Intersection and Trim
Last updated
Last updated
Many of the examples so far have focused on the construction of higher dimensional geometry from lower dimensional objects. Intersection methods allow this higher dimensional geometry to generate lower dimensional objects, while the trim and select trim commands allow script to heavily modify geometric forms after they’ve been created.
The Intersect method is defined on all pieces of geometry in Dynamo, meaning that in theory any piece of geometry can be intersected with any other piece of geometry. Naturally some intersections are meaningless, such as intersections involving Points, as the resulting object will always be the input Point itself. The other possible combinations of intersections between objects are outlined in the following chart. The following chart outlines the result of various intersection operations:
The following very simple example demonstrates the intersection of a plane with a NurbsSurface. The intersection generates a NurbsCurve array, which can be used like any other NurbsCurve.
The Trim method is very similar to the Intersect method, in that it is defined for almost every piece of geometry. However, there are far more limitations on Trim than on Intersect.
Something to note about Trim methods is the requirement of a “select” point, a point which determines which geometry to discard, and which pieces to keep. Dynamo finds and discards the trimmed geometry closest to the select point.
Using: Point
Curve
Plane
Surface
Solid
On: Curve
Yes
No
No
No
No
Polygon
-
No
Yes
No
No
Surface
-
Yes
Yes
Yes
Yes
Solid
-
-
Yes
Yes
Yes
With:
Surface
Curve
Plane
Solid
Surface
Curve
Point
Point, Curve
Surface
Curve
Point
Point
Point
Curve
Plane
Curve
Point
Curve
Curve
Solid
Surface
Curve
Curve
Solid