[Serializable] public class SubD : GeometryBase
Subdivision surface

Constructors

SubD

#Since v7.0
public SubD()
Create a new instance of SubD geometry

SubD

#
protected SubD(SerializationInfo info, StreamingContext context)
Protected constructor used in serialization.
info (SerializationInfo)
context (StreamingContext)

Properties

Disposed

public bool Disposed { get; }
Indicates if this object has been disposed or the document it originally belonged to has been disposed.
inherited fromCommonObject

Edges

#Since v7.0
public SubDEdgeList Edges { get; }
All edges in this SubD

Empty

#Since v7.18
public static SubD Empty { get; }
Get a new, empty SubD object.

ErrorCount

#Since v8.36
[CLSCompliant(false)] public static uint ErrorCount { get; }
The number of errors the SubD code has trapped since the process started.

This is a diagnostic counter, not a per-SubD property. Sample it before and after an operation to find out whether that operation hit an internal error, which usually means the SubD is not valid.

Faces

#Since v7.0
public SubDFaceList Faces { get; }
All faces in this SubD

HasBrepForm

public bool HasBrepForm { get; }
Returns true if the Brep.TryConvertBrep function will be successful for this object
inherited fromGeometryBase

HasUserData

public bool HasUserData { get; }
Gets true if this class has any custom information attached to it through UserData.
inherited fromCommonObject

IsDeformable

public bool IsDeformable { get; }
true if object can be accurately modified with "squishy" transformations like projections, shears, and non-uniform scaling.
inherited fromGeometryBase

IsDocumentControlled

public sealed override bool IsDocumentControlled { get; }
If true this object may not be modified. Any properties or functions that attempt to modify this object when it is set to "IsReadOnly" will throw a NotSupportedException.
inherited fromGeometryBase

IsShallowDuplicate

public bool IsShallowDuplicate { get; }
Is this instance a 'shallow copy'. Shallow copies are no different than regular instances with the exception that they will convert to complete independent 'deep' copies if a non const operation is perform on the instance (something that mutates the internal data)
inherited fromGeometryBase

IsSolid

#Since v7.0
public bool IsSolid { get; }
Test SubD to see if the active level is a solid. A "solid" is a closed oriented manifold, or a closed oriented manifold.

IsValid

public virtual bool IsValid { get; }
Tests an object to see if it is valid.
inherited fromCommonObject

ObjectType

[CLSCompliant(false)] public ObjectType ObjectType { get; }
Useful for switch statements that need to differentiate between basic object types like points, curves, surfaces, and so on.
inherited fromGeometryBase

TextureCoordinateType

#Since v8.28
public SubDTextureCoordinateType TextureCoordinateType { get; }
Gets the texture cordinate type.

UserData

public UserDataList UserData { get; }
List of custom information that is attached to this class.
inherited fromCommonObject

UserDictionary

public ArchivableDictionary UserDictionary { get; }
Dictionary of custom information attached to this class. The dictionary is actually user data provided as an easy to use shareable set of information.
inherited fromCommonObject

UserStringCount

public int UserStringCount { get; }
Gets the amount of user strings.
inherited fromGeometryBase

Vertices

#Since v7.0
public SubDVertexList Vertices { get; }
All vertices in this SubD

Methods

ClearEdgeSharpness

#Since v8.36
[CLSCompliant(false)] public uint ClearEdgeSharpness()
Converts every sharp edge in this SubD to a smooth edge.
The number of edges that were changed.

ClearEvaluationCache

#Since v7.0
public void ClearEvaluationCache()
Clear all cached evaluation information (meshes, surface points, bounding boxes, ...) that depends on edge tags, vertex tags, and the location of vertex control points.

ClosestPoint

#Since v9.0
[ConstOperation] public bool ClosestPoint(Point3d testPoint, out Point3d closestPoint, out SubDComponentParameter parameter, double maximumDistance)
Gets the point on this SubD's surface that is closest to a test point.
testPoint (Point3d)The point to project onto this SubD.
closestPoint (out Point3d)The closest point is returned here, or Point3d.Unset if this fails.
parameter (out SubDComponentParameter)The parameter of the closest point is returned here, or SubDComponentParameter.Unset if this fails.
maximumDistance (double)If larger than 0 and the distance from testPoint to this SubD is larger than this, then false is returned. Otherwise this is ignored.
True if a closest point was found.

ClosestPoint

#Since v9.0
[ConstOperation] public bool ClosestPoint(Point3d testPoint, out Point3d closestPoint, out SubDComponentParameter parameter)
Gets the point on this SubD's surface that is closest to a test point.
Remarks: The search is refined on the surface itself, so the result is not limited to the surface mesh. The one exception is the corner of an extraordinary vertex, where the surface derivatives needed to refine are not available; there the result is the closest surface mesh point, so its accuracy is the accuracy of the surface mesh. Call UpdateSurfaceMeshCache(bool) first if you need more accuracy near extraordinary vertices.
testPoint (Point3d)The point to project onto this SubD.
closestPoint (out Point3d)The closest point is returned here, or Point3d.Unset if this fails.
parameter (out SubDComponentParameter)The parameter of the closest point is returned here, or SubDComponentParameter.Unset if this fails. Evaluating it with Evaluate(SubDComponentParameter, Point3d) returns closestPoint.
True if a closest point was found.

ClosestPoint

