Surface

compute_rhino3d.Surface.CreateRollingBallFillet(surfaceA, surfaceB, radius, tolerance, multiple=False)

Constructs a rolling ball fillet between two surfaces.

Parameters:
  • 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[]

compute_rhino3d.Surface.CreateRollingBallFillet1(surfaceA, flipA, surfaceB, flipB, radius, tolerance, multiple=False)

Constructs a rolling ball fillet between two surfaces.

Parameters:
  • 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[]

compute_rhino3d.Surface.CreateRollingBallFillet2(surfaceA, uvA, surfaceB, uvB, radius, tolerance, multiple=False)

Constructs a rolling ball fillet between two surfaces.

Parameters:
  • 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[]

compute_rhino3d.Surface.CreateExtrusion(profile, direction, multiple=False)

Constructs a surface by extruding a curve along a vector.

Parameters:
  • 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

compute_rhino3d.Surface.CreateExtrusionToPoint(profile, apexPoint, multiple=False)

Constructs a surface by extruding a curve to a point.

Parameters:
  • 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

compute_rhino3d.Surface.CreatePeriodicSurface(surface, direction, multiple=False)

Constructs a periodic surface from a base surface and a direction.

Parameters:
  • 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

compute_rhino3d.Surface.CreatePeriodicSurface1(surface, direction, bSmooth, multiple=False)

Constructs a periodic surface from a base surface and a direction.

Parameters:
  • 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

compute_rhino3d.Surface.CreateSoftEditSurface(surface, uv, delta, uLength, vLength, tolerance, fixEnds, multiple=False)

Creates a soft edited surface from an exising surface using a smooth field of influence.

Parameters:
  • 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 magitude, or maximum distance, of the move.
  • uLength (float) – The distance along the surface’s u-direction from the editing point over which the strength of the editing falls off smoothly.
  • vLength (float) – The distance along the surface’s v-direction 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

compute_rhino3d.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.

Parameters:
  • 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

compute_rhino3d.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.

Parameters:
  • 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

compute_rhino3d.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.

Parameters:
  • 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

compute_rhino3d.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.

Parameters:
  • 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

compute_rhino3d.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.

Parameters: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
compute_rhino3d.Surface.ClosestSide(thisSurface, u, v, multiple=False)

Gets the side that is closest, in terms of 3D-distance, to a U and V parameter.

Parameters:
  • 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

compute_rhino3d.Surface.Extend(thisSurface, edge, extensionLength, smooth, multiple=False)

Extends an untrimmed surface along one edge.

Parameters:
  • edge (IsoStatus) – Edge to extend. Must be North, South, East, or West.
  • extensionLength (float) – distance to extend.
  • smooth (bool) – True for smooth (C-infinity) 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

compute_rhino3d.Surface.Rebuild(thisSurface, uDegree, vDegree, uPointCount, vPointCount, multiple=False)

Rebuilds an existing surface to a given degree and point count.

Parameters:
  • 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

compute_rhino3d.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.

Parameters:
  • 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

compute_rhino3d.Surface.ClosestPoint(thisSurface, testPoint, multiple=False)

Input the parameters of the point on the surface that is closest to testPoint.

Parameters:
  • 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

compute_rhino3d.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.

Parameters:
  • 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

compute_rhino3d.Surface.Offset(thisSurface, distance, tolerance, multiple=False)

Constructs a new surface which is offset from the current surface.

Parameters:
  • 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 offsetted surface or None on failure.

Return type:

rhino3dm.Surface

compute_rhino3d.Surface.Fit(thisSurface, uDegree, vDegree, fitTolerance, multiple=False)

Fits a new surface through an existing surface.

Parameters:
  • 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

compute_rhino3d.Surface.InterpolatedCurveOnSurfaceUV(thisSurface, points, tolerance, multiple=False)

Constructs an interpolated curve on a surface, using 2D surface points.

Parameters:
  • points (System.Collections.Generic.IEnumerable<Point2d>) – A list, an array or any enumerable set of 2D 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

compute_rhino3d.Surface.InterpolatedCurveOnSurface(thisSurface, points, tolerance, multiple=False)

Constructs an interpolated curve on a surface, using 3D points.

Parameters:
  • 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

compute_rhino3d.Surface.ShortPath(thisSurface, start, end, tolerance, multiple=False)

Constructs a geodesic between 2 points, used by ShortPath command in Rhino.

Parameters:
  • start (rhino3dm.Point2d) – start point of curve in parameter space. Points must be distinct in the domain of thie surface.
  • end (rhino3dm.Point2d) – end point of curve in parameter space. Points must be distinct in the domain of thie 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

compute_rhino3d.Surface.Pushup(thisSurface, curve2d, tolerance, curve2dSubdomain, multiple=False)

Computes a 3d curve that is the composite of a 2d curve and the surface map.

Parameters:
  • 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 sub-domain 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

compute_rhino3d.Surface.Pushup1(thisSurface, curve2d, tolerance, multiple=False)

Computes a 3d curve that is the composite of a 2d curve and the surface map.

Parameters:
  • 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

compute_rhino3d.Surface.Pullback(thisSurface, curve3d, tolerance, multiple=False)

Pulls a 3d curve back to the surface’s parameter space.

Parameters:
  • 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

compute_rhino3d.Surface.Pullback1(thisSurface, curve3d, tolerance, curve3dSubdomain, multiple=False)

Pulls a 3d curve back to the surface’s parameter space.

Parameters:
  • 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