RhinoCompute.SubD

RhinoCompute.SubD.joinSubDs(subdsToJoin, tolerance, joinedEdgesAreCreases, multiple=false)

Joins an enumeration of SubDs to form as few as possible resulting SubDs. There may be more than one SubD in the result array.

Arguments:
  • subdsToJoin (IEnumerable<SubD>) – An enumeration of SubDs to join.
  • tolerance (float) – The join tolerance.
  • joinedEdgesAreCreases (bool) – If true, merged boundary edges will be creases. If false, merged boundary edges will be smooth.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Return type:

SubD[]

RhinoCompute.SubD.toBrep(thisSubD, options, multiple=false)

Create a Brep based on this SubD geometry.

Arguments:
  • options (SubDToBrepOptions) – The SubD to Brep conversion options. Use SubDToBrepOptions.Default for sensible defaults. Currently, these return unpacked faces and locally-G1 vertices in the output Brep.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

A new Brep if successful, or None on failure.

Return type:

rhino3dm.Brep

RhinoCompute.SubD.toBrep1(thisSubD, multiple=false)

Create a Brep based on this SubD geometry, based on SubDToBrepOptions.Default options.

Arguments:
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

A new Brep if successful, or None on failure.

Return type:

rhino3dm.Brep

RhinoCompute.SubD.createFromMesh(mesh, multiple=false)

Create a new SubD from a mesh.

Arguments:
  • mesh (rhino3dm.Mesh) – The input mesh.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

A new SubD if successful, or None on failure.

Return type:

SubD

RhinoCompute.SubD.createFromMesh1(mesh, options, multiple=false)

Create a new SubD from a mesh.

Arguments:
  • mesh (rhino3dm.Mesh) – The input mesh.
  • options (SubDCreationOptions) – The SubD creation options.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

A new SubD if successful, or None on failure.

Return type:

SubD

RhinoCompute.SubD.createFromSurface(surface, method, corners, multiple=false)

Create a SubD that approximates the surface. If the surface is a SubD friendly NURBS surface and withCorners is true, then the SubD and input surface will have the same geometry.

Arguments:
  • method (SubDFromSurfaceMethods) – Selects the method used to calculate the SubD.
  • corners (bool) – If the surface is open, then the corner vertices with be tagged as VertexTagCorner. This makes the resulting SubD have sharp corners to match the appearance of the input surface.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Return type:

SubD

RhinoCompute.SubD.offset(thisSubD, distance, solidify, multiple=false)

Makes a new SubD with vertices offset at distance in the direction of the control net vertex normals. Optionally, based on the value of solidify, adds the input SubD and a ribbon of faces along any naked edges.

Arguments:
  • distance (float) – The distance to offset.
  • solidify (bool) – True if the output SubD should be turned into a closed SubD.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

A new SubD if successful, or None on failure.

Return type:

SubD

RhinoCompute.SubD.createFromLoft(curves, closed, addCorners, addCreases, divisions, multiple=false)

Creates a SubD lofted through shape curves.

Arguments:
  • curves (list[rhino3dm.NurbsCurve]) – An enumeration of SubD-friendly NURBS curves to loft through.
  • closed (bool) – Creates a SubD that is closed in the lofting direction. Must have three or more shape curves.
  • addCorners (bool) – With open curves, adds creased vertices to the SubD at both ends of the first and last curves.
  • addCreases (bool) – With kinked curves, adds creased edges to the SubD along the kinks.
  • divisions (int) – The segment number between adjacent input curves.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

A new SubD if successful, or None on failure.

Return type:

SubD

RhinoCompute.SubD.createFromSweep(rail1, shapes, closed, addCorners, roadlikeFrame, roadlikeNormal, multiple=false)

Fits a SubD through a series of profile curves that define the SubD cross-sections and one curve that defines a SubD edge.

Arguments:
  • rail1 (rhino3dm.NurbsCurve) – A SubD-friendly NURBS curve to sweep along.
  • shapes (list[rhino3dm.NurbsCurve]) – An enumeration of SubD-friendly NURBS curves to sweep through.
  • closed (bool) – Creates a SubD that is closed in the rail curve direction.
  • addCorners (bool) – With open curves, adds creased vertices to the SubD at both ends of the first and last curves.
  • roadlikeFrame (bool) – Determines how sweep frame rotations are calculated. If False (Freeform), frame are propogated based on a refrence direction taken from the rail curve curvature direction. If True (Roadlike), frame rotations are calculated based on a vector supplied in “roadlikeNormal” and the world coordinate system.
  • roadlikeNormal (rhino3dm.Vector3d) – If roadlikeFrame = true, provide 3D vector used to calculate the frame rotations for sweep shapes. If roadlikeFrame = false, then pass .
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

A new SubD if successful, or None on failure.

Return type:

SubD

RhinoCompute.SubD.createFromSweep1(rail1, rail2, shapes, closed, addCorners, multiple=false)

Fits a SubD through a series of profile curves that define the SubD cross-sections and two curves that defines SubD edges.

Arguments:
  • rail1 (rhino3dm.NurbsCurve) – The first SubD-friendly NURBS curve to sweep along.
  • rail2 (rhino3dm.NurbsCurve) – The second SubD-friendly NURBS curve to sweep along.
  • shapes (list[rhino3dm.NurbsCurve]) – An enumeration of SubD-friendly NURBS curves to sweep through.
  • closed (bool) – Creates a SubD that is closed in the rail curve direction.
  • addCorners (bool) – With open curves, adds creased vertices to the SubD at both ends of the first and last curves.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

A new SubD if successful, or None on failure.

Return type:

SubD

RhinoCompute.SubD.mergeAllCoplanarFaces(thisSubD, tolerance, multiple=false)

Merges adjacent coplanar faces into single faces.

Arguments:
  • tolerance (float) – Tolerance for determining when edges are adjacent. When in doubt, use the document’s ModelAbsoluteTolerance property.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

True if faces were merged, False if no faces were merged.

Return type:

bool

RhinoCompute.SubD.mergeAllCoplanarFaces1(thisSubD, tolerance, angleTolerance, multiple=false)

Merges adjacent coplanar faces into single faces.

Arguments:
  • tolerance (float) – Tolerance for determining when edges are adjacent. When in doubt, use the document’s ModelAbsoluteTolerance property.
  • angleTolerance (float) – Angle tolerance, in radians, for determining when faces are parallel. When in doubt, use the document’s ModelAngleToleranceRadians property.
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns:

True if faces were merged, False if no faces were merged.

Return type:

bool

RhinoCompute.SubD.interpolateSurfacePoints(thisSubD, surfacePoints, multiple=false)

Modifies the SubD so that the SubD vertex limit surface points are equal to surface_points[]

Arguments:
  • surfacePoints (rhino3dm.Point3d[]) – point for limit surface to interpolate. surface_points[i] is the location for the i-th vertex returned by SubVertexIterator vit(this)
  • multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Return type:

bool