#Since v9.0
[ConstOperation] public Point3d ClosestPoint(Point3d testPoint)
Gets the point on this SubD's surface that is closest to a test point.
testPoint (Point3d)The point to project onto this SubD.
The closest point, or Point3d.Unset if none was found.

ClosestPoints

#Since v9.0
[ConstOperation] public int ClosestPoints(IEnumerable<Point3d> testPoints, out Point3d[] closestPoints, out SubDComponentParameter[] parameters, double maximumDistance)
Gets the points on this SubD's surface that are closest to each of a list of test points. This is faster than calling ClosestPoint(Point3d, Point3d, SubDComponentParameter) in a loop because the spatial index over the surface is built once.
testPoints (IEnumerable<Point3d>)The points to project onto this SubD.
closestPoints (out Point3d[])One point per test point. Entries where no closest point was found are Point3d.Unset.
parameters (out SubDComponentParameter[])One parameter per test point. Entries where no closest point was found are SubDComponentParameter.Unset.
maximumDistance (double)If larger than 0, test points farther than this from the SubD get no closest point. Otherwise this is ignored.
The number of closest points that were found.

ComponentFromComponentIndex

#Since v7.6
public SubDComponent ComponentFromComponentIndex(ComponentIndex componentIndex)
Returns a SubDComponent, either a SubDEdge, SubDFace, or SubDVertex, from a component index.
componentIndex (ComponentIndex)The component index.
The SubDComponent if successful, null otherwise.

ComponentIndex

[ConstOperation] public ComponentIndex ComponentIndex()
If this piece of geometry is a component in something larger, like a BrepEdge in a Brep, then this function returns the component index.
inherited fromGeometryBase
This object's component index. If this object is not a sub-piece of a larger geometric entity, then the returned index has m_type = ComponentIndex.InvalidType and m_index = -1.

ConstructConstObject

protected void ConstructConstObject(object parentObject, int subobjectIndex)
Assigns a parent object and a sub-object index to this.
inherited fromCommonObject
parentObject (object)The parent object.
subobjectIndex (int)The sub-object index.

CopyEvaluationCache

#Since v8.8
public bool CopyEvaluationCache(in SubD src)
Expert function that copies cached evaluations of component subdivision points and limit surface information from src to this. Typically this is done for performance critical situations like control point editing: - Copy a SubD to be modified (this does not copy the evaluation cache) - Copy the evaluation cache from the unmodified SubD - Modify the SubD copy - Update the surface mesh cache so that only the modified parts are recalculated - Display, meshing, bounding boxes on the modified SubD are now available
src (in SubD)The SubD from which to copy cached evaluations
True if the cache was fully copied, false otherwise

CreateFromCylinder

#Since v7.6
[CLSCompliant(false)] public static SubD CreateFromCylinder(Cylinder cylinder, uint circumferenceFaceCount, uint heightFaceCount, SubDEndCapStyle endCapStyle, SubDEdgeTag endCapEdgeTag, SubDComponentLocation radiusLocation)
Creates a SubD form of a cylinder.
cylinder (Cylinder)The defining cylinder.
circumferenceFaceCount (uint)Number of faces around the cylinder.
heightFaceCount (uint)Number of faces in the top-to-bottom direction.
endCapStyle (SubDEndCapStyle)The end cap style.
endCapEdgeTag (SubDEdgeTag)The end cap edge tag.
radiusLocation (SubDComponentLocation)The SubD component location.
A new SubD if successful, or null on failure.

CreateFromLoft

