ISurfaceAssistant

References
public interface ISurfaceAssistant
Base interface for surface-like type assistants. Do not implement this interface from scratch, instead inherit from SurfaceAssistant.

Properties

IsReimplementation

#
bool IsReimplementation { get; }
Gets whether or not this assistant is a type-safe re-implementation of a more generic assistant.

ReimplementationBase

#
ISurfaceAssistant ReimplementationBase { get; }
Gets the base assistant (if any) this assistant is a re-implementation of.

Type

#
Type Type { get; }
Gets the type associated with this assistant.

Methods

BoundingBox

#
BoundingBox BoundingBox(object instance)
Gets the bounding box of a surface.
instance (object)Surface instance.
World axis aligned bounding box.

ConvertToBrep

#
Brep ConvertToBrep(object instance)
Convert the instance into a Rhino Brep type which best describes the original instance. Note this method need not return a duplicate of the input, if a duplicate is required by the caller then a ReferenceEquals check must be performed.
instance (object)Instance to convert.
A Rhino Brep or null if there is no way to describe the surfacr geometry as a Brep.

EvaluateCurvature

#
bool EvaluateCurvature(object instance, SurfaceLocus parameter, out SurfaceCurvature curvature)
Evaluate the surface curvature at the given parameter.
instance (object)
parameter (SurfaceLocus)
curvature (out SurfaceCurvature)
True on success, false on failure.

EvaluateNormal

#
Vector3d EvaluateNormal(object instance, SurfaceLocus parameter)
Evaluate the normal vector of the surface at the given parameter.
instance (object)Instance of T.
parameter (SurfaceLocus)Surface parameter.
Normal at parameter, or Vector3d.Unset if the surface cannot be evaluated at the given parameter.

EvaluatePosition

#
Point3d EvaluatePosition(object instance, SurfaceLocus parameter)
Evaluate the position of the surface at the given parameter.
instance (object)Instance of T.
parameter (SurfaceLocus)Surface parameter.
Point at parameter, or Point3d.None if the surface cannot be evaluated at the given parameter.

EvaluateTangent

#
Plane EvaluateTangent(object instance, SurfaceLocus parameter)
Evaluate the tangent of the surface at the given parameter.
instance (object)Instance of T.
parameter (SurfaceLocus)Surface parameter.
Tangent at parameter, or Plane.Unset if the surface cannot be evaluated at the given parameter.

EvaluateUV

#
bool EvaluateUV(object instance, SurfaceLocus parameter, out Vector3d u, out Vector3d v)
Evaluate the U and V directions of the surface at the given parameter.
instance (object)
parameter (SurfaceLocus)
u (out Vector3d)
v (out Vector3d)
True on success, false on failure.

Explode

#
object[] Explode(object instance)
Explode a surface into smaller fragments, each representing a subtype of surface.
instance (object)Instance.
Array of subcurves.

ExplodeRecursive

#
object[] ExplodeRecursive(object instance)
Explode a surface into the smallest possible fragments.
instance (object)Instance.
Array of subsurfaces.

FindClosestParameter

#
SurfaceLocus FindClosestParameter(object instance, Point3d point)
Find the locus on the surface closest to a test point.
instance (object)Instance of T.
point (Point3d)Test point.
Parameter or SurfaceLocus.None if no parameter could be found.

FlipDirection

#
object FlipDirection(object instance)
Flip the normal direction of the surface.
instance (object)Instance to flip.
Flipped surface or null if surface cannot be flipped.

IsClosed

#
bool IsClosed(object instance)
Determine whether the surface is closed (i.e. solid).
instance (object)Instance of T.
Boolean value indicating closedness.

IsPlanar

#
bool IsPlanar(object instance, double tolerance)
Determine whether the surface is planar.
instance (object)Instance of T.
tolerance (double)Maximum allowed planarity deviation.
Boolean value indicating planarity.

IsPlanar

#
void IsPlanar(object instance, out Plane plane, out double deviation)
Determine the best fit plane for this surface.
instance (object)Instance of T.
plane (out Plane)Plane of curve or Plane.None if curve is not planar.
deviation (out double)Maximum deviation from plane.

Slice

#
object[] Slice(object instance, Plane plane, double tolerance)
Compute the intersection between a surface and a plane.
instance (object)Surface.
plane (Plane)Plane.
tolerance (double)Absolute tolerance.
Array of any kind of curves.