SubDSurfaceInterpolator
ReferencesInterpolate some or all of the vertices limit surface positions in a SubD to specified locations. NB: It is recommended not to use these methods to interpolate more than 1000 vertices. SubD.SetVertexSurfacePoint(uint, Point3d) SubD.InterpolateSurfacePoints(Point3d[]) SubD.InterpolateSurfacePoints(uint[], Point3d[]) SubDVertex.SurfacePoint()
Constructors
Initialize an empty SubDSurfaceInterpolator.
public SubDSurfaceInterpolator()
Finalizer
Passively reclaims unmanaged resources when the class user did not explicitly call Dispose().
~SubDSurfaceInterpolator()
Properties
The context assigned id. This id is provided for applications using ON_SubDSurfaceInterpolator. It is not inspected or used in any part of the interpolation setup or calculations.
Remarks: In Rhino, when an interpolator is being used to modify a CRhinoSubDObject, this id is often the Rhino object id.
Interpolation requires building a solver. We estimate that this solver will work in reasonnable time if the number of interplolated vertices is smaller than MaximumInterpolatedVertexCount. However, given sufficient time, memory, and CPU resources, the code will work with any value. In version 8.0, this value is 1000.
Methods
Create an interpolator where all the marked vertices (unmarked if interpolatedVerticesMark is false) in the SubD are free vertices in the linear system used for interpolation, and the unmarked (marked if interpolatedVerticesMark is false) are fixed to their initial positions. Free vertices are can move as a result of the interpolation, and can receive an interpolation target location.
[CLSCompliant(false)]
public static SubDSurfaceInterpolator CreateFromMarkedVertices()
subd,
The SubD to use for interpolation
interpolatedVerticesMark,
If True, marked vertices will be considered free, and unmarked vertices will be fixed.
out uint
freeVertexCount
The number of free vertices in the system
Remarks: Sets ContextId to the Guid of the Rhino SubD object for subd.
Returns: A new SubDSurfaceInterpolator
Create an interpolator where all the selected vertices in the SubD are free vertices in the linear system used for interpolation, and the unselected are fixed to their initial positions. Free vertices are can move as a result of the interpolation, and can receive an interpolation target location.
[CLSCompliant(false)]
public static SubDSurfaceInterpolator CreateFromSelectedVertices()
subd,
The SubD to use for interpolation
out uint
freeVertexCount
The number of free vertices in the system
Remarks: Sets ContextId to the Guid of the Rhino SubD object for subd.
Returns: A new SubDSurfaceInterpolator
Create an interpolator where all the vertices in the SubD are free vertices in the linear system used for interpolation (i.e. can move as a result of the interpolation, and can receive an interpolation target location).
[CLSCompliant(false)]
public static SubDSurfaceInterpolator CreateFromSubD()
subd,
The SubD to use for interpolation
out uint
freeVertexCount
The number of free vertices in the system
Remarks: Sets ContextId to the Guid of the Rhino SubD object for subd.
Returns: A new SubDSurfaceInterpolator
Create an interpolator where all the listed vertices in the SubD are free vertices in the linear system used for interpolation, and the unselected are fixed to their initial positions. Free vertices are can move as a result of the interpolation, and can receive an interpolation target location.
[CLSCompliant(false)]
public static SubDSurfaceInterpolator CreateFromVertexIdList()
subd,
The SubD to use for interpolation
vertexIndices,
Indices of the vertices to be interpolated
out uint
freeVertexCount
The number of free vertices in the system
Remarks: Sets ContextId to the Guid of the Rhino SubD object for subd.
Returns: A new SubDSurfaceInterpolator
Actively reclaims unmanaged resources that this instance uses.
public void Dispose()
For derived class implementers.
This method is called with argument true when class user calls Dispose(), while with argument false when the Garbage Collector invokes the finalizer, or Finalize() method.
You must reclaim all used unmanaged resources in both cases, and can use this chance to call Dispose on disposable fields if the argument is true.
Also, you must call the base virtual method within your overriding method.
protected virtual void Dispose()
disposing
true if the call comes from the Dispose() method; false if it comes from the Garbage Collector finalizer.
Returns: Number of vertices with fixed surface points.
Returns: Number of vertices with interpolated surface points.
Returns: If vertex is an interpolated vertex, returns the index of the vertex in the array returned by VertexIdList(). Otherwise, returns ON_UNSET_UINT_INDEX.
Returns: True if the vertex surface point is being interpolated.
Returns: True if the vertex surface point is being interpolated.
Solve the interpolation system, given target interpolation locations for the free vertices in the system. Updates the subd referenced by this system so the corresponding surface points are at the locations given by surfacePoints.
public bool Solve()
Point3d[]
surfacePoints
The limit surface locations for the interpolated vertices. The number of desired locations needs to match the InterpolatedVertexCount().
Returns: True if a solution was found.
Apply an arbitrary transformation to the target interpolation points.
public void Transform()
Transform
transform
The transformation to apply.
Returns: List of indices of the vertices with interpolated surface points. Vertices that are not in this vertex list have unchanged control net points.