#Since v7.0
public static SubD CreateFromLoft(IEnumerable<NurbsCurve> curves, bool closed, bool addCorners, bool addCreases, int divisions)
Creates a SubD lofted through shape curves.
Remarks: Shape curves must be in the proper order and orientation and have point counts for the desired surface. Shape curves must be either all open or all closed.
curves (IEnumerable<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.
A new SubD if successful, or null on failure.

CreateFromMesh

#Since v7.0
public static SubD CreateFromMesh(Mesh mesh, SubDCreationOptions options)
Create a new SubD from a mesh.
mesh (Mesh)The input mesh.
options (SubDCreationOptions)The SubD creation options.
A new SubD if successful, or null on failure.

CreateFromMesh

#Since v7.0
public static SubD CreateFromMesh(Mesh mesh)
Create a new SubD from a mesh.
mesh (Mesh)The input mesh.
A new SubD if successful, or null on failure.

CreateFromSurface

#Since v7.9
public static SubD CreateFromSurface(Surface surface, SubDFromSurfaceMethods method, bool corners)
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.
surface (Surface)
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.

CreateFromSweep

#Since v7.0
public static SubD CreateFromSweep(NurbsCurve rail1, IEnumerable<NurbsCurve> shapes, bool closed, bool addCorners, bool roadlikeFrame, Vector3d roadlikeNormal)
Fits a SubD through a series of profile curves that define the SubD cross-sections and one curve that defines a SubD edge.
Remarks: Shape curves must be in the proper order and orientation. Shape curves must have the same point counts and rail curves must have the same point counts. Shape curves will relocated to the nearest pair of Greville points on the rails. Shape curves will be made at each pair of rail edit points where there isn't an input shape.
rail1 (NurbsCurve)A SubD-friendly NURBS curve to sweep along.
shapes (IEnumerable<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 propagated based on a reference 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 (Vector3d)If roadlikeFrame = true, provide 3D vector used to calculate the frame rotations for sweep shapes. If roadlikeFrame = false, then pass Vector3d.Unset.
A new SubD if successful, or null on failure.

CreateFromSweep

#Since v7.0
public static SubD CreateFromSweep(NurbsCurve rail1, NurbsCurve rail2, IEnumerable<NurbsCurve> shapes, bool closed, bool addCorners)
Fits a SubD through a series of profile curves that define the SubD cross-sections and two curves that defines SubD edges.
Remarks: Shape curves must be in the proper order and orientation. Shape curves must have the same point counts and rail curves must have the same point counts. Shape curves will relocated to the nearest pair of Greville points on the rails. Shape curves will be made at each pair of rail edit points where there isn't an input shape.
rail1 (NurbsCurve)The first SubD-friendly NURBS curve to sweep along.
rail2 (NurbsCurve)The second SubD-friendly NURBS curve to sweep along.
shapes (IEnumerable<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.
A new SubD if successful, or null on failure.

CreateGlobeSphere

#Since v8.4
[CLSCompliant(false)] public static SubD CreateGlobeSphere(Sphere sphere, SubDComponentLocation vertexLocation, uint axialFaceCount, uint equatorialFaceCount)
Creates a SubD sphere made from polar triangle fans and bands of quads. The result resembles a globe with triangle fans at the poles and the edges forming latitude parallels and longitude meridians.
sphere (Sphere)Location, size and orientation of the sphere.
vertexLocation (SubDComponentLocation)If vertexLocation = SubDComponentLocation::ControlNet, then the control net points will be on the surface of the sphere. Otherwise the limit surface points will be on the sphere.
axialFaceCount (uint)Number of faces along the sphere's meridians. (axialFaceCount >= 2) For example, if you wanted each face to span 30 degrees of latitude, you would pass 6 (=180 degrees/30 degrees) for axialFaceCount.
equatorialFaceCount (uint)Number of faces around the sphere's parallels. (equatorialFaceCount >= 3) For example, if you wanted each face to span 30 degrees of longitude, you would pass 12 (=360 degrees/30 degrees) for equatorialFaceCount.
If the input parameters are valid, a SubD globe sphere is returned. Otherwise null is returned.

CreateIcosahedron

#Since v8.4
[CLSCompliant(false)] public static SubD CreateIcosahedron(Sphere sphere, SubDComponentLocation vertexLocation)
Creates a SubD sphere based on an icosohedron (20 triangular faces and 5 valent vertices). This is a goofy topology for a Catmull-Clark subdivision surface (all triangles, all vertices have 5 edges). You may want to consider using the much behaved result from CreateSubDQuadSphere(sphere, vertexLocation, 1) or even the result from CreateSubDGlobeSphere().
sphere (Sphere)Location, size and orientation of the sphere.
vertexLocation (SubDComponentLocation)If vertexLocation = SubDComponentLocation::ControlNet, then the control net points will be on the surface of the sphere. Otherwise the limit surface points will be on the sphere.
If the input parameters are valid, a SubD icosahedron is returned. Otherwise null is returned.

CreateQuadSphere

#Since v8.4
[CLSCompliant(false)] public static SubD CreateQuadSphere(Sphere sphere, SubDComponentLocation vertexLocation, uint quadSubdivisionLevel)
Creates a SubD sphere made from quad faces.
sphere (Sphere)Location, size and orientation of the sphere.
vertexLocation (SubDComponentLocation)If vertexLocation = SubDComponentLocation::ControlNet, then the control net points will be on the surface of the sphere. Otherwise the limit surface points will be on the sphere.
quadSubdivisionLevel (uint)The resulting sphere will have 6*4^subdivision level quads. (0 for 6 quads, 1 for 24 quads, 2 for 96 quads, ...).
If the input parameters are valid, a SubD quad sphere is returned. Otherwise null is returned.

CreateSubDBox

#Since v8.36
[CLSCompliant(false)] public static SubD CreateSubDBox(Box box, double edgeSharpness, uint faceCountX, uint faceCountY, uint faceCountZ)
Creates a SubD box from a Box.
box (Box)The box to build from. It must be valid.
edgeSharpness (double)The sharpness to give the edges where box sides meet. See CreateSubDBox(IEnumerable<Point3d>, double, uint, uint, uint).
faceCountX (uint)Number of faces in the box X direction.
faceCountY (uint)Number of faces in the box Y direction.
faceCountZ (uint)Number of faces in the box Z direction.
A new SubD box, or null if the input is not valid.

CreateSubDBox

#Since v8.36
[CLSCompliant(false)] public static SubD CreateSubDBox(IEnumerable<Point3d> corners, double edgeSharpness, uint faceCountX, uint faceCountY, uint faceCountZ)
Creates a SubD box.
corners (IEnumerable<Point3d>)The eight box corners. The first four are the bottom face, in order around it, and the last four are the top face, in the same order.
edgeSharpness (double)The sharpness to give the edges where box sides meet. SubDEdgeSharpness.SmoothValue leaves them smooth and SubDEdgeSharpness.CreaseValue makes them creases.
faceCountX (uint)Number of faces along the first bottom edge.
faceCountY (uint)Number of faces along the second bottom edge.
faceCountZ (uint)Number of faces from the bottom face to the top face.
A new SubD box, or null if the input is not valid.

CreateTriSphere

#Since v8.4
[CLSCompliant(false)] public static SubD CreateTriSphere(Sphere sphere, SubDComponentLocation vertexLocation, uint triSubdivisionLevel)
Creates a SubD sphere made from triangular faces. This is a goofy topology for a Catmull-Clark subdivision surface (all triangles and all vertices have 5 or 6 edges). You may want to consider using the much behaved result from CreateSubDQuadSphere() or even the result from CreateSubDGlobeSphere().
sphere (Sphere)Location, size and orientation of the sphere.
vertexLocation (SubDComponentLocation)If vertexLocation = SubDComponentLocation::ControlNet, then the control net points will be on the surface of the sphere. Otherwise the limit surface points will be on the sphere.
triSubdivisionLevel (uint)The resulting sphere will have 20*4^subdivision level triangles. (0 for 20 triangles, 1 for 80 triangles, 2 for 320 triangles, ...).
If the input parameters are valid, a SubD tri sphere is returned. Otherwise null is returned.

DataCRC

[CLSCompliant(false)] public uint DataCRC(uint currentRemainder)
Returns a CRC calculated from the information that defines the object. This CRC can be used as a quick way to see if two objects are not identical.
inherited fromGeometryBase
currentRemainder (uint)The current remainder value.
CRC of the information the defines the object.

DeleteAllUserStrings

public void DeleteAllUserStrings()
inherited fromGeometryBase

DeleteComponents

#Since v8.36
public bool DeleteComponents(IEnumerable<ComponentIndex> componentIndices, bool markDeletedFaceEdges)
Deletes components from this SubD, identified by component index.
componentIndices (IEnumerable<ComponentIndex>)The component indices to delete.
markDeletedFaceEdges (bool)If true, edges that survive the deletion of a face they bounded get their runtime mark set.
True if the deletion succeeded.

DeleteComponents

#Since v8.36
public bool DeleteComponents(IEnumerable<SubDComponent> components, bool markDeletedFaceEdges)
Deletes components from this SubD.

Deleting a vertex deletes every edge and face attached to it. Deleting an edge deletes every face attached to it. Deleting a face deletes only that face.

components (IEnumerable<SubDComponent>)The components to delete.
markDeletedFaceEdges (bool)If true, edges that survive the deletion of a face they bounded get their runtime mark set, so the caller can find the boundary of the hole that was opened.
True if the deletion succeeded.

DeleteComponents

#Since v8.36
public bool DeleteComponents(IEnumerable<SubDComponent> components)
Deletes components from this SubD, leaving the edges that bounded any deleted face unmarked. See DeleteComponents(IEnumerable<SubDComponent>, bool).
components (IEnumerable<SubDComponent>)The components to delete.
True if the deletion succeeded.

DeleteUserString

public bool DeleteUserString(string key)
inherited fromGeometryBase
key (string)

Dispose

public void Dispose()
Actively reclaims unmanaged resources that this instance uses.
inherited fromCommonObject

Dispose

#
protected override void Dispose(bool disposing)
Deletes the underlying native pointer during a Dispose call or GC collection
disposing (bool)

DissolveOrDeleteComponents

#Since v8.36
[CLSCompliant(false)] public uint DissolveOrDeleteComponents(IEnumerable<ComponentIndex> componentIndices)
Dissolves or deletes components, identified by component index. See DissolveOrDeleteComponents(IEnumerable<SubDComponent>).
componentIndices (IEnumerable<ComponentIndex>)The component indices to dissolve or delete.
The number of merged faces created by dissolving edges and vertices.

DissolveOrDeleteComponents

#Since v8.36
[CLSCompliant(false)] public uint DissolveOrDeleteComponents(IEnumerable<SubDComponent> components)
Dissolves the given edges and vertices, merging the faces around them, and deletes the given faces.

This is the difference between removing an edge between two quads to get one bigger face, and removing the two quads to leave a hole. Use DeleteComponents(IEnumerable<SubDComponent>, bool) when a hole is what you want.

components (IEnumerable<SubDComponent>)The vertices, edges and faces to dissolve or delete.
The number of merged faces created by dissolving edges and vertices.

Duplicate

public virtual GeometryBase Duplicate()
Constructs a deep (full) copy of this object.
inherited fromGeometryBase
An object of the same type as this, with the same properties and behavior.

DuplicateEdgeCurves

#Since v8.7
[ConstOperation] public Curve[] DuplicateEdgeCurves()
Gets Nurbs form of all edges in this SubD, with clamped knots. NB: Does not update the SubD evaluation cache before getting the edges.
An array of edge curves.

DuplicateEdgeCurves

#Since v8.7
public Curve[] DuplicateEdgeCurves(bool boundaryOnly, bool interiorOnly, bool smoothOnly, bool sharpOnly, bool creaseOnly, bool clampEnds)
Gets Nurbs form of edges in this SubD. NB: Does not update the SubD evaluation cache before getting the edges.
boundaryOnly (bool)If true, then only the boundary edges are duplicated. If false, then all edges are duplicated. If both boundaryOnly and interiorOnly are true, an empty array is returned.
interiorOnly (bool)If true, then only the interior edges are duplicated. If false, then all edges are duplicated. Note: interior edges with faces of different orientations are also returned. If both boundaryOnly and interiorOnly are true, an empty array is returned.
smoothOnly (bool)If true, then only the smooth (and not sharp) edges are duplicated. If false, then all edges are duplicated. If both smoothOnly and sharpOnly and creaseOnly are true, an empty array is returned.
sharpOnly (bool)If true, then only the sharp edges are duplicated. If false, then all edges are duplicated. If both smoothOnly and sharpOnly and creaseOnly are true, an empty array is returned.
creaseOnly (bool)If true, then only the creased edges are duplicated. If false, then all edges are duplicated. If both smoothOnly and sharpOnly and creaseOnly are true, an empty array is returned.
clampEnds (bool)If true, the end knots are clamped. Otherwise the end knots are(-2,-1,0,...., k1, k1+1, k1+2).
Array of edge curves on success.

DuplicateShallow

public GeometryBase DuplicateShallow()
Constructs a light copy of this object. By "light", it is meant that the same underlying data is used until something is done to attempt to change it. For example, you could have a shallow copy of a very heavy mesh object and the same underlying data will be used when doing things like inspecting the number of faces on the mesh. If you modify the location of one of the mesh vertices, the shallow copy will create a full duplicate of the underlying mesh data and the shallow copy will become a deep copy.
inherited fromGeometryBase
An object of the same type as this object.

This behavior is overridden by implementing classes.

EnsurePrivateCopy

public void EnsurePrivateCopy()
If you want to keep a copy of this class around by holding onto it in a variable after a command completes, call EnsurePrivateCopy to make sure that this class is not tied to the document. You can call this function as many times as you want.
inherited fromCommonObject

Evaluate

#Since v9.0
[ConstOperation] public bool Evaluate(SubDComponentParameter parameter, out Point3d point, out Vector3d ds, out Vector3d dt, out Vector3d normal)
Evaluates the location, first derivatives and unit normal of a point on this SubD's surface.
parameter (SubDComponentParameter)The parameter to evaluate.
point (out Point3d)The surface point is returned here, or Point3d.Unset if this fails.
ds (out Vector3d)The first derivative in the direction of the first face corner parameter is returned here.
dt (out Vector3d)The first derivative in the direction of the second face corner parameter is returned here.
normal (out Vector3d)The unit surface normal is returned here. It is parallel to the cross product of ds and dt.
True if the evaluation succeeded.

Evaluate

#Since v9.0
[ConstOperation] public bool Evaluate(SubDComponentParameter parameter, out Point3d point, out Vector3d normal)
Evaluates the location and unit normal of a point on this SubD's surface.
Remarks: The surface derivatives this needs are not available in the corner of an extraordinary vertex unless the parameter is exactly at the vertex, at the midpoint of one of its edges, or at the center of the face.
parameter (SubDComponentParameter)The parameter to evaluate.
point (out Point3d)The surface point is returned here, or Point3d.Unset if this fails.
normal (out Vector3d)The unit surface normal is returned here, or Vector3d.Unset if this fails.
True if the evaluation succeeded.

Evaluate

#Since v9.0
[ConstOperation] public bool Evaluate(SubDComponentParameter parameter, out Point3d point)
Evaluates the location of a point on this SubD's surface.
parameter (SubDComponentParameter)The parameter to evaluate.
point (out Point3d)The surface point is returned here, or Point3d.Unset if this fails.
True if the evaluation succeeded.

EvaluateCurvature

#Since v9.0
[ConstOperation] public bool EvaluateCurvature(SubDComponentParameter parameter, ExtraordinaryVertexCurvature extraordinaryVertexCurvature, out SurfaceCurvature curvature)
Evaluates the curvature of a point on this SubD's surface, choosing what to report exactly on an extraordinary vertex.
parameter (SubDComponentParameter)The parameter to evaluate.
extraordinaryVertexCurvature (SubD.ExtraordinaryVertexCurvature)What to report when the parameter is exactly on an extraordinary vertex, where the limit surface has no curvature of its own.
curvature (out SurfaceCurvature)The surface curvature is returned here, or null if this fails.
True if the evaluation succeeded.

EvaluateCurvature

#Since v9.0
[ConstOperation] public bool EvaluateCurvature(SubDComponentParameter parameter, out Point3d point, out Vector3d normal, out double kappa1, out double kappa2)
Evaluates the principal curvatures of a point on this SubD's surface.
Remarks: This needs second order surface derivatives. They are available throughout the corner quad of an extraordinary vertex, but not exactly on such a vertex: a SubD limit surface is C1 there but generally not C2, so it has no curvature. This returns false in that case, and kappa1 and kappa2 are double.NaN.
parameter (SubDComponentParameter)The parameter to evaluate.
point (out Point3d)The surface point is returned here, or Point3d.Unset if this fails.
normal (out Vector3d)The unit surface normal is returned here.
kappa1 (out double)The largest principal curvature, in absolute value, is returned here.
kappa2 (out double)The smallest principal curvature, in absolute value, is returned here.
True if the evaluation succeeded.

EvaluateCurvature

#Since v9.0
[ConstOperation] public bool EvaluateCurvature(SubDComponentParameter parameter, out SurfaceCurvature curvature)
Evaluates the curvature of a point on this SubD's surface.
Remarks: Unlike the overload that returns the two principal curvature values, this one also reports their directions. See SurfaceCurvature.CreateFromSubD(SubD, SubDComponentParameter) for when the curvature exists.
parameter (SubDComponentParameter)The parameter to evaluate.
curvature (out SurfaceCurvature)The surface curvature is returned here, or null if this fails.
True if the evaluation succeeded.

Flip

#Since v8.7
public bool Flip()
Reverses the orientation of all SubD normals.
True if successful.

GetBoundingBox

[ConstOperation] public BoundingBox GetBoundingBox(bool accurate)
Bounding box solver. Gets the world axis aligned bounding box for the geometry.
inherited fromGeometryBase
accurate (bool)If true, a physically accurate bounding box will be computed. If not, a bounding box estimate will be computed. For some geometry types there is no difference between the estimate and the accurate bounding box. Estimated bounding boxes can be computed much (much) faster than accurate (or "tight") bounding boxes. Estimated bounding boxes are always similar to or larger than accurate bounding boxes.
The bounding box of the geometry in world coordinates or BoundingBox.Empty if not bounding box could be found.

GetBoundingBox

[ConstOperation] public BoundingBox GetBoundingBox(Plane plane, out Box worldBox)
Aligned Bounding box solver. Gets the plane aligned bounding box.
inherited fromGeometryBase
plane (Plane)Orientation plane for BoundingBox.
worldBox (out Box)Aligned box in World coordinates.
A BoundingBox in plane coordinates.

GetBoundingBox

[ConstOperation] public BoundingBox GetBoundingBox(Plane plane)
Aligned Bounding box solver. Gets the plane aligned bounding box.
inherited fromGeometryBase
plane (Plane)Orientation plane for BoundingBox.
A BoundingBox in plane coordinates.

GetBoundingBox

[ConstOperation] public virtual BoundingBox GetBoundingBox(Transform xform)
Aligned Bounding box solver. Gets the world axis aligned bounding box for the transformed geometry.
inherited fromGeometryBase
xform (Transform)Transformation to apply to object prior to the BoundingBox computation. The geometry itself is not modified.
The accurate bounding box of the transformed geometry in world coordinates or BoundingBox.Empty if not bounding box could be found.

GetObjectData

[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter)] public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
Populates a System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.
inherited fromCommonObject
info (SerializationInfo)The System.Runtime.Serialization.SerializationInfo to populate with data.
context (StreamingContext)The destination (see System.Runtime.Serialization.StreamingContext) for this serialization.

GetUserString

public string GetUserString(string key)
Gets user string from this geometry.
inherited fromGeometryBase
key (string)id used to retrieve the string.
string associated with the key if successful. null if no key was found.

GetUserStrings

public NameValueCollection GetUserStrings()
Gets a copy of all (user key string, user value string) pairs attached to this geometry.
inherited fromGeometryBase
A new collection.

InterpolateSurfacePoints

#Since v7.1
public bool InterpolateSurfacePoints(Point3d[] surfacePoints)
Modifies the SubD so that the SubD vertex limit surface points are equal to surface_points[]
surfacePoints (Point3d[])Points for limit surface to interpolate. surface_points[i] is the location for the i-th vertex returned by SubVertexIterator vit(this)
True on success

InterpolateSurfacePoints

#Since v8.0
[CLSCompliant(false)] public bool InterpolateSurfacePoints(uint[] vertexIndices, Point3d[] surfacePoints)
Modifies the SubD so that the SubD vertex limit surface points of the listed vertices are equal to surface_points[].
vertexIndices (uint[])Ids of the vertices to interpolate. Other vertices remain fixed.
surfacePoints (Point3d[])Points for limit surface to interpolate. surface_points[i] is the location for the vertex returned by this.Vertices.Find(vertexIndices[i]).
True on success

IsValidWithLog

public bool IsValidWithLog(out string log)
Determines if an object is valid. Also provides a report on errors if this object happens not to be valid.
inherited fromCommonObject
log (out string)A textual log. This out parameter is assigned during this call.
true if this object is valid; false otherwise.

JoinSubDs

#Since v7.16
public static SubD[] JoinSubDs(IEnumerable<SubD> subdsToJoin, double tolerance, bool joinedEdgesAreCreases, bool preserveSymmetry)
Joins an enumeration of SubDs to form as few as possible resulting SubDs. There may be more than one SubD in the result array.
Remarks: NOTE: All of the input SubDs are copied and added to the result array in one form or another.
subdsToJoin (IEnumerable<SubD>)An enumeration of SubDs to join.
tolerance (double)The join tolerance.
joinedEdgesAreCreases (bool)If true, merged boundary edges will be creases. If false, merged boundary edges will be smooth.
preserveSymmetry (bool)If true, and if all inputs share the same symmetry, the output will also be symmetrical wrt. that symmetry. If false, or true but no common symmetry exists, symmetry information is removed from all newly joined SubDs.

JoinSubDs

#Since v7.14
public static SubD[] JoinSubDs(IEnumerable<SubD> subdsToJoin, double tolerance, bool joinedEdgesAreCreases)
Joins an enumeration of SubDs to form as few as possible resulting SubDs. There may be more than one SubD in the result array.
Remarks: NOTE: All of the input SubDs are copied and added to the result array in one form or another. NOTE: Symmetry information is removed from newly joined SubDs.See also comments in SubD.JoinSubDs with the bPreserveSymmetry parameter.
subdsToJoin (IEnumerable<SubD>)An enumeration of SubDs to join.
tolerance (double)The join tolerance.
joinedEdgesAreCreases (bool)If true, merged boundary edges will be creases. If false, merged boundary edges will be smooth.

MakeDeformable

public bool MakeDeformable()
If possible, converts the object into a form that can be accurately modified with "squishy" transformations like projections, shears, an non-uniform scaling.
inherited fromGeometryBase
false if object cannot be converted to a deformable object. true if object was already deformable or was converted into a deformable object.

MemoryEstimate

[CLSCompliant(false)] [ConstOperation] public uint MemoryEstimate()
Computes an estimate of the number of bytes that this object is using in memory.
inherited fromGeometryBase
An estimated memory footprint.

MergeAllCoplanarFaces

#Since v7.9
public bool MergeAllCoplanarFaces(double tolerance, double angleTolerance)
Merges adjacent coplanar faces into single faces.
tolerance (double)Tolerance for determining when edges are adjacent. When in doubt, use the document's ModelAbsoluteTolerance property.
angleTolerance (double)Angle tolerance, in radians, for determining when faces are parallel. When in doubt, use the document's ModelAngleToleranceRadians property.
true if faces were merged, false if no faces were merged.

MergeAllCoplanarFaces

#Since v7.9
public bool MergeAllCoplanarFaces(double tolerance)
Merges adjacent coplanar faces into single faces.
tolerance (double)Tolerance for determining when edges are adjacent. When in doubt, use the document's ModelAbsoluteTolerance property.
true if faces were merged, false if no faces were merged.

NonConstOperation

#
protected override void NonConstOperation()
Destroy cache handle

Offset

#Since v7.0
[ConstOperation] public SubD Offset(double distance, bool solidify)
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.
distance (double)The distance to offset.
solidify (bool)true if the output SubD should be turned into a closed SubD.
A new SubD if successful, or null on failure.

OnSwitchToNonConst

#
protected override void OnSwitchToNonConst()
Called when this object switches from being considered "owned by the document" to being an independent instance.

PackFaces

#Since v7.23
[CLSCompliant(false)] public uint PackFaces()
Resets the SubD to the default face packing if adding creases or deleting faces breaks the quad grids. It does not change the topology or geometry of the SubD. SubD face packs always stop at creases.
The number of face packs.

Rotate

public bool Rotate(double angleRadians, Vector3d rotationAxis, Point3d rotationCenter)
Rotates the object about the specified axis. A positive rotation angle results in a counter-clockwise rotation about the axis (right hand rule).
inherited fromGeometryBase
angleRadians (double)Angle of rotation in radians.
rotationAxis (Vector3d)Direction of the axis of rotation.
rotationCenter (Point3d)Point on the axis of rotation.
true if geometry successfully rotated.

Scale

public bool Scale(double scaleFactor)
Scales the object by the specified factor. The scale is centered at the origin.
inherited fromGeometryBase
scaleFactor (double)The uniform scaling factor.
true if geometry successfully scaled.

SetEdgeSharpness

#Since v8.36
[CLSCompliant(false)] public uint SetEdgeSharpness(IEnumerable<int> edgeIds, SubDEdgeSharpness sharpness, bool preserveSymmetry)
Sets the sharpness of a list of edges, identified by their ids.
edgeIds (IEnumerable<int>)The ids of the edges to change.
sharpness (SubDEdgeSharpness)The sharpness to apply to every edge in the list. Pass SubDEdgeSharpness.Smooth to make the edges smooth again.
preserveSymmetry (bool)If true and this SubD has symmetric content, the change tries to keep it symmetric.
The number of edges that were changed.

SetEdgeSharpness

#Since v8.36
[CLSCompliant(false)] public uint SetEdgeSharpness(IEnumerable<SubDEdge> edges, IEnumerable<SubDEdgeSharpness> sharpnesses, bool preserveSymmetry)
Sets the sharpness of a list of edges, one sharpness per edge.

Use this with SubDEdgeSharpness.CreateEdgeChainSharpness(Interval, int) to give a chain of edges a sharpness that varies evenly along it.

edges (IEnumerable<SubDEdge>)The edges to change.
sharpnesses (IEnumerable<SubDEdgeSharpness>)One sharpness per edge, in the same order as edges. Must be the same length.
preserveSymmetry (bool)If true and this SubD has symmetric content, the change tries to keep it symmetric.
The number of edges that were changed.

SetEdgeSharpness

#Since v8.36
[CLSCompliant(false)] public uint SetEdgeSharpness(IEnumerable<SubDEdge> edges, SubDEdgeSharpness sharpness, bool preserveSymmetry)
Sets the sharpness of a list of edges.
edges (IEnumerable<SubDEdge>)The edges to change.
sharpness (SubDEdgeSharpness)The sharpness to apply to every edge in the list. Pass SubDEdgeSharpness.Smooth to make the edges smooth again.
preserveSymmetry (bool)If true and this SubD has symmetric content, the change tries to keep it symmetric.
The number of edges that were changed.

SetUserString

public bool SetUserString(string key, string value)
Attach a user string (key,value combination) to this geometry.
inherited fromGeometryBase
key (string)id used to retrieve this string.
value (string)string associated with key.
true on success.

SetVertexSurfacePoint

#Since v8.0
[CLSCompliant(false)] public bool SetVertexSurfacePoint(uint vertexIndex, Point3d surfacePoint)
Set the location of a single vertex surface point. This function is not suitable for setting the locations of multiple vertex surface points that are topologically near to each other.
vertexIndex (uint)Index of the vertex to modify
surfacePoint (Point3d)New surface point location for that vertex
True if a vertex was modified, false otherwise.

SharpEdgeCount

#Since v8.36
[CLSCompliant(false)] [ConstOperation] public uint SharpEdgeCount()
Gets the number of sharp edges in this SubD. See SubDEdge.IsSharp for what makes an edge sharp.
The number of sharp edges.

SharpEdgeCount

#Since v8.36
[CLSCompliant(false)] [ConstOperation] public uint SharpEdgeCount(out SubDEdgeSharpness sharpnessRange)
Gets the number of sharp edges in this SubD, and the range of sharpness values used.
sharpnessRange (out SubDEdgeSharpness)The smallest and largest sharpness found on the sharp edges. If there are no sharp edges, this is SubDEdgeSharpness.Smooth.
The number of sharp edges.

Subdivide

#Since v8.0
public bool Subdivide()
Apply the Catmull-Clark subdivision algorithm and save the results in this SubD.
true on success

Subdivide

#Since v8.0
public bool Subdivide(IEnumerable<int> faceIndices)
Apply the Catmull-Clark subdivision algorithm and save the results in this SubD.
faceIndices (IEnumerable<int>)Indices of the faces to subdivide.
true on success

Subdivide

#Since v7.0
public bool Subdivide(int count)
Apply the Catmull-Clark subdivision algorithm and save the results in this SubD.
count (int)Number of times to subdivide (must be greater than 0)
true on success

SurfaceMeshCacheExists

#Since v8.9
[CLSCompliant(false)] public bool SurfaceMeshCacheExists(bool bTextureCoordinatesExist, bool bCurvaturesExist, bool bColorsExist)
Checks that a surface mesh evaluation cache exists, and that it has the required options. This cache is used by - SubDVertex.SurfacePoint(), - SubDEdge.ToNurbsCurve(bool), and - Mesh.CreateFromSubD(SubD, int).
Remarks: This does not check that the cache is up to date, UpdateSurfaceMeshCache(bool).
bTextureCoordinatesExist (bool)If True, the cache must contain texture coordinates information.
bCurvaturesExist (bool)If True, the cache must contain curvature information.
bColorsExist (bool)If True, the cache must contain color information.
True if the cache exists on all face fragments and has the required options.

ToBrep

#Since v7.6
public Brep ToBrep()
Create a Brep based on this SubD geometry, based on SubDToBrepOptions.Default options.
A new Brep if successful, or null on failure.

ToBrep

#Since v7.0
public Brep ToBrep(SubDToBrepOptions options)
Create a Brep based on this SubD geometry.
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.
A new Brep if successful, or null on failure.

ToJSON

public string ToJSON(SerializationOptions options)
Create a JSON string representation of this object
inherited fromCommonObject
options (SerializationOptions)

Transform

public bool Transform(Transform xform)
Transforms the geometry. If the input Transform has a SimilarityType of OrientationReversing, you may want to consider flipping the transformed geometry after calling this function when it makes sense. For example, you may want to call Flip() on a Brep after transforming it.
inherited fromGeometryBase
xform (Transform)Transformation to apply to geometry.
true if geometry successfully transformed.

TransformComponents

#Since v8.12
[CLSCompliant(false)] public uint TransformComponents(IEnumerable<ComponentIndex> components, Transform xform, SubDComponentLocation componentLocation)
Transforms an enumerable of SubD components.
Remarks: This method does not clear the evaluation cache.
components (IEnumerable<ComponentIndex>)The SubD components to transform.
xform (Transform)The transformation to apply.
componentLocation (SubDComponentLocation)Select between applying the transform to the control net (faster) or the surface points (slower).
The number of vertex locations that changed.

Translate

public bool Translate(double x, double y, double z)
Translates the object along the specified vector.
inherited fromGeometryBase
x (double)The X component.
y (double)The Y component.
z (double)The Z component.
true if geometry successfully translated.

Translate

public bool Translate(Vector3d translationVector)
Translates the object along the specified vector.
inherited fromGeometryBase
translationVector (Vector3d)A moving vector.
true if geometry successfully translated.

UpdateAllTagsAndSectorCoefficients

#Since v7.0
[CLSCompliant(false)] public uint UpdateAllTagsAndSectorCoefficients()
Updates vertex tag, edge tag, and edge coefficient values on the active level. After completing custom editing operations that modify the topology of the SubD control net or changing values of vertex or edge tags, the tag and sector coefficients information on nearby components in the edited areas need to be updated.
Number of vertices and edges that were changed during the update.

UpdateSurfaceMeshCache

#Since v8.7
[CLSCompliant(false)] public uint UpdateSurfaceMeshCache(bool lazyUpdate)
Updates limit surface information returned by - SubDVertex.SurfacePoint(), - SubDEdge.ToNurbsCurve(bool), and - Mesh.CreateFromSubD(SubD, int). The density of the mesh cache is SubDDisplayParameters.Default().
lazyUpdate (bool)If false, all information is updated. If true, only missing information is updated. If a relatively small subset of a SubD has been modified and care was taken to mark cached subdivision information as stale, then passing true can substantially improve performance.
The number of elements that were updated.