Represents a base class that is common to most RhinoCommon surface types.

A surface represents an entity that can be all visited by providing two independent parameters, usually called (u, v), or sometimes (s, t).

Constructors

Surface

#
protected Surface()
Protected constructor for internal use.

Surface

#
protected Surface(SerializationInfo info, StreamingContext context)
Protected constructor for internal use.
info (SerializationInfo)Serialization data.
context (StreamingContext)Serialization stream.

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

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 v5.0
public virtual bool IsSolid { get; }
Gets a values indicating whether a surface is solid.

IsSubDFriendly

#Since v7.0
public bool IsSubDFriendly { get; }
Returns true if the surface is a non-rational, uniform, natural or periodic, cubic NURBS surface. Otherwise, false is returned.

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

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

Methods

ClosestPoint

#ExampleSince v5.0
[ConstOperation] public bool ClosestPoint(Point3d testPoint, out double u, out double v)
Input the parameters of the point on the surface that is closest to testPoint.
testPoint (Point3d)A point to test against.
u (out double)U parameter of the surface that is closest to testPoint.
v (out double)V parameter of the surface that is closest to testPoint.
true on success, false on failure.

ClosestSide

#Since v5.0
[ConstOperation] public IsoStatus ClosestSide(double u, double v)
Gets the side that is closest, in terms of 3D-distance, to a U and V parameter.
u (double)A u parameter.
v (double)A v parameter.
A side.

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.

CreateExtrusion

#Since v5.0
public static Surface CreateExtrusion(Curve profile, Vector3d direction)
Constructs a surface by extruding a curve along a vector.
profile (Curve)Profile curve to extrude.
direction (Vector3d)Direction and length of extrusion.
A surface on success or null on failure.

CreateExtrusionToPoint

#Since v5.0
public static Surface CreateExtrusionToPoint(Curve profile, Point3d apexPoint)
Constructs a surface by extruding a curve to a point.
profile (Curve)Profile curve to extrude.
apexPoint (Point3d)Apex point of extrusion.
A Surface on success or null on failure.

CreatePeriodicSurface

#Since v6.0
public static Surface CreatePeriodicSurface(Surface surface, int direction, bool bSmooth)
Constructs a periodic surface from a base surface and a direction.
surface (Surface)The surface to make periodic.
direction (int)The direction to make periodic, either 0 = U, or 1 = V.
bSmooth (bool)Controls kink removal. If true, smooths any kinks in the surface and moves control points to make a smooth surface. If false, control point locations are not changed or changed minimally (only one point may move) and only the knot vector is altered.
A periodic surface if successful, null on failure.

CreatePeriodicSurface

#Since v5.0
public static Surface CreatePeriodicSurface(Surface surface, int direction)
Constructs a periodic surface from a base surface and a direction.
surface (Surface)The surface to make periodic.
direction (int)The direction to make periodic, either 0 = U, or 1 = V.
A Surface on success or null on failure.

CreateRollingBallFillet

#Since v5.0
public static Surface[] CreateRollingBallFillet(Surface surfaceA, bool flipA, Surface surfaceB, bool flipB, double radius, double tolerance)
Constructs a rolling ball fillet between two surfaces.
surfaceA (Surface)A first surface.
flipA (bool)A value that indicates whether A should be used in flipped mode.
surfaceB (Surface)A second surface.
flipB (bool)A value that indicates whether B should be used in flipped mode.
radius (double)A radius value.
tolerance (double)A tolerance value.
A new array of rolling ball fillet surfaces; this array can be empty on failure.
ArgumentNullExceptionIf surfaceA or surfaceB are null.

CreateRollingBallFillet

#Since v5.0
public static Surface[] CreateRollingBallFillet(Surface surfaceA, Point2d uvA, Surface surfaceB, Point2d uvB, double radius, double tolerance)
Constructs a rolling ball fillet between two surfaces.
surfaceA (Surface)A first surface.
uvA (Point2d)A point in the parameter space of FaceA near where the fillet is expected to hit the surface.
surfaceB (Surface)A second surface.
uvB (Point2d)A point in the parameter space of FaceB near where the fillet is expected to hit the surface.
radius (double)A radius value.
tolerance (double)A tolerance value used for approximating and intersecting offset surfaces.
A new array of rolling ball fillet surfaces; this array can be empty on failure.
ArgumentNullExceptionIf surfaceA or surfaceB are null.

CreateRollingBallFillet

#Since v5.0
public static Surface[] CreateRollingBallFillet(Surface surfaceA, Surface surfaceB, double radius, double tolerance)
Constructs a rolling ball fillet between two surfaces.
surfaceA (Surface)A first surface.
surfaceB (Surface)A second surface.
radius (double)A radius value.
tolerance (double)A tolerance value.
A new array of rolling ball fillet surfaces; this array can be empty on failure.
ArgumentNullExceptionIf surfaceA or surfaceB are null.

CreateSoftEditSurface

#Since v6.0
public static Surface CreateSoftEditSurface(Surface surface, Point2d uv, Vector3d delta, double uLength, double vLength, double tolerance, bool fixEnds)
Creates a soft edited surface from an existing surface using a smooth field of influence.
surface (Surface)The surface to soft edit.
uv (Point2d)A point in the parameter space to move from. This location on the surface is moved, and the move is smoothly tapered off with increasing distance along the surface from this parameter.
delta (Vector3d)The direction and magnitude, or maximum distance, of the move.
uLength (double)The distance along the surface's u-direction from the editing point over which the strength of the editing falls off smoothly.
vLength (double)The distance along the surface's v-direction from the editing point over which the strength of the editing falls off smoothly.
tolerance (double)The active document's model absolute tolerance.
fixEnds (bool)Keeps edge locations fixed.
The soft edited surface if successful. null on failure.

CreateTweenSurfacesWithSampling

