RhinoCompute.Surface¶

RhinoCompute.Surface.
createRollingBallFillet
(surfaceA, surfaceB, radius, tolerance, multiple=false)¶ Constructs a rolling ball fillet between two surfaces.
Arguments:  surfaceA (rhino3dm.Surface) – A first surface.
 surfaceB (rhino3dm.Surface) – A second surface.
 radius (float) – A radius value.
 tolerance (float) – A tolerance value.
 multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: A new array of rolling ball fillet surfaces; this array can be empty on failure.
Return type: rhino3dm.Surface[]

RhinoCompute.Surface.
createRollingBallFillet1
(surfaceA, flipA, surfaceB, flipB, radius, tolerance, multiple=false)¶ Constructs a rolling ball fillet between two surfaces.
Arguments:  surfaceA (rhino3dm.Surface) – A first surface.
 flipA (bool) – A value that indicates whether A should be used in flipped mode.
 surfaceB (rhino3dm.Surface) – A second surface.
 flipB (bool) – A value that indicates whether B should be used in flipped mode.
 radius (float) – A radius value.
 tolerance (float) – A tolerance value.
 multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: A new array of rolling ball fillet surfaces; this array can be empty on failure.
Return type: rhino3dm.Surface[]

RhinoCompute.Surface.
createRollingBallFillet2
(surfaceA, uvA, surfaceB, uvB, radius, tolerance, multiple=false)¶ Constructs a rolling ball fillet between two surfaces.
Arguments:  surfaceA (rhino3dm.Surface) – A first surface.
 uvA (rhino3dm.Point2d) – A point in the parameter space of FaceA near where the fillet is expected to hit the surface.
 surfaceB (rhino3dm.Surface) – A second surface.
 uvB (rhino3dm.Point2d) – A point in the parameter space of FaceB near where the fillet is expected to hit the surface.
 radius (float) – A radius value.
 tolerance (float) – A tolerance value used for approximating and intersecting offset surfaces.
 multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: A new array of rolling ball fillet surfaces; this array can be empty on failure.
Return type: rhino3dm.Surface[]

RhinoCompute.Surface.
createExtrusion
(profile, direction, multiple=false)¶ Constructs a surface by extruding a curve along a vector.
Arguments:  profile (rhino3dm.Curve) – Profile curve to extrude.
 direction (rhino3dm.Vector3d) – Direction and length of extrusion.
 multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: A surface on success or None on failure.
Return type: rhino3dm.Surface

RhinoCompute.Surface.
createExtrusionToPoint
(profile, apexPoint, multiple=false)¶ Constructs a surface by extruding a curve to a point.
Arguments:  profile (rhino3dm.Curve) – Profile curve to extrude.
 apexPoint (rhino3dm.Point3d) – Apex point of extrusion.
 multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: A Surface on success or None on failure.
Return type: rhino3dm.Surface

RhinoCompute.Surface.
createPeriodicSurface
(surface, direction, multiple=false)¶ Constructs a periodic surface from a base surface and a direction.
Arguments:  surface (rhino3dm.Surface) – The surface to make periodic.
 direction (int) – The direction to make periodic, either 0 = U, or 1 = V.
 multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: A Surface on success or None on failure.
Return type: rhino3dm.Surface

