3D Sketch is used to edit a family or create a 3D object. In the Revit Platform API, you can complete the 3D Sketch using the following classes.
In other words, there are four operations through which a 2D model turns into a 3D model. For more details about sketching in 2D, refer to 2D Sketch.
Revit uses extrusions to define 3D geometry for families. You create an extrusion by defining a 2D sketch on a plane; Revit then extrudes the sketch between a start and an end point.
Query the Extrusion Form object for a generic form to use in family modeling and massing. The Extrusion class has the following properties:
Table 40: Extrusion Properties
Property |
Description |
ExtrusionStart |
Returns the Extrusion Start point. It is a Double type. |
ExtrusionEnd |
Returns the Extrusion End point. It is a Double type. |
Sketch |
Returns the Extrusion Sketch. It contains a sketch plane and some curves. |
Figure 81: Extrusion result
The Revolve command creates geometry that revolves around an axis. You can use the revolve command to create door knobs or other knobs on furniture, a dome roof, or columns.
Query the Revolution Form object for a generic form to use in family modeling and massing. The Revolution class has the following properties:
Table 41: Revolution Properties
Property |
Description |
Axis |
Returns the Axis. It is a ModelLine object. |
EndAngle |
Returns the End Angle. It is a Double type. |
Sketch |
Returns the Extrusion Sketch. It contains a SketchPlane and some curves. |
EndAngle is consistent with the same parameter in the Revit UI. The following pictures illustrate the Revolution corresponding parameter, the sketch, and the result.
Figure 82: Corresponding parameter
Figure 83: Revolution sketch
Figure 84: Revolution result
The Blend command blends two profiles together. For example, if you sketch a large rectangle and a smaller rectangle on top of it, Revit blends the two shapes together.
Query the Blend Form object for a generic form to use in family modeling and massing. The Blend class has the following properties:
Table 42: Blend Properties
Property |
Description |
BottomSketch |
Returns the Bottom Sketch. It is a Sketch object. |
TopSketch |
Returns the Top Sketch Blend. It is a Sketch object. |
FirstEnd |
Returns the First End. It is a Double type. |
SecondEnd |
Returns the Second End. It is a Double type. |
The FirstEnd and SecondEnd property values are consistent with the same parameters in the Revit UI. The following pictures illustrate the Blend corresponding parameters, the sketches, and the result.
Figure 85: Blend parameters in the UI
Figure 86: Blend top sketch and bottom sketch
Figure 87: Blend result
The Sweep command sweeps one profile along a created 2D path or selected 3D path. The path may be an open or closed loop, but must pierce the profile plane.
Query the Sweep Form object for a generic form for use in family modeling and massing. The Sweep class has the following properties:
Table 43: Sweep Properties
Property |
Description |
Path3d |
Returns the 3D Path Sketch. It is a Path3D object. |
PathSketch |
Returns the Plan Path Sketch. It is a Sketch object. |
ProfileSketch |
Returns the profile Sketch. It is a Sketch object. |
EnableTrajSegmentation |
Returns the Trajectory Segmentation state. It is a Boolean. |
MaxSegmentAngle |
Returns the Maximum Segment Angle. It is a Double type. |
Creating a 2D Path is similar to other forms. The 3D Path is fetched by picking the created 3D curves.
Figure 88: Pick the Sweep 3D path
Figure 89: Sweep profile sketch
Segmented sweeps are useful for creating mechanical duct work elbows. Create a segmented sweep by setting two sweep parameters and sketching a path with arcs.
Figure 90: Corresponding segment settings in the UI
Figure 91: Sweep result