#Since v8.14
public static Surface[] CreateTweenSurfacesWithSampling(Surface surface0, Surface surface1, int numSurfaces, int numSamples, double tolerance)
Create tween surfaces that gradually transition between two bounding surfaces using point sampling.
surface0 (Surface)The first, or starting, surface.
surface1 (Surface)The second, or ending, curve.
numSurfaces (int)Number of tween surfaces to create.
numSamples (int)Number of sample points along input surfaces.
tolerance (double)The tolerance. When in doubt, use the document's model absolute tolerance.
>An array of tween surfaces if successful, an empty array on error.

CurvatureAt

#ExampleSince v5.0
[ConstOperation] public SurfaceCurvature CurvatureAt(double u, double v)
Computes the curvature at the given UV coordinate.
u (double)U parameter for evaluation.
v (double)V parameter for evaluation.
Surface Curvature data for the point at UV or null on failure.

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.

Degree

#Since v5.0
[ConstOperation] public int Degree(int direction)
Returns the maximum algebraic degree of any span (or a good estimate if curve spans are not algebraic).
direction (int)0 gets first parameter's domain, 1 gets second parameter's domain.
The maximum degree.

DeleteAllUserStrings

public void DeleteAllUserStrings()
inherited fromGeometryBase

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)
Overridden in order to destroy local display cache information
inherited fromGeometryBase
disposing (bool)

Domain

#Since v5.0
[ConstOperation] public Interval Domain(int direction)
Gets the domain in a direction.
direction (int)0 gets first parameter, 1 gets second parameter.
An interval value.

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.

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 v5.0
[ConstOperation] public bool Evaluate(double u, double v, int numberDerivatives, out Point3d point, out Vector3d[] derivatives)
Evaluates a surface mathematically.
Remarks: The partial derivatives will be in the order {Su, Sv} for numberDerivatives = 1, {Su, Sv, Suu, Suv, Svv} for 2, {Su, Sv, Suu, Suv, Svv, Suuu, Suuv, Suvv, Svvv} for 3, and similar for higher counts.
u (double)A U parameter.
v (double)A V parameter.
numberDerivatives (int)The number of derivatives.
point (out Point3d)A point. This out parameter will be assigned during this call.
derivatives (out Vector3d[])A vector array. This out parameter will be assigned during this call. This can be null.
true if the operation succeeded; false otherwise.

Extend

#Since v7.4
public bool Extend(int direction, Interval interval)
Analytically extends the surface to include the interval.
direction (int)If 0, Surface.Domain(0) will include the interval. (the first surface parameter). If 1, Surface.Domain(1) will include the interval. (the second surface parameter).
interval (Interval)If the interval is not included in surface domain, the surface will be extended so that its domain includes the interval. Note, this method will fail if the surface is closed in the specified direction.
True if successful, false otherwise.

Extend

#Since v5.0
[ConstOperation] public Surface Extend(IsoStatus edge, double extensionLength, bool smooth)
Extends an untrimmed surface along one edge.
edge (IsoStatus)Edge to extend. Must be North, South, East, or West.
extensionLength (double)distance to extend.
smooth (bool)true for smooth (C-infinity) extension. false for a C1- ruled extension.
New extended surface on success.

Fit

#Since v5.0
[ConstOperation] public Surface Fit(int uDegree, int vDegree, double fitTolerance)
Fits a new surface through an existing surface.
uDegree (int)the output surface U degree. Must be bigger than 1.
vDegree (int)the output surface V degree. Must be bigger than 1.
fitTolerance (double)The fitting tolerance.
A surface, or null on error.

FitCurveToSurface

#Since v8.0
public Curve[] FitCurveToSurface(Curve trimCurve3d, Vector3d trimProjectionDir, double tolerance, IEnumerable<double> Knots, bool divideIntoSections, ref Curve trimCurveOnSurface, ref Curve splitCurve)
trimCurve3d (Curve)curve that will trim from one edge to the opposite
trimProjectionDir (Vector3d)Vector for projection, or zero vector for no projection
tolerance (double)3d tolerance for projection, splitting, fitting...
Knots (IEnumerable<double>)For TrimParamKnots=3, the custom knots to add
divideIntoSections (bool)If true, the surface is divided at each knot
trimCurveOnSurface (ref Curve)the actual trim curve as it is projected on or pulled to the surface
splitCurve (ref Curve)the actual fit curve the split the surface

FrameAt

#ExampleSince v5.0
[ConstOperation] public bool FrameAt(double u, double v, out Plane frame)
Computes the orient plane on a surface given a U and V parameter.

This is the simple evaluation call with no error handling.

u (double)A first parameter.
v (double)A second parameter.
frame (out Plane)A frame plane that will be computed during this call.
true if this operation succeeded; otherwise false.

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.

GetNextDiscontinuity

#Since v7.4
[ConstOperation] public bool GetNextDiscontinuity(int direction, Continuity continuityType, double t0, double t1, double cosAngleTolerance, double curvatureTolerance, out double t)
Searches for a derivative, tangent, or curvature discontinuity.
direction (int)If 0, then "u" parameter is checked. If 1, then the "v" parameter is checked.
continuityType (Continuity)The desired continuity.
t0 (double)Search begins at t0. If there is a discontinuity at t0, it will be ignored. This makes it possible to repeatedly call GetNextDiscontinuity and step through the discontinuities.
t1 (double)(t0 != t1) If there is a discontinuity at t1 is will be ignored unless c is a locus discontinuity type and t1 is at the start or end of the curve.
cosAngleTolerance (double)default = cos(1 degree) Used only when continuityType is G1_continuous or G2_continuous. If the cosine of the angle between two tangent vectors is <= cos_angle_tolerance, then a G1 discontinuity is reported.
curvatureTolerance (double)(default = ON_SQRT_EPSILON) Used only when continuityType is G2_continuous. If K0 and K1 are curvatures evaluated from above and below and |K0 - K1| > curvature_tolerance, then a curvature discontinuity is reported.
t (out double)if a discontinuity is found, then t reports the parameter at the discontinuity.
Parametric continuity tests c = (C0_continuous, ..., G2_continuous): TRUE if a parametric discontinuity was found strictly between t0 and t1. Note well that all curves are parametrically continuous at the ends of their domains. Locus continuity tests c = (C0_locus_continuous, ...,G2_locus_continuous): TRUE if a locus discontinuity was found strictly between t0 and t1 or at t1 is the at the end of a curve. Note well that all open curves (IsClosed()=false) are locus discontinuous at the ends of their domains. All closed curves (IsClosed()=true) are at least C0_locus_continuous at the ends of their domains.

