Set the workplane to Ref. Level. Place two orthogonal vertical reference planes and constrain them to existing geometry. We are going to use a vertical corner edge of the door to rotate the door about, so define the hinge point to coincide with the door side offset.

A variable is assigned to the door panel side offset.

Defining a Door Hinge 01

The door hinge side offset is assigned a calculated variable:
(dh_so) = (dj1_m_w) – (dj1_r_w) + (dp_so)

Defining a Door Hinge 02

Create and name the reference plane. Assign (dh_so) as a label to the defining dimension

Defining a Door Hinge 03

The door hinge face offset is assigned a calculated variable:
(dh_fo) = (dj1_m_d)

Defining a Door Hinge 04

Create the second vertical hinge plane orthogonal to the first and assign (dh_fo) as a label to the defining dimension

Defining a Door Hinge 05

The hinge position is now flexing with the door. A reference line is drawn and constrained as follows (it will eventually coincide with the interior face of the door panel)

Defining a Door Hinge 06

Create a locked parameter of zero length.

Defining a Door Hinge 07

Create an aligned linear dimension from the endpoint of the reference line closest to the hinge point. During the dimension command, when selecting the endpoint, hover over it and press Tab repeatedly until a point is obtained to snap to

Defining a Door Hinge 08

, then select one of the hinge axes to dimension to. Assign the zero length parameter to it. Notice that the dimension does not update to this zero value. We will fix this shortly. Create another dimension orthogonal to the first and also assign the zero length parameter to it. Again note that it does not update automatically to zero value.

Defining a Door Hinge 09

Open the <Modify><Properties><Family Types> dialogue and click apply to finally update the dimensions to their correct zero value.

Defining a Door Hinge 10

Now the dimensions have been updated, as shown below.

Defining a Door Hinge 11

Define a door opening angle parameter.

Defining a Door Hinge 12

Assign the Door Opening Parameter to the reference line using an angular dimension. Define it an instance parameter so that each door instance is be opened and closed individually. <Annotate><Dimension><Angular>

Defining a Door Hinge 13

Were the door panel extruded (the extrusion profile constrained to the rotatable reference line), the door would be functional. However, if one were to import a door panel as a family and then try to constrain it one would run into trouble. A simple extrusion would never suffice were an interior decorator to model custom doors to show his clients! We will investigate both these cases.