RhinoCompute.Surface.
createPeriodicSurface1
(surface, direction, bSmooth, multiple=false)¶ Constructs a periodic surface from a base surface and a direction.
Arguments:  surface (rhino3dm.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.
 multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: A periodic surface if successful, None on failure.
Return type: rhino3dm.Surface

RhinoCompute.Surface.
createSoftEditSurface
(surface, uv, delta, uLength, vLength, tolerance, fixEnds, multiple=false)¶ Creates a soft edited surface from an existing surface using a smooth field of influence.
Arguments:  surface (rhino3dm.Surface) – The surface to soft edit.
 uv (rhino3dm.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 (rhino3dm.Vector3d) – The direction and magnitude, or maximum distance, of the move.
 uLength (float) – The distance along the surface’s udirection from the editing point over which the strength of the editing falls off smoothly.
 vLength (float) – The distance along the surface’s vdirection from the editing point over which the strength of the editing falls off smoothly.
 tolerance (float) – The active document’s model absolute tolerance.
 fixEnds (bool) – Keeps edge locations fixed.
 multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: The soft edited surface if successful. None on failure.
Return type: rhino3dm.Surface

RhinoCompute.Surface.
smooth
(thisSurface, smoothFactor, bXSmooth, bYSmooth, bZSmooth, bFixBoundaries, coordinateSystem, multiple=false)¶ Smooths a surface by averaging the positions of control points in a specified region.
Arguments:  smoothFactor (float) – 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.
 multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: The smoothed surface if successful, None otherwise.
Return type: rhino3dm.Surface

RhinoCompute.Surface.
smooth1
(thisSurface, smoothFactor, bXSmooth, bYSmooth, bZSmooth, bFixBoundaries, coordinateSystem, plane, multiple=false)¶ Smooths a surface by averaging the positions of control points in a specified region.
Arguments:  smoothFactor (float) – 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 (rhino3dm.Plane) – If SmoothingCoordinateSystem.CPlane specified, then the construction plane.
 multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: The smoothed surface if successful, None otherwise.
Return type: rhino3dm.Surface

RhinoCompute.Surface.
variableOffset
(thisSurface, uMinvMin, uMinvMax, uMaxvMin, uMaxvMax, tolerance, multiple=false)¶ Copies a surface so that all locations at the corners of the copied surface are specified distances from the original surface.
Arguments:  uMinvMin (float) – Offset distance at Domain(0).Min, Domain(1).Min.
 uMinvMax (float) – Offset distance at Domain(0).Min, Domain(1).Max.
 uMaxvMin (float) – Offset distance at Domain(0).Max, Domain(1).Min.
 uMaxvMax (float) – Offset distance at Domain(0).Max, Domain(1).Max.
 tolerance (float) – The offset tolerance.
 multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: The offset surface if successful, None otherwise.
Return type: rhino3dm.Surface

RhinoCompute.Surface.
variableOffset1
(thisSurface, uMinvMin, uMinvMax, uMaxvMin, uMaxvMax, interiorParameters, interiorDistances, tolerance, multiple=false)¶ 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.
Arguments:  uMinvMin (float) – Offset distance at Domain(0).Min, Domain(1).Min.
 uMinvMax (float) – Offset distance at Domain(0).Min, Domain(1).Max.
 uMaxvMin (float) – Offset distance at Domain(0).Max, Domain(1).Min.
 uMaxvMax (float) – Offset distance at Domain(0).Max, Domain(1).Max.
 interiorParameters (list[rhino3dm.Point2d]) – An array of interior UV parameters to offset from.
 interiorDistances (list[float]) – >An array of offset distances at the interior UV parameters.
 tolerance (float) – The offset tolerance.
 multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: The offset surface if successful, None otherwise.
Return type: rhino3dm.Surface

RhinoCompute.Surface.
getSurfaceSize
(thisSurface, multiple=false)¶ Gets an estimate of the size of the rectangle that would be created if the 3d surface where flattened into a rectangle.
Arguments:  multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: True if successful.
Return type: bool

RhinoCompute.Surface.
closestSide
(thisSurface, u, v, multiple=false)¶ Gets the side that is closest, in terms of 3Ddistance, to a U and V parameter.
Arguments:  u (float) – A u parameter.
 v (float) – A v parameter.
 multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: A side.
Return type: IsoStatus

RhinoCompute.Surface.
extend
(thisSurface, edge, extensionLength, smooth, multiple=false)¶ Extends an untrimmed surface along one edge.
Arguments:  edge (IsoStatus) – Edge to extend. Must be North, South, East, or West.
 extensionLength (float) – distance to extend.
 smooth (bool) – True for smooth (Cinfinity) extension. False for a C1 ruled extension.
 multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: New extended surface on success.
Return type: rhino3dm.Surface

RhinoCompute.Surface.
rebuild
(thisSurface, uDegree, vDegree, uPointCount, vPointCount, multiple=false)¶ Rebuilds an existing surface to a given degree and point count.
Arguments:  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)
 multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: new rebuilt surface on success. None on failure.
Return type: NurbsSurface

RhinoCompute.Surface.
rebuildOneDirection
(thisSurface, direction, pointCount, loftType, refitTolerance, multiple=false)¶ Rebuilds an existing surface with a new surface to a given point count in either the u or v directions independently.
Arguments:  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 (float) – The refit tolerance. When in doubt, use the document’s model absolute tolerance.
 multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: new rebuilt surface on success. None on failure.
Return type: NurbsSurface

RhinoCompute.Surface.
closestPoint
(thisSurface, testPoint, multiple=false)¶ Input the parameters of the point on the surface that is closest to testPoint.
Arguments:  testPoint (rhino3dm.Point3d) – A point to test against.
 multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: True on success, False on failure.
Return type: bool

RhinoCompute.Surface.
localClosestPoint
(thisSurface, testPoint, seedU, seedV, multiple=false)¶ 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.
Arguments:  testPoint (rhino3dm.Point3d) – A point to test against.
 seedU (float) – The seed parameter in the U direction.
 seedV (float) – The seed parameter in the V direction.
 multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: True if the search is successful, False if the search fails.
Return type: bool

RhinoCompute.Surface.
offset
(thisSurface, distance, tolerance, multiple=false)¶ Constructs a new surface which is offset from the current surface.
Arguments:  distance (float) – Distance (along surface normal) to offset.
 tolerance (float) – Offset accuracy.
 multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: The offset surface or None on failure.
Return type: rhino3dm.Surface

RhinoCompute.Surface.
fit
(thisSurface, uDegree, vDegree, fitTolerance, multiple=false)¶ Fits a new surface through an existing surface.
Arguments:  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 (float) – The fitting tolerance.
 multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: A surface, or None on error.
Return type: rhino3dm.Surface

RhinoCompute.Surface.
interpolatedCurveOnSurfaceUV
(thisSurface, points, tolerance, multiple=false)¶ Returns a curve that interpolates points on a surface. The interpolant lies on the surface.
Arguments:  points (System.Collections.Generic.IEnumerable<Point2d>) – List of at least two UV parameter locations on the surface.
 tolerance (float) – Tolerance used for the fit of the pushup curve. Generally, the resulting interpolating curve will be within tolerance of the surface.
 multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: A new NURBS curve if successful, or None on error.
Return type: rhino3dm.NurbsCurve

RhinoCompute.Surface.
interpolatedCurveOnSurfaceUV1
(thisSurface, points, tolerance, closed, closedSurfaceHandling, multiple=false)¶ Returns a curve that interpolates points on a surface. The interpolant lies on the surface.
Arguments:  points (System.Collections.Generic.IEnumerable<Point2d>) – List of at least two UV parameter locations on the surface.
 tolerance (float) – Tolerance used for the fit of the pushup 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.
 multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: A new NURBS curve if successful, or None on error.
Return type: rhino3dm.NurbsCurve

RhinoCompute.Surface.
interpolatedCurveOnSurface
(thisSurface, points, tolerance, multiple=false)¶ Constructs an interpolated curve on a surface, using 3D points.
Arguments:  points (System.Collections.Generic.IEnumerable<Point3d>) – A list, an array or any enumerable set of points.
 tolerance (float) – A tolerance value.
 multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: A new NURBS curve, or None on error.
Return type: rhino3dm.NurbsCurve

RhinoCompute.Surface.
shortPath
(thisSurface, start, end, tolerance, multiple=false)¶ Constructs a geodesic between 2 points, used by ShortPath command in Rhino.
Arguments:  start (rhino3dm.Point2d) – start point of curve in parameter space. Points must be distinct in the domain of the surface.
 end (rhino3dm.Point2d) – end point of curve in parameter space. Points must be distinct in the domain of the surface.
 tolerance (float) – tolerance used in fitting discrete solution.
 multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: a geodesic curve on the surface on success. None on failure.
Return type: rhino3dm.Curve

RhinoCompute.Surface.
pushup
(thisSurface, curve2d, tolerance, curve2dSubdomain, multiple=false)¶ Computes a 3d curve that is the composite of a 2d curve and the surface map.
Arguments:  curve2d (rhino3dm.Curve) – a 2d curve whose image is in the surface’s domain.
 tolerance (float) – the maximum acceptable distance from the returned 3d curve to the image of curve_2d on the surface.
 curve2dSubdomain (rhino3dm.Interval) – The curve interval (a subdomain of the original curve) to use.
 multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: 3d curve.
Return type: rhino3dm.Curve

RhinoCompute.Surface.
pushup1
(thisSurface, curve2d, tolerance, multiple=false)¶ Computes a 3d curve that is the composite of a 2d curve and the surface map.
Arguments:  curve2d (rhino3dm.Curve) – a 2d curve whose image is in the surface’s domain.
 tolerance (float) – the maximum acceptable distance from the returned 3d curve to the image of curve_2d on the surface.
 multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: 3d curve.
Return type: rhino3dm.Curve

RhinoCompute.Surface.
pullback
(thisSurface, curve3d, tolerance, multiple=false)¶ Pulls a 3d curve back to the surface’s parameter space.
Arguments:  curve3d (rhino3dm.Curve) – The curve to pull.
 tolerance (float) – 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.
 multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: 2d curve.
Return type: rhino3dm.Curve

RhinoCompute.Surface.
pullback1
(thisSurface, curve3d, tolerance, curve3dSubdomain, multiple=false)¶ Pulls a 3d curve back to the surface’s parameter space.
Arguments:  curve3d (rhino3dm.Curve) – A curve.
 tolerance (float) – 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 (rhino3dm.Interval) – A subdomain of the curve to sample.
 multiple (bool) – (default False) If True, all parameters are expected as lists of equal length and input will be batch processed
Returns: 2d curve.
Return type: rhino3dm.Curve