GetNextDiscontinuity

#Since v5.0
[ConstOperation] public bool GetNextDiscontinuity(int direction, Continuity continuityType, double t0, double t1, out double t)
Searches for a derivative, tangent, or curvature discontinuity.
direction (int)If 0, then "u" parameter is checked. If 1, then the "v" parameter is checked.
continuityType (Continuity)The desired continuity.
t0 (double)Search begins at t0. If there is a discontinuity at t0, it will be ignored. This makes it possible to repeatedly call GetNextDiscontinuity and step through the discontinuities.
t1 (double)(t0 != t1) If there is a discontinuity at t1 is will be ignored unless c is a locus discontinuity type and t1 is at the start or end of the curve.
t (out double)if a discontinuity is found, then t reports the parameter at the discontinuity.
Parametric continuity tests c = (C0_continuous, ..., G2_continuous): TRUE if a parametric discontinuity was found strictly between t0 and t1. Note well that all curves are parametrically continuous at the ends of their domains. Locus continuity tests c = (C0_locus_continuous, ...,G2_locus_continuous): TRUE if a locus discontinuity was found strictly between t0 and t1 or at t1 is the at the end of a curve. Note well that all open curves (IsClosed()=false) are locus discontinuous at the ends of their domains. All closed curves (IsClosed()=true) are at least C0_locus_continuous at the ends of their domains.

GetNurbsFormParameterFromSurfaceParameter

#Since v6.0
[ConstOperation] public bool GetNurbsFormParameterFromSurfaceParameter(double surfaceS, double surfaceT, out double nurbsS, out double nurbsT)
Translates a parameter from the current surface to the parameter space of the surface returned by ToNurbsSurface().
surfaceS (double)The parameter in the S, or sometimes U, direction, of this surface.
surfaceT (double)The parameter in the T, or sometimes V, direction of this surface.
nurbsS (out double)S on the NURBS form.
nurbsT (out double)T on the NURBS form.
True if the operation succeeded; otherwise, false.

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.

GetSpanVector

#Since v5.0
[ConstOperation] public double[] GetSpanVector(int direction)
Gets array of span "knots".
direction (int)0 gets first parameter's domain, 1 gets second parameter's domain.
An array with span vectors; or null on error.

GetSurfaceParameterFromNurbsFormParameter

#Since v6.0
[ConstOperation] public bool GetSurfaceParameterFromNurbsFormParameter(double nurbsS, double nurbsT, out double surfaceS, out double surfaceT)
Translates a parameter from a value on the surface returned by ToNurbsSurface() to the current surface.
nurbsS (double)The parameter in the S, or sometimes U, direction of the NURBS form surface.
nurbsT (double)The parameter in the T, or sometimes V, direction of the NURBS form surface.
surfaceS (out double)S on this surface.
surfaceT (out double)T o n this surface.
True if the operation succeeded; otherwise, false.

GetSurfaceSize

#Since v5.0
[ConstOperation] public bool GetSurfaceSize(out double width, out double height)
Gets an estimate of the size of the rectangle that would be created if the 3d surface where flattened into a rectangle.
width (out double)corresponds to the first surface parameter.
height (out double)corresponds to the second surface parameter.
true if successful.
Re-parameterize a surface to minimize distortion in the map from parameter space to 3d. Surface surf = ...; double width, height; if ( surf.GetSurfaceSize( out width, out height ) ) { surf.SetDomain( 0, new ON_Interval( 0.0, width ) ); surf.SetDomain( 1, new ON_Interval( 0.0, height ) ); }

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.

HasNurbsForm

#Since v5.0
[ConstOperation] public int HasNurbsForm()
Is there a NURBS surface representation of this surface.
0 unable to create NURBS representation with desired accuracy. 1 success - NURBS parameterization matches the surface's 2 success - NURBS point locus matches the surface's and the domain of the NURBS surface is correct. However, This surface's parameterization and the NURBS surface parameterization may not match. This situation happens when getting NURBS representations of surfaces that have a transcendental parameterization like spheres, cylinders, and cones.

InterpolatedCurveOnSurface

#Since v5.0
[ConstOperation] public NurbsCurve InterpolatedCurveOnSurface(IEnumerable<Point3d> points, double tolerance)
Constructs an interpolated curve on a surface, using 3D points.
points (IEnumerable<Point3d>)A list, an array or any enumerable set of points.
tolerance (double)A tolerance value.
A new NURBS curve, or null on error.

InterpolatedCurveOnSurfaceUV

#Since v6.18
[ConstOperation] public NurbsCurve InterpolatedCurveOnSurfaceUV(IEnumerable<Point2d> points, double tolerance, bool closed, int closedSurfaceHandling)
Returns a curve that interpolates points on a surface. The interpolant lies on the surface.
points (IEnumerable<Point2d>)List of at least two UV parameter locations on the surface.
tolerance (double)Tolerance used for the fit of the push-up curve. Generally, the resulting interpolating curve will be within tolerance of the surface.
closed (bool)If false, the interpolating curve is not closed. If true, the interpolating curve is closed, and the last point and first point should generally not be equal.
closedSurfaceHandling (int)If 0, all points must be in the rectangular domain of the surface. If the surface is closed in some direction, then this routine will interpret each point and place it at an appropriate location in the covering space. This is the simplest option and should give good results. If 1, then more options for more control of handling curves going across seams are available. If the surface is closed in some direction, then the points are taken as points in the covering space. Example, if srf.IsClosed(0)=true and srf.IsClosed(1)=false and srf.Domain(0)=srf.Domain(1)=Interval(0,1) then if closedSurfaceHandling=1 a point(u, v) in points can have any value for the u coordinate, but must have 0<=v<=1. In particular, if points = { (0.0,0.5), (2.0,0.5) } then the interpolating curve will wrap around the surface two times in the closed direction before ending at start of the curve. If closed=true the last point should equal the first point plus an integer multiple of the period on a closed direction.
A new NURBS curve if successful, or null on error.

InterpolatedCurveOnSurfaceUV

#Since v5.0
[ConstOperation] public NurbsCurve InterpolatedCurveOnSurfaceUV(IEnumerable<Point2d> points, double tolerance)
Returns a curve that interpolates points on a surface. The interpolant lies on the surface.
points (IEnumerable<Point2d>)List of at least two UV parameter locations on the surface.
tolerance (double)Tolerance used for the fit of the push-up curve. Generally, the resulting interpolating curve will be within tolerance of the surface.
A new NURBS curve if successful, or null on error.

IsAtSeam

#Since v5.0
[ConstOperation] public int IsAtSeam(double u, double v)
Tests if a surface parameter value is at a seam.
u (double)Surface u parameter to test.
v (double)Surface v parameter to test.
0 if not a seam, 1 if u == Domain(0)[i] and srf(u, v) == srf(Domain(0)[1-i], v) 2 if v == Domain(1)[i] and srf(u, v) == srf(u, Domain(1)[1-i]) 3 if 1 and 2 are true.

IsAtSingularity

#Since v5.0
[ConstOperation] public bool IsAtSingularity(double u, double v, bool exact)
Tests if a surface parameter value is at a singularity.
u (double)Surface u parameter to test.
v (double)Surface v parameter to test.
exact (bool)If true, test if (u,v) is exactly at a singularity. If false, test if close enough to cause numerical problems.
true if surface is singular at (s,t)

IsClosed

#Since v5.0
[ConstOperation] public bool IsClosed(int direction)
Gets a value indicating if the surface is closed in a direction.
direction (int)0 = U, 1 = V.
The indicating boolean value.

IsCone

#Since v5.0
[ConstOperation] public bool IsCone()
Determines if the surface is a portion of a cone within RhinoMath.ZeroTolerance.
true if the surface is a portion of a cone.

IsCone

#Since v5.0
[ConstOperation] public bool IsCone(double tolerance)
Determines if the surface is a portion of a cone within a given tolerance.
tolerance (double)tolerance to use when checking.
true if the surface is a portion of a cone.

IsContinuous

#Since v5.0
[ConstOperation] public bool IsContinuous(Continuity continuityType, double u, double v)
Tests continuity at a surface parameter value.
continuityType (Continuity)The continuity type to sample.
u (double)Surface u parameter to test.
v (double)Surface v parameter to test.
true if the surface has at least the specified continuity at the (u,v) parameter.

IsCylinder

#Since v5.0
[ConstOperation] public bool IsCylinder()
Determines if the surface is a portion of a cylinder within RhinoMath.ZeroTolerance.
true if the surface is a portion of a cylinder.

IsCylinder

#Since v5.0
[ConstOperation] public bool IsCylinder(double tolerance)
Determines if the surface is a portion of a cylinder within a given tolerance.
tolerance (double)tolerance to use when checking.
true if the surface is a portion of a cylinder.

IsExtrusion

#Since v9.0
[ConstOperation] public bool IsExtrusion()
Determines if the surface is a portion of an extrusion within RhinoMath.ZeroTolerance.
true if the surface is an extrusion.

IsExtrusion

#Since v9.0
[ConstOperation] public bool IsExtrusion(double tolerance)
Determines if the surface is a portion of an extrusion within a given tolerance.
tolerance (double)tolerance to use when checking.
true if the surface is an extrusion.

IsIsoparametric

#Since v5.0
[ConstOperation] public IsoStatus IsIsoparametric(BoundingBox bbox)
Determines if a 2d bounding box is isoparametric in the parameter space of this surface.
bbox (BoundingBox)Bounding box to test.
IsoStatus flag describing the iso-parametric relationship between the surface and the bounding box.

IsIsoparametric

#Since v5.0
[ConstOperation] public IsoStatus IsIsoparametric(Curve curve, Interval curveDomain)
Determines if a 2D curve is isoparametric in the parameter space of this surface.
curve (Curve)Curve to test.
curveDomain (Interval)Sub domain of the curve.
IsoStatus flag describing the iso-parametric relationship between the surface and the curve.

IsIsoparametric

#Since v5.0
[ConstOperation] public IsoStatus IsIsoparametric(Curve curve)
Determines if a 2d curve is isoparametric in the parameter space of this surface.
curve (Curve)Curve to test.
IsoStatus flag describing the iso-parametric relationship between the surface and the curve.

IsoCurve

#ExampleSince v5.0
[ConstOperation] public Curve IsoCurve(int direction, double constantParameter)
Gets isoparametric curve.
Remarks: In this function "direction" indicates which direction the resulting curve runs. 0: horizontal, 1: vertical In the other Surface functions that take a "direction" argument, "direction" indicates if "constantParameter" is a "u" or "v" parameter.
direction (int)0 first parameter varies and second parameter is constant e.g., point on IsoCurve(0,c) at t is srf(t,c) This is a horizontal line from left to right 1 first parameter is constant and second parameter varies e.g., point on IsoCurve(1,c) at t is srf(c,t This is a vertical line from bottom to top.
constantParameter (double)The parameter that was constant on the original surface.
An isoparametric curve or null on error.

IsoCurve

#Since v9.0
[ConstOperation] public Curve IsoCurve(IsoStatus iso, double t)
Gets isoparametric curve. IsoStatus.None is not supported, and IsoStatus.X and IsoStatus.Y need valid t-values in the U- or V-domain respectively.
iso (IsoStatus)IsoStatus.North returns the curve where U varies and V is V_max (paramter t is ignored) IsoStatus.East returns the curve where V varies and U is U_max (paramter t is ignored) IsoStatus.South returns the curve where U varies and V is V_min (paramter t is ignored) IsoStatus.West returns the curve where V varies and U is U_min (paramter t is ignored) IsoStatus.X returns the curve where V varies and U is t (if t is inside the U-domain) IsoStatus.Y returns the curve where U varies and V is t (if t is inside the V-domain)
t (double)the parameter used if iso is X or Y.
An isoparametric curve or null on error.

IsoCurve

#Since v9.0
[ConstOperation] public Curve IsoCurve(IsoStatus iso)
Gets isoparametric curve that corresponds to one of the four surface edges. Other IsoStatus values are not supported.
iso (IsoStatus)IsoStatus.North returns the curve where U varies and V is V_max IsoStatus.East returns the curve where V varies and U is U_max IsoStatus.South returns the curve where U varies and V is V_min IsoStatus.West returns the curve where V varies and U is U_min
An isoparametric curve or null on error.

IsPeriodic

#Since v5.0
[ConstOperation] public bool IsPeriodic(int direction)
Gets a value indicating if the surface is periodic in a direction (default is false).
direction (int)0 = U, 1 = V.
The indicating boolean value.

IsPlanar

#ExampleSince v5.0
[ConstOperation] public bool IsPlanar()
Tests a surface to see if it is planar to zero tolerance.
true if the surface is planar (flat) to within RhinoMath.ZeroTolerance units (1e-12).

IsPlanar

#Since v5.0
[ConstOperation] public bool IsPlanar(double tolerance)
Tests a surface to see if it is planar to a given tolerance.
tolerance (double)tolerance to use when checking.
true if there is a plane such that the maximum distance from the surface to the plane is <= tolerance.

IsSingular

#Since v5.0
[ConstOperation] public bool IsSingular(int side)
true if surface side is collapsed to a point.
side (int)side of parameter space to test 0 = south, 1 = east, 2 = north, 3 = west.
True if this specific side of the surface is singular; otherwise, false.

IsSphere

#Since v5.0
[ConstOperation] public bool IsSphere()
Determines if the surface is a portion of a sphere within RhinoMath.ZeroTolerance.
true if the surface is a portion of a sphere.

IsSphere

#Since v5.0
[ConstOperation] public bool IsSphere(double tolerance)
Determines if the surface is a portion of a sphere within a given tolerance.
tolerance (double)tolerance to use when checking.
true if the surface is a portion of a sphere.

IsTorus

#Since v5.0
[ConstOperation] public bool IsTorus()
Determines if the surface is a portion of a torus within RhinoMath.ZeroTolerance.
true if the surface is a portion of a torus.

IsTorus

#Since v5.0
[ConstOperation] public bool IsTorus(double tolerance)
Determines if the surface is a portion of a torus within a given tolerance.
tolerance (double)tolerance to use when checking.
true if the surface is a portion of a torus.

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.

LocalClosestPoint

#Since v6.3
[ConstOperation] public bool LocalClosestPoint(Point3d testPoint, double seedU, double seedV, out double u, out double v)
Find parameters of the point on a surface that is locally closest to the testPoint. The search for a local close point starts at seed parameters.
testPoint (Point3d)A point to test against.
seedU (double)The seed parameter in the U direction.
seedV (double)The seed parameter in the V direction.
u (out double)U parameter of the surface that is closest to testPoint.
v (out double)V parameter of the surface that is closest to testPoint.
true if the search is successful, false if the search fails.

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.

NonConstOperation

protected override void NonConstOperation()
Destroy cache handle
inherited fromGeometryBase

NormalAt

#ExampleSince v5.0
[ConstOperation] public Vector3d NormalAt(double u, double v)
Computes the surface normal at a point.

This is the simple evaluation call - it does not support error handling.

u (double)A U parameter.
v (double)A V parameter.
The normal.

Offset

#Since v5.0
[ConstOperation] public Surface Offset(double distance, double tolerance)
Constructs a new surface which is offset from the current surface.
distance (double)Distance (along surface normal) to offset.
tolerance (double)Offset accuracy.
The offset surface or null on failure.

OnSwitchToNonConst

protected override void OnSwitchToNonConst()
Is called when a non-constant operation occurs.
inherited fromGeometryBase

PointAt

#Since v5.0
[ConstOperation] public Point3d PointAt(double u, double v)
Evaluates a point at a given parameter.
u (double)evaluation parameters.
v (double)evaluation parameters.
Point3d.Unset on failure.

Pullback

#Since v5.0
[ConstOperation] public Curve Pullback(Curve curve3d, double tolerance, Interval curve3dSubdomain)
Pulls a 3d curve back to the surface's parameter space.
curve3d (Curve)A curve.
tolerance (double)the maximum acceptable 3d distance between from surface(curve_2d(t)) to the locus of points on the surface that are closest to curve_3d.
curve3dSubdomain (Interval)A sub-domain of the curve to sample.
2d curve.

Pullback

#Since v5.0
[ConstOperation] public Curve Pullback(Curve curve3d, double tolerance)
Pulls a 3d curve back to the surface's parameter space.
curve3d (Curve)The curve to pull.
tolerance (double)the maximum acceptable 3d distance between from surface(curve_2d(t)) to the locus of points on the surface that are closest to curve_3d.
2d curve.

Pushup

#Since v5.0
[ConstOperation] public Curve Pushup(Curve curve2d, double tolerance, Interval curve2dSubdomain)
Computes a 3d curve that is the composite of a 2d curve and the surface map.
curve2d (Curve)a 2d curve whose image is in the surface's domain.
tolerance (double)the maximum acceptable distance from the returned 3d curve to the image of curve_2d on the surface.
curve2dSubdomain (Interval)The curve interval (a sub-domain of the original curve) to use.
3d curve.

Pushup

#Since v5.0
[ConstOperation] public Curve Pushup(Curve curve2d, double tolerance)
Computes a 3d curve that is the composite of a 2d curve and the surface map.
curve2d (Curve)a 2d curve whose image is in the surface's domain.
tolerance (double)the maximum acceptable distance from the returned 3d curve to the image of curve_2d on the surface.
3d curve.

Rebuild

#Since v5.0
[ConstOperation] public NurbsSurface Rebuild(int uDegree, int vDegree, int uPointCount, int vPointCount)
Rebuilds an existing surface to a given degree and point count.
uDegree (int)the output surface u degree.
vDegree (int)the output surface u degree.
uPointCount (int)The number of points in the output surface u direction. Must be bigger than uDegree (maximum value is 1000)
vPointCount (int)The number of points in the output surface v direction. Must be bigger than vDegree (maximum value is 1000)
new rebuilt surface on success. null on failure.

RebuildOneDirection

#Since v6.7
[ConstOperation] public NurbsSurface RebuildOneDirection(int direction, int pointCount, LoftType loftType, double refitTolerance)
Rebuilds an existing surface with a new surface to a given point count in either the u or v directions independently.
direction (int)The direction (0 = U, 1 = V).
pointCount (int)The number of points in the output surface in the "direction" direction.
loftType (LoftType)The loft type
refitTolerance (double)The refit tolerance. When in doubt, use the document's model absolute tolerance.
new rebuilt surface on success. null on failure.

RefitSimplySplitSurface

#Since v8.0
[ConstOperation] public bool RefitSimplySplitSurface(Curve trimCurve3d, Vector3d trimProjectionDir, double tolerance, RefitTrimKnotMode knotAdditionMode, int numInsertKnots, IEnumerable<double> Knots, RefitTrimSectionMode sectionMode, int numNonTrimSpans, bool meetCurve, bool oneSided, Point3d PtActive, bool outputSurface, bool outputCurve, ref int numSections, List<Surface> lowerSurface, List<Surface> upperSurface, List<Curve> edgeCurve, ref double FitMeasurement, ref Curve trimCurveOnSurface, ref Curve splitCurve)
This routine accepts a 3-d trim curve (trimCrv3d). The trim curve is assumed to run from one surface edge to the opposite edge; this is referred to as a "simple" trim curve, roughly parallel to one of the srf directions (either u or v). We refer to that parameter as the "trim parameter". The routine splits the surface via the trim curve, and then refits either side ("upper" = "above the trim", and "lower" = "below the trim") as a set of untrimmed Nurbs surfaces. The idea is to retain, as much as possible, the Nurbs structure of srf, especially in the trim parameter.
trimCurve3d (Curve)curve that will trim from one edge to the opposite
trimProjectionDir (Vector3d)Vector for projection, or zero vector for no projection
tolerance (double)3d tolerance for projection, splitting, fitting...
knotAdditionMode (RefitTrimKnotMode)0: no, don't add any 1: Yes, add nKnots knots, spaced regularly over the entire surface 2: Yes, add nKnots knots, spaced regularly PER EXISTING SPAN 3: Yes, add nKnots knots, as provided in the array Knots
numInsertKnots (int)FOr TrimParamKnots != 3, the number of knots to add
Knots (IEnumerable<double>)For TrimParamKnots=3, the custom knots to add
sectionMode (RefitTrimSectionMode)0: no sections, just output one "upper" and one "lower" surface 1: Yes, divide into sections at each of the input surface's existing knots 2: Yes, divide into sections at each of the "nKnot" added knot values 3: Yes, divide into sections at ALL knot values (i.e. both 1 and 2)
numNonTrimSpans (int)number of spans in the non-trim parameter
meetCurve (bool)Drag the refit surfaces out to meet the original trim curve
oneSided (bool)Inputting an "active" point means you only want one side of the "split" to be refit - In other words, you want a "trim refit". Results will be returned in "srfLower"
PtActive (Point3d)Active point
outputSurface (bool)if true, output fit surfaces: srfLower and, if !bActivePt, srfUpper
outputCurve (bool)if true, output fit curve: crvEdge
numSections (ref int)
lowerSurface (List<Surface>)Surfaces (# = nSections) below trim curve in srf's (u,v) domain
upperSurface (List<Surface>)Surfaces (# = nSections) above trim curve in srf's (u,v) domain
edgeCurve (List<Curve>)Curves (# = nSections) fit to trim curve with srf's u/v parameter
FitMeasurement (ref double)Calculated based on trimParamSections
trimCurveOnSurface (ref Curve)the actual trim curve as it is projected on or pulled to the surface
splitCurve (ref Curve)the actual fit curve the split the surface
true for zuccess, false for failure

RefitSplit

#Since v8.0
[ConstOperation] public int RefitSplit(Curve curve, Vector3d trimProjectionDir, double tolerance, IEnumerable<double> Knots, bool bMeetCurve, bool divideIntoSections, List<Surface> srfLower, List<Surface> srfUpper, List<Curve> edgeCurve, ref Curve trimCurveOnSurface, ref Curve splitCurve)
Splits the surface into two and refits the split edge
curve (Curve)The curve used to split the surface. It must be a simple division, from one edge of the parametric space to the opposite edge.
trimProjectionDir (Vector3d)Vector for projection, or zero vector for no projection
tolerance (double)3d tolerance for projection, splitting, fitting...
Knots (IEnumerable<double>)
bMeetCurve (bool)
divideIntoSections (bool)If true, the surface is divided at each knot
srfLower (List<Surface>)Surfaces below trim curve in srf's (u,v) domain
srfUpper (List<Surface>)Surfaces below trim curve in srf's (u,v) domain
edgeCurve (List<Curve>)Curves (# = nSections) fit to trim curve with srf's u/v parameter
trimCurveOnSurface (ref Curve)the actual trim curve as it is projected on or pulled to the surface
splitCurve (ref Curve)the actual fit curve the split the surface

Reverse

#Since v5.8
public Surface Reverse(int direction, bool inPlace)
Same as Reverse, but if inPlace is set to true this Surface is modified instead of a new copy being created.
direction (int)0 for first parameter's domain, 1 for second parameter's domain.
inPlace (bool)
If inPlace is False, a new reversed surface on success. If inPlace is true, this surface instance is returned on success.

Reverse

#Since v5.0
[ConstOperation] public Surface Reverse(int direction)
Reverses parameterization Domain changes from [a,b] to [-b,-a]
direction (int)0 for first parameter's domain, 1 for second parameter's domain.
a new reversed surface on success.

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.

SetDomain

#Since v5.0
public virtual bool SetDomain(int direction, Interval domain)
Sets the domain in a direction.
direction (int)0 sets first parameter's domain, 1 sets second parameter's domain.
domain (Interval)A new domain to be assigned.
true if setting succeeded, otherwise false.

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.

ShortPath

#Since v5.0
[ConstOperation] public Curve ShortPath(Point2d start, Point2d end, double tolerance)
Constructs a geodesic between 2 points, used by ShortPath command in Rhino.
start (Point2d)start point of curve in parameter space. Points must be distinct in the domain of the surface.
end (Point2d)end point of curve in parameter space. Points must be distinct in the domain of the surface.
tolerance (double)tolerance used in fitting discrete solution.
a geodesic curve on the surface on success. null on failure.

Smooth

#Since v6.0
public Surface Smooth(double smoothFactor, bool bXSmooth, bool bYSmooth, bool bZSmooth, bool bFixBoundaries, SmoothingCoordinateSystem coordinateSystem, Plane plane)
Smooths a surface by averaging the positions of control points in a specified region.
smoothFactor (double)The smoothing factor, which controls how much control points move towards the average of the neighboring control points.
bXSmooth (bool)When true control points move in X axis direction.
bYSmooth (bool)When true control points move in Y axis direction.
bZSmooth (bool)When true control points move in Z axis direction.
bFixBoundaries (bool)When true the surface edges don't move.
coordinateSystem (SmoothingCoordinateSystem)The coordinates to determine the direction of the smoothing.
plane (Plane)If SmoothingCoordinateSystem.CPlane specified, then the construction plane.
The smoothed surface if successful, null otherwise.

Smooth

#Since v6.0
public Surface Smooth(double smoothFactor, bool bXSmooth, bool bYSmooth, bool bZSmooth, bool bFixBoundaries, SmoothingCoordinateSystem coordinateSystem)
Smooths a surface by averaging the positions of control points in a specified region.
smoothFactor (double)The smoothing factor, which controls how much control points move towards the average of the neighboring control points.
bXSmooth (bool)When true control points move in X axis direction.
bYSmooth (bool)When true control points move in Y axis direction.
bZSmooth (bool)When true control points move in Z axis direction.
bFixBoundaries (bool)When true the surface edges don't move.
coordinateSystem (SmoothingCoordinateSystem)The coordinates to determine the direction of the smoothing.
The smoothed surface if successful, null otherwise.

SpanCount

#Since v5.0
[ConstOperation] public int SpanCount(int direction)
Gets number of smooth nonempty spans in the parameter direction.
direction (int)0 gets first parameter's domain, 1 gets second parameter's domain.
The span count.

Split

#Since v5.0
[ConstOperation] public Surface[] Split(int direction, double parameter)
Splits (divides) the surface into two parts at the specified parameter
direction (int)0 = The surface is split vertically. The "west" side is returned as the first surface in the array and the "east" side is returned as the second surface in the array. 1 = The surface is split horizontally. The "south" side is returned as the first surface in the array and the "north" side is returned as the second surface in the array
parameter (double)value of constant parameter in interval returned by Domain(direction)
Array of two surfaces on success

ToBrep

#Since v5.0
[ConstOperation] public Brep ToBrep()
Converts the surface into a Brep.
A Brep with a similar shape like this surface or null.

ToJSON

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

ToNurbsSurface

#Since v5.0
[ConstOperation] public NurbsSurface ToNurbsSurface()
Gets a NURBS surface representation of this surface. Default tolerance of 0.0 is used.
NurbsSurface on success, null on failure.

ToNurbsSurface

#Since v5.0
[ConstOperation] public NurbsSurface ToNurbsSurface(double tolerance, out int accuracy)
Gets a NURBS surface representation of this surface.
tolerance (double)tolerance to use when creating NURBS representation.
accuracy (out int)

0 = unable to create NURBS representation with desired accuracy.

1 = success - returned NURBS parameterization matches the surface's to the desired accuracy.

2 = success - returned NURBS point locus matches the surface's to the desired accuracy and the domain of the NURBS surface is correct. However, this surface's parameterization and the NURBS surface parameterization may not match to the desired accuracy. This situation happens when getting NURBS representations of surfaces that have a transcendental parameterization like spheres, cylinders, and cones.

NurbsSurface on success, null on failure.

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.

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.

Transpose

#Since v5.0
[ConstOperation] public Surface Transpose()
Transposes surface parameterization (swap U and V)
New transposed surface on success, null on failure.

Transpose

#Since v5.8
public Surface Transpose(bool inPlace)
Transposes surface parameterization (swap U and V)
inPlace (bool)
New transposed surface on success, null on failure.

Trim

#Since v5.0
[ConstOperation] public Surface Trim(Interval u, Interval v)
Constructs a sub-surface that covers the specified UV trimming domain.
u (Interval)Domain of surface along U direction to include in the subsurface.
v (Interval)Domain of surface along V direction to include in the subsurface.
SubSurface on success, null on failure.

TryGetCone

#Since v5.0
[ConstOperation] public bool TryGetCone(out Cone cone, double tolerance)
Tests a surface to see if it is a portion of a cone and returns the cone.
cone (out Cone)On success, the cone parameters are filled in.
tolerance (double)tolerance to use when checking.
true if the surface is a portion of a cone.

TryGetCone

#Since v5.0
[ConstOperation] public bool TryGetCone(out Cone cone)
Tests a surface to see if it is a portion of a cone within RhinoMath.ZeroTolerance and return the cone.
cone (out Cone)On success, the cone parameters are filled in.
true if the surface is a portion of a cone.

TryGetCylinder

#Since v5.0
[ConstOperation] public bool TryGetCylinder(out Cylinder cylinder, double tolerance)
Tests a surface to see if it is a portion of a cylinder and return the infinite cylinder.
Remarks: If successful, an infinite cylinder is returned. When a surface has a cylindrical shape, even if its ends are not circles on the cylinder, it returns the axis and radius. You can detect infinite cylinders using Cylinder.IsFinite.
cylinder (out Cylinder)On success, the cylinder parameters are filled in.
tolerance (double)tolerance to use when checking.
true if the surface is a portion of a cylinder.

TryGetCylinder

#Since v5.0
[ConstOperation] public bool TryGetCylinder(out Cylinder cylinder)
Tests a surface to see if it is a portion of a cylinder within RhinoMath.ZeroTolerance and return the cylinder.
Remarks: If successful, an infinite cylinder is returned. When a surface has a cylindrical shape, even if its ends are not circles on the cylinder, it returns the axis and radius. You can detect infinite cylinders using Cylinder.IsFinite.
cylinder (out Cylinder)On success, the cylinder parameters are filled in.
true if the surface is a portion of a cylinder.

TryGetExtrusion

#Since v9.0
[ConstOperation] public bool TryGetExtrusion(out Extrusion extrusion, double tolerance)
Tests a surface to see if it is an extrusion and returns the extrusion.
extrusion (out Extrusion)On success, the extrusion parameters are filled in.
tolerance (double)tolerance to use when checking.
true if the surface is a portion of an extrusion.

TryGetExtrusion

#Since v9.0
[ConstOperation] public bool TryGetExtrusion(out Extrusion extrusion)
Tests a surface to see if it is an extrusion within RhinoMath.ZeroTolerance and returns the extrusion.
extrusion (out Extrusion)On success, the extrusion parameters are filled in.
true if the surface is an extrusion.

TryGetFiniteCylinder

#Since v6.0
[ConstOperation] public bool TryGetFiniteCylinder(out Cylinder cylinder, double tolerance)
Tests a surface with the assumption that it might be a right circular cylinder and returns this geometry.
Remarks: If successful, a finite cylinder is returned.
cylinder (out Cylinder)On success, the cylinder parameters are filled in.
tolerance (double)tolerance to use when checking.
true if the surface is a portion of a cylinder.

TryGetPlane

#ExampleSince v5.0
[ConstOperation] public bool TryGetPlane(out Plane plane, double tolerance)
Tests a surface for planarity and return the plane.
plane (out Plane)On success, the plane parameters are filled in.
tolerance (double)tolerance to use when checking.
true if there is a plane such that the maximum distance from the surface to the plane is <= tolerance.

TryGetPlane

#Since v5.0
[ConstOperation] public bool TryGetPlane(out Plane plane)
Tests a surface for planarity and return the plane.
plane (out Plane)On success, the plane parameters are filled in.
true if there is a plane such that the maximum distance from the surface to the plane is <= RhinoMath.ZeroTolerance.

TryGetSphere

#Since v5.0
[ConstOperation] public bool TryGetSphere(out Sphere sphere, double tolerance)
Test a surface to see if it is a portion of a sphere and return the sphere.
sphere (out Sphere)On success, the sphere parameters are filled in.
tolerance (double)tolerance to use when checking.
true if the surface is a portion of a sphere.

TryGetSphere

#Since v5.0
[ConstOperation] public bool TryGetSphere(out Sphere sphere)
Test a surface to see if it is a portion of a sphere and return the sphere.
sphere (out Sphere)On success, the sphere parameters are filled in.
true if the surface is a portion of a sphere.

TryGetTorus

#Since v5.0
[ConstOperation] public bool TryGetTorus(out Torus torus, double tolerance)
Tests a surface to see if it is a portion of a torus and returns the torus.
torus (out Torus)On success, the torus parameters are filled in.
tolerance (double)tolerance to use when checking.
true if the surface is a portion of a torus.

TryGetTorus

#Since v5.0
[ConstOperation] public bool TryGetTorus(out Torus torus)
Tests a surface to see if it is a portion of a torus within RhinoMath.ZeroTolerance and returns the torus.
torus (out Torus)On success, the torus parameters are filled in.
true if the surface is a portion of a torus.

VariableOffset

#Since v6.13
public Surface VariableOffset(double uMinvMin, double uMinvMax, double uMaxvMin, double uMaxvMax, double tolerance)
Copies a surface so that all locations at the corners of the copied surface are specified distances from the original surface.
uMinvMin (double)Offset distance at Domain(0).Min, Domain(1).Min.
uMinvMax (double)Offset distance at Domain(0).Min, Domain(1).Max.
uMaxvMin (double)Offset distance at Domain(0).Max, Domain(1).Min.
uMaxvMax (double)Offset distance at Domain(0).Max, Domain(1).Max.
tolerance (double)The offset tolerance.
The offset surface if successful, null otherwise.

VariableOffset

#Since v6.13
public Surface VariableOffset(double uMinvMin, double uMinvMax, double uMaxvMin, double uMaxvMax, IEnumerable<Point2d> interiorParameters, IEnumerable<double> interiorDistances, double tolerance)
Copies a surface so that all locations at the corners, and from specified interior locations, of the copied surface are specified distances from the original surface.
uMinvMin (double)Offset distance at Domain(0).Min, Domain(1).Min.
uMinvMax (double)Offset distance at Domain(0).Min, Domain(1).Max.
uMaxvMin (double)Offset distance at Domain(0).Max, Domain(1).Min.
uMaxvMax (double)Offset distance at Domain(0).Max, Domain(1).Max.
interiorParameters (IEnumerable<Point2d>)An array of interior UV parameters to offset from.
interiorDistances (IEnumerable<double>)>An array of offset distances at the interior UV parameters.
tolerance (double)The offset tolerance.
The offset surface if successful, null otherwise.