NexoNest / Computational geometry / Rhino 8
From a signature
to the geometry.
Understand what the numbers mean, which assumptions matter, and what to check before using a result.
In PyCharm, use Ctrl + Q for a short geometry note and follow its Learn more link here. Each class and member has a permanent, case-sensitive link. Overloads share one member section.
How to read this reference
Authored lessons explain geometric concepts and pitfalls. Other entries show the API-derived summary and signatures. Coverage is a partial Python view of RhinoCommon; supporting .NET types, null results, collection behavior, and runtime overload selection may need additional handling. Collection outputs use Sequence or Mapping abstractions rather than promising Python lists or dictionaries.
Examples target Rhino 8 Python and use geometry in memory. Stubs do not execute geometry or install Rhino. Model units, tolerances, validity, and success flags remain part of your algorithm's contract.
API summaries originate in RhinoCommon XML documentation. Rhino and RhinoCommon are products of Robert McNeel & Associates. NexoRhino is an independent NexoNest project. See the software terms.
No matching class or method. Clear the filters or try a shorter name.
AngularDimension
17 members
Represents a dimension of an entity that can be measured with an angle.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, arc: Arc, offset: float) -> None
def __init__(self, line1: Line, pointOnLine1: Point3d, line2: Line, pointOnLine2: Point3d, pointOnAngularDimensionArc: Point3d, bSetExtensionPoints: bool) -> None
def __init__(self, plane: Plane, horizontal: Vector3d, centerpoint: Point3d, defpoint1: Point3d, defpoint2: Point3d, dimlinepoint: Point3d) -> None
def __init__(self, plane: Plane, horizontal: Vector3d, extpoint1: Point3d, extpoint2: Point3d, dirpoint1: Point3d, dirpoint2: Point3d, dimlinepoint: Point3d) -> NoneConstructs an angular dimension.
CenterPoint
def CenterPoint(self) -> Point2dSee the signature and official API documentation for this member.
DefPoint1
def DefPoint1(self) -> Point2dSee the signature and official API documentation for this member.
DefPoint2
def DefPoint2(self) -> Point2dSee the signature and official API documentation for this member.
DimlinePoint
def DimlinePoint(self) -> Point2dSee the signature and official API documentation for this member.
ArrowPoint1
def ArrowPoint1(self) -> Point2dSee the signature and official API documentation for this member.
ArrowPoint2
def ArrowPoint2(self) -> Point2dSee the signature and official API documentation for this member.
AngleFormat
def AngleFormat(self) -> AnySee the signature and official API documentation for this member.
AngleResolution
def AngleResolution(self) -> intSee the signature and official API documentation for this member.
AngleRoundoff
def AngleRoundoff(self) -> floatSee the signature and official API documentation for this member.
AngleZeroSuppression
def AngleZeroSuppression(self) -> AnySee the signature and official API documentation for this member.
AdjustFromPoints
def AdjustFromPoints(self, plane: Plane, centerpoint: Point3d, defpoint1: Point3d, defpoint2: Point3d, dimlinepoint: Point3d) -> bool
def AdjustFromPoints(self, plane: Plane, extpoint1: Point3d, extpoint2: Point3d, dirpoint1: Point3d, dirpoint2: Point3d, dimlinepoint: Point3d) -> boolUpdates dimension geometry from point locations.
Create
def Create(dimStyle: DimensionStyle, line1: Line, pointOnLine1: Point3d, line2: Line, pointOnLine2: Point3d, pointOnAngularDimensionArc: Point3d, bSetExtensionPoints: bool) -> AngularDimension
def Create(dimStyle: DimensionStyle, plane: Plane, horizontal: Vector3d, centerpoint: Point3d, defpoint1: Point3d, defpoint2: Point3d, dimlinepoint: Point3d) -> AngularDimension
def Create(dimStyle: DimensionStyle, plane: Plane, horizontal: Vector3d, extpoint1: Point3d, extpoint2: Point3d, dirpoint1: Point3d, dirpoint2: Point3d, dimlinepoint: Point3d) -> AngularDimension
def Create(styleId: Any, plane: Plane, extpoint1: Point3d, extpoint2: Point3d, dirpoint1: Point3d, dirpoint2: Point3d, dimlinepoint: Point3d) -> AngularDimensionThe angle between the lines is dimensioned. If the lines intersect in a single point, that point is used as the center of the angular dimension arc.In this case, there are eight possible angles to dimension.The pointOnAngularDimensionArc and pointOnLine parameters are used to select the correct angle to dimension. If a pointOnLine parameter is not set, the corresponding line's midpoint is used. If the lines are colinear, the point on the line closest to pointOnAngularDimensionArc is the center of the angular dimension arc.
Get3dPoints
def Get3dPoints(self) -> tuple[bool, Point3d, Point3d, Point3d, Point3d, Point3d, Point3d, Point3d]Get locations of dimension's 3d points
GetAngleDisplayText
def GetAngleDisplayText(self, style: DimensionStyle) -> strSee the signature and official API documentation for this member.
GetDisplayLines
def GetDisplayLines(self, style: DimensionStyle, scale: float) -> tuple[bool, Sequence[Line], Sequence[Arc]]See the signature and official API documentation for this member.
GetTextRectangle
def GetTextRectangle(self) -> tuple[bool, Sequence[Point3d]]See the signature and official API documentation for this member.
AnnotationBase
53 members
Provides a common base class to all annotation geometry. This class refers to the geometric element that is independent from the document.
Permanent link · Official RhinoCommon reference
AnnotationType
def AnnotationType(self) -> AnnotationTypeType of annotation
DimensionStyleId
def DimensionStyleId(self) -> AnyId of this annotation's parent dimstyle If this annotation has overrides to dimstyle properties, those overrides will be represented in the DimensionStyle returned by DimensionStyle(ParentStyle)
HasPropertyOverrides
def HasPropertyOverrides(self) -> boolSee the signature and official API documentation for this member.
DimensionStyle
def DimensionStyle(self) -> DimensionStyleIf there are no overrides then the parent style is returned otherwise the dimension style saved with the annotation is returned.
ParentDimensionStyle
def ParentDimensionStyle(self) -> DimensionStyleThe parent dimension style associated with this annotation
TextHeight
def TextHeight(self) -> floatAnnotationBase.TextHeight Gets the parent dimstyle for the annotation and gets or sets the text height in the dimstyle
MaskEnabled
def MaskEnabled(self) -> boolDetermines whether or not to draw a Text Mask
MaskUsesViewportColor
def MaskUsesViewportColor(self) -> boolIf true, the viewport's color is used for the mask color. If false, the color defined by MaskColor is used
MaskColorSource
def MaskColorSource(self) -> AnyGets or sets whether the mask background color is from the background or from a color
DrawTextFrame
def DrawTextFrame(self) -> boolGets or sets whether to draw a frame around a text mask
MaskFrame
def MaskFrame(self) -> AnyGets or sets whether to draw a frame around a text mask
MaskColor
def MaskColor(self) -> AnyColor to use for drawing a text mask when it is enabled. If the mask is enabled and MaskColor is System.Drawing.Color.Transparent, then the viewport's color will be used for the MaskColor
MaskOffset
def MaskOffset(self) -> floatOffset for the border around text of the rectangle used to draw the mask. This value multiplied by TextHeight is the offset on each side of the tight rectangle around the text characters to the mask rectangle. The default value is 0.1.
DimensionScale
def DimensionScale(self) -> floatGets or sets the dimension scale
DrawForward
def DrawForward(self) -> boolGets or sets whether the text is oriented towards the reader when viewed from behind
Font
def Font(self) -> AnyThe base Font for the text of the annotation. The text string is rich text and therefore a different font that the base font can be associated with sub strings of the text
FontIndex
def FontIndex(self) -> intObsolete; use Font property instead
DimensionLengthDisplay
def DimensionLengthDisplay(self) -> AnyLength display units and format
AlternateDimensionLengthDisplay
def AlternateDimensionLengthDisplay(self) -> AnyAlternate length display units and format
DecimalSeparator
def DecimalSeparator(self) -> strSet or get the decimal separator c
Plane
def Plane(self) -> PlanePlane that this annotation lies on
TextFormula
def TextFormula(self) -> strSee RichText
RichText
def RichText(self) -> strText including additional RTF formatting information
Text
def Text(self) -> strText including additional RTF formatting information
PlainText
def PlainText(self) -> strText stripped of RTF formatting information
PlainTextWithFields
def PlainTextWithFields(self) -> strText stripped of RTF formatting information and with field expressions intact
TextHasRtfFormatting
def TextHasRtfFormatting(self) -> boolGets a value indicating whether the annotation's text is formatted as RTF (Rich Text Format). Returns true if the text begins with an RTF header; otherwise, false.
FirstCharFont
def FirstCharFont(self) -> AnyReturns the font used by the first run of text in an annotation
TextModelWidth
def TextModelWidth(self) -> floatWidth of text in the model
FormatWidth
def FormatWidth(self) -> floatText format width (Wrapping rectangle)
TextIsWrapped
def TextIsWrapped(self) -> boolIs text wrapping on
TextRotationRadians
def TextRotationRadians(self) -> floatRotation of text in radians
TextRotationDegrees
def TextRotationDegrees(self) -> floatRotation of text in degrees
ClearPropertyOverrides
def ClearPropertyOverrides(self) -> boolClears all overridden properties for this annotation
FirstCharProperties
def FirstCharProperties(rtf_str: str, bold: bool, italic: bool, underline: bool, facename: str) -> tuple[bool, bool, bool, bool, str]Extracts the font properties (bold, italic, underline, and facename) from the first character run of an RTF string.
FormatRtfString
def FormatRtfString(rtf_in: str, clear_bold: bool, set_bold: bool, clear_italic: bool, set_italic: bool, clear_underline: bool, set_underline: bool, clear_facename: bool, set_facename: bool, facename: str) -> strModifies the formatting of an RTF (Rich Text Format) string by setting or clearing bold, italic, underline, and font face properties on the first character run.
GetBoundingBox
def GetBoundingBox(self, accurate: bool) -> BoundingBox
def GetBoundingBox(self, plane: Plane) -> BoundingBox | tuple[BoundingBox, Box]
def GetBoundingBox(self, xform: Transform) -> BoundingBoxBounding box solver. Gets the world axis aligned bounding box for the geometry.
GetDimensionScale
def GetDimensionScale(doc: RhinoDoc, dimstyle: DimensionStyle, vport: RhinoViewport) -> floatGet view dependent dimension scale
GetDimensionStyle
def GetDimensionStyle(self, parentDimStyle: DimensionStyle) -> DimensionStyleReturn the proper dimension style from which to get properties for this annotation object If this object has style overrides, those will be included in the returned dimension style and the style will be updated to include the current state of the parent style for non-overridden fields
GetPlainTextWithRunMap
def GetPlainTextWithRunMap(self, map: Iterable[int]) -> tuple[str, Sequence[int]]Return plain text string for this annotation with field expressions unevaluated.
IsAllBold
def IsAllBold(self) -> boolReturns true if all of the text in the annotation is Bold, otherwise returns false
IsAllItalic
def IsAllItalic(self) -> boolReturns true if all of the text in the annotation is Italic, otherwise returns false
IsAllUnderlined
def IsAllUnderlined(self) -> boolReturns true if all of the text in the annotation is Underlined, otherwise returns false
IsPropertyOverridden
def IsPropertyOverridden(self, field: Any) -> boolReturns true if a property is overridden
PlainTextToRtf
def PlainTextToRtf(str: str) -> strSee the signature and official API documentation for this member.
RunReplace
def RunReplace(self, replaceString: str, startRunIndex: int, startRunPosition: int, endRunIndex: int, endRunPosition: int) -> boolReplace text within a formatted string
SetBold
def SetBold(self, set_on: bool) -> boolSee the signature and official API documentation for this member.
SetFacename
def SetFacename(self, set_on: bool, facename: str) -> boolSee the signature and official API documentation for this member.
SetItalic
def SetItalic(self, set_on: bool) -> boolSee the signature and official API documentation for this member.
SetOverrideDimStyle
def SetOverrideDimStyle(self, OverrideStyle: DimensionStyle) -> boolSet a style including overrides for this annotation object. The DimensionStyle OverrideStyle must have the override fields marked as overridden and must have it's Id set to nil. Use DimensionStyle.SetFieldOverride(Field field) and related functions to manage override settings. To override a field, the field value must be set and the field must be marked as an override. The DimensionStyle passed in here must not be in the dimstyle table
SetRichText
def SetRichText(self, rtfText: str, dimstyle: DimensionStyle) -> NoneSets the annotation's text as rich text (RTF), optionally using a specified dimension style for formatting overrides.
SetUnderline
def SetUnderline(self, set_on: bool) -> boolSee the signature and official API documentation for this member.
WrapText
def WrapText(self) -> NoneWrap text
AnnotationType
0 members
ON::AnnotationType identifies the type of an annotation object derived from ON_Annotation.
Arc
32 members
An arc is a portion of a circle, represented by a plane, radius, and angular interval. Angles are in radians; a curve parameter is not necessarily an angle or a distance.
An arc has constant curvature over a finite angular interval. An ArcCurve wrapper exposes the Curve API and its own parameter domain.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, center: Point3d, radius: float, angleRadians: float) -> None
def __init__(self, circle: Circle, angleIntervalRadians: Interval) -> None
def __init__(self, circle: Circle, angleRadians: float) -> None
def __init__(self, plane: Plane, center: Point3d, radius: float, angleRadians: float) -> None
def __init__(self, plane: Plane, radius: float, angleRadians: float) -> None
def __init__(self, pointA: Point3d, tangentA: Vector3d, pointB: Point3d) -> None
def __init__(self, startPoint: Point3d, pointOnInterior: Point3d, endPoint: Point3d) -> NoneSee the signature and official API documentation for this member.
Unset
Unset: ClassVar[Arc]See the signature and official API documentation for this member.
IsValid
def IsValid(self) -> boolGets a value indicating whether or not this arc is valid. Detail: Radius>0 and 0<AngleRadians()<=2*Math.Pi.
IsCircle
def IsCircle(self) -> boolGets a value indicating whether or not this arc is a complete circle.
Plane
def Plane(self) -> PlaneGets or sets the plane in which this arc lies.
Radius
def Radius(self) -> floatGets or sets the radius of this arc.
Diameter
def Diameter(self) -> floatGets or sets the Diameter of this arc.
Center
def Center(self) -> Point3dGets or sets the center point for this arc.
Circumference
def Circumference(self) -> floatGets the circumference of the circle that is coincident with this arc.
Length
def Length(self) -> floatGets the length of the arc. (Length = Radius * (subtended angle in radians)).
StartPoint
def StartPoint(self) -> Point3dGets the start point of the arc.
MidPoint
def MidPoint(self) -> Point3dGets the mid-point of the arc.
EndPoint
def EndPoint(self) -> Point3dGets the end point of the arc.
AngleDomain
def AngleDomain(self) -> IntervalGets or sets the angle domain (in Radians) of this arc.
StartAngle
def StartAngle(self) -> floatGets or sets the start angle (in Radians) for this arc segment.
EndAngle
def EndAngle(self) -> floatGets or sets the end angle (in Radians) for this arc segment.
Angle
def Angle(self) -> floatGets or sets the sweep -or subtended- angle (in Radians) for this arc segment.
StartAngleDegrees
def StartAngleDegrees(self) -> floatGets or sets the start angle (in Degrees) for this arc segment.
EndAngleDegrees
def EndAngleDegrees(self) -> floatGets or sets the end angle (in Degrees) for this arc segment.
AngleDegrees
def AngleDegrees(self) -> floatGets or sets the sweep -or subtended- angle (in Degrees) for this arc segment.
BoundingBox
def BoundingBox(self) -> BoundingBoxComputes the 3D axis aligned bounding box for this arc.
ClosestParameter
def ClosestParameter(self, testPoint: Point3d) -> floatGets parameter on the arc closest to a test point.
ClosestPoint
def ClosestPoint(self, testPoint: Point3d) -> Point3dComputes the point on an arc that is closest to a test point.
EpsilonEquals
def EpsilonEquals(self, other: Arc, epsilon: float) -> boolCheck that all values in other are within epsilon of the values in this
Equals
def Equals(self, other: Arc) -> bool
def Equals(self, obj: Any) -> boolDetermines whether another arc has the same value as this arc.
GetHashCode
def GetHashCode(self) -> intComputes a hash code for the present arc.
PointAt
def PointAt(self, t: float) -> Point3dArc.PointAt evaluates an angle in radians within AngleDomain. The start angle need not be zero.
Distinguish absolute angle from angular distance measured from the start. Curve wrappers can use an entirely different parameter domain.
Reverse
def Reverse(self) -> NoneReverses the orientation of the arc. Changes the domain from [a,b] to [-b,-a].
TangentAt
def TangentAt(self, t: float) -> Vector3dGets the tangent at the given parameter.
ToNurbsCurve
def ToNurbsCurve(self) -> NurbsCurve
def ToNurbsCurve(self, degree: int, cvCount: int) -> NurbsCurveInitializes a nurbs curve representation of this arc. This amounts to the same as calling NurbsCurve.CreateFromArc().
Transform
def Transform(self, xform: Transform) -> boolTransforms the arc using a Transformation matrix.
Trim
def Trim(self, domain: Interval) -> boolSets the arc's angle domain (in radians) to the specified interval, provided it is increasing and its length does not exceed 2.0 * Math.PI (plus a small tolerance). If the interval length exceeds 2.0 * Math.PI it will be clamped to exactly 2.0 * Math.PI. Returns true if the domain was set successfully, false otherwise.
ArcCurve
6 members
This curve wraps an exact circular arc. Its parameter domain can differ from the arc's angular interval; use PointAt with curve parameters, not assumed angles.
Use the stored Arc for angular evaluation, or inherited Curve methods with curve parameters. Identical shape does not imply identical parameterization.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, arc: Arc) -> None
def __init__(self, arc: Arc, t0: float, t1: float) -> None
def __init__(self, circle: Circle) -> None
def __init__(self, circle: Circle, t0: float, t1: float) -> None
def __init__(self, other: ArcCurve) -> NoneInitializes a new Rhino.Geometry.ArcCurve instance. Radius is set to 1, position to Origin and Domain to full span (circle).
Arc
def Arc(self) -> ArcGets the arc that is contained within this ArcCurve.
IsCompleteCircle
def IsCompleteCircle(self) -> boolGets a value indicating whether or not this curve can be represented by a complete circle.
Radius
def Radius(self) -> floatGets the radius of this ArcCurve.
AngleRadians
def AngleRadians(self) -> floatGets the angles of this arc in radians.
AngleDegrees
def AngleDegrees(self) -> floatGets the angles of this arc in degrees.
AreaMassProperties
26 members
Area has squared model units; an area centroid is an area-weighted location. Open surfaces can have area without enclosing a volume.
Integrated area weighting differs from averaging vertices. Nonuniform tessellation makes unweighted sample averages particularly misleading.
Permanent link · Official RhinoCommon reference
Area
def Area(self) -> floatGets the area solution.
AreaError
def AreaError(self) -> floatGets the uncertainty in the area calculation.
Centroid
def Centroid(self) -> Point3dGets the area centroid in the world coordinate system.
CentroidError
def CentroidError(self) -> Vector3dGets the uncertainty in the centroid calculation.
WorldCoordinatesFirstMoments
def WorldCoordinatesFirstMoments(self) -> Vector3dReturns the world coordinate first moments if they were able to be calculated. X is integral of "x dm" over the area Y is integral of "y dm" over the area Z is integral of "z dm" over the area.
WorldCoordinatesFirstMomentsError
def WorldCoordinatesFirstMomentsError(self) -> Vector3dUncertainty in world coordinates first moments calculation.
WorldCoordinatesSecondMoments
def WorldCoordinatesSecondMoments(self) -> Vector3dReturns the world coordinate second moments if they were able to be calculated. X is integral of "xx dm" over the area Y is integral of "yy dm" over the area Z is integral of "zz dm" over the area.
WorldCoordinatesSecondMomentsError
def WorldCoordinatesSecondMomentsError(self) -> Vector3dUncertainty in world coordinates second moments calculation.
WorldCoordinatesProductMoments
def WorldCoordinatesProductMoments(self) -> Vector3dReturns the world coordinate product moments if they were able to be calculated. X is integral of "xy dm" over the area Y is integral of "yz dm" over the area Z is integral of "zx dm" over the area.
WorldCoordinatesProductMomentsError
def WorldCoordinatesProductMomentsError(self) -> Vector3dUncertainty in world coordinates second moments calculation.
WorldCoordinatesMomentsOfInertia
def WorldCoordinatesMomentsOfInertia(self) -> Vector3dThe moments of inertia about the world coordinate axes. X = integral of (y^2 + z^2) dm Y = integral of (z^2 + x^2) dm Z = integral of (z^2 + y^2) dm.
WorldCoordinatesMomentsOfInertiaError
def WorldCoordinatesMomentsOfInertiaError(self) -> Vector3dUncertainty in world coordinates moments of inertia calculation.
WorldCoordinatesRadiiOfGyration
def WorldCoordinatesRadiiOfGyration(self) -> Vector3dRadii of gyration with respect to world coordinate system. X = sqrt(integral of (y^2 + z^2) dm/M) Y = sqrt(integral of (z^2 + x^2) dm/M) Z = sqrt(integral of (z^2 + y^2) dm/M)
CentroidCoordinatesSecondMoments
def CentroidCoordinatesSecondMoments(self) -> Vector3dSecond moments with respect to centroid coordinate system. X = integral of (x-x0)^2 dm Y = integral of (y-y0)^2 dm Z = integral of (z-z0)^2 dm where (x0,y0,z0) = centroid.
CentroidCoordinatesSecondMomentsError
def CentroidCoordinatesSecondMomentsError(self) -> Vector3dUncertainty in centroid coordinates second moments calculation.
CentroidCoordinatesProductMoments
def CentroidCoordinatesProductMoments(self) -> Vector3dProduct moments with respect to centroid coordinate system.
CentroidCoordinatesProductMomentsError
def CentroidCoordinatesProductMomentsError(self) -> Vector3dUncertainty in product moments with respect to centroid coordinate system.
CentroidCoordinatesMomentsOfInertia
def CentroidCoordinatesMomentsOfInertia(self) -> Vector3dMoments of inertia with respect to centroid coordinate system. X = integral of ((y-y0)^2 + (z-z0)^2) dm Y = integral of ((z-z0)^2 + (x-x0)^2) dm Z = integral of ((z-z0)^2 + (y-y0)^2) dm where (x0,y0,z0) = centroid.
CentroidCoordinatesMomentsOfInertiaError
def CentroidCoordinatesMomentsOfInertiaError(self) -> Vector3dUncertainty in centroid coordinates moments of inertia calculation.
CentroidCoordinatesRadiiOfGyration
def CentroidCoordinatesRadiiOfGyration(self) -> Vector3dRadii of gyration with respect to centroid coordinate system. X = sqrt(integral of ((y-y0)^2 + (z-z0)^2) dm/M) Y = sqrt(integral of ((z-z0)^2 + (x-x0)^2) dm/M) Z = sqrt(integral of ((z-z0)^2 + (y-y0)^2) dm/M) where (x0,y0,z0) = centroid.
CentroidCoordinatesPrincipalMoments
def CentroidCoordinatesPrincipalMoments(self) -> tuple[bool, float, Vector3d, float, Vector3d, float, Vector3d]Calculates the eigenvalues and eigenvectors of the moments matrix with respect to centroid coordinates.
CentroidCoordinatesPrincipalMomentsOfInertia
def CentroidCoordinatesPrincipalMomentsOfInertia(self) -> tuple[bool, float, Vector3d, float, Vector3d, float, Vector3d]Calculates the principal moments of inertia and principal axes with respect to centroid coordinates.
Compute
def Compute(brep: Brep) -> AreaMassProperties
def Compute(brep: Brep, area: bool, firstMoments: bool, secondMoments: bool, productMoments: bool) -> AreaMassProperties
def Compute(brep: Brep, area: bool, firstMoments: bool, secondMoments: bool, productMoments: bool, relativeTolerance: float, absoluteTolerance: float) -> AreaMassProperties
def Compute(closedPlanarCurve: Curve) -> AreaMassProperties
def Compute(closedPlanarCurve: Curve, planarTolerance: float) -> AreaMassProperties
def Compute(geometry: Iterable[GeometryBase]) -> AreaMassProperties
def Compute(geometry: Iterable[GeometryBase], area: bool, firstMoments: bool, secondMoments: bool, productMoments: bool) -> AreaMassProperties
def Compute(hatch: Hatch) -> AreaMassProperties
def Compute(mesh: Mesh) -> AreaMassProperties
def Compute(mesh: Mesh, area: bool, firstMoments: bool, secondMoments: bool, productMoments: bool) -> AreaMassProperties
def Compute(surface: Surface) -> AreaMassProperties
def Compute(surface: Surface, area: bool, firstMoments: bool, secondMoments: bool, productMoments: bool) -> AreaMassPropertiesArea integration can fail and carries numerical error estimates. Check the result object before reading it.
Area has squared model units. The centroid is weighted by continuous area rather than by the number of sampled vertices.
Dispose
def Dispose(self) -> NoneActively reclaims unmanaged resources that this instance uses.
WorldCoordinatesPrincipalMoments
def WorldCoordinatesPrincipalMoments(self) -> tuple[bool, float, Vector3d, float, Vector3d, float, Vector3d]Calculates the eigenvalues and eigenvectors of moments matrix in world coordinates.
WorldCoordinatesPrincipalMomentsOfInertia
def WorldCoordinatesPrincipalMomentsOfInertia(self) -> tuple[bool, float, Vector3d, float, Vector3d, float, Vector3d]Calculates the principal moments of inertia and principal axes with respect to world coordinates.
Arrowhead
3 members
Arrowhead used by annotation
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, arrowType: Any, blockId: Any) -> NoneConstructor
BlockId
def BlockId(self) -> AnyId of block used for user-defined arrowhead
ArrowType
def ArrowType(self) -> AnyType of arrowhead used by annotation
BezierCurve
23 members
A Bezier curve uses a polynomial or rational control polygon over one span. Interior control points generally do not lie on the curve.
Endpoint control points locate the endpoints; neighboring control points influence endpoint tangents. The control polygon is an editing structure, not a sampled curve.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self, controlPoints: Iterable[Point2d]) -> None
def __init__(self, controlPoints: Iterable[Point3d]) -> None
def __init__(self, controlPoints: Iterable[Point4d]) -> NoneCreate bezier curve with controls defined by a list of 2d points
Dimension
def Dimension(self) -> intDimension of Bezier
IsValid
def IsValid(self) -> boolTests an object to see if it is valid.
IsRational
def IsRational(self) -> boolGets a value indicating whether or not the curve is rational. Rational curves have control-points with custom weights.
ControlVertexCount
def ControlVertexCount(self) -> intNumber of control vertices in this curve
ChangeDimension
def ChangeDimension(self, desiredDimension: int) -> boolChange dimension of bezier.
CreateBeziers
def CreateBeziers(sourceCurve: Curve) -> Sequence[BezierCurve]Create an array of Bezier curves that fit to an existing curve. Please note, these Beziers can be of any order and may be rational.
CreateCubicBeziers
def CreateCubicBeziers(sourceCurve: Curve, distanceTolerance: float, kinkTolerance: float) -> Sequence[BezierCurve]Constructs an array of cubic, non-rational Beziers that fit a curve to a tolerance.
CreateLoftedBezier
def CreateLoftedBezier(points: Iterable[Point2d]) -> BezierCurve
def CreateLoftedBezier(points: Iterable[Point3d]) -> BezierCurveLoft a bezier through a list of points
CurvatureAt
def CurvatureAt(self, t: float) -> Vector3dEvaluate the curvature vector at a curve parameter.
Dispose
def Dispose(self) -> NoneActively reclaims unmanaged resources that this instance uses.
GetBoundingBox
def GetBoundingBox(self, accurate: bool) -> BoundingBoxBounding box solver. Gets the world axis aligned bounding box for the curve.
GetControlVertex2d
def GetControlVertex2d(self, index: int) -> Point2dGet location of a control vertex.
GetControlVertex3d
def GetControlVertex3d(self, index: int) -> Point3dGets the 3D location of a control vertex at the specified index.
GetControlVertex4d
def GetControlVertex4d(self, index: int) -> Point4dGets the homogeneous (4D) value of a control vertex at the specified index.
GetObjectData
def GetObjectData(self, info: Any, context: Any) -> NonePopulates a System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.
IncreaseDegree
def IncreaseDegree(self, desiredDegree: int) -> boolIncrease degree of bezier
MakeNonRational
def MakeNonRational(self) -> boolMake bezier non-rational
MakeRational
def MakeRational(self) -> boolMake bezier rational
PointAt
def PointAt(self, t: float) -> Point3dEvaluates point at a curve parameter.
Split
def Split(self, t: float) -> tuple[bool, BezierCurve, BezierCurve]Divides the Bezier curve at the specified parameter.
TangentAt
def TangentAt(self, t: float) -> Vector3dEvaluates the unit tangent vector at a curve parameter.
ToNurbsCurve
def ToNurbsCurve(self) -> NurbsCurveConstructs a NURBS curve representation of this curve.
BezierSurface
19 members
A Bezier surface uses a tensor-product control net. The net is not a mesh of points on the evaluated surface.
Parameter spacing follows basis functions rather than physical distance. Geometry-aware sampling is needed when spatial regularity matters.
Permanent link · Official RhinoCommon reference
IsValid
def IsValid(self) -> boolTests an object to see if it is valid.
Dimension
def Dimension(self) -> intDimension of Bezier
IsRational
def IsRational(self) -> boolGets a value indicating whether or not the surface is rational. Rational surfaces have control-points with custom weights.
ControlVertexCount
def ControlVertexCount(self, direction: int) -> intNumber of control vertices in this surface
CreateLoftedBezier
def CreateLoftedBezier(curves: Iterable[BezierCurve]) -> BezierSurfaceLoft a bezier surface through a list of bezier curves.
Dispose
def Dispose(self) -> NoneActively reclaims unmanaged resources that this instance uses.
Domain
def Domain(self, direction: int) -> IntervalGets the domain in a direction.
GetBoundingBox
def GetBoundingBox(self, accurate: bool) -> BoundingBoxBounding box solver. Gets the world axis aligned bounding box for the surface.
GetControlVertex2d
def GetControlVertex2d(self, i: int, j: int) -> Point2dGet location of a control vertex.
GetControlVertex3d
def GetControlVertex3d(self, i: int, j: int) -> Point3dGet location of a control vertex.
GetControlVertex4d
def GetControlVertex4d(self, i: int, j: int) -> Point4dGet location of a control vertex.
MakeNonRational
def MakeNonRational(self) -> boolMake bezier non-rational
MakeRational
def MakeRational(self) -> boolMake bezier rational
PointAt
def PointAt(self, u: float, v: float) -> Point3dEvaluates point at a surface parameter.
Reverse
def Reverse(self, direction: int) -> BezierSurfaceReverses parameterization Domain changes from [a,b] to [-b,-a]
Split
def Split(self, direction: int, t: float) -> tuple[bool, BezierSurface, BezierSurface]Divides the Bezier surface at the specified parameter.
ToNurbsSurface
def ToNurbsSurface(self) -> NurbsSurfaceConstructs a NURBS surface representation of this surface.
Transform
def Transform(self, xform: Transform) -> boolTransforms the surface
Transpose
def Transpose(self) -> BezierSurfaceTransposes surface parameterization (swap U and V)
BlendContinuity
0 members
Used in curve and surface blending and matching functions.
BlendType
0 members
Blend types used for creating filleted Brep edges
BoundingBox
25 members
An axis-aligned box bounds geometry in a coordinate frame. Overlapping boxes are useful for broad-phase rejection, but do not prove the enclosed objects intersect.
Use inexpensive bounds to reject distant candidates before exact tests. Coordinate-frame choice affects how tight the enclosure can be.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, min: Point3d, max: Point3d) -> None
def __init__(self, minX: float, minY: float, minZ: float, maxX: float, maxY: float, maxZ: float) -> None
def __init__(self, points: Iterable[Point3d]) -> None
def __init__(self, points: Iterable[Point3d], xform: Transform) -> NoneSee the signature and official API documentation for this member.
Empty
Empty: ClassVar[BoundingBox]See the signature and official API documentation for this member.
Unset
Unset: ClassVar[BoundingBox]See the signature and official API documentation for this member.
IsValid
def IsValid(self) -> boolGets a value that indicates whether or not this bounding box is valid. Empty boxes are not valid, and neither are boxes with unset points.
Min
def Min(self) -> Point3dGets or sets the point in the minimal corner.
Max
def Max(self) -> Point3dGets or sets the point in the maximal corner.
Center
def Center(self) -> Point3dGets the point in the center of the bounding box.
Area
def Area(self) -> floatGets the area of this BoundingBox.
Volume
def Volume(self) -> floatGets the volume of this BoundingBox.
Diagonal
def Diagonal(self) -> Vector3dGets the diagonal vector of this BoundingBox. The diagonal connects the Min and Max points.
ClosestPoint
def ClosestPoint(self, point: Point3d) -> Point3d
def ClosestPoint(self, point: Point3d, includeInterior: bool) -> Point3dFinds the closest point on or in the bounding box.
Contains
def Contains(self, box: BoundingBox) -> bool
def Contains(self, box: BoundingBox, strict: bool) -> bool
def Contains(self, point: Point3d) -> bool
def Contains(self, point: Point3d, strict: bool) -> boolBox containment is a coarse test relative to the box axes. Boundary handling depends on the overload.
Containment by a bounding box does not prove containment by the geometry inside that box. Follow it with the intended exact predicate.
Corner
def Corner(self, minX: bool, minY: bool, minZ: bool) -> Point3dGets one of the eight corners of the box.
FurthestPoint
def FurthestPoint(self, point: Point3d) -> Point3dFinds the furthest point on the Box.
GetCorners
def GetCorners(self) -> Sequence[Point3d]Gets an array filled with the 8 corner points of this box. See remarks for the return order.
GetEdges
def GetEdges(self) -> Sequence[Line]Gets an array of the 12 edges of this box.
Inflate
def Inflate(self, amount: float) -> None
def Inflate(self, xAmount: float, yAmount: float, zAmount: float) -> NoneInflates the box with equal amounts in all directions. Inflating with negative amounts may result in decreasing boxes. Invalid boxes can not be inflated.
Intersection
def Intersection(a: BoundingBox, b: BoundingBox) -> BoundingBoxComputes the intersection of two bounding boxes.
IsDegenerate
def IsDegenerate(self, tolerance: float) -> intDetermines whether a bounding box is degenerate (flat) in one or more directions.
MakeValid
def MakeValid(self) -> boolEnsures that the box is defined in an increasing fashion along X, Y and Z axes. If the Min or Max points are unset, this function will not change the box.
PointAt
def PointAt(self, tx: float, ty: float, tz: float) -> Point3dEvaluates the bounding box with normalized parameters. The box has idealized side length of 1x1x1.
ToBrep
def ToBrep(self) -> BrepConstructs a Rhino.Geometry.Brep representation of this bounding box.
ToString
def ToString(self) -> strConstructs the string representation of this aligned bounding box.
Transform
def Transform(self, xform: Transform) -> boolTransforming a box produces an axis-aligned enclosure of transformed corners, which can exceed an oriented enclosure.
Repeatedly transforming axis-aligned bounds can accumulate empty space. Retain a Box and its frame when orientation matters.
Union
BoundingBox.Union(a: BoundingBox, b: BoundingBox) -> BoundingBox
BoundingBox.Union(box: BoundingBox, point: Point3d) -> BoundingBox
<instance>.Union(a: BoundingBox, b: BoundingBox) -> BoundingBox
<instance>.Union(box: BoundingBox, point: Point3d) -> BoundingBox
<instance>.Union(other: BoundingBox) -> None
<instance>.Union(point: Point3d) -> NoneInstance Union modifies a box and returns None. Static Union returns a new BoundingBox.
The result is an axis-aligned enclosure, not a Boolean solid union. Empty space between disjoint input boxes remains inside that enclosure.
Rhino 8 Python example · geometry in memory
import Rhino.Geometry as rg
a = rg.BoundingBox(rg.Point3d(0, 0, 0), rg.Point3d(1, 1, 1))
b = rg.BoundingBox(rg.Point3d(2, 2, 2), rg.Point3d(3, 3, 3))
combined = rg.BoundingBox.Union(a, b)
assert abs(combined.Max.X - 3) < 1e-9Box
25 members
A Box combines a plane and three intervals, allowing orientation relative to world axes.
Its BoundingBox is an axis-aligned enclosure and can be much larger. Preserve the local frame for orientation-dependent packing and dimensions.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, basePlane: Plane, boundingbox: BoundingBox) -> None
def __init__(self, basePlane: Plane, geometry: GeometryBase) -> None
def __init__(self, basePlane: Plane, points: Iterable[Point3d]) -> None
def __init__(self, basePlane: Plane, xSize: Interval, ySize: Interval, zSize: Interval) -> None
def __init__(self, bbox: BoundingBox) -> None
def __init__(self, other: Box) -> NoneSee the signature and official API documentation for this member.
Empty
Empty: ClassVar[Box]See the signature and official API documentation for this member.
Unset
Unset: ClassVar[Box]See the signature and official API documentation for this member.
IsValid
def IsValid(self) -> boolGets the validity of this Box. Boxes are invalid when the base plane or any of the dimension intervals are invalid or decreasing.
Plane
def Plane(self) -> PlaneGets or sets the orientation plane for this Box.
X
def X(self) -> IntervalGets or sets the Interval that describes the dimension of the Box along the orientation plane X-Axis. Otherwise known as the Width of the Box.
Y
def Y(self) -> IntervalGets or sets the Interval that describes the dimension of the Box along the orientation plane Y-Axis. Otherwise known as the Depth of the Box.
Z
def Z(self) -> IntervalGets or sets the Interval that describes the dimension of the Box along the orientation plane Z-Axis. Otherwise known as the Height of the Box.
Center
def Center(self) -> Point3dGets the point that is in the center of the box.
BoundingBox
def BoundingBox(self) -> BoundingBoxGets the world axis aligned Bounding box for this oriented box.
Area
def Area(self) -> floatGets the total surface area of this box.
Volume
def Volume(self) -> floatGets the total volume of this box.
ClosestPoint
def ClosestPoint(self, point: Point3d) -> Point3d
def ClosestPoint(self, point: Point3d, includeInterior: bool) -> Point3dFinds the closest point on or in the Box. The box should be Valid for this to work.
Contains
def Contains(self, box: BoundingBox) -> bool
def Contains(self, box: BoundingBox, strict: bool) -> bool
def Contains(self, box: Box) -> bool
def Contains(self, box: Box, strict: bool) -> bool
def Contains(self, point: Point3d) -> bool
def Contains(self, point: Point3d, strict: bool) -> boolTest a bounding box for Box inclusion. This is the same as calling Contains(box,false)
EpsilonEquals
def EpsilonEquals(self, other: Box, epsilon: float) -> boolCheck that all values in other are within epsilon of the values in this
FurthestPoint
def FurthestPoint(self, point: Point3d) -> Point3dFinds the furthest point on the Box. The Box should be Valid for this to work properly.
GetCorners
def GetCorners(self) -> Sequence[Point3d]Gets an array of the 8 corner points of this box.
Inflate
def Inflate(self, amount: float) -> None
def Inflate(self, xAmount: float, yAmount: float, zAmount: float) -> NoneInflates the box by a given offset in each direction. Inflating with negative amounts may result in decreasing boxes. InValid boxes cannot be inflated.
MakeValid
def MakeValid(self) -> boolAttempts to make the Box valid. This is not always possible.
PointAt
def PointAt(self, x: float, y: float, z: float) -> Point3dBox.PointAt uses normalized coordinates along its intervals, evaluated in the local frame.
Coordinates from zero to one span each interval. They are not model distances measured along the plane axes.
RepositionBasePlane
def RepositionBasePlane(self, origin: Point3d) -> NoneRepositions the origin of the Base plane for this box without affecting the physical dimensions.
ToBrep
def ToBrep(self) -> BrepConstructs a brep representation of this box.
ToExtrusion
def ToExtrusion(self) -> ExtrusionConstructs an extrusion representation of this box.
Transform
def Transform(self, xform: Transform) -> boolTransforms this Box using a Transformation matrix. If the Transform does not preserve Similarity, the dimensions of the resulting box cannot be trusted.
Union
def Union(self, point: Point3d) -> NoneConstructs a union between this Box and the given point. This grows the box in directions so it contains the point.
Brep
129 members
A boundary representation combines geometric surfaces and curves with face, edge, and vertex topology. A valid Brep is not necessarily a closed solid.
Geometry describes shape; topology describes connections. Matching edge coordinates do not necessarily mean two faces share one topological edge.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> NoneInitializes a new empty brep
Vertices
def Vertices(self) -> AnyGets the brep vertices list accessor.
Surfaces
def Surfaces(self) -> AnyParametric surfaces used by faces
Edges
def Edges(self) -> AnyGets the brep edges list accessor.
Trims
def Trims(self) -> AnyGets the brep trims list accessor.
Loops
def Loops(self) -> AnyGets the brep loop list accessor.
Faces
def Faces(self) -> AnyGets the brep faces list accessor.
Curves2D
def Curves2D(self) -> AnyParameter space trimming curves (used by trims)
Curves3D
def Curves3D(self) -> AnyPointers to 3d curves (used by edges)
IsSolid
def IsSolid(self) -> boolClosedness is a boundary condition. It does not establish every geometric or manufacturing requirement.
Check validity, manifoldness, orientation, and task-specific constraints such as minimum thickness separately.
SolidOrientation
def SolidOrientation(self) -> BrepSolidOrientationGets the solid orientation state of this Brep.
IsManifold
def IsManifold(self) -> boolGets a value indicating whether or not the Brep is manifold. Non manifold breps have at least one edge that is shared among three or more faces.
IsSurface
def IsSurface(self) -> boolReturns true if the Brep has a single face and that face is geometrically the same as the underlying surface. I.e., the face has trivial trimming. In this case, the surface is the first face surface. The flag Brep.Faces[0].OrientationIsReversed records the correspondence between the surface's natural parametric orientation and the orientation of the Brep. trivial trimming here means that there is only one loop curve in the brep and that loop curve is the same as the underlying surface boundary.
HasRegionTopology
def HasRegionTopology(self) -> boolReturns true if the Brep has region topology information, false otherwise.
AddEdgeCurve
def AddEdgeCurve(self, curve: Curve) -> intAdd a 3d curve used by the brep edges
AddSurface
def AddSurface(self, surface: Surface) -> intAdds a 3D surface used by BrepFace.
AddTrimCurve
def AddTrimCurve(self, curve: Curve) -> intAdd a 2d curve used by the brep trims
Append
def Append(self, other: Brep) -> NoneAppends a copy of another brep to this and updates indices of appended brep parts. Duplicates are not removed
CapPlanarHoles
def CapPlanarHoles(self, tolerance: float) -> BrepCapping attempts to fill planar openings. It is not a general repair for nonplanar gaps.
Confirm validity and solid status afterward. Nearly planar or complicated loops may need explicit construction and inspection.
ChangeSeam
def ChangeSeam(face: BrepFace, direction: int, parameter: float, tolerance: float) -> BrepChange the seam of a closed trimmed surface.
ClosestPoint
def ClosestPoint(self, testPoint: Point3d) -> Point3d
def ClosestPoint(self, testPoint: Point3d, maximumDistance: float) -> tuple[bool, Point3d, ComponentIndex, float, float, Vector3d]The nearest point can belong to a face, edge, or vertex. Overloads return different additional information.
Interpret returned parameters with the component type. Edge parameters cannot be blindly interpreted as surface UV coordinates.
Compact
def Compact(self) -> NoneDeletes any unreferenced objects from arrays, re-indexes as needed, and shrinks arrays to minimum required size. Uses CUllUnused* members to delete any unreferenced objects from arrays.
CopyTrimCurves
def CopyTrimCurves(trimSource: BrepFace, surfaceSource: Surface, tolerance: float) -> BrepCopy all trims from a Brep face onto a surface.
CreateBaseballSphere
def CreateBaseballSphere(center: Point3d, radius: float, tolerance: float) -> BrepCreates a brep representation of the sphere with two similar trimmed NURBS surfaces, and no singularities.
CreateBlendShape
def CreateBlendShape(face0: BrepFace, edge0: BrepEdge, t0: float, rev0: bool, continuity0: BlendContinuity, face1: BrepFace, edge1: BrepEdge, t1: float, rev1: bool, continuity1: BlendContinuity) -> CurveMakes a curve blend between points on two surface edges. The blend will be tangent to the surfaces and perpendicular to the edges.
CreateBlendSurface
def CreateBlendSurface(face0: BrepFace, edge0: BrepEdge, domain0: Interval, rev0: bool, continuity0: BlendContinuity, face1: BrepFace, edge1: BrepEdge, domain1: Interval, rev1: bool, continuity1: BlendContinuity) -> Sequence[Brep]Makes a surface blend between two surface edges.
CreateBooleanDifference
def CreateBooleanDifference(firstBrep: Brep, secondBrep: Brep, tolerance: float) -> Sequence[Brep]
def CreateBooleanDifference(firstBrep: Brep, secondBrep: Brep, tolerance: float, manifoldOnly: bool) -> Sequence[Brep]
def CreateBooleanDifference(firstSet: Iterable[Brep], secondSet: Iterable[Brep], tolerance: float) -> Sequence[Brep]
def CreateBooleanDifference(firstSet: Iterable[Brep], secondSet: Iterable[Brep], tolerance: float, manifoldOnly: bool) -> Sequence[Brep]Difference is ordered: subtracting B from A differs from subtracting A from B.
Keep targets and cutters distinct. Coplanar faces, tiny features, and small gaps can make the operation numerically difficult.
CreateBooleanDifferenceWithIndexMap
def CreateBooleanDifferenceWithIndexMap(firstSet: Iterable[Brep], secondSet: Iterable[Brep], tolerance: float, manifoldOnly: bool) -> tuple[Sequence[Brep], Sequence[int]]Compute the solid difference between two sets of Breps.
CreateBooleanIntersection
def CreateBooleanIntersection(firstBrep: Brep, secondBrep: Brep, tolerance: float) -> Sequence[Brep]
def CreateBooleanIntersection(firstBrep: Brep, secondBrep: Brep, tolerance: float, manifoldOnly: bool) -> Sequence[Brep]
def CreateBooleanIntersection(firstSet: Iterable[Brep], secondSet: Iterable[Brep], tolerance: float) -> Sequence[Brep]
def CreateBooleanIntersection(firstSet: Iterable[Brep], secondSet: Iterable[Brep], tolerance: float, manifoldOnly: bool) -> Sequence[Brep]Intersection retains common regions, which can be empty or have several components.
Nonoverlapping bounds can reject candidates cheaply. Overlapping bounding boxes alone do not prove a solid intersection exists.
CreateBooleanSplit
def CreateBooleanSplit(firstBrep: Brep, secondBrep: Brep, tolerance: float) -> Sequence[Brep]
def CreateBooleanSplit(firstSet: Iterable[Brep], secondSet: Iterable[Brep], tolerance: float) -> Sequence[Brep]Splits shared areas of Breps and creates separate Breps from the shared and unshared parts.
CreateBooleanUnion
def CreateBooleanUnion(breps: Iterable[Brep], tolerance: float) -> Sequence[Brep]
def CreateBooleanUnion(breps: Iterable[Brep], tolerance: float, manifoldOnly: bool) -> Sequence[Brep] | tuple[Sequence[Brep], Sequence[Point3d], Sequence[Point3d], Sequence[Point3d]]Boolean union can return multiple components or fail. One input set does not guarantee one result.
Inspect output count, validity, and closure. Disjoint solids can remain separate, while tolerance-scale features can complicate intersections.
CreateChamferSurface
def CreateChamferSurface(face0: BrepFace, uv0: Point2d, radius0: float, face1: BrepFace, uv1: Point2d, radius1: float, extend: bool, tolerance: float) -> Sequence[Brep]
def CreateChamferSurface(face0: BrepFace, uv0: Point2d, radius0: float, face1: BrepFace, uv1: Point2d, radius1: float, trim: bool, extend: bool, tolerance: float) -> tuple[Sequence[Brep], Sequence[Brep], Sequence[Brep]]Creates a ruled surface as a bevel between two input surface edges.
CreateContourCurves
def CreateContourCurves(brepToContour: Brep, contourStart: Point3d, contourEnd: Point3d, interval: float) -> Sequence[Curve]
def CreateContourCurves(brepToContour: Brep, sectionPlane: Plane) -> Sequence[Curve]Constructs the contour curves for a brep at a specified interval.
CreateCurvatureAnalysisMesh
def CreateCurvatureAnalysisMesh(brep: Brep, state: Any) -> Sequence[Mesh]Create an array of analysis meshes for the brep using the specified settings. Meshes aren't set on the brep.
CreateDevelopableLoft
def CreateDevelopableLoft(crv0: Curve, crv1: Curve, reverse0: bool, reverse1: bool, density: int) -> Sequence[Brep]
def CreateDevelopableLoft(rail0: NurbsCurve, rail1: NurbsCurve, fixedRulings: Iterable[Point2d]) -> Sequence[Brep]Creates a single developable surface between two curves.
CreateEdgeSurface
def CreateEdgeSurface(curves: Iterable[Curve]) -> BrepConstructs a coons patch from 2, 3, or 4 curves.
CreateFilletEdges
def CreateFilletEdges(brep: Brep, edgeIndices: Iterable[int], startRadii: Iterable[float], endRadii: Iterable[float], blendType: BlendType, railType: RailType, setbackFillets: bool, tolerance: float, angleTolerance: float) -> Sequence[Brep]
def CreateFilletEdges(brep: Brep, edgeIndices: Iterable[int], startRadii: Iterable[float], endRadii: Iterable[float], blendType: BlendType, railType: RailType, tolerance: float) -> Sequence[Brep]Fillets, chamfers, or blends the edges of a brep.
CreateFilletEdgesVariableRadius
def CreateFilletEdgesVariableRadius(brep: Brep, edgeIndices: Iterable[int], edgeDistances: Mapping[int, Iterable[BrepEdgeFilletDistance]], blendType: BlendType, railType: RailType, setbackFillets: bool, tolerance: float, angleTolerance: float) -> Sequence[Brep]Fillets, chamfers, or blends the edges of a brep.
CreateFilletSurface
def CreateFilletSurface(face0: BrepFace, uv0: Point2d, face1: BrepFace, uv1: Point2d, radius: float, extend: bool, tolerance: float) -> Sequence[Brep]
def CreateFilletSurface(face0: BrepFace, uv0: Point2d, face1: BrepFace, uv1: Point2d, radius: float, trim: bool, extend: bool, tolerance: float) -> tuple[Sequence[Brep], Sequence[Brep], Sequence[Brep]]Creates a constant-radius round surface between two surfaces.
CreateFromBox
def CreateFromBox(box: BoundingBox) -> Brep
def CreateFromBox(box: Box) -> Brep
def CreateFromBox(corners: Iterable[Point3d]) -> BrepConstructs new brep that matches a bounding box.
CreateFromCone
def CreateFromCone(cone: Cone, capBottom: bool) -> BrepConstructs a Brep representation of the cone with a single face for the cone, an edge along the cone seam, and vertices at the base and apex ends of this seam edge. The optional cap is a single face with one circular edge starting and ending at the base vertex.
CreateFromCornerPoints
def CreateFromCornerPoints(corner1: Point3d, corner2: Point3d, corner3: Point3d, corner4: Point3d, tolerance: float) -> Brep
def CreateFromCornerPoints(corner1: Point3d, corner2: Point3d, corner3: Point3d, tolerance: float) -> BrepMakes a Brep with one face from four corner points.
CreateFromCylinder
def CreateFromCylinder(cylinder: Cylinder, capBottom: bool, capTop: bool) -> BrepConstructs a Brep definition of a cylinder.
CreateFromJoinedEdges
def CreateFromJoinedEdges(brep0: Brep, edgeIndex0: int, brep1: Brep, edgeIndex1: int, joinTolerance: float) -> BrepJoins two naked edges, or edges that are coincident or close together, from two Breps.
CreateFromLoft
def CreateFromLoft(curves: Iterable[Curve], start: Point3d, end: Point3d, loftType: LoftType, closed: bool) -> Sequence[Brep]
def CreateFromLoft(curves: Iterable[Curve], start: Point3d, end: Point3d, loftType: LoftType, closed: bool, angleTol: float) -> Sequence[Brep]
def CreateFromLoft(curves: Iterable[Curve], start: Point3d, end: Point3d, StartTangent: bool, EndTangent: bool, StartTrim: BrepTrim, EndTrim: BrepTrim, loftType: LoftType, closed: bool) -> Sequence[Brep]Constructs one or more Breps by lofting through a set of curves.
CreateFromLoftRebuild
def CreateFromLoftRebuild(curves: Iterable[Curve], start: Point3d, end: Point3d, loftType: LoftType, closed: bool, angleTol: float, rebuildPointCount: int) -> Sequence[Brep]
def CreateFromLoftRebuild(curves: Iterable[Curve], start: Point3d, end: Point3d, loftType: LoftType, closed: bool, rebuildPointCount: int) -> Sequence[Brep]Constructs one or more Breps by lofting through a set of curves. Input for the loft is simplified by rebuilding to a specified number of control points.
CreateFromLoftRefit
def CreateFromLoftRefit(curves: Iterable[Curve], start: Point3d, end: Point3d, loftType: LoftType, closed: bool, angleTol: float, refitTolerance: float) -> Sequence[Brep]
def CreateFromLoftRefit(curves: Iterable[Curve], start: Point3d, end: Point3d, loftType: LoftType, closed: bool, refitTolerance: float) -> Sequence[Brep]Constructs one or more Breps by lofting through a set of curves. Input for the loft is simplified by refitting to a specified tolerance.
CreateFromMatch
def CreateFromMatch(edge: BrepEdge, targetCurve: Curve, settings: MatchSrfSettings) -> tuple[bool, Brep, Brep]
def CreateFromMatch(edge: BrepEdge, targetCurves: Iterable[Curve], settings: MatchSrfSettings) -> tuple[bool, Brep, Brep]Match an edge to the target curve using the settings provided
CreateFromMesh
def CreateFromMesh(mesh: Mesh, trimmedTriangles: bool) -> BrepCreate a brep representation of a mesh
CreateFromOffsetFace
def CreateFromOffsetFace(face: BrepFace, offsetDistance: float, offsetTolerance: float, bothSides: bool, createSolid: bool) -> BrepOffsets a face including trim information to create a new brep.
CreateFromRevSurface
def CreateFromRevSurface(surface: RevSurface, capStart: bool, capEnd: bool) -> BrepConstructs a brep form of a surface of revolution.
CreateFromSphere
def CreateFromSphere(sphere: Sphere) -> BrepConstructs a Brep definition of a sphere.
CreateFromSurface
def CreateFromSurface(surface: Surface) -> BrepConstructs a Brep from a surface. The resulting Brep has an outer boundary made from four trims. The trims are ordered so that they run along the south, east, north, and then west side of the surface's parameter space.
CreateFromSweep
def CreateFromSweep(rail: Curve, shape: Curve, closed: bool, tolerance: float) -> Sequence[Brep]
def CreateFromSweep(rail: Curve, shapes: Iterable[Curve], closed: bool, tolerance: float) -> Sequence[Brep]
def CreateFromSweep(rail: Curve, shapes: Iterable[Curve], startPoint: Point3d, endPoint: Point3d, frameType: SweepFrame, roadlikeNormal: Vector3d, closed: bool, blendType: SweepBlend, miterType: SweepMiter, tolerance: float, rebuildType: SweepRebuild, rebuildPointCount: int, refitTolerance: float) -> Sequence[Brep]
def CreateFromSweep(rail1: Curve, rail2: Curve, shape: Curve, closed: bool, tolerance: float) -> Sequence[Brep]
def CreateFromSweep(rail1: Curve, rail2: Curve, shapes: Iterable[Curve], closed: bool, tolerance: float) -> Sequence[Brep]
def CreateFromSweep(rail1: Curve, rail2: Curve, shapes: Iterable[Curve], start: Point3d, end: Point3d, closed: bool, tolerance: float, rebuild: SweepRebuild, rebuildPointCount: int, refitTolerance: float, preserveHeight: bool) -> Sequence[Brep]
def CreateFromSweep(rail1: Curve, rail2: Curve, shapes: Iterable[Curve], start: Point3d, end: Point3d, closed: bool, tolerance: float, rebuild: SweepRebuild, rebuildPointCount: int, refitTolerance: float, preserveHeight: bool, autoAdjust: bool) -> Sequence[Brep]Sweep1 function that fits a surface through a profile curve that define the surface cross-sections and one curve that defines a surface edge.
CreateFromSweepInParts
def CreateFromSweepInParts(rail1: Curve, rail2: Curve, shapes: Iterable[Curve], rail_params: Iterable[Point2d], closed: bool, tolerance: float) -> Sequence[Brep]Makes a 2 rail sweep. Like CreateFromSweep but the result is split where parameterization along a rail changes abruptly.
CreateFromSweepSegmented
def CreateFromSweepSegmented(rail: Curve, shape: Curve, closed: bool, tolerance: float) -> Sequence[Brep]
def CreateFromSweepSegmented(rail: Curve, shapes: Iterable[Curve], closed: bool, tolerance: float) -> Sequence[Brep]
def CreateFromSweepSegmented(rail: Curve, shapes: Iterable[Curve], startPoint: Point3d, endPoint: Point3d, frameType: SweepFrame, roadlikeNormal: Vector3d, closed: bool, blendType: SweepBlend, miterType: SweepMiter, tolerance: float, rebuildType: SweepRebuild, rebuildPointCount: int, refitTolerance: float) -> Sequence[Brep]Sweep1 function that fits a surface through a profile curve that define the surface cross-sections and one curve that defines a surface edge. The Segmented version breaks the rail at curvature kinks and sweeps each piece separately, then put the results together into a Brep.
CreateFromTaperedExtrude
def CreateFromTaperedExtrude(curveToExtrude: Curve, distance: float, direction: Vector3d, basePoint: Point3d, draftAngleRadians: float, cornerType: ExtrudeCornerType) -> Sequence[Brep]
def CreateFromTaperedExtrude(curveToExtrude: Curve, distance: float, direction: Vector3d, basePoint: Point3d, draftAngleRadians: float, cornerType: ExtrudeCornerType, tolerance: float, angleToleranceRadians: float) -> Sequence[Brep]Extrude a curve to a taper making a brep (potentially more than 1)
CreateFromTaperedExtrudeWithRef
def CreateFromTaperedExtrudeWithRef(curve: Curve, direction: Vector3d, distance: float, draftAngle: float, plane: Plane, tolerance: float) -> Sequence[Brep]Creates one or more Breps by extruding a curve a distance along an axis with draft angle.
CreateFromTorus
def CreateFromTorus(torus: Torus) -> BrepConstructs a Brep definition of a torus.
CreateOffsetBrep
def CreateOffsetBrep(brep: Brep, distance: float, solid: bool, extend: bool, shrink: bool, tolerance: float) -> tuple[Sequence[Brep], Sequence[Brep], Sequence[Brep]]
def CreateOffsetBrep(brep: Brep, distance: float, solid: bool, extend: bool, tolerance: float) -> tuple[Sequence[Brep], Sequence[Brep], Sequence[Brep]]Offsets a Brep.
CreatePatch
def CreatePatch(geometry: Iterable[GeometryBase], startingSurface: Surface, tolerance: float) -> Brep
def CreatePatch(geometry: Iterable[GeometryBase], startingSurface: Surface, uSpans: int, vSpans: int, trim: bool, tangency: bool, pointSpacing: float, flexibility: float, surfacePull: float, fixEdges: Iterable[bool], tolerance: float) -> Brep
def CreatePatch(geometry: Iterable[GeometryBase], uSpans: int, vSpans: int, tolerance: float) -> BrepConstructs a brep patch. This is the simple version of fit that uses a specified starting surface.
CreatePipe
def CreatePipe(rail: Curve, radius: float, localBlending: bool, cap: PipeCapMode, fitRail: bool, absoluteTolerance: float, angleToleranceRadians: float) -> Sequence[Brep]
def CreatePipe(rail: Curve, railRadiiParameters: Iterable[float], radii: Iterable[float], localBlending: bool, cap: PipeCapMode, fitRail: bool, absoluteTolerance: float, angleToleranceRadians: float) -> Sequence[Brep]Creates a single walled pipe.
CreatePlanarBreps
def CreatePlanarBreps(inputLoop: Curve) -> Sequence[Brep]
def CreatePlanarBreps(inputLoop: Curve, tolerance: float) -> Sequence[Brep]
def CreatePlanarBreps(inputLoops: Iterable[Curve]) -> Sequence[Brep]
def CreatePlanarBreps(inputLoops: Iterable[Curve], tolerance: float) -> Sequence[Brep]
def CreatePlanarBreps(inputLoops: Any) -> Sequence[Brep]
def CreatePlanarBreps(inputLoops: Any, tolerance: float) -> Sequence[Brep]Constructs a set of planar breps as outlines by the loops.
CreatePlanarDifference
def CreatePlanarDifference(b0: Brep, b1: Brep, plane: Plane, tolerance: float) -> Sequence[Brep]CreatePlanarDifference
CreatePlanarIntersection
def CreatePlanarIntersection(b0: Brep, b1: Brep, plane: Plane, tolerance: float) -> Sequence[Brep]CreatePlanarIntersection
CreatePlanarUnion
def CreatePlanarUnion(b0: Brep, b1: Brep, plane: Plane, tolerance: float) -> Sequence[Brep]
def CreatePlanarUnion(breps: Iterable[Brep], plane: Plane, tolerance: float) -> Sequence[Brep]CreatePlanarUnion
CreateQuadSphere
def CreateQuadSphere(sphere: Sphere) -> BrepConstructs a Brep definition of a quad sphere.
CreateShell
def CreateShell(brep: Brep, facesToRemove: Iterable[int], distance: float, tolerance: float) -> Sequence[Brep]Creates a hollowed out shell from a solid Brep. Function only operates on simple, solid, manifold Breps.
CreateSolid
def CreateSolid(breps: Iterable[Brep], tolerance: float) -> Sequence[Brep]Constructs closed polysurfaces from surfaces and polysurfaces that bound a region in space.
CreateThickPipe
def CreateThickPipe(rail: Curve, radius0: float, radius1: float, localBlending: bool, cap: PipeCapMode, fitRail: bool, absoluteTolerance: float, angleToleranceRadians: float) -> Sequence[Brep]
def CreateThickPipe(rail: Curve, railRadiiParameters: Iterable[float], radii0: Iterable[float], radii1: Iterable[float], localBlending: bool, cap: PipeCapMode, fitRail: bool, absoluteTolerance: float, angleToleranceRadians: float) -> Sequence[Brep]Creates a double-walled pipe.
CreateTrimmedPlane
def CreateTrimmedPlane(plane: Plane, curve: Curve) -> Brep
def CreateTrimmedPlane(plane: Plane, curves: Iterable[Curve]) -> BrepCreate a Brep trimmed plane.
CreateTrimmedSurface
def CreateTrimmedSurface(trimSource: BrepFace, surfaceSource: Surface) -> Brep
def CreateTrimmedSurface(trimSource: BrepFace, surfaceSource: Surface, tolerance: float) -> BrepConstructs a Brep using the trimming information of a brep face and a surface. Surface must be roughly the same shape and in the same location as the trimming brep face.
CullUnused2dCurves
def CullUnused2dCurves(self) -> boolCulls 3d curves not referenced by an edge.
CullUnused3dCurves
def CullUnused3dCurves(self) -> boolCulls 2d curves not referenced by a trim.
CullUnusedEdges
def CullUnusedEdges(self) -> boolCulls edges with m_edge_index == -1.
CullUnusedFaces
def CullUnusedFaces(self) -> boolCulls faces with m_face_index == -1.
CullUnusedLoops
def CullUnusedLoops(self) -> boolCulls loops with m_loop_index == -1.
CullUnusedSurfaces
def CullUnusedSurfaces(self) -> boolCulls surfaces not referenced by a face.
CullUnusedTrims
def CullUnusedTrims(self) -> boolCulls trims with m_trim_index == -1.
CullUnusedVertices
def CullUnusedVertices(self) -> boolCulls vertices with m_vertex_index == -1.
CutUpSurface
def CutUpSurface(surface: Surface, curves: Iterable[Curve], flip: bool, fitTolerance: float, keepTolerance: float) -> Sequence[Brep]
def CutUpSurface(surface: Surface, curves: Iterable[Curve], useEdgeCurves: bool, tolerance: float) -> Sequence[Brep]Splits, or cuts up, a surface. Designed to split the underlying surface of a Brep face with edge curves.
DestroyRegionTopology
def DestroyRegionTopology(self) -> NoneDestroys a Brep's region topology information.
Duplicate
def Duplicate(self) -> GeometryBaseCopies this brep.
DuplicateBrep
def DuplicateBrep(self) -> BrepSame as Rhino.Geometry.Brep.Duplicate, but already performs a cast to a brep. This cast always succeeds.
DuplicateEdgeCurves
def DuplicateEdgeCurves(self) -> Sequence[Curve]
def DuplicateEdgeCurves(self, nakedOnly: bool) -> Sequence[Curve]Duplicate all the edges of this Brep.
DuplicateNakedEdgeCurves
def DuplicateNakedEdgeCurves(self, nakedOuter: bool, nakedInner: bool) -> Sequence[Curve]Duplicate naked edges of this Brep.
DuplicateSubBrep
def DuplicateSubBrep(self, faceIndices: Iterable[int]) -> BrepCopy a subset of this Brep into another Brep.
DuplicateVertices
def DuplicateVertices(self) -> Sequence[Point3d]Duplicate all the corner vertices of this Brep.
ExtendBrepFacesToConnect
def ExtendBrepFacesToConnect(Face0: BrepFace, edgeIndex0: int, Face1: BrepFace, edgeIndex1: int, tol: float, angleTol: float) -> tuple[bool, Brep, Brep]
def ExtendBrepFacesToConnect(Face0: BrepFace, f0_sel_pt: Point3d, Face1: BrepFace, f1_sel_pt: Point3d, tol: float, angleTol: float) -> tuple[bool, Brep, Brep]Extends Faces to meet and trims the faces to each other. If input faces intersect without extending, the selection point indicates the side to keep
FindCoincidentBrepComponents
def FindCoincidentBrepComponents(self, point: Point3d, tolerance: float) -> tuple[Sequence[int], Sequence[int], Sequence[int]]Find the indices of all brep faces, edges and vertices that are within tolerance of a test-point.
Flip
def Flip(self) -> NoneReverses entire brep orientation of all faces.
GetArea
def GetArea(self) -> float
def GetArea(self, relativeTolerance: float, absoluteTolerance: float) -> floatCompute the Area of the Brep. If you want proper Area data with moments and error information, use the AreaMassProperties class.
GetConnectedComponents
def GetConnectedComponents(self) -> Sequence[Brep]If this Brep has two or more connected components, then duplicates of the connected components are returned.
GetPointInside
def GetPointInside(self, tolerance: float) -> tuple[bool, Point3d]Finds a point inside of a solid Brep.
GetRegions
def GetRegions(self) -> Sequence[BrepRegion]Gets an array containing all regions in this brep.
GetTangentConnectedComponents
def GetTangentConnectedComponents(self, angleTolerance: float, includeMeshes: bool) -> Sequence[Brep]If this Brep has two or more components connected by tangent edges, then duplicates of the connected components are returned.
GetVolume
def GetVolume(self) -> float
def GetVolume(self, relativeTolerance: float, absoluteTolerance: float) -> floatCompute the Volume of the Brep. If you want proper Volume data with moments and error information, use the VolumeMassProperties class.
GetWireframe
def GetWireframe(self, density: int) -> Sequence[Curve]Constructs all the Wireframe curves for this Brep.
InsetFaces
def InsetFaces(self, faceIndices: Iterable[int], distance: float, loose: bool, ignoreSeams: bool, creaseCorners: bool, tolerance: float, angleTolerance: float) -> BrepIndividually insets faces of a brep by offsetting the faces outer edges inward and inner edges out then splitting the face with the offset curves.
IsBox
def IsBox(self) -> bool
def IsBox(self, tolerance: float) -> boolVerifies a Brep is in the form of a solid box.
IsDuplicate
def IsDuplicate(self, other: Brep, tolerance: float) -> boolSee if this and other are same brep geometry.
IsOrientedManifold
def IsOrientedManifold(self) -> tuple[bool, bool, bool]Test a Brep to see if it is an oriented manifold. Non manifold Breps have at least one edge that is shared among three or more faces.
IsPointInside
def IsPointInside(self, point: Point3d, tolerance: float, strictlyIn: bool) -> boolA point-in-solid test needs a suitable closed Brep, tolerance, and boundary policy.
Validate the boundary first. Near-boundary queries need consistent classification rather than repeated ad hoc tolerance changes.
IsValidGeometry
def IsValidGeometry(self) -> tuple[bool, str]Expert user function that tests the brep to see if its geometry information is valid. The value of brep.IsValidTopology() must be true before brep.IsValidGeometry() can be safely called.
IsValidTolerancesAndFlags
def IsValidTolerancesAndFlags(self) -> tuple[bool, str]Expert user function that tests the brep to see if its tolerances and flags are valid. The values of brep.IsValidTopology() and brep.IsValidGeometry() must be true before brep.IsValidTolerancesAndFlags() can be safely called.
IsValidTopology
def IsValidTopology(self) -> tuple[bool, str]Tests the brep to see if its topology information is valid.
Join
def Join(self, otherBrep: Brep, tolerance: float, compact: bool) -> boolIf any edges of this brep overlap edges of otherBrep, merge a copy of otherBrep into this brep joining all edges that overlap within tolerance.
JoinBreps
def JoinBreps(brepsToJoin: Iterable[Brep], tolerance: float) -> Sequence[Brep]
def JoinBreps(brepsToJoin: Iterable[Brep], tolerance: float, angleTolerance: float) -> Sequence[Brep] | tuple[Sequence[Brep], Sequence[Sequence[int]]]Joining merges compatible boundaries within tolerance. It does not guarantee a closed or valid result.
Inspect naked edges. Raising tolerance can conceal mismatches and should follow a deliberate modeling accuracy policy.
JoinEdges
def JoinEdges(self, edgeIndex0: int, edgeIndex1: int, joinTolerance: float, compact: bool) -> boolJoins two naked edges, or edges that are coincident or close together.
JoinNakedEdges
def JoinNakedEdges(self, tolerance: float) -> intJoins naked edge pairs within the same brep that overlap within tolerance.
MakeValidForV2
def MakeValidForV2(self) -> boolNo support is available for this function. Expert user function that converts all geometry in Brep to NURB form.
MergeBreps
def MergeBreps(brepsToMerge: Iterable[Brep], tolerance: float) -> BrepCombines two or more breps into one. A merge is like a boolean union that keeps the inside pieces. This function creates non-manifold Breps which in general are unusual in Rhino. You may want to consider using JoinBreps or CreateBooleanUnion functions instead.
MergeCoplanarFaces
def MergeCoplanarFaces(self, faceIndex: int, tolerance: float, angleTolerance: float) -> bool
def MergeCoplanarFaces(self, faceIndex0: int, faceIndex1: int, tolerance: float, angleTolerance: float) -> bool
def MergeCoplanarFaces(self, tolerance: float) -> bool
def MergeCoplanarFaces(self, tolerance: float, angleTolerance: float) -> boolMerges coplanar faces adjacent to Brep face into a single face.
MergeSurfaces
def MergeSurfaces(brep0: Brep, brep1: Brep, tolerance: float, angleToleranceRadians: float) -> Brep
def MergeSurfaces(brep0: Brep, brep1: Brep, tolerance: float, angleToleranceRadians: float, point0: Point2d, point1: Point2d, roundness: float, smooth: bool) -> Brep
def MergeSurfaces(surface0: Surface, surface1: Surface, tolerance: float, angleToleranceRadians: float) -> BrepMerges two surfaces into one surface at untrimmed edges. Both surfaces must be untrimmed and share an edge.
PushPullExtend
def PushPullExtend(self, faceIndex: int, transform: Transform, tolerance: float) -> BrepIf the brep.Faces[faceIndex] is planar, and all the adjacent faces are planar, this function transforms brep.Faces[faceIndex] with the transform parameter and recomputes the adjacent faces. See the PushPull commands extend mode.
RebuildTrimsForV2
def RebuildTrimsForV2(self, face: BrepFace, nurbsSurface: NurbsSurface) -> NoneNo support is available for this function. Expert user function used by MakeValidForV2 to convert trim curves from one surface to its NURBS form. After calling this function, you need to change the surface of the face to a NurbsSurface.
RemoveFins
def RemoveFins(self) -> boolRecursively removes any Brep face with a naked edge. This function is only useful for non-manifold Breps.
RemoveHoles
def RemoveHoles(self, loops: Iterable[ComponentIndex], tolerance: float) -> Brep
def RemoveHoles(self, tolerance: float) -> BrepRemoves inner loops, or holes, in a Brep.
Repair
def Repair(self, tolerance: float) -> boolFills in missing or fixes incorrect component information from a Brep. Useful when reading Brep information from other file formats that do not provide as complete of a Brep definition as required by Rhino.
SetTolerancesBoxesAndFlags
def SetTolerancesBoxesAndFlags(self) -> None
def SetTolerancesBoxesAndFlags(self, bLazy: bool, bSetVertexTolerances: bool, bSetEdgeTolerances: bool, bSetTrimTolerances: bool, bSetTrimIsoFlags: bool, bSetTrimTypeFlags: bool, bSetLoopTypeFlags: bool, bSetTrimBoxes: bool) -> NoneSet tolerances and flags in a Brep.
SetTrimIsoFlags
def SetTrimIsoFlags(self) -> NoneThis function can be used to set the BrepTrim::m_iso flag. It is intended to be used when creating a Brep from a definition that does not include compatible parameter space type information.
SetVertices
def SetVertices(self) -> NoneThis function can be used to compute vertex information for a b-rep when everything but the Vertices array is properly filled in. It is intended to be used when creating a Brep from a definition that does not include explicit vertex information.
Split
def Split(self, cutter: Brep, intersectionTolerance: float) -> Sequence[Brep] | tuple[Sequence[Brep], bool]
def Split(self, cutters: Iterable[Brep], intersectionTolerance: float) -> Sequence[Brep]
def Split(self, cutters: Iterable[Curve], intersectionTolerance: float) -> Sequence[Brep]
def Split(self, cutters: Iterable[GeometryBase], normal: Vector3d, planView: bool, intersectionTolerance: float) -> Sequence[Brep]Splits a Brep into pieces using a Brep as a cutter.
SplitDisjointPieces
def SplitDisjointPieces(brep: Brep) -> Sequence[Brep] | tuple[Sequence[Brep], Sequence[Sequence[int]]]Separates, or splits, a disjoint Brep into separate Breps.
Standardize
def Standardize(self) -> NoneStandardizes all trims, edges, and faces in the brep. After standardizing, there may be unused curves and surfaces in the brep. Call Brep.Compact to remove these unused curves and surfaces.
TransformComponent
def TransformComponent(self, components: Iterable[ComponentIndex], xform: Transform, tolerance: float, timeLimit: float, useMultipleThreads: bool) -> boolTransform an array of Brep components, bend neighbors to match, and leave the rest fixed.
Trim
def Trim(self, cutter: Brep, intersectionTolerance: float) -> Sequence[Brep]
def Trim(self, cutter: Plane, intersectionTolerance: float) -> Sequence[Brep]Trims a brep with an oriented cutter. The parts of the brep that lie inside (opposite the normal) of the cutter are retained while the parts to the outside (in the direction of the normal) are discarded. If the Cutter is closed, then a connected component of the Brep that does not intersect the cutter is kept if and only if it is contained in the inside of cutter. That is the region bounded by cutter opposite from the normal of cutter, If cutter is not closed all these components are kept.
TryConvertBrep
def TryConvertBrep(geometry: GeometryBase) -> BrepAttempts to convert a generic Geometry object into a Brep.
UnjoinEdges
def UnjoinEdges(self, edgesToUnjoin: Iterable[int]) -> Sequence[Brep]Un-joins, or separates, edges within the Brep. Note, seams in closed surfaces will not separate.
BrepEdge
16 members
An edge is a topological connection backed by a 3D curve. Edge and trim directions can differ.
Adjacency determines naked, manifold, and nonmanifold edges. Coincident geometry does not alone establish shared topology.
Permanent link · Official RhinoCommon reference
Tolerance
def Tolerance(self) -> floatGets or sets the accuracy of the edge curve (>=0.0 or RhinoMath.UnsetValue) A value of UnsetValue indicates that the tolerance should be computed. The maximum distance from the edge's 3d curve to any surface of a face that has this edge as a portion of its boundary must be <= this tolerance.
TrimCount
def TrimCount(self) -> intGets the number of trim-curves that use this edge.
Valence
def Valence(self) -> EdgeAdjacencyGets the topological valency of this edge. The topological valency is defined by how many adjacent faces share this edge.
Brep
def Brep(self) -> BrepGets the Brep that owns this edge.
EdgeIndex
def EdgeIndex(self) -> intGets the index of this edge in the Brep.Edges collection.
ProxyBrepSubDEdgeId
def ProxyBrepSubDEdgeId(self) -> intIf this edge is part of a brep created by SubD.ProxyBrep(), then the subd component id of the corresponding SubD edge is returned. Otherwise 0 is returned.
EdgeCurveIndex
def EdgeCurveIndex(self) -> intGet the brep.Curves3D[] index of the 3d curve geometry used by this edge or -1.
EdgeCurve
def EdgeCurve(self) -> CurveGet the brep.Curves3D[] 3d curve geometry used by this edge or null.
StartVertex
def StartVertex(self) -> BrepVertexBrepVertex at start of edge
EndVertex
def EndVertex(self) -> BrepVertexBrepVertex at end of edge
AdjacentFaces
def AdjacentFaces(self) -> Sequence[int]Gets the indices of all the BrepFaces that use this edge.
ConcavityAt
def ConcavityAt(self, t: float, tolerance: float) -> ConcavityDetermine the concavity of this edge at a specific parameter.
GetEdgeParameter
def GetEdgeParameter(self, trimIndex: int, trimParameter: float) -> tuple[bool, float]Get corresponding edge parameter for given trim at given trim parameter.
IsSmoothManifoldEdge
def IsSmoothManifoldEdge(self, angleToleranceRadians: float=...) -> boolFor a manifold, non-boundary edge, decides whether or not the two surfaces on either side meet smoothly.
SetEdgeCurve
def SetEdgeCurve(self, curve3dIndex: int) -> bool
def SetEdgeCurve(self, curve3dIndex: int, subDomain: Interval) -> boolSet 3d curve geometry used by a b-rep edge.
TrimIndices
def TrimIndices(self) -> Sequence[int]Gets the indices of all trims associated with this edge.
BrepEdgeFilletDistance
3 members
Fillet distances along a BrepEdge
Permanent link · Official RhinoCommon reference
__init__
def __init__(self, edgeParameter: float, filletDistance: float) -> NoneConstruct a fillet distance
EdgeParameter
def EdgeParameter(self) -> floatThe parameter along the BrepEdge where to apply a fillet distance (radius)
FilletDistance
def FilletDistance(self) -> floatDistance to fillet
BrepFace
38 members
A face references an underlying surface and trimming loops. A point on that surface may lie outside the trimmed face. Geometry and topology must be considered together.
Outer and inner loops define retained regions. Surface evaluation can pass through holes, so placement needs trim-aware classification.
Permanent link · Official RhinoCommon reference
Brep
def Brep(self) -> BrepGets the Brep that owns this face.
OrientationIsReversed
def OrientationIsReversed(self) -> boolA face can use the opposite orientation from its underlying surface.
Apply the topological orientation sign when deriving an outward normal. The surface normal alone follows only its parameterization.
IsSurface
def IsSurface(self) -> boolGets a value indicating whether the face is synonymous with the underlying surface. If a Face has no trimming curves then it is considered a Surface.
FaceIndex
def FaceIndex(self) -> intIndex of face in Brep.Faces array.
SurfaceIndex
def SurfaceIndex(self) -> intSurface index of the 3d surface geometry used by this face or -1
Loops
def Loops(self) -> AnyLoops in this face.
OuterLoop
def OuterLoop(self) -> BrepLoopEvery face has a single outer loop.
MaterialChannelIndex
def MaterialChannelIndex(self) -> intThis face's rendering material channel index.
PackId
def PackId(self) -> int0 if the pack it is unset, or >0 if the set pack id.
ProxyBrepSubDFaceId
def ProxyBrepSubDFaceId(self) -> intIf this face is part of a brep created by SubD.ProxyBrep(), then the subd component id of the corresponding SubD face is returned. Otherwise 0 is returned.
Id
def Id(self) -> AnyGets or sets the persistent id of this Brep face. By default, the id is Guid.Zero. Note, Rhino does not set this id. Thus, the property is available for use as a way of tracking Brep faces.
PerFaceColor
def PerFaceColor(self) -> AnyIf per-face color is "Empty", then this face does not have a custom color
AdjacentEdges
def AdjacentEdges(self) -> Sequence[int]Gets the indices of all the BrepEdges that delineate this Face.
AdjacentFaces
def AdjacentFaces(self) -> Sequence[int]Gets the indices of all the BrepFaces that surround (are adjacent to) this face.
ChangeSurface
def ChangeSurface(self, surfaceIndex: int) -> boolExpert user tool that replaces the 3d surface geometry use by the face.
ClearMaterialChannelIndex
def ClearMaterialChannelIndex(self) -> NoneClear this face's rendering material channel index.
ClearPackId
def ClearPackId(self) -> NoneSets BrepFace.PackId to 0.
CreateExtrusion
def CreateExtrusion(self, pathCurve: Curve, cap: bool) -> BrepExtrude a face in a Brep. Interop note: this CLR method group hides or extends a base method in a way Python override checking cannot fully represent.
DraftAnglePoint
def DraftAnglePoint(self, testPoint: Point2d, testAngle: float, pullDirection: Vector3d, edge: bool) -> tuple[bool, Point3d, float]Returns the surface draft angle and point at a parameter.
DuplicateFace
def DuplicateFace(self, duplicateMeshes: bool) -> BrepDuplicating a face retains trimming topology in a new Brep.
The result can be open. Extracting one face from a solid does not preserve its original volume enclosure.
DuplicateSurface
def DuplicateSurface(self) -> SurfaceThe duplicated underlying surface does not retain the face's trimming loops.
Use DuplicateFace to preserve trims. The untrimmed surface can extend through holes and beyond the visible face boundary.
FilletSurfaceToCurve
def FilletSurfaceToCurve(self, curve: Curve, t: float, u: float, v: float, radius: float, alignToCurve: int, railDegree: int, arcDegree: int, arcSliders: Iterable[float], numBezierSrfs: int, tolerance: float, out_fillets: Iterable[Brep]) -> tuple[bool, Sequence[float]]Creates a constant-radius fillet surface between a surface and the curve.
FilletSurfaceToRail
def FilletSurfaceToRail(self, curveOnFace: Curve, secondFace: BrepFace, u1: float, v1: float, railDegree: int, arcDegree: int, arcSliders: Iterable[float], numBezierSrfs: int, extend: bool, split_type: FilletSurfaceSplitType, tolerance: float, out_fillets: Iterable[Brep], out_breps0: Iterable[Brep], out_breps1: Iterable[Brep]) -> tuple[bool, Sequence[float]]Creates a surface between two surfaces, with a fixed rail curve on the first surface.
GetMesh
def GetMesh(self, meshType: MeshType) -> MeshObtains a reference to a specified type of mesh for this brep face.
IsPointOnFace
def IsPointOnFace(self, u: float, v: float) -> PointFaceRelation
def IsPointOnFace(self, u: float, v: float, tolerance: float) -> PointFaceRelationThis classifies UV coordinates against the retained trimming region, including holes and boundaries.
Surface projection can produce UV values outside the face. Use the classification when a subsequent operation must remain on the visible face.
PullPointsToFace
def PullPointsToFace(self, points: Iterable[Point3d], tolerance: float) -> Sequence[Point3d]Pulls one or more points to a brep face.
RebuildEdges
def RebuildEdges(self, tolerance: float, rebuildSharedEdges: bool, rebuildVertices: bool) -> boolRebuild the edges used by a face so they lie on the surface.
RefitTrim
def RefitTrim(self, edge: BrepEdge, knots: Iterable[float], tolerance: float, bSections: bool, fitQuality: float) -> tuple[Sequence[Surface], float]The RefitTrim command replaces a trimmed surface edge with an untrimmed edge.
RemoveHoles
def RemoveHoles(self, tolerance: float) -> BrepRemove all inner loops, or holes, from a Brep face.
SetDomain
def SetDomain(self, direction: int, domain: Interval) -> boolSets the surface domain of this face.
SetMesh
def SetMesh(self, meshType: MeshType, mesh: Mesh) -> boolSets a reference to a specified type of mesh for this brep face.
SetPackId
def SetPackId(self, packId: int) -> NoneUsed by SubD functions that create breps to transmit the subd face SubDFace.PackId value to the brep face or faces generated from the subd face. Unless you are an expert and doing something very carefully and very fancy, to not call this function.
ShrinkFace
def ShrinkFace(self, disableSide: Any) -> boolShrinks the underlying untrimmed surface of this Brep face close to trimming boundaries. Shrinking a surface is like extending smoothly, only backwards. knot of full multiplicity are added where you want the surface to be cut off. Then the remaining control points are thrown away.
ShrinkSurfaceToEdge
def ShrinkSurfaceToEdge(self) -> boolShrinks the underlying untrimmed surface of this Brep face right to the trimming boundaries. Note, shrinking the trimmed surface can sometimes cause problems later since having the edges so close to the trimming boundaries can cause commands that use the surface edges as input to fail.
Split
def Split(self, curves: Iterable[Curve], tolerance: float) -> Brep
def Split(self, direction: int, parameter: float) -> Sequence[Surface]Split this face using 3D trimming curves.
TrimAwareIsoCurve
def TrimAwareIsoCurve(self, direction: int, constantParameter: float) -> Sequence[Curve]Similar to IsoCurve function, except this function pays attention to trims on faces and may return multiple curves.
TrimAwareIsoIntervals
def TrimAwareIsoIntervals(self, direction: int, constantParameter: float) -> Sequence[Interval]Gets intervals where the iso curve exists on a BrepFace (trimmed surface)
UnderlyingSurface
def UnderlyingSurface(self) -> SurfaceGets the untrimmed surface that is the base of this face.
BrepLoop
8 members
Loops group oriented trims into face boundaries and holes.
Outer and inner classifications jointly define the retained region. Preserve classification and orientation when reconstructing a face.
Permanent link · Official RhinoCommon reference
Brep
def Brep(self) -> BrepGets the Brep that owns this loop.
LoopIndex
def LoopIndex(self) -> intGets the index of this loop in the Brep.Loops collection.
Face
def Face(self) -> BrepFaceBrepFace this loop belongs to.
LoopType
def LoopType(self) -> BrepLoopTypetype of loop.
Trims
def Trims(self) -> AnyList of trims for this loop
IsSurfaceBoundary
def IsSurfaceBoundary(self) -> boolTrue if the loop's trims all run along the edge's of the underlying surface's parameter space.
To2dCurve
def To2dCurve(self) -> CurveCreate a 2d curve that traces the entire loop
To3dCurve
def To3dCurve(self) -> CurveCreate a 3D curve that approximates the loop geometry.
BrepLoopType
0 members
Each brep loop has a defined type, e.g. outer, inner or point on surface.
BrepRegion
6 members
Represents a brep topological region that has sides.
Permanent link · Official RhinoCommon reference
Brep
def Brep(self) -> BrepGets a reference to the Brep this region belongs to.
Index
def Index(self) -> intGets the index of region in the RegionTopology array.
IsFinite
def IsFinite(self) -> boolGets a value indicating whether this region is finite.
BoundingBox
def BoundingBox(self) -> BoundingBoxGets the region bounding box.
BoundaryBrep
def BoundaryBrep(self) -> BrepGets the boundary of a region as a brep object. If the region is finite, the boundary will be a closed manifold brep. The boundary may have more than one connected component.
GetFaceSides
def GetFaceSides(self) -> Sequence[BrepRegionFaceSide]Gets an array of Rhino.Geometry.BrepRegionFaceSide entities delimiting this region.
BrepRegionFaceSide
4 members
Represents a side of a Rhino.Geometry.BrepRegion entity.
Permanent link · Official RhinoCommon reference
Brep
def Brep(self) -> BrepThe brep this side belongs to.
Region
def Region(self) -> BrepRegionThe region this side belongs to.
SurfaceNormalPointsIntoRegion
def SurfaceNormalPointsIntoRegion(self) -> boolGets true if BrepFace's surface normal points into region; false otherwise.
Face
def Face(self) -> BrepFaceGets the face this side belongs to.
BrepSolidOrientation
0 members
Enumerates all possible Solid Orientations for a Brep.
BrepTrim
16 members
A trim is a curve in face parameter space, connected to Brep topology.
Its parameterization can differ from the corresponding 3D edge. Use correspondence methods instead of equating their parameters.
Permanent link · Official RhinoCommon reference
Brep
def Brep(self) -> BrepGets the Brep that owns this trim.
Loop
def Loop(self) -> BrepLoopLoop that this trim belongs to
Face
def Face(self) -> BrepFaceBrep face this trim belongs to
Edge
def Edge(self) -> BrepEdgeBrep edge this trim belongs to. This will be null for singular trims
TrimCurveIndex
def TrimCurveIndex(self) -> intGets the Brep.Curves2D 2d curve index of the 2d curve geometry used by this trim, or -1.
TrimCurve
def TrimCurve(self) -> CurveGets the Brep.Curves2D 2d curve geometry used by this trim, or null.
TrimIndex
def TrimIndex(self) -> intGets the index of this trim in the Brep.Trims collection.
TrimType
def TrimType(self) -> BrepTrimTypeType of trim
IsoStatus
def IsoStatus(self) -> IsoStatusSee the signature and official API documentation for this member.
StartVertex
def StartVertex(self) -> BrepVertexBrepVertex at start of trim
EndVertex
def EndVertex(self) -> BrepVertexBrepVertex at end of trim
GetTolerances
def GetTolerances(self) -> tuple[float, float]The values in tolerance[] record the accuracy of the parameter space trimming curves.
GetTrimParameter
def GetTrimParameter(self, edgeParameter: float) -> tuple[bool, float]Get corresponding trim parameter at given edge parameter.
IsReversed
def IsReversed(self) -> boolGet orientation of trim with respect to it's corresponding edge.
SetTolerances
def SetTolerances(self, toleranceU: float, toleranceV: float) -> NoneThe values in tolerance[] record the accuracy of the parameter space trimming curves.
SetTrimCurve
def SetTrimCurve(self, curve2dIndex: int) -> bool
def SetTrimCurve(self, curve2dIndex: int, subDomain: Interval) -> boolSet 2d curve geometry used by a b-rep trim.
BrepTrimType
0 members
Each brep trim has a defined type.
BrepVertex
5 members
A vertex is a topological endpoint with position and tolerance. Nearby positions do not automatically identify one vertex.
Keep connectivity identity separate from coordinate equality. Joining can alter vertex relationships according to tolerance rules.
Permanent link · Official RhinoCommon reference
Brep
def Brep(self) -> BrepGets the Brep that owns this vertex.
VertexIndex
def VertexIndex(self) -> intGets the index of this vertex in the Brep.Vertices collection.
Tolerance
def Tolerance(self) -> floatAccuracy of vertex point, either >=0.0 or Rhino.RhinoMath.UnsetValue. A value of Rhino.RhinoMath.UnsetValue indicates that the tolerance should be computed. A value of 0.0 indicates that the distance from the vertex to any applicable edge or trim end is <= Rhino.RhinoMath.ZeroTolerance. If an edge begins or ends at this vertex, then the distance from the vertex's 3d point to the appropriate end of the edge's 3d curve must be <= this tolerance. If a trim begins or ends at this vertex, then the distance from the vertex's 3d point to the 3d point on the surface obtained by evaluating the surface at the appropriate end of the trimming curve must be <= this tolerance.
ProxyBrepSubDVertexId
def ProxyBrepSubDVertexId(self) -> intIf this vertex is part of a brep created by SubD.ProxyBrep(), then the subd component id of the corresponding SubD vertex is returned. Otherwise 0 is returned.
EdgeIndices
def EdgeIndices(self) -> Sequence[int]Gets the indices of all edges associated with this vertex.
Centermark
4 members
Represents a center mark dimension.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, plane: Plane, centerPoint: Point3d, radius: float) -> None
def __init__(self, plane: Plane, curve: Curve, curveParameter: float) -> NoneConstructs a new center mark dimension.
Radius
def Radius(self) -> floatGets or sets the center mark's radius.
AdjustFromPoints
def AdjustFromPoints(self, plane: Plane, centerPoint: Point3d) -> boolUpdate dimension geometry from point locations.
Create
def Create(dimStyle: DimensionStyle, plane: Plane, centerPoint: Point3d, radius: float) -> Centermark
def Create(dimStyle: DimensionStyle, plane: Plane, curve: Curve, curveParameter: float) -> CentermarkCreates a new center mark dimension.
Circle
26 members
A circle uses a plane and positive radius. Its evaluation parameter is an angle in radians.
PointAt(0) lies along the plane's X axis. Increasing angles rotate toward Y; conversion to a Curve introduces that curve's own domain.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, arc: Arc) -> None
def __init__(self, center: Point3d, radius: float) -> None
def __init__(self, plane: Plane, center: Point3d, radius: float) -> None
def __init__(self, plane: Plane, radius: float) -> None
def __init__(self, point1: Point3d, point2: Point3d, point3: Point3d) -> None
def __init__(self, radius: float) -> None
def __init__(self, startPoint: Point3d, tangentAtP: Vector3d, pointOnCircle: Point3d) -> NoneSee the signature and official API documentation for this member.
Unset
Unset: ClassVar[Circle]See the signature and official API documentation for this member.
IsValid
def IsValid(self) -> boolA valid circle has radius larger than 0.0 and a base plane which is must also be valid.
Radius
def Radius(self) -> floatGets or sets the radius of this circle. Radii should be positive values.
Diameter
def Diameter(self) -> floatGets or sets the diameter (radius * 2.0) of this circle. Diameters should be positive values.
Plane
def Plane(self) -> PlaneGets or sets the plane of the circle.
Center
def Center(self) -> Point3dGets or sets the center point of this circle.
Normal
def Normal(self) -> Vector3dGets the normal vector for this circle.
Circumference
def Circumference(self) -> floatGets or sets the circumference of this circle.
BoundingBox
def BoundingBox(self) -> BoundingBoxGets the circle's 3d axis aligned bounding box.
ClosestParameter
def ClosestParameter(self, testPoint: Point3d) -> tuple[bool, float]Python returns (success, angle), not a bare float. Check success before calling PointAt(angle).
A point on the normal axis through the center does not determine a unique closest angular direction. Do not rely on a particular angle in that case.
Rhino 8 Python example · geometry in memory
import Rhino.Geometry as rg
circle = rg.Circle(5.0)
ok, angle = circle.ClosestParameter(rg.Point3d(7, 2, 0))
if not ok:
raise ValueError("Projection failed")
point = circle.PointAt(angle)ClosestPoint
def ClosestPoint(self, testPoint: Point3d) -> Point3dGets the point on the circle which is closest to a test point.
DerivativeAt
def DerivativeAt(self, derivative: int, t: float) -> Vector3dDetermines the value of the Nth derivative at a parameter.
EpsilonEquals
def EpsilonEquals(self, other: Circle, epsilon: float) -> boolCheck that all values in other are within epsilon of the values in this
IsInPlane
def IsInPlane(self, plane: Plane, tolerance: float) -> boolEvaluates whether or not this circle is co-planar with a given plane.
PointAt
def PointAt(self, t: float) -> Point3dCircle.PointAt evaluates an angle in radians. On a fixed circle, equal angular increments give equal arc-length increments.
This special relationship does not hold for arbitrary Curve parameters. An ArcCurve representing the circle can have a different domain.
Reverse
def Reverse(self) -> NoneReverse the orientation of the circle. Changes the domain from [a,b] to [-b,-a].
Rotate
def Rotate(self, angle: float, axis: Vector3d) -> bool
def Rotate(self, angle: float, axis: Vector3d, point: Point3d) -> bool
def Rotate(self, sinAngle: float, cosAngle: float, axis: Vector3d) -> bool
def Rotate(self, sinAngle: float, cosAngle: float, axis: Vector3d, point: Point3d) -> boolRotates the circle through a given angle.
TangentAt
def TangentAt(self, t: float) -> Vector3dThe tangent follows increasing angle and lies in the circle plane, perpendicular to the radius.
Orientation follows the circle's plane. A tangent alone does not determine a complete spatial frame.
ToNurbsCurve
def ToNurbsCurve(self) -> NurbsCurve
def ToNurbsCurve(self, degree: int, cvCount: int) -> NurbsCurveRational NURBS can represent a circle exactly. Rational weights enable that exact conic representation.
Exact shape does not imply identical parameterization. Use the returned curve's domain instead of reusing circle angles as NURBS parameters.
Rhino 8 Python example · geometry in memory
import Rhino.Geometry as rg
curve = rg.Circle(5.0).ToNurbsCurve()
assert curve is not None and curve.IsClosedTransform
def Transform(self, xform: Transform) -> boolTransforms this circle using an transformation matrix.
Translate
def Translate(self, delta: Vector3d) -> boolMoves the circle.
TryFitCircleToPoints
def TryFitCircleToPoints(points: Iterable[Point3d]) -> tuple[bool, Circle]A fitted circle approximates samples. Success does not mean every sample lies exactly on the circle.
Measure residuals and inspect sample distribution. Nearly collinear or clustered points can make the radius estimate unstable.
TryFitCircleTT
def TryFitCircleTT(c1: Curve, c2: Curve, t1: float, t2: float) -> CircleTry to fit a circle to two curves using tangent relationships.
TryFitCircleTTT
def TryFitCircleTTT(c1: Curve, c2: Curve, c3: Curve, t1: float, t2: float, t3: float) -> CircleTry to fit a circle to three curves using tangent relationships.
TrySmallestEnclosingCircle
def TrySmallestEnclosingCircle(points: Iterable[Point2d], tolerance: float) -> tuple[bool, Circle, Sequence[int]]Attempt to create the smallest circle enclosing a set of planar points.
ClippingPlaneSurface
10 members
Represents a planar surface that is used as clipping plane in viewports. A clipping plane object maintains a list of viewports that it clips against.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, plane: Plane) -> None
def __init__(self, planeSurface: PlaneSurface) -> NoneConstructs an empty clipping plane surface
PlaneDepth
def PlaneDepth(self) -> floatDistance that the clipping has an effect
PlaneDepthEnabled
def PlaneDepthEnabled(self) -> boolDetermines if the PlaneDepth value should be used
ParticipationListsEnabled
def ParticipationListsEnabled(self) -> boolShould the object and layer participation lists be used when determining clipping
AddClipViewportId
def AddClipViewportId(self, viewportId: Any) -> boolAdds a viewport id to the list of viewports that this clipping plane clips.
ClearClipParticipationLists
def ClearClipParticipationLists(self) -> NoneRemove list of object ids that this clipping plane surface clips. This causes the clipping plane surface to clip all objects
GetClipParticipation
def GetClipParticipation(self) -> tuple[Sequence[Any], Sequence[int], bool]See the signature and official API documentation for this member.
RemoveClipViewportId
def RemoveClipViewportId(self, viewportId: Any) -> boolRemoves a viewport id that this being clipped by this clipping plane.
SetClipParticipation
def SetClipParticipation(self, objectIds: Iterable[Any], layerIndices: Iterable[int], isExclusionList: bool) -> NoneSet a list of specific object ids and layers that this clipping plane surface clips.
ViewportIds
def ViewportIds(self) -> Sequence[Any]Returns the ids of RhinoViewport objects that are clipped by this clipping plane.
ComponentIndex
9 members
A component reference combines subobject kind and an index within its owner.
Topology changes can invalidate saved indices. Retain owner identity and revision when persistent correspondence matters.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, type: ComponentIndexType, index: int) -> NoneSee the signature and official API documentation for this member.
ComponentIndexType
def ComponentIndexType(self) -> ComponentIndexTypeThe interpretation of Index depends on the Type value. Type m_index interpretation (0 based indices) no_type used when context makes it clear what array is being index brep_vertex Brep.m_V[] array index brep_edge Brep.m_E[] array index brep_face Brep.m_F[] array index brep_trim Brep.m_T[] array index brep_loop Brep.m_L[] array index mesh_vertex Mesh.m_V[] array index meshtop_vertex MeshTopology.m_topv[] array index meshtop_edge MeshTopology.m_tope[] array index mesh_face Mesh.m_F[] array index idef_part InstanceDefinition.m_object_uuid[] array index polycurve_segment PolyCurve::m_segment[] array index dim_linear_point LinearDimension2::POINT_INDEX dim_radial_point RadialDimension2::POINT_INDEX dim_angular_point AngularDimension2::POINT_INDEX dim_ordinate_point OrdinateDimension2::POINT_INDEX dim_text_point TextEntity2 origin point.
Index
def Index(self) -> intThe interpretation of m_index depends on the m_type value. m_type m_index interpretation (0 based indices) no_type used when context makes it clear what array is being index brep_vertex Brep.m_V[] array index brep_edge Brep.m_E[] array index brep_face Brep.m_F[] array index brep_trim Brep.m_T[] array index brep_loop Brep.m_L[] array index mesh_vertex Mesh.m_V[] array index meshtop_vertex MeshTopology.m_topv[] array index meshtop_edge MeshTopology.m_tope[] array index mesh_face Mesh.m_F[] array index idef_part InstanceDefinition.m_object_uuid[] array index polycurve_segment PolyCurve::m_segment[] array index dim_linear_point LinearDimension2::POINT_INDEX dim_radial_point RadialDimension2::POINT_INDEX dim_angular_point AngularDimension2::POINT_INDEX dim_ordinate_point OrdinateDimension2::POINT_INDEX dim_text_point TextEntity2 origin point.
IsSet
def IsSet(self) -> boolTrue if Rhino.Geometry.ComponentIndex.ComponentIndexType is set to a value between Rhino.Geometry.ComponentIndexType.BrepVertex and Rhino.Geometry.ComponentIndexType.DimLeaderPoint.
Unset
Unset: ClassVar[ComponentIndex]See the signature and official API documentation for this member.
CompareTo
def CompareTo(self, other: ComponentIndex) -> intCompares this Rhino.Geometry.ComponentIndex with another Rhino.Geometry.ComponentIndex.
Equals
def Equals(self, other: ComponentIndex) -> bool
def Equals(self, obj: Any) -> boolDetermines whether the specified Rhino.Geometry.ComponentIndex is equal to the current Rhino.Geometry.ComponentIndex, comparing by value.
GetHashCode
def GetHashCode(self) -> intComputes the hash code for this Rhino.Geometry.ComponentIndex object.
IsUnset
def IsUnset(self) -> boolReturn true is this component index is the same as the Unset component index
ComponentIndexType
0 members
Defines enumerated values to represent component index types.
ComponentStatus
23 members
Provides information about selection, highlighting, visibility, editability and integrity states of a component. This structure is immutable.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> NoneSee the signature and official API documentation for this member.
Clear
Clear: ClassVar[ComponentStatus]See the signature and official API documentation for this member.
Selected
Selected: ClassVar[ComponentStatus]See the signature and official API documentation for this member.
SelectedPersistent
SelectedPersistent: ClassVar[ComponentStatus]See the signature and official API documentation for this member.
Highlighted
Highlighted: ClassVar[ComponentStatus]See the signature and official API documentation for this member.
Hidden
Hidden: ClassVar[ComponentStatus]See the signature and official API documentation for this member.
Locked
Locked: ClassVar[ComponentStatus]See the signature and official API documentation for this member.
Damaged
Damaged: ClassVar[ComponentStatus]See the signature and official API documentation for this member.
AllSet
AllSet: ClassVar[ComponentStatus]See the signature and official API documentation for this member.
IsClear
def IsClear(self) -> boolTrue if every setting is 0 or false.
IsDamaged
def IsDamaged(self) -> boolReturns false if component is not damaged. True otherwise.
IsHighlighted
def IsHighlighted(self) -> boolReturns true if highlighted. False otherwise.
IsHidden
def IsHidden(self) -> boolReturns true if hidden. False otherwise.
IsLocked
def IsLocked(self) -> boolReturns true if locked. False otherwise.
IsSelected
def IsSelected(self) -> boolReturns true if selected or selected persistent. False otherwise.
IsSelectedPersistent
def IsSelectedPersistent(self) -> boolReturns true if selected persistent. False otherwise.
Equals
def Equals(self, other: ComponentStatus) -> bool
def Equals(self, obj: Any) -> boolDetermines if another ComponentStatus and this are equal.
GetHashCode
def GetHashCode(self) -> intServes as a special hash function. The inner value is used for the purpose.
HasAllEqualStates
def HasAllEqualStates(self, statesFilter: ComponentStatus, comparand: ComponentStatus) -> boolFor the purposes of this test, Selected and SelectedPersistent are considered equal.
HasNoEqualStates
def HasNoEqualStates(self, statesFilter: ComponentStatus, comparand: ComponentStatus) -> boolFor the purposes of this test, Selected and SelectedPersistent are considered equal.
HasSomeEqualStates
def HasSomeEqualStates(self, statesFilter: ComponentStatus, comparand: ComponentStatus) -> boolFor the purposes of this test, Selected and SelectedPersistent are considered equal.
ToString
def ToString(self) -> strProvides a string representation of this ComponentStatus.
WithStates
def WithStates(self, additionalStatus: ComponentStatus) -> ComponentStatusActivates any information flag described in any of the two input component statuses and returns a new ComponentStatus with those flags checked.
Concavity
0 members
Enumerates the possible types of edge concavity types.
Cone
15 members
A cone narrows to an apex, where regular surface parameterization becomes singular.
Normals and tangent directions at the apex need special handling. Uniform parameter sampling can become spatially uneven near it.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, plane: Plane, height: float, radius: float) -> NoneSee the signature and official API documentation for this member.
Unset
Unset: ClassVar[Cone]See the signature and official API documentation for this member.
Plane
def Plane(self) -> PlaneGets or sets the base plane of the cone. The apex of the cone is at the plane's origin.
Height
def Height(self) -> floatGets or sets the height of the circular right cone.
Radius
def Radius(self) -> floatGets or sets the radius of the cone.
IsValid
def IsValid(self) -> booltrue if plane is valid, height is not zero and radius is not zero.
BasePoint
def BasePoint(self) -> Point3dCenter of base circle.
ApexPoint
def ApexPoint(self) -> Point3dPoint at tip of the cone.
Axis
def Axis(self) -> Vector3dUnit vector axis of cone.
AngleInDegrees
def AngleInDegrees(self) -> floatComputes the angle (in degrees) between the axis and the side of the cone. The angle and the height have the same sign.
AngleInRadians
def AngleInRadians(self) -> floatComputes the angle (in radians) between the axis and the side of the cone. The angle and the height have the same sign.
EpsilonEquals
def EpsilonEquals(self, other: Cone, epsilon: float) -> boolCheck that all values in other are within epsilon of the values in this
ToBrep
def ToBrep(self, capBottom: bool) -> BrepGets a Brep representation of the cone with a single face for the cone, an edge along the cone seam, and vertices at the base and apex ends of this seam edge. The optional cap is a single face with one circular edge starting and ending at the base vertex.
ToNurbsSurface
def ToNurbsSurface(self) -> NurbsSurfaceConstructs a Nurbs surface representation of this Cone. This is synonymous with calling NurbsSurface.CreateFromCone().
ToRevSurface
def ToRevSurface(self) -> RevSurfaceConstructs a RevSurface representation of this Cone. This is synonymous with calling RevSurface.CreateFromCone().
ConicSectionType
0 members
Defines enumerated values for types of conic sections.
Continuity
0 members
Provides enumerated values for continuity along geometry, such as continuous first derivative or continuous unit tangent and curvature.
ControlPoint
9 members
A NURBS control point combines a Euclidean location and rational weight. It usually is not a point on the geometry.
Changing weight alters the basis contribution without moving the stored location. Preserve weights when exchanging rational curves and surfaces.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, euclideanPt: Point3d, weight: float) -> None
def __init__(self, pt: Point3d) -> None
def __init__(self, pt: Point4d) -> None
def __init__(self, x: float, y: float, z: float) -> None
def __init__(self, x: float, y: float, z: float, weight: float) -> NoneSee the signature and official API documentation for this member.
Unset
Unset: ClassVar[ControlPoint]See the signature and official API documentation for this member.
Location
def Location(self) -> Point3dGets or sets world 3-D, or Euclidean location of the control point.
X
def X(self) -> floatGets or sets the X coordinate of the control point.
Y
def Y(self) -> floatGets or sets the Y coordinate of the control point.
Z
def Z(self) -> floatGets or sets the Z coordinate of the control point.
Weight
def Weight(self) -> floatGets or sets the weight of this control point.
EpsilonEquals
def EpsilonEquals(self, other: ControlPoint, epsilon: float) -> boolCheck that all values in other are within epsilon of the values in this
Equals
def Equals(self, other: ControlPoint) -> bool
def Equals(self, obj: Any) -> boolDetermines if two points exactly match.
Curve
138 members
A parametric curve maps one parameter t to a point in space. Equal parameter steps generally do not produce equal distances. Use length-based sampling when physical spacing matters.
Parameter speed is the magnitude of the derivative with respect to t. Changing the domain can change speed without changing the geometric path.
Permanent link · Official RhinoCommon reference
IsSubDFriendly
def IsSubDFriendly(self) -> boolReturns true if the curve is a cubic, non-rational, uniform NURBS curve that is either periodic or has natural end conditions. Otherwise, false is returned.
Domain
def Domain(self) -> IntervalGets or sets the domain of the curve.
Dimension
def Dimension(self) -> intGets the dimension of the object. The dimension is typically three. For parameter space trimming curves the dimension is two. In rare cases the dimension can be one or greater than three.
SpanCount
def SpanCount(self) -> intGets the number of non-empty smooth (c-infinity) spans in the curve.
Degree
def Degree(self) -> intDegree is the polynomial degree per span. Order is degree plus one.
Higher degree does not automatically improve quality. Knot multiplicity and control-point placement also govern smoothness and local behavior.
IsClosed
def IsClosed(self) -> boolGets a value indicating whether or not this curve is a closed curve.
IsPeriodic
def IsPeriodic(self) -> boolGets a value indicating whether or not this curve is considered to be Periodic.
PointAtStart
def PointAtStart(self) -> Point3dEvaluates point at the start of the curve.
PointAtEnd
def PointAtEnd(self) -> Point3dEvaluates point at the end of the curve.
PointAtMid
def PointAtMid(self) -> Point3dEvaluates point at the middle, or mid, of the curve.
TangentAtStart
def TangentAtStart(self) -> Vector3dEvaluates the unit tangent vector at the start of the curve.
TangentAtEnd
def TangentAtEnd(self) -> Vector3dEvaluate unit tangent vector at the end of the curve.
ChangeClosedCurveSeam
def ChangeClosedCurveSeam(self, t: float) -> boolIf this curve is closed, then modify it so that the start/end point is at curve parameter t.
ChangeDimension
def ChangeDimension(self, desiredDimension: int) -> boolChanges the dimension of a curve.
ClosedCurveOrientation
def ClosedCurveOrientation(self) -> CurveOrientation
def ClosedCurveOrientation(self, plane: Plane) -> CurveOrientation
def ClosedCurveOrientation(self, upDirection: Vector3d) -> CurveOrientation
def ClosedCurveOrientation(self, xform: Transform) -> CurveOrientationClockwise and counterclockwise depend on the reference plane or viewing direction.
Interpret winding for suitable closed planar curves. Reversing the reference normal reverses apparent winding without changing the geometry.
ClosestPoint
def ClosestPoint(self, testPoint: Point3d) -> tuple[bool, float]
def ClosestPoint(self, testPoint: Point3d, maximumDistance: float) -> tuple[bool, float]The result is a curve parameter, not a distance. Evaluate PointAt(t) to obtain the projected point, and check success before using t.
After successful projection, evaluate PointAt(t) and measure the distance. The maximum-distance overload can reject distant candidates; a parameter alone is not a distance.
Rhino 8 Python example · geometry in memory
import Rhino.Geometry as rg
curve = rg.ArcCurve(rg.Circle(5.0))
ok, t = curve.ClosestPoint(rg.Point3d(7, 2, 0))
if not ok:
raise ValueError("Projection failed")
projected = curve.PointAt(t)ClosestPoints
def ClosestPoints(self, geometry: Iterable[GeometryBase]) -> tuple[bool, Point3d, Point3d, int]
def ClosestPoints(self, geometry: Iterable[GeometryBase], maximumDistance: float) -> tuple[bool, Point3d, Point3d, int]
def ClosestPoints(self, otherCurve: Curve) -> tuple[bool, Point3d, Point3d]Finds the object (and the closest point in that object) that is closest to this curve. Rhino.Geometry.Brep, Rhino.Geometry.Surface, Rhino.Geometry.Curve and Rhino.Geometry.PointCloud are examples of objects that can be passed to this function.
CombineShortSegments
def CombineShortSegments(self, tolerance: float) -> boolLooks for segments that are shorter than tolerance that can be combined. For NURBS of degree greater than 1, spans are combined by removing knots. Similarly for NURBS segments of polycurves. Otherwise, RemoveShortSegments() is called. Does not change the domain, but it will change the relative parameterization.
Contains
def Contains(self, testPoint: Point3d) -> PointContainment
def Contains(self, testPoint: Point3d, plane: Plane) -> PointContainment
def Contains(self, testPoint: Point3d, plane: Plane, tolerance: float) -> PointContainmentContainment classifies planar closed-curve regions, including inside, outside, boundary, and undefined.
Specify plane and tolerance. Treating the enumeration as a Boolean loses boundary information and can misinterpret an undefined result.
ControlPolygon
def ControlPolygon(self) -> PolylineGets the curve's control polygon.
CreateArcBlend
def CreateArcBlend(startPt: Point3d, startDir: Vector3d, endPt: Point3d, endDir: Vector3d, controlPointLengthRatio: float) -> CurveCreates a polycurve consisting of two tangent arc segments that connect two points and two directions.
CreateArcCornerRectangle
def CreateArcCornerRectangle(rectangle: Rectangle3d, radius: float) -> CurveCreates an arc-cornered (rounded) rectangular curve.
CreateArcLineArcBlend
def CreateArcLineArcBlend(startPt: Point3d, startDir: Vector3d, endPt: Point3d, endDir: Vector3d, radius: float) -> CurveCreates an arc-line-arc blend curve between two curves. The output is generally a PolyCurve with three segments: arc, line, arc. In some cases, one or more of those segments will be absent because they would have 0 length. If there is only a single segment, the result will either be an ArcCurve or a LineCurve.
CreateBlendCurve
def CreateBlendCurve(curve0: Curve, t0: float, reverse0: bool, continuity0: BlendContinuity, curve1: Curve, t1: float, reverse1: bool, continuity1: BlendContinuity) -> Curve
def CreateBlendCurve(curveA: Curve, curveB: Curve, continuity: BlendContinuity) -> Curve
def CreateBlendCurve(curveA: Curve, curveB: Curve, continuity: BlendContinuity, bulgeA: float, bulgeB: float) -> CurveMakes a curve blend between 2 curves at the parameters specified with the directions and continuities specified
CreateBooleanDifference
def CreateBooleanDifference(curveA: Curve, curveB: Curve) -> Sequence[Curve]
def CreateBooleanDifference(curveA: Curve, curveB: Curve, tolerance: float) -> Sequence[Curve]
def CreateBooleanDifference(curveA: Curve, subtractors: Iterable[Curve]) -> Sequence[Curve]
def CreateBooleanDifference(curveA: Curve, subtractors: Iterable[Curve], tolerance: float) -> Sequence[Curve]Calculates the boolean difference between two closed, planar curves. Note, curves must be co-planar.
CreateBooleanIntersection
def CreateBooleanIntersection(curveA: Curve, curveB: Curve) -> Sequence[Curve]
def CreateBooleanIntersection(curveA: Curve, curveB: Curve, tolerance: float) -> Sequence[Curve]Calculates the boolean intersection of two closed, planar curves. Note, curves must be co-planar.
CreateBooleanRegions
def CreateBooleanRegions(curves: Iterable[Curve], plane: Plane, combineRegions: bool, tolerance: float) -> CurveBooleanRegions
def CreateBooleanRegions(curves: Iterable[Curve], plane: Plane, points: Iterable[Point3d], combineRegions: bool, tolerance: float) -> CurveBooleanRegionsCalculates curve Boolean regions, which trims and splits curves based on their overlapping regions.
CreateBooleanUnion
def CreateBooleanUnion(curves: Iterable[Curve]) -> Sequence[Curve]
def CreateBooleanUnion(curves: Iterable[Curve], tolerance: float) -> Sequence[Curve]Calculates the boolean union of two or more closed, planar curves. Note, curves must be co-planar.
CreateConicCornerRectangle
def CreateConicCornerRectangle(rectangle: Rectangle3d, rho: float) -> CurveCreates a conic-corned (rounded) rectangular curve.
CreateControlPointCurve
def CreateControlPointCurve(points: Iterable[Point3d]) -> Curve
def CreateControlPointCurve(points: Iterable[Point3d], degree: int) -> CurveInput points form a control polygon; interior points generally are not on the result.
Use interpolation if samples must lie on the curve. Degree and point placement affect flexibility and potential oscillation.
CreateCurve2View
def CreateCurve2View(curveA: Curve, curveB: Curve, vectorA: Vector3d, vectorB: Vector3d, tolerance: float, angleTolerance: float) -> Sequence[Curve]Creates a third curve from two curves that are planar in different construction planes. The new curve looks the same as each of the original curves when viewed in each plane.
CreateFillet
def CreateFillet(curve0: Curve, curve1: Curve, radius: float, t0Base: float, t1Base: float) -> ArcComputes the fillet arc for a curve filleting operation.
CreateFilletCornersCurve
def CreateFilletCornersCurve(curve: Curve, radius: float, tolerance: float, angleTolerance: float) -> CurveRounds the corners of a kinked curve with arcs of a single, specified radius.
CreateFilletCurves
def CreateFilletCurves(curve0: Curve, point0: Point3d, curve1: Curve, point1: Point3d, radius: float, join: bool, trim: bool, arcExtension: bool, tolerance: float, angleTolerance: float) -> Sequence[Curve]Creates a tangent arc between two curves and trims or extends the curves to the arc.
CreateInterpolatedCurve
def CreateInterpolatedCurve(points: Iterable[Point3d], degree: int) -> Curve
def CreateInterpolatedCurve(points: Iterable[Point3d], degree: int, knots: CurveKnotStyle) -> Curve
def CreateInterpolatedCurve(points: Iterable[Point3d], degree: int, knots: CurveKnotStyle, startTangent: Vector3d, endTangent: Vector3d) -> CurveInterpolation aims to pass through samples. Point order, spacing, degree, and knot style affect shape.
Interpolation also follows measurement noise. Check overshoot and curvature; approximation can be preferable for noisy scans.
CreateMatchCurve
def CreateMatchCurve(curve0: Curve, reverse0: bool, continuity: BlendContinuity, curve1: Curve, reverse1: bool, preserve: PreserveEnd, average: bool) -> Sequence[Curve]Changes a curve end to meet a specified curve with a specified continuity.
CreateMeanCurve
def CreateMeanCurve(curveA: Curve, curveB: Curve) -> Curve
def CreateMeanCurve(curveA: Curve, curveB: Curve, angleToleranceRadians: float) -> CurveConstructs a mean, or average, curve from two curves.
CreatePeriodicCurve
def CreatePeriodicCurve(curve: Curve) -> Curve
def CreatePeriodicCurve(curve: Curve, smooth: bool) -> CurveRemoves kinks from a curve. Periodic curves deform smoothly without kinks.
CreateRevisionCloud
def CreateRevisionCloud(curve: Curve, segmentCount: int, angle: float, flip: bool) -> Curve
def CreateRevisionCloud(points: Iterable[Point3d], angle: float, flip: bool) -> CurveCreates a revision cloud curve from a planar curve.
CreateSoftEditCurve
def CreateSoftEditCurve(curve: Curve, t: float, delta: Vector3d, length: float, fixEnds: bool) -> CurveCreates a soft edited curve from an existing curve using a smooth field of influence.
CreateTextOutlines
def CreateTextOutlines(text: str, font: str, textHeight: float, textStyle: int, closeLoops: bool, plane: Plane, smallCapsScale: float, tolerance: float) -> Sequence[Curve]Creates outline curves created from a text string. The functionality is similar to what you find in Rhino's TextObject command or TextEntity.Explode() in RhinoCommon.
CreateTweenCurves
def CreateTweenCurves(curve0: Curve, curve1: Curve, numCurves: int) -> Sequence[Curve]
def CreateTweenCurves(curve0: Curve, curve1: Curve, numCurves: int, tolerance: float) -> Sequence[Curve]Creates curves between two open or closed input curves. Uses the control points of the curves for finding tween curves. That means the first control point of first curve is matched to first control point of the second curve and so on. There is no matching of curves direction. Caller must match input curves direction before calling the function.
CreateTweenCurvesWithMatching
def CreateTweenCurvesWithMatching(curve0: Curve, curve1: Curve, numCurves: int) -> Sequence[Curve]
def CreateTweenCurvesWithMatching(curve0: Curve, curve1: Curve, numCurves: int, tolerance: float) -> Sequence[Curve]Creates curves between two open or closed input curves. Make the structure of input curves compatible if needed. Refits the input curves to have the same structure. The resulting curves are usually more complex than input unless input curves are compatible and no refit is needed. There is no matching of curves direction. Caller must match input curves direction before calling the function.
CreateTweenCurvesWithSampling
def CreateTweenCurvesWithSampling(curve0: Curve, curve1: Curve, numCurves: int, numSamples: int) -> Sequence[Curve]
def CreateTweenCurvesWithSampling(curve0: Curve, curve1: Curve, numCurves: int, numSamples: int, tolerance: float) -> Sequence[Curve]Creates curves between two open or closed input curves. Use sample points method to make curves compatible. This is how the algorithm works: Divides the two curves into an equal number of points, finds the midpoint between the corresponding points on the curves and interpolates the tween curve through those points. There is no matching of curves direction. Caller must match input curves direction before calling the function.
CurvatureAt
def CurvatureAt(self, t: float) -> Vector3dCurvature measures how rapidly the tangent changes with arc length. Its magnitude has inverse-length units; a circle of radius r has curvature magnitude 1/r.
Nonzero curvature has a reciprocal local radius. Curvature vanishes on straight regions and may not have one smooth value at a discontinuity.
DerivativeAt
def DerivativeAt(self, t: float, derivativeCount: int) -> Sequence[Vector3d]
def DerivativeAt(self, t: float, derivativeCount: int, side: CurveEvaluationSide) -> Sequence[Vector3d]Derivatives are with respect to the curve parameter. Their magnitudes depend on parameterization.
The same geometric path can have different first-derivative magnitudes after a domain change. Use a unit tangent when only direction matters.
DivideAsContour
def DivideAsContour(self, contourStart: Point3d, contourEnd: Point3d, interval: float) -> Sequence[Point3d]Divides this curve at fixed steps along a defined contour line.
DivideByCount
def DivideByCount(self, segmentCount: int, includeEnds: bool) -> Sequence[float] | tuple[Sequence[float], Sequence[Point3d]]Equal arc-length divisions need not have equal parameter increments. Returned parameters locate sample points; evaluate them with PointAt.
Division count describes segments, not always the number of returned samples. Endpoint inclusion and closure affect how the resulting sequence should be interpreted.
DivideByLength
def DivideByLength(self, segmentLength: float, includeEnds: bool) -> Sequence[float] | tuple[Sequence[float], Sequence[Point3d]]
def DivideByLength(self, segmentLength: float, includeEnds: bool, reverse: bool) -> Sequence[float] | tuple[Sequence[float], Sequence[Point3d]]Length division samples by distance along the curve. The final remainder can be shorter than the requested spacing.
Choose endpoint handling and remainder policy before interpreting sample counts. Evaluate returned parameters with PointAt.
DivideEquidistant
def DivideEquidistant(self, distance: float) -> Sequence[Point3d] | tuple[Sequence[Point3d], Sequence[float]]Calculates 3d points on a curve where the linear distance between the points is equal.
DoDirectionsMatch
def DoDirectionsMatch(curveA: Curve, curveB: Curve) -> boolDetermines whether two curves travel more or less in the same direction.
Duplicate
def Duplicate(self) -> GeometryBaseConstructs an exact duplicate of this Curve.
DuplicateCurve
def DuplicateCurve(self) -> CurveConstructs an exact duplicate of this curve.
DuplicateSegments
def DuplicateSegments(self) -> Sequence[Curve]Duplicates curve segments. Explodes polylines, polycurves and G1 discontinuous NURBS curves. Single segment curves, such as lines, arcs, unkinked NURBS curves, are duplicated.
Extend
def Extend(self, domain: Interval) -> Curve
def Extend(self, side: CurveEnd, length: float, style: CurveExtensionStyle) -> Curve
def Extend(self, side: CurveEnd, style: CurveExtensionStyle, endPoint: Point3d) -> Curve
def Extend(self, side: CurveEnd, style: CurveExtensionStyle, geometry: Iterable[GeometryBase]) -> Curve
def Extend(self, t0: float, t1: float) -> CurveWhere possible, analytically extends curve to include the given domain. This will not work on closed curves. The original curve will be identical to the restriction of the resulting curve to the original curve domain.
ExtendByArc
def ExtendByArc(self, side: CurveEnd, geometry: Iterable[GeometryBase]) -> CurveExtends a curve by an Arc until it intersects a collection of objects.
ExtendByLine
def ExtendByLine(self, side: CurveEnd, geometry: Iterable[GeometryBase]) -> CurveExtends a curve by a line until it intersects a collection of objects.
ExtendOnSurface
def ExtendOnSurface(self, side: CurveEnd, face: BrepFace) -> Curve
def ExtendOnSurface(self, side: CurveEnd, surface: Surface) -> CurveExtends a curve on a surface.
ExtremeParameters
def ExtremeParameters(self, direction: Vector3d) -> Sequence[float]Returns the parameter values of all local extrema. Parameter values are in increasing order so consecutive extrema define an interval on which each component of the curve is monotone. Note, non-periodic curves always return the end points.
Fair
def Fair(self, distanceTolerance: float, angleTolerance: float, clampStart: int, clampEnd: int, iterations: int) -> CurveFairs a curve object. Fair works best on degree 3 (cubic) curves. Attempts to remove large curvature variations while limiting the geometry changes to be no more than the specified tolerance.
FilletSurfaceToCurve
def FilletSurfaceToCurve(self, face: BrepFace, t: float, u: float, v: float, radius: float, alignToCurve: int, railDegree: int, arcDegree: int, arcSliders: Iterable[float], numBezierSrfs: int, tolerance: float, out_fillets: Iterable[Brep]) -> tuple[bool, Sequence[float]]Creates a constant-radius fillet surface between a surface and the curve.
FilletSurfaceToRail
def FilletSurfaceToRail(self, faceWithCurve: BrepFace, secondFace: BrepFace, u1: float, v1: float, railDegree: int, arcDegree: int, arcSliders: Iterable[float], numBezierSrfs: int, extend: bool, split_type: FilletSurfaceSplitType, tolerance: float, out_fillets: Iterable[Brep], out_breps0: Iterable[Brep], out_breps1: Iterable[Brep]) -> tuple[bool, Sequence[float]]Creates a surface between two surfaces, with a fixed rail curve on the first surface.
FindLocalInflection
def FindLocalInflection(self, N: Vector3d, subDomain: Interval, seed: float) -> tuple[bool, float, float]Local minimization for point on a curve with tangent perpendicular to N.
Fit
def Fit(self, degree: int, fitTolerance: float, angleTolerance: float) -> CurveFits a new curve through an existing curve.
FrameAt
def FrameAt(self, t: float) -> tuple[bool, Plane]Curve-frame orientation depends on tangent and curvature. Straight and singular regions can make it unstable.
For section placement, compare perpendicular-frame methods and inspect frame rotation between samples. Closed seams need an explicit continuity policy.
GetConicSectionType
def GetConicSectionType(self) -> ConicSectionType | tuple[ConicSectionType, Point3d, Point3d, Point3d]Returns the type of conic section based on the curve's shape.
GetCurveParameterFromNurbsFormParameter
def GetCurveParameterFromNurbsFormParameter(self, nurbsParameter: float) -> tuple[bool, float]Convert a NURBS curve parameter to a curve parameter.
GetDistancesBetweenCurves
def GetDistancesBetweenCurves(curveA: Curve, curveB: Curve, tolerance: float) -> tuple[bool, float, float, float, float, float, float]Calculates the minimum and maximum distances between two curves. This function is useful for computing curve deviation. If you are not computing curve deviation, use Rhino.Geometry.Curve.ClosestPoints(Rhino.Geometry.Curve,Rhino.Geometry.Point3d@,Rhino.Geometry.Point3d@).
GetFilletPoints
def GetFilletPoints(curve0: Curve, curve1: Curve, radius: float, t0Base: float, t1Base: float) -> tuple[bool, float, float, Plane]Finds points at which to cut a pair of curves so that a fillet of given radius can be inserted.
GetLength
def GetLength(self) -> float
def GetLength(self, fractionalTolerance: float) -> float
def GetLength(self, fractionalTolerance: float, subdomain: Interval) -> float
def GetLength(self, subdomain: Interval) -> floatArc length measures distance along the curve in model units. A parameter-domain length is generally a different quantity.
Numerical integration and tolerance affect estimates. A closed curve can have coincident endpoints while retaining substantial arc length.
GetLocalPerpPoint
def GetLocalPerpPoint(self, testPoint: Point3d, seedParmameter: float) -> tuple[bool, float]
def GetLocalPerpPoint(self, testPoint: Point3d, seedParmameter: float, subDomain: Interval) -> tuple[bool, float]Search for a location on the curve, near seedParmameter, that is perpendicular to a test point.
GetLocalTangentPoint
def GetLocalTangentPoint(self, testPoint: Point3d, seedParmameter: float) -> tuple[bool, float]
def GetLocalTangentPoint(self, testPoint: Point3d, seedParmameter: float, subDomain: Interval) -> tuple[bool, float]Search for a location on the curve, near seedParmameter, that is tangent to a test point.
GetNextDiscontinuity
def GetNextDiscontinuity(self, continuityType: Continuity, t0: float, t1: float) -> tuple[bool, float]
def GetNextDiscontinuity(self, continuityType: Continuity, t0: float, t1: float, cosAngleTolerance: float, curvatureTolerance: float) -> tuple[bool, float]Searches for a derivative, tangent, or curvature discontinuity.
GetNurbsFormParameterFromCurveParameter
def GetNurbsFormParameterFromCurveParameter(self, curveParameter: float) -> tuple[bool, float]Convert a curve parameter to a NURBS curve parameter.
GetPerpendicularFrames
def GetPerpendicularFrames(self, parameters: Iterable[float]) -> Sequence[Plane]Gets a collection of perpendicular frames along the curve. Perpendicular frames are also known as 'Zero-twisting frames' and they minimize rotation from one frame to the next.
GetSubCurves
def GetSubCurves(self) -> Sequence[Curve]Gets subcurves from a curve. The results will be similar to what is produced by Rhino's Explode command.
HasNurbsForm
def HasNurbsForm(self) -> intDoes a NURBS curve representation of this curve exist?
InflectionPoints
def InflectionPoints(self) -> Sequence[Point3d] | tuple[Sequence[Point3d], Sequence[float]]Returns a curve's inflection points. An inflection point is a location on a curve at which the sign of the curvature (i.e., the concavity) changes. The curvature at these locations is always 0.
IsArc
def IsArc(self) -> bool
def IsArc(self, tolerance: float) -> boolTest a curve to see if it can be represented by an arc or circle within RhinoMath.ZeroTolerance.
IsCircle
def IsCircle(self) -> bool
def IsCircle(self, tolerance: float) -> boolTest a curve to see if it can be represented by a circle within RhinoMath.ZeroTolerance.
IsClosable
def IsClosable(self, tolerance: float) -> bool
def IsClosable(self, tolerance: float, minimumAbsoluteSize: float, minimumRelativeSize: float) -> boolDecide if it makes sense to close off this curve by moving the endpoint to the start based on start-end gap size and length of curve as approximated by chord defined by 6 points.
IsContinuous
def IsContinuous(self, continuityType: Continuity, t: float) -> boolTest continuity at a curve parameter value.
IsEllipse
def IsEllipse(self) -> bool
def IsEllipse(self, tolerance: float) -> boolTest a curve to see if it can be represented by an ellipse within RhinoMath.ZeroTolerance.
IsInPlane
def IsInPlane(self, testPlane: Plane) -> bool
def IsInPlane(self, testPlane: Plane, tolerance: float) -> boolTest a curve to see if it lies in a specific plane.
IsLinear
def IsLinear(self) -> bool
def IsLinear(self, tolerance: float) -> boolTest a curve to see if it is linear to within RhinoMath.ZeroTolerance units (1e-12).
IsPlanar
def IsPlanar(self) -> bool
def IsPlanar(self, tolerance: float) -> boolTest a curve for planarity.
IsPolyline
def IsPolyline(self) -> boolSeveral types of Curve can have the form of a polyline including a degree 1 NurbsCurve, a PolylineCurve, and a PolyCurve all of whose segments are some form of polyline. IsPolyline tests a curve to see if it can be represented as a polyline.
IsShort
def IsShort(self, tolerance: float) -> bool
def IsShort(self, tolerance: float, subdomain: Interval) -> boolUsed to quickly find short curves.
JoinCurves
def JoinCurves(inputCurves: Iterable[Curve]) -> Sequence[Curve]
def JoinCurves(inputCurves: Iterable[Curve], joinTolerance: float) -> Sequence[Curve]
def JoinCurves(inputCurves: Iterable[Curve], joinTolerance: float, preserveDirection: bool) -> Sequence[Curve] | tuple[Sequence[Curve], Sequence[int]]
def JoinCurves(inputCurves: Iterable[Curve], joinTolerance: float, preserveDirection: bool, simpleJoin: bool) -> tuple[Sequence[Curve], Sequence[int]]Joining connects compatible endpoints within tolerance. It does not guarantee one result or a closed curve.
Inspect result count and closure. Excessive tolerance can connect unintended endpoints or conceal meaningful gaps.
LcoalClosestPoint
def LcoalClosestPoint(self, testPoint: Point3d, seed: float) -> tuple[bool, float]Find parameter of the point on a curve that is locally closest to the testPoint. The search for a local close point starts at a seed parameter.
LengthParameter
def LengthParameter(self, segmentLength: float) -> tuple[bool, float]
def LengthParameter(self, segmentLength: float, fractionalTolerance: float) -> tuple[bool, float]
def LengthParameter(self, segmentLength: float, fractionalTolerance: float, subdomain: Interval) -> tuple[bool, float]
def LengthParameter(self, segmentLength: float, subdomain: Interval) -> tuple[bool, float]Convert a measured arc length into a curve parameter. Check success before using the result.
This supports fabrication spacing and travel distances. Distances beyond the available curve require an explicit rejection or extrapolation policy.
LocalClosestPoint
def LocalClosestPoint(self, testPoint: Point3d, seed: float) -> tuple[bool, float]Find parameter of the point on a curve that is locally closest to the testPoint. The search for a local close point starts at a seed parameter.
MakeClosed
def MakeClosed(self, tolerance: float) -> boolIf IsClosed, just return true. Otherwise, decide if curve can be closed as follows: Linear curves polylinear curves with 2 segments, NURBS with 3 or less control points cannot be made closed. Also, if tolerance > 0 and the gap between start and end is larger than tolerance, curve cannot be made closed. Adjust the curve's endpoint to match its start point.
MakeEndsMeet
def MakeEndsMeet(curveA: Curve, adjustStartCurveA: bool, curveB: Curve, adjustStartCurveB: bool) -> boolMakes adjustments to the ends of one or both input curves so that they meet at a point.
MaxCurvaturePoints
def MaxCurvaturePoints(self) -> Sequence[Point3d] | tuple[Sequence[Point3d], Sequence[float]]Returns a curve's maximum curvature points. The maximum curvature points identify where the curvature starts to decrease in both directions from the points.
NormalizedLengthParameter
def NormalizedLengthParameter(self, s: float) -> tuple[bool, float]
def NormalizedLengthParameter(self, s: float, fractionalTolerance: float) -> tuple[bool, float]
def NormalizedLengthParameter(self, s: float, fractionalTolerance: float, subdomain: Interval) -> tuple[bool, float]
def NormalizedLengthParameter(self, s: float, subdomain: Interval) -> tuple[bool, float]Convert an arc-length fraction into a curve parameter, accounting for nonuniform parameter speed.
Equal fractions give equal arc-length intervals within numerical tolerance. Straight-line distances between samples can still differ on a bent curve.
NormalizedLengthParameters
def NormalizedLengthParameters(self, s: Iterable[float], absoluteTolerance: float) -> Sequence[float]
def NormalizedLengthParameters(self, s: Iterable[float], absoluteTolerance: float, fractionalTolerance: float) -> Sequence[float]
def NormalizedLengthParameters(self, s: Iterable[float], absoluteTolerance: float, fractionalTolerance: float, subdomain: Interval) -> Sequence[float]
def NormalizedLengthParameters(self, s: Iterable[float], absoluteTolerance: float, subdomain: Interval) -> Sequence[float]Input the parameter of the point on the curve that is a prescribed arc length from the start of the curve. A fractional tolerance of 1e-8 is used in this version of the function.
Offset
def Offset(self, directionPoint: Point3d, normal: Vector3d, distance: float, tolerance: float, angleTolerance: float, loose: bool, cornerStyle: CurveOffsetCornerStyle, endStyle: CurveOffsetEndStyle) -> Sequence[Curve]
def Offset(self, directionPoint: Point3d, normal: Vector3d, distance: float, tolerance: float, cornerStyle: CurveOffsetCornerStyle) -> Sequence[Curve]
def Offset(self, plane: Plane, distance: float, tolerance: float, cornerStyle: CurveOffsetCornerStyle) -> Sequence[Curve]Offset depends on side, plane, corner style, and tolerance. One input can produce several pieces or fail.
Self-intersections and tight curvature can change output topology. Check count, validity, and the intended side before using results.
OffsetNormalToSurface
def OffsetNormalToSurface(self, surface: Surface, height: float) -> CurveFinds a curve by offsetting an existing curve normal to a surface. The caller is responsible for ensuring that the curve lies on the input surface.
OffsetOnSurface
def OffsetOnSurface(self, face: BrepFace, curveParameters: Iterable[float], offsetDistances: Iterable[float], fittingTolerance: float) -> Sequence[Curve]
def OffsetOnSurface(self, face: BrepFace, distance: float, fittingTolerance: float) -> Sequence[Curve]
def OffsetOnSurface(self, face: BrepFace, throughPoint: Point2d, fittingTolerance: float) -> Sequence[Curve]
def OffsetOnSurface(self, surface: Surface, curveParameters: Iterable[float], offsetDistances: Iterable[float], fittingTolerance: float) -> Sequence[Curve]
def OffsetOnSurface(self, surface: Surface, distance: float, fittingTolerance: float) -> Sequence[Curve]
def OffsetOnSurface(self, surface: Surface, throughPoint: Point2d, fittingTolerance: float) -> Sequence[Curve]Offset a curve on a brep face surface. This curve must lie on the surface. This overload allows to specify different offsets for different curve parameters.
OffsetTangentToSurface
def OffsetTangentToSurface(self, surface: Surface, height: float) -> CurveFinds a curve by offsetting an existing curve tangent to a surface. The caller is responsible for ensuring that the curve lies on the input surface.
PerpendicularFrameAt
def PerpendicularFrameAt(self, t: float) -> tuple[bool, Plane]A perpendicular frame uses the curve tangent as its normal. Check success and frame continuity.
One local frame does not guarantee a globally consistent sequence. Inflections, sampling direction, and closed seams can introduce apparent twists.
PlanarClosedCurveRelationship
def PlanarClosedCurveRelationship(curveA: Curve, curveB: Curve, testPlane: Plane, tolerance: float) -> RegionContainmentDetermines whether two coplanar simple closed curves are disjoint or intersect; otherwise, if the regions have a containment relationship, discovers which curve encloses the other.
PlanarCurveCollision
def PlanarCurveCollision(curveA: Curve, curveB: Curve, testPlane: Plane, tolerance: float) -> boolDetermines if two coplanar curves collide (intersect).
PointAt
def PointAt(self, t: float) -> Point3dEvaluate t in the curve's Domain. A parameter is not generally a distance or normalized fraction.
Use length-to-parameter conversion for measured spacing. Query the domain before assuming a range such as [0,1].
PointAtLength
def PointAtLength(self, length: float) -> Point3dGets a point at a certain length along the curve. The length must be non-negative and less than or equal to the length of the curve. Lengths will not be wrapped when the curve is closed or periodic.
PointAtNormalizedLength
def PointAtNormalizedLength(self, length: float) -> Point3dA normalized length fraction refers to arc length, not the curve's parameter interval.
The fraction 0.5 identifies the halfway point along a valid curve. A parameter-domain midpoint can be at a different location.
Rhino 8 Python example · geometry in memory
import Rhino.Geometry as rg
curve = rg.LineCurve(rg.Point3d(0, 0, 0), rg.Point3d(10, 0, 0))
midpoint = curve.PointAtNormalizedLength(0.5)
assert abs(midpoint.X - 5) < 1e-9ProjectToBrep
def ProjectToBrep(curve: Curve, brep: Brep, direction: Vector3d, tolerance: float) -> Sequence[Curve]
def ProjectToBrep(curve: Curve, breps: Iterable[Brep], direction: Vector3d, tolerance: float) -> Sequence[Curve] | tuple[Sequence[Curve], Sequence[int]]
def ProjectToBrep(curves: Iterable[Curve], breps: Iterable[Brep], direction: Vector3d, tolerance: float) -> Sequence[Curve] | tuple[Sequence[Curve], Sequence[int], Sequence[int]]
def ProjectToBrep(curves: Iterable[Curve], breps: Iterable[Brep], direction: Vector3d, tolerance: float, loose: bool) -> tuple[Sequence[Curve], Sequence[int], Sequence[int]]Projects a Curve onto a Brep along a given direction.
ProjectToMesh
def ProjectToMesh(curve: Curve, mesh: Mesh, direction: Vector3d, tolerance: float) -> Sequence[Curve]
def ProjectToMesh(curve: Curve, meshes: Iterable[Mesh], direction: Vector3d, tolerance: float) -> Sequence[Curve]
def ProjectToMesh(curves: Iterable[Curve], meshes: Iterable[Mesh], direction: Vector3d, tolerance: float) -> Sequence[Curve]
def ProjectToMesh(curves: Iterable[Curve], meshes: Iterable[Mesh], direction: Vector3d, tolerance: float, loose: bool) -> Sequence[Curve]Projects a curve to a mesh using a direction and tolerance.
ProjectToPlane
def ProjectToPlane(curve: Curve, plane: Plane) -> CurvePlane projection removes displacement normal to the plane and can collapse geometry.
Projection generally changes lengths and angles. A perpendicular line can collapse to a point, making downstream curve operations degenerate.
PullToBrepFace
Curve.PullToBrepFace(curve: Curve, face: BrepFace, tolerance: float) -> Sequence[Curve]
Curve.PullToBrepFace(curve: Curve, face: BrepFace, tolerance: float, loose: bool) -> Sequence[Curve]
<instance>.PullToBrepFace(curve: Curve, face: BrepFace, tolerance: float) -> Sequence[Curve]
<instance>.PullToBrepFace(curve: Curve, face: BrepFace, tolerance: float, loose: bool) -> Sequence[Curve]
<instance>.PullToBrepFace(face: BrepFace, tolerance: float) -> Sequence[Curve]See the signature and official API documentation for this member.
PullToMesh
def PullToMesh(self, mesh: Mesh, tolerance: float) -> PolylineCurve
def PullToMesh(self, mesh: Mesh, tolerance: float, loose: bool) -> CurvePulling uses proximity to a mesh and differs from projection in a fixed direction.
The target's tessellation affects the result. Inspect behavior near creases, boundaries, and disconnected components.
Rebuild
def Rebuild(self, pointCount: int, degree: int, preserveTangents: bool) -> NurbsCurveRebuilding changes degree and control-point count and generally approximates the original shape.
Measure deviation and verify endpoint or tangent constraints. Fewer control points can simplify editing while losing important detail.
RemoveShortSegments
def RemoveShortSegments(self, tolerance: float) -> boolLooks for segments that are shorter than tolerance that can be removed. Does not change the domain, but it will change the relative parameterization.
Repair
def Repair(self, tolerance: float) -> boolRepairs a curve.
Reparameterize
def Reparameterize(self) -> CurveReparameterizes a curve using automatic parameterization.
Reverse
def Reverse(self) -> boolReverse changes traversal in place. Saved parameters can identify different points afterward.
Recompute correspondence or use the documented parameter mapping. Tangent direction and orientation-sensitive operations also change.
RibbonOffset
def RibbonOffset(self, distance: float, blendRadius: float, directionPoint: Point3d, normal: Vector3d, tolerance: float) -> Curve | tuple[Curve, Sequence[Curve], Sequence[Surface]] | tuple[Curve, Sequence[float], Sequence[float]]
def RibbonOffset(self, ribbonParameters: RibbonOffsetParameters) -> tuple[Curve, Sequence[Curve], Sequence[Curve], Sequence[Brep]]Offsets a closed curve in the following way: pProject the curve to a plane with given normal. Then, loose Offset the projection by distance + blend_radius and trim off self-intersection. THen, Offset the remaining curve back in the opposite direction by blend_radius, filling gaps with blends. Finally, use the elevations of the input curve to get the correct elevations of the result.
SetEndPoint
def SetEndPoint(self, point: Point3d) -> boolForces the curve to end at a specified point. Not all curve types support this operation.
SetStartPoint
def SetStartPoint(self, point: Point3d) -> boolForces the curve to start at a specified point. Not all curve types support this operation.
Simplify
def Simplify(self, options: CurveSimplifyOptions, distanceTolerance: float, angleToleranceRadians: float) -> CurveReturns a geometrically equivalent PolyCurve. The PolyCurve has the following properties 1. All the PolyCurve segments are LineCurve, PolylineCurve, ArcCurve, or NurbsCurve. 2. The NURBS Curves segments do not have fully multiple interior knots. 3. Rational NURBS curves do not have constant weights. 4. Any segment for which IsLinear() or IsArc() is true is a Line, Polyline segment, or an Arc. 5. Adjacent co-linear or co-circular segments are combined. 6. Segments that meet with G1-continuity have there ends tuned up so that they meet with G1-continuity to within machine precision.
SimplifyEnd
def SimplifyEnd(self, end: CurveEnd, options: CurveSimplifyOptions, distanceTolerance: float, angleToleranceRadians: float) -> CurveSame as SimplifyCurve, but simplifies only the last two segments at "side" end.
Smooth
def Smooth(self, smoothFactor: float, bXSmooth: bool, bYSmooth: bool, bZSmooth: bool, bFixBoundaries: bool, coordinateSystem: SmoothingCoordinateSystem) -> Curve
def Smooth(self, smoothFactor: float, bXSmooth: bool, bYSmooth: bool, bZSmooth: bool, bFixBoundaries: bool, coordinateSystem: SmoothingCoordinateSystem, plane: Plane) -> CurveSmooths a curve by averaging the positions of control points in a specified region.
SpanDomain
def SpanDomain(self, spanIndex: int) -> IntervalGet the domain of the curve span with the given index. Use the SpanCount property to test how many spans there are.
SpanVector
def SpanVector(self) -> Sequence[float]Returns the vector of span division parameters for this curve.
Split
def Split(self, cutter: Brep, tolerance: float) -> Sequence[Curve]
def Split(self, cutter: Brep, tolerance: float, angleToleranceRadians: float) -> Sequence[Curve]
def Split(self, cutter: Surface, tolerance: float) -> Sequence[Curve]
def Split(self, cutter: Surface, tolerance: float, angleToleranceRadians: float) -> Sequence[Curve]
def Split(self, plane: Plane, tolerance: float, angleToleranceRadians: float) -> Sequence[Curve]
def Split(self, t: float) -> Sequence[Curve]
def Split(self, t: Iterable[float]) -> Sequence[Curve]Splitting creates pieces separated at curve parameters. Check result count and the domains of the pieces.
Endpoint parameters may not produce a useful new segment. Preserve segment-to-source correspondence when transferring attributes.
TangentAt
def TangentAt(self, t: float) -> Vector3dThe tangent describes the direction of increasing parameter. It is neither a position nor a curvature measurement.
Reversing the curve reverses traversal. At singular or discontinuous regions, a stable tangent may not be available.
ToArcsAndLines
def ToArcsAndLines(self, tolerance: float, angleTolerance: float, minimumLength: float, maximumLength: float) -> PolyCurveConverts a curve into polycurve consisting of arc segments. Sections of the input curves that are nearly straight are converted to straight-line segments.
ToNurbsCurve
def ToNurbsCurve(self) -> NurbsCurve
def ToNurbsCurve(self, subdomain: Interval) -> NurbsCurveConstructs a NURBS curve representation of this curve.
ToPolyline
def ToPolyline(self, mainSegmentCount: int, subSegmentCount: int, maxAngleRadians: float, maxChordLengthRatio: float, maxAspectRatio: float, tolerance: float, minEdgeLength: float, maxEdgeLength: float, keepStartPoint: bool) -> PolylineCurve
def ToPolyline(self, mainSegmentCount: int, subSegmentCount: int, maxAngleRadians: float, maxChordLengthRatio: float, maxAspectRatio: float, tolerance: float, minEdgeLength: float, maxEdgeLength: float, keepStartPoint: bool, curveDomain: Interval) -> PolylineCurve
def ToPolyline(self, tolerance: float, angleTolerance: float, minimumLength: float, maximumLength: float) -> PolylineCurvePolyline conversion approximates shape with straight segments. Deviation and angle limits matter more than density alone.
Choose tolerance in model units for the downstream task. A visually dense polyline remains an approximation of the curve.
TorsionAt
def TorsionAt(self, t: float) -> floatEvaluate the torsion of a curve at a parameter. Sometimes also called the "second curvature", torsion is the rate of change of a curve's osculating plane.
Trim
def Trim(self, domain: Interval) -> Curve
def Trim(self, side: CurveEnd, length: float) -> Curve
def Trim(self, t0: float, t1: float) -> CurveCurve trimming keeps a parameter interval. It differs from trimming a surface through Brep loops.
Use the source domain. Closed curves require deliberate seam handling when the retained interval crosses the domain boundary.
TrimInterval
def TrimInterval(self, domain: Interval) -> bool
def TrimInterval(self, t0: float, t1: float) -> boolTrims the curve in-place by removing portions of the curve outside the specified interval.
TryGetArc
def TryGetArc(self) -> tuple[bool, Arc]
def TryGetArc(self, plane: Plane) -> tuple[bool, Arc]
def TryGetArc(self, plane: Plane, tolerance: float) -> tuple[bool, Arc]
def TryGetArc(self, tolerance: float) -> tuple[bool, Arc]Try to convert this curve into an Arc using RhinoMath.ZeroTolerance.
TryGetCircle
def TryGetCircle(self) -> tuple[bool, Circle]
def TryGetCircle(self, tolerance: float) -> tuple[bool, Circle]Try to convert this curve into a circle using RhinoMath.ZeroTolerance.
TryGetEllipse
def TryGetEllipse(self) -> tuple[bool, Ellipse]
def TryGetEllipse(self, plane: Plane) -> tuple[bool, Ellipse]
def TryGetEllipse(self, plane: Plane, tolerance: float) -> tuple[bool, Ellipse]
def TryGetEllipse(self, tolerance: float) -> tuple[bool, Ellipse]Try to convert this curve into an Ellipse within RhinoMath.ZeroTolerance.
TryGetPlane
def TryGetPlane(self) -> tuple[bool, Plane]
def TryGetPlane(self, tolerance: float) -> tuple[bool, Plane]Test a curve for planarity and return the plane.
TryGetPolyline
def TryGetPolyline(self) -> tuple[bool, Polyline, Sequence[float]] | tuple[bool, Polyline]Several types of Curve can have the form of a polyline including a degree 1 NurbsCurve, a PolylineCurve, and a PolyCurve all of whose segments are some form of polyline. IsPolyline tests a curve to see if it can be represented as a polyline.
CurveBooleanRegions
10 members
Represents the results of a Curve.CreateBooleanRegions calculation.
Permanent link · Official RhinoCommon reference
RegionCount
def RegionCount(self) -> intReturns the number of curve regions. A curve region is a collection of curves that bound a single connected region of the plane.
PointCount
def PointCount(self) -> intIf this object were created using the Curve.CreateBooleanRegions override that accepts a collection of points as input, then this value will be equal to the length of the points collection.
PlanarCurveCount
def PlanarCurveCount(self) -> intReturns number of planar curves that were calculated by Curve.CreateBooleanRegions.
BoundaryCount
def BoundaryCount(self, regionIndex: int) -> intReturns the number of boundary curves in a curve region.
Dispose
def Dispose(self) -> NoneActively reclaims unmanaged resources that this instance uses.
PlanarCurve
def PlanarCurve(self, planarCurveIndex: int) -> CurveReturns a planar curve that was calculated by Curve.CreateBooleanRegions.
RegionCurves
def RegionCurves(self, regionIndex: int) -> Sequence[Curve]Returns the boundary curves in a curve region. A curve region is a collection of curves that bound a single connected region of the plane. Note, the first curve is always the outer boundary.
RegionPointIndex
def RegionPointIndex(self, pointIndex: int) -> intIf this object were created using the Curve.CreateBooleanRegions override that accepts a collection of points as input, then you this method to retrieve the index of the point contained in a curve region. If this.RegionPointIndex(i) = n, then points[i] is contained in this.RegionCurves(n). If points[i] is not in any region, then this.RegionPointIndex(i) = -1.
SegmentCount
def SegmentCount(self, regionIndex: int, boundaryIndex: int) -> intReturns the number of segments in a boundary curve in a curve region.
SegmentDetails
def SegmentDetails(self, regionIndex: int, boundaryIndex: int, segmmentIndex: int) -> tuple[int, Interval, bool]Returns the details of a segment in a boundary curve in a curve region.
CurveEnd
0 members
Defines the extremes of a curve through a flagged enumeration.
CurveEvaluationSide
0 members
Defines enumerated values for the options that defines a curve evaluation side when evaluating kinks.
CurveExtensionStyle
0 members
Defines enumerated values for styles to use during curve extension, such as "Line", "Arc" or "Smooth".
CurveKnotStyle
0 members
Defines enumerated values for knot spacing styles in interpolated curves.
CurveOffsetCornerStyle
0 members
Defines enumerated values for all implemented corner styles in curve offsets.
CurveOffsetEndStyle
0 members
Defines enumerated values for all implemented end styles in curve offsets.
CurveOrientation
0 members
Defines enumerated values for closed curve orientations.
CurveProxy
1 members
Represent curve geometry. Usually this is part of another piece of geometry that can be represented as a "proxy".
Permanent link · Official RhinoCommon reference
ProxyCurveIsReversed
def ProxyCurveIsReversed(self) -> boolTrue if "this" is a curve is reversed from the "real" curve geometry
CurveSimplifyOptions
0 members
Enumerates the options to use when simplifying a curve.
Cylinder
18 members
A cylinder combines a circular cross section and an axis; height limits determine its finite extent.
An analytic cylinder and a capped Brep solid are different representations. Inspect conversion options and closure when volume matters.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, baseCircle: Circle) -> None
def __init__(self, baseCircle: Circle, height: float) -> NoneSee the signature and official API documentation for this member.
Unset
Unset: ClassVar[Cylinder]See the signature and official API documentation for this member.
IsValid
def IsValid(self) -> boolGets a boolean value indicating whether this cylinder is valid. A valid cylinder is represented by a valid circle and two valid heights.
IsFinite
def IsFinite(self) -> booltrue if the cylinder is finite (Height0 != Height1) false if the cylinder is infinite.
Center
def Center(self) -> Point3dGets the center point of the defining circle.
Axis
def Axis(self) -> Vector3dGets the axis direction of the cylinder.
TotalHeight
def TotalHeight(self) -> floatGets the height of the cylinder. Infinite cylinders have a height of zero, not Double.PositiveInfinity.
Height1
def Height1(self) -> floatGets or sets the start height of the cylinder. The center of bottom cap is: BasePlane.Origin + Height1 * BasePlane.ZAxis.
Height2
def Height2(self) -> floatGets or sets the end height of the cylinder. If the end height equals the start height, the cylinder is presumed to be infinite. The center of top cap is: BasePlane.Origin + Height2 * BasePlane.ZAxis.
Radius
def Radius(self) -> floatGets or sets the radius of the cylinder.
BasePlane
def BasePlane(self) -> PlaneGets or sets the base plane of the cylinder.
CircleAt
def CircleAt(self, linearParameter: float) -> CircleCompute the circle at the given elevation parameter.
EpsilonEquals
def EpsilonEquals(self, other: Cylinder, epsilon: float) -> boolCheck that all values in other are within epsilon of the values in this
LineAt
def LineAt(self, angularParameter: float) -> LineCompute the line at the given angle parameter. This line will be degenerate if the cylinder is infinite.
ToBrep
def ToBrep(self, capBottom: bool, capTop: bool) -> BrepConstructs a Brep representation of this Cylinder. This is synonymous with calling NurbsSurface.CreateFromCylinder().
ToNurbsSurface
def ToNurbsSurface(self) -> NurbsSurfaceConstructs a Nurbs surface representation of this cylinder. This is synonymous with calling NurbsSurface.CreateFromCylinder().
ToRevSurface
def ToRevSurface(self) -> RevSurfaceConstructs a RevSurface representation of this Cylinder. This is synonymous with calling RevSurface.CreateFromCylinder().
Transform
def Transform(self, xform: Transform) -> boolTransforms this cylinder. Note that non-similarity preserving transformations cannot be applied to a cylinder.
DetailView
5 members
Represents a view of the model placed on a page layout.
Permanent link · Official RhinoCommon reference
IsParallelProjection
def IsParallelProjection(self) -> boolGets or sets whether the view is parallel.
IsPerspectiveProjection
def IsPerspectiveProjection(self) -> boolGets or sets whether the view is perspective.
IsProjectionLocked
def IsProjectionLocked(self) -> boolGets or sets whether the view is locked.
PageToModelRatio
def PageToModelRatio(self) -> floatGets the ratio of page units to model units for this detail view. Returns 0 if the projection is not parallel.
SetScale
def SetScale(self, modelLength: float, modelUnits: UnitSystem, pageLength: float, pageUnits: UnitSystem) -> boolSets the detail viewport's projection so geometry is displayed at a certain scale.
DevelopableSrf
4 members
Helpers for developable surface functions
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> NoneSee the signature and official API documentation for this member.
GetLocalDevopableRuling
def GetLocalDevopableRuling(rail0: NurbsCurve, t0: float, dom0: Interval, rail1: NurbsCurve, t1: float, dom1: Interval, t0_out: float, t1_out: float) -> tuple[int, float, float]Finds minimum twist ruling between 2 curves at local domains
RulingMinTwist
def RulingMinTwist(rail0: NurbsCurve, t0: float, dom0: Interval, rail1: NurbsCurve, t1: float, dom1: Interval, t0_out: float, t1_out: float, cos_twist_out: float) -> tuple[bool, float, float, float]
def RulingMinTwist(rail0: NurbsCurve, t0: float, rail1: NurbsCurve, t1: float, dom1: Interval, t1_out: float, cos_twist_out: float) -> tuple[bool, float, float]Find a ruling from rail0(t0_out) to rail1(t1_out) that has the least twist across the ruling with t0_out in domain0 and t1_out in domain1. max_cos_twist is cos(twist) for the returned ruling
UntwistRulings
def UntwistRulings(rail0: NurbsCurve, rail1: NurbsCurve, rulings: Iterable[Point2d]) -> tuple[bool, Sequence[Point2d]]See the signature and official API documentation for this member.
Dimension
57 members
Base class for dimensions
Permanent link · Official RhinoCommon reference
UseDefaultTextPoint
def UseDefaultTextPoint(self) -> boolSee the signature and official API documentation for this member.
TextPosition
def TextPosition(self) -> Point2dGets and sets the position of text on the plane.
PlainUserText
def PlainUserText(self) -> strSee the signature and official API documentation for this member.
TextFormula
def TextFormula(self) -> strSee the signature and official API documentation for this member.
TextRotation
def TextRotation(self) -> floatSee the signature and official API documentation for this member.
NumericValue
def NumericValue(self) -> floatGets the numeric value (or measurement), depending on geometry type. LinearDimension: distance between arrow tips RadialDimension: radius or diameter depending on type AngularDimension: angle in radians
DetailMeasured
def DetailMeasured(self) -> AnySee the signature and official API documentation for this member.
DistanceScale
def DistanceScale(self) -> floatSee the signature and official API documentation for this member.
ForceArrowPosition
def ForceArrowPosition(self) -> AnySee the signature and official API documentation for this member.
ForceTextPosition
def ForceTextPosition(self) -> AnySee the signature and official API documentation for this member.
ForceDimLine
def ForceDimLine(self) -> boolSee the signature and official API documentation for this member.
ArrowFit
def ArrowFit(self) -> AnySee the signature and official API documentation for this member.
ForceDimensionLineBetweenExtensionLines
def ForceDimensionLineBetweenExtensionLines(self) -> boolSee the signature and official API documentation for this member.
TextFit
def TextFit(self) -> AnySee the signature and official API documentation for this member.
TextOrientation
def TextOrientation(self) -> AnySee the signature and official API documentation for this member.
TextLocation
def TextLocation(self) -> AnySee the signature and official API documentation for this member.
TextAngleType
def TextAngleType(self) -> AnySee the signature and official API documentation for this member.
DimensionLineExtension
def DimensionLineExtension(self) -> floatSee the signature and official API documentation for this member.
ExtensionLineExtension
def ExtensionLineExtension(self) -> floatSee the signature and official API documentation for this member.
ExtensionLineOffset
def ExtensionLineOffset(self) -> floatSee the signature and official API documentation for this member.
FixedLengthExtensionOn
def FixedLengthExtensionOn(self) -> boolSee the signature and official API documentation for this member.
FixedExtensionLength
def FixedExtensionLength(self) -> floatSee the signature and official API documentation for this member.
BaselineSpacing
def BaselineSpacing(self) -> floatSee the signature and official API documentation for this member.
CentermarkSize
def CentermarkSize(self) -> floatSee the signature and official API documentation for this member.
CentermarkStyle
def CentermarkStyle(self) -> AnySee the signature and official API documentation for this member.
SuppressExtension1
def SuppressExtension1(self) -> boolSee the signature and official API documentation for this member.
SuppressExtension2
def SuppressExtension2(self) -> boolSee the signature and official API documentation for this member.
ArrowheadType1
def ArrowheadType1(self) -> AnySee the signature and official API documentation for this member.
ArrowheadType2
def ArrowheadType2(self) -> AnySee the signature and official API documentation for this member.
ArrowSize
def ArrowSize(self) -> floatSee the signature and official API documentation for this member.
ArrowBlockId1
def ArrowBlockId1(self) -> AnySee the signature and official API documentation for this member.
ArrowBlockId2
def ArrowBlockId2(self) -> AnySee the signature and official API documentation for this member.
LengthFactor
def LengthFactor(self) -> floatSee the signature and official API documentation for this member.
LengthResolution
def LengthResolution(self) -> intSee the signature and official API documentation for this member.
LengthRoundoff
def LengthRoundoff(self) -> floatSee the signature and official API documentation for this member.
Prefix
def Prefix(self) -> strSee the signature and official API documentation for this member.
Suffix
def Suffix(self) -> strSee the signature and official API documentation for this member.
ZeroSuppression
def ZeroSuppression(self) -> AnySee the signature and official API documentation for this member.
AltUnitsDisplay
def AltUnitsDisplay(self) -> boolSee the signature and official API documentation for this member.
AltLengthFactor
def AltLengthFactor(self) -> floatSee the signature and official API documentation for this member.
AltLengthResolution
def AltLengthResolution(self) -> intSee the signature and official API documentation for this member.
AltLengthRoundoff
def AltLengthRoundoff(self) -> floatSee the signature and official API documentation for this member.
AltPrefix
def AltPrefix(self) -> strSee the signature and official API documentation for this member.
AltSuffix
def AltSuffix(self) -> strSee the signature and official API documentation for this member.
AltZeroSuppression
def AltZeroSuppression(self) -> AnySee the signature and official API documentation for this member.
AlternateBelowLine
def AlternateBelowLine(self) -> boolSee the signature and official API documentation for this member.
ToleranceFormat
def ToleranceFormat(self) -> AnySee the signature and official API documentation for this member.
ToleranceResolution
def ToleranceResolution(self) -> intSee the signature and official API documentation for this member.
AltToleranceResolution
def AltToleranceResolution(self) -> intSee the signature and official API documentation for this member.
ToleranceUpperValue
def ToleranceUpperValue(self) -> floatSee the signature and official API documentation for this member.
ToleranceLowerValue
def ToleranceLowerValue(self) -> floatSee the signature and official API documentation for this member.
ToleranceHeightScale
def ToleranceHeightScale(self) -> floatSee the signature and official API documentation for this member.
Explode
def Explode(self) -> Sequence[GeometryBase]Explodes this dimension into its geometric components.
GetTextTransform
def GetTextTransform(self, viewport: ViewportInfo, style: DimensionStyle, textScale: float, drawForward: bool) -> TransformGet the transform for this text object's text geometry
SetAltDimensionLengthDisplayWithZeroSuppressionReset
def SetAltDimensionLengthDisplayWithZeroSuppressionReset(self, ld: Any) -> NoneSee the signature and official API documentation for this member.
SetDimensionLengthDisplayWithZeroSuppressionReset
def SetDimensionLengthDisplayWithZeroSuppressionReset(self, ld: Any) -> NoneSee the signature and official API documentation for this member.
UpdateDimensionText
def UpdateDimensionText(self, style: DimensionStyle, units: UnitSystem) -> NoneRemakes dimension text geometry object and sets it on the dimension.
DistancingMode
0 members
Defines how offset and similar operations should work.
EdgeAdjacency
0 members
Enumerates all possible Topological Edge adjacency types.
Ellipse
10 members
An ellipse is a planar conic with two principal radii. Its angular parameter is not proportional to arc length.
Equal angular steps travel different distances. Convert to a Curve and use length methods for uniform physical spacing.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, center: Point3d, second: Point3d, third: Point3d) -> None
def __init__(self, plane: Plane, radius1: float, radius2: float) -> NoneSee the signature and official API documentation for this member.
Plane
def Plane(self) -> PlaneGets or sets the base plane of the ellipse.
Radius1
def Radius1(self) -> floatGets or sets the radius of the ellipse along the base plane X semi-axis.
Radius2
def Radius2(self) -> floatGets or sets the radius of the ellipse along the base plane Y semi-axis.
Center
def Center(self) -> Point3dGets or sets the center of the ellipse.
FocalDistance
def FocalDistance(self) -> floatGets the distance from the center to a focus.
IsValid
def IsValid(self) -> boolReturns an indication of the validity of this ellipse.
EpsilonEquals
def EpsilonEquals(self, other: Ellipse, epsilon: float) -> boolCheck that all values in other are within epsilon of the values in this
GetFoci
def GetFoci(self) -> tuple[Point3d, Point3d]Gets the foci. The foci are two points whose sum of distances from any point on the ellipse is always the same.
ToNurbsCurve
def ToNurbsCurve(self) -> NurbsCurveConstructs a nurbs curve representation of this ellipse. This is equivalent to calling NurbsCurve.CreateFromEllipse().
ExtrudeCornerType
0 members
Corner types used for creating a tapered extrusion
Extrusion
33 members
An extrusion stores profiles and a path compactly. Caps and inner profiles determine solid enclosure.
It can be more economical than a general Brep. Convert when topology is needed and verify IsSolid for volume-related tasks.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> NoneInitializes a new instance of the Rhino.Geometry.Extrusion class.
PathStart
def PathStart(self) -> Point3dGets the start point of the path.
PathEnd
def PathEnd(self) -> Point3dGets the end point of the path.
PathTangent
def PathTangent(self) -> Vector3dGets the up vector of the path.
MiterPlaneNormalAtStart
def MiterPlaneNormalAtStart(self) -> Vector3dGets or sets the normal of the miter plane at the start in profile coordinates. In profile coordinates, 0,0,1 always maps to the extrusion axis
MiterPlaneNormalAtEnd
def MiterPlaneNormalAtEnd(self) -> Vector3dGets or sets the normal of the miter plane at the end in profile coordinates. In profile coordinates, 0,0,1 always maps to the extrusion axis
IsMiteredAtStart
def IsMiteredAtStart(self) -> boolReturns a value indicating whether a miter plane at start is defined.
IsMiteredAtEnd
def IsMiteredAtEnd(self) -> boolGets a value indicating whether a miter plane at the end is defined.
IsSolid
def IsSolid(self) -> boolGets a value indicating whether there is no gap among all surfaces constructing this object.
IsCappedAtBottom
def IsCappedAtBottom(self) -> boolGets a value indicating whether the surface that fills the bottom profile is existing.
IsCappedAtTop
def IsCappedAtTop(self) -> boolGets a value indicating whether the surface that fills the top profile is existing.
CapCount
def CapCount(self) -> intGets the amount of capping surfaces.
ProfileCount
def ProfileCount(self) -> intGets the amount of profile curves.
AddInnerProfile
def AddInnerProfile(self, innerProfile: Curve) -> boolAdds an inner profile.
Create
def Create(curve: Curve, plane: Plane, height: float, cap: bool) -> Extrusion
def Create(planarCurve: Curve, height: float, cap: bool) -> ExtrusionCreate an extrusion from a 3d curve, a plane and a height.
CreateBoxExtrusion
def CreateBoxExtrusion(box: Box, cap: bool=...) -> ExtrusionGets an extrusion from a box.
CreateCylinderExtrusion
def CreateCylinderExtrusion(cylinder: Cylinder, capBottom: bool, capTop: bool) -> ExtrusionGets an extrusion form of a cylinder.
CreatePipeExtrusion
def CreatePipeExtrusion(cylinder: Cylinder, otherRadius: float, capTop: bool, capBottom: bool) -> ExtrusionGets an extrusion form of a pipe.
GetBrepFormComponentIndex
def GetBrepFormComponentIndex(self, extrusionComponentIndex: ComponentIndex) -> ComponentIndexConvert a component index that identifies a part of this extrusion to a component index that identifies a part of the Brep created by Extrusion.ToBrep(false).
GetMesh
def GetMesh(self, meshType: MeshType) -> MeshObtains a reference to a specified type of mesh for this extrusion.
GetPathPlane
def GetPathPlane(self, s: float) -> PlaneGets the 3D plane perpendicular to the path at a normalized path parameter.
GetProfilePlane
def GetProfilePlane(self, s: float) -> PlaneGets the 3D plane containing the profile curve at a normalized path parameter.
GetProfileTransformation
def GetProfileTransformation(self, s: float) -> TransformGets the transformation that maps the XY profile curve to its 3d location.
GetWireframe
def GetWireframe(self) -> Sequence[Curve]Constructs all the Wireframe curves for this Extrusion.
PathLineCurve
def PathLineCurve(self) -> LineCurveGets the line-like curve that is the conceptual axis of the extrusion.
Profile3d
def Profile3d(self, ci: ComponentIndex) -> Curve
def Profile3d(self, profileIndex: int, s: float) -> CurveGets one of the profiles.
ProfileIndex
def ProfileIndex(self, profileParameter: float) -> intGets the index of the profile curve at a domain related to a parameter.
SetMesh
def SetMesh(self, mesh: Mesh, meshType: MeshType) -> boolSets a specified type of mesh for this extrusion.
SetOuterProfile
def SetOuterProfile(self, outerProfile: Curve, cap: bool) -> boolSets the outer profile of the extrusion.
SetPathAndUp
def SetPathAndUp(self, a: Point3d, b: Point3d, up: Vector3d) -> boolAllows to set the two points at the extremes and the up vector.
ToBrep
def ToBrep(self) -> Brep
def ToBrep(self, splitKinkyFaces: bool) -> BrepConversion expands compact extrusion geometry into Brep faces and edges.
Component indices and identity can change. Recompute topology references instead of assuming a one-to-one index mapping.
WallEdge
def WallEdge(self, ci: ComponentIndex) -> CurveGets one of the longitudinal curves along the beam or extrusion.
WallSurface
def WallSurface(self, ci: ComponentIndex) -> SurfaceGets one of the longitudinal surfaces of the extrusion.
FilletSurfaceSplitType
0 members
RhinoFilletSurfaceSplitType
GeometryBase
24 members
Provides a common base for most geometric classes. This class is abstract.
Permanent link · Official RhinoCommon reference
IsDocumentControlled
def IsDocumentControlled(self) -> boolIf 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.
IsShallowDuplicate
def IsShallowDuplicate(self) -> boolIs 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)
ObjectType
def ObjectType(self) -> AnyUseful for switch statements that need to differentiate between basic object types like points, curves, surfaces, and so on.
IsDeformable
def IsDeformable(self) -> booltrue if object can be accurately modified with "squishy" transformations like projections, shears, and non-uniform scaling.
HasBrepForm
def HasBrepForm(self) -> boolReturns true if the Brep.TryConvertBrep function will be successful for this object
UserStringCount
def UserStringCount(self) -> intGets the amount of user strings.
ComponentIndex
def ComponentIndex(self) -> ComponentIndexIf this piece of geometry is a component in something larger, like a BrepEdge in a Brep, then this function returns the component index.
DataCRC
def DataCRC(self, currentRemainder: int) -> intReturns 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.
DeleteAllUserStrings
def DeleteAllUserStrings(self) -> NoneSee the signature and official API documentation for this member.
DeleteUserString
def DeleteUserString(self, key: str) -> boolSee the signature and official API documentation for this member.
Duplicate
def Duplicate(self) -> GeometryBaseConstructs a deep (full) copy of this object.
DuplicateShallow
def DuplicateShallow(self) -> GeometryBaseConstructs 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.
GeometryEquals
def GeometryEquals(first: GeometryBase, second: GeometryBase) -> boolDetermines if two geometries equal one another, in pure geometrical shape. This version only compares the geometry itself and does not include any user data comparisons. This is a comparison by value: for two identical items it will be true, no matter where in memory they may be stored.
GeometryReferenceEquals
def GeometryReferenceEquals(one: GeometryBase, other: GeometryBase) -> boolDetermines if two objects are respectively shallow copies, new managed instantiations of the same geometry, or similar internal references to the exact same geometry, both in managed and in unmanaged code.
GetBoundingBox
def GetBoundingBox(self, accurate: bool) -> BoundingBox
def GetBoundingBox(self, plane: Plane) -> BoundingBox | tuple[BoundingBox, Box]
def GetBoundingBox(self, xform: Transform) -> BoundingBoxBounding box solver. Gets the world axis aligned bounding box for the geometry.
GetUserString
def GetUserString(self, key: str) -> strGets user string from this geometry.
GetUserStrings
def GetUserStrings(self) -> AnyGets a copy of all (user key string, user value string) pairs attached to this geometry.
MakeDeformable
def MakeDeformable(self) -> boolIf possible, converts the object into a form that can be accurately modified with "squishy" transformations like projections, shears, an non-uniform scaling.
MemoryEstimate
def MemoryEstimate(self) -> intComputes an estimate of the number of bytes that this object is using in memory.
Rotate
def Rotate(self, angleRadians: float, rotationAxis: Vector3d, rotationCenter: Point3d) -> boolRotates the object about the specified axis. A positive rotation angle results in a counter-clockwise rotation about the axis (right hand rule).
Scale
def Scale(self, scaleFactor: float) -> boolScales the object by the specified factor. The scale is centered at the origin.
SetUserString
def SetUserString(self, key: str, value: str) -> boolAttach a user string (key,value combination) to this geometry.
Transform
def Transform(self, xform: Transform) -> boolTransforms 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.
Translate
def Translate(self, translationVector: Vector3d) -> bool
def Translate(self, x: float, y: float, z: float) -> boolTranslates the object along the specified vector.
Hatch
15 members
A hatch combines planar boundaries and a display pattern. Pattern scale differs from boundary geometry.
Loops define filled regions and holes. Pattern appearance does not establish a connected surface or a solid.
Permanent link · Official RhinoCommon reference
PatternIndex
def PatternIndex(self) -> intGets or sets the index of the pattern in the document hatch pattern table.
PatternRotation
def PatternRotation(self) -> floatGets or sets the relative rotation of the pattern.
BasePoint
def BasePoint(self) -> Point3dGets or sets the hatch pattern base point
Plane
def Plane(self) -> PlaneGets or sets the hatch plane
PatternScale
def PatternScale(self) -> floatGets or sets the scaling factor of the pattern.
Create
def Create(curve: Curve, hatchPatternIndex: int, rotationRadians: float, scale: float) -> Sequence[Hatch]
def Create(curve: Curve, hatchPatternIndex: int, rotationRadians: float, scale: float, tolerance: float) -> Sequence[Hatch]
def Create(curves: Iterable[Curve], hatchPatternIndex: int, rotationRadians: float, scale: float) -> Sequence[Hatch]
def Create(curves: Iterable[Curve], hatchPatternIndex: int, rotationRadians: float, scale: float, tolerance: float) -> Sequence[Hatch]
def Create(hatchPlane: Plane, outerLoop: Curve, innerLoops: Iterable[Curve], hatchPatternIndex: int, rotationRadians: float, scale: float) -> HatchConstructs an array of Rhino.Geometry.Hatch from one curve.
CreateDisplayGeometry
def CreateDisplayGeometry(self, pattern: Any, patternScale: float) -> tuple[Sequence[Curve], Sequence[Line], Brep]Generate geometry that would be used to draw the hatch with a given hatch pattern
CreateFromBrep
def CreateFromBrep(brep: Brep, brepFaceIndex: int, hatchPatternIndex: int, rotationRadians: float, scale: float, basePoint: Point3d) -> HatchCreate a hatch from a planar face of a Brep
Explode
def Explode(self) -> Sequence[GeometryBase]Decomposes the hatch pattern into an array of geometry.
Get2dCurves
def Get2dCurves(self, outer: bool) -> Sequence[Curve]Gets 2d curves that define the boundaries of the hatch
Get3dCurves
def Get3dCurves(self, outer: bool) -> Sequence[Curve]Gets 3d curves that define the boundaries of the hatch
GetGradientFill
def GetGradientFill(self) -> AnyGet gradient fill information for this hatch. If the "GradientType" for the fill is None, then this hatch doesn't have any gradient fill.
ScalePattern
def ScalePattern(self, xform: Transform) -> NoneScale the hatch's pattern
SetGradientFill
def SetGradientFill(self, fill: Any) -> NoneSee the signature and official API documentation for this member.
ToBrep
def ToBrep(self) -> BrepConstructs a Brep representation of this hatch.
HermiteSurface
18 members
Create an ON_NurbsSurface satisfying Hermite interpolation conditions at a grid of points.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, uCount: int, vCount: int) -> NoneInitializes a new Rhino.Geometry.HermiteSurface instance.
IsValid
def IsValid(self) -> boolReturns true if the all of values in all of the internal data structures contain valid values, false otherwise.
UCount
def UCount(self) -> intGets the number of parameters in the "u" direction.
VCount
def VCount(self) -> intGets the number of parameters in the "v" direction.
Dispose
def Dispose(self) -> NoneActively reclaims unmanaged resources that this instance uses.
PointAt
def PointAt(self, uIndex: int, vIndex: int) -> Point3dGets the interpolation point at the u,v parameter location.
SetPointAt
def SetPointAt(self, uIndex: int, vIndex: int, point: Point3d) -> NoneSets the interpolation point at the u,v parameter location.
SetTwistAt
def SetTwistAt(self, uIndex: int, vIndex: int, twist: Vector3d) -> NoneSet the twist direction (mixed second partial derivative) to interpolate at the u,v parameter location.
SetUParameterAt
def SetUParameterAt(self, index: int, parameter: float) -> NoneSets the "u" parameter at an index. These parameters are strictly increasing.
SetUTangentAt
def SetUTangentAt(self, uIndex: int, vIndex: int, tangent: Vector3d) -> NoneSet the "u" tangent direction (actually first derivative) to interpolate at the u,v parameter location.
SetVParameterAt
def SetVParameterAt(self, index: int, parameter: float) -> NoneSets the "v" parameter at an index. These parameters are strictly increasing.
SetVTangentAt
def SetVTangentAt(self, uIndex: int, vIndex: int, tangent: Vector3d) -> NoneSet the "v" tangent direction (actually first derivative) to interpolate at the u,v parameter location.
ToNurbsSurface
def ToNurbsSurface(self) -> NurbsSurfaceConstructs a NURBS surface satisfying the Hermite interpolation conditions.
TwistAt
def TwistAt(self, uIndex: int, vIndex: int) -> Vector3dGet the twist direction (mixed second partial derivative) to interpolate at the u,v parameter location.
UParameterAt
def UParameterAt(self, index: int) -> floatGets the "u" parameter at an index. These parameters are strictly increasing.
UTangentAt
def UTangentAt(self, uIndex: int, vIndex: int) -> Vector3dGet the "u" tangent direction (actually first derivative) to interpolate at the u,v parameter location.
VParameterAt
def VParameterAt(self, index: int) -> floatGets the "v" parameter at an index. These parameters are strictly increasing.
VTangentAt
def VTangentAt(self, uIndex: int, vIndex: int) -> Vector3dGet the "v" tangent direction (actually first derivative) to interpolate at the u,v parameter location.
HiddenLineDrawing
8 members
Represents a hidden line drawing object. A hidden line drawing consists of curves generated from source objects. The curves correspond to edges, and silhouettes of source objects and intersections with cutting planes.
Permanent link · Official RhinoCommon reference
Segments
def Segments(self) -> Sequence[HiddenLineDrawingSegment]Sub-curve objects calculated by the hidden line drawing.
Points
def Points(self) -> Sequence[HiddenLineDrawingPoint]Point objects calculated by the hidden line drawing.
Viewport
def Viewport(self) -> ViewportInfoReturns the ViewportInfo used by the hidden line drawing.
WorldToHiddenLine
def WorldToHiddenLine(self) -> TransformReturns the world-coordinate system to HLD-coordinate system transformation.
BoundingBox
def BoundingBox(self, includeHidden: bool) -> BoundingBoxGet tight bounding box of the hidden line drawing.
Compute
def Compute(parameters: HiddenLineDrawingParameters, multipleThreads: bool) -> HiddenLineDrawing
def Compute(parameters: HiddenLineDrawingParameters, multipleThreads: bool, progress: Any, cancelToken: Any) -> HiddenLineDrawingPerform the hidden line drawing calculation based on input parameters
Dispose
def Dispose(self) -> NoneActively reclaims unmanaged resources that this instance uses.
RejoinCompatibleVisible
def RejoinCompatibleVisible(self) -> NoneJoin consecutive visible curves from a single FullCurve
HiddenLineDrawingObject
4 members
Represents an object added to a HiddenLineDrawing
Permanent link · Official RhinoCommon reference
OccludingSections
def OccludingSections(self) -> boolObjects in this drawing could have occluding sections. Objects must added with the occluding section option set as desired.
Geometry
def Geometry(self) -> GeometryBaseReturns the geometry in world coordinates if UseXform is false. Otherwise, the geometry in object space coordinates is returned.
Transform
def Transform(self) -> TransformReturns the transformation passed into the Add... function when setting up the hidden line drawing parameters.
Tag
def Tag(self) -> AnyReturns the extra data used to cross-reference the object specified in HiddenLineDrawing.AddObject.
HiddenLineDrawingObjectCurve
11 members
Curves generated from source objects which correspond to edges, and silhouettes of source objects and intersections with cutting planes. A HiddenLineDrawingObjectCurve is partitioned into hidden and visible segments called HiddenLineDrawingSegment
Permanent link · Official RhinoCommon reference
IsValid
def IsValid(self) -> boolVerifies the object is valid.
SourceObject
def SourceObject(self) -> HiddenLineDrawingObjectReturn the source object that this curve came from
SourceObjectComponentIndex
def SourceObjectComponentIndex(self) -> ComponentIndexComponent of source object part that generated this curve.
ClippingPlaneIndex
def ClippingPlaneIndex(self) -> intIndex into HiddenLineDrawing.ClippingPlanes when SilhouetteType == SilhouetteType.SectionCut.
Index
def Index(self) -> intIndex of this object in HiddenLineDrawing.FullCurves.
SilhouetteType
def SilhouetteType(self) -> SilhouetteTypeThe silhouette event type
OriginalDomainStart
def OriginalDomainStart(self) -> floatInitialized to RhinoMath.UnsetValue. Valid if the full curve is closed. Rejoin can reparameterize the curve by moving the seam. When this has been done the original domain start is stored here.
Parameters
def Parameters(self) -> Sequence[float]Increasing, partition of curve.Domain.
Segments
def Segments(self) -> Sequence[HiddenLineDrawingSegment]The HiddenLineDrawingCurve objects that make up this full curve.
IsProjecting
def IsProjecting(self) -> boolReturns true if all the non clipped portions of this curve are projecting.
Curve
def Curve(self, t: float) -> HiddenLineDrawingSegment
def Curve(self, t: float, side: int) -> HiddenLineDrawingSegmentReturns the HiddenLineDrawingCurve object containing parameter 't'.
HiddenLineDrawingParameters
11 members
Input used for computing a hidden line drawing
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> Nonedefault constructor
AbsoluteTolerance
def AbsoluteTolerance(self) -> floatAbsolute tolerance is used to decide if curves overlap or intersect. A suggested value is to use RhinoDoc.AbsoluteTolerance
Flatten
def Flatten(self) -> boolFlatten the computed geometry
IncludeTangentEdges
def IncludeTangentEdges(self) -> boolInclude tangent edges in hidden line drawing (default is true)
IncludeTangentSeams
def IncludeTangentSeams(self) -> boolInclude tangent seams in hidden line drawing (default is true)
IncludeHiddenCurves
def IncludeHiddenCurves(self) -> boolInclude hidden curves in hidden line drawing (default is true)
OccludingSectionOption
def OccludingSectionOption(self) -> boolEnable occluding section option (default is false)
AddClippingPlane
def AddClippingPlane(self, plane: Plane) -> NoneSpecify clipping planes that are active for this view.
AddGeometry
def AddGeometry(self, geometry: GeometryBase, tag: Any) -> bool
def AddGeometry(self, geometry: GeometryBase, tag: Any, occluding_sections: bool) -> bool
def AddGeometry(self, geometry: GeometryBase, xform: Transform, tag: Any) -> bool
def AddGeometry(self, geometry: GeometryBase, xform: Transform, tag: Any, occluding_sections: bool) -> boolAdd geometry that should be included in the calculation
AddGeometryAndPlanes
def AddGeometryAndPlanes(self, geometry: GeometryBase, tag: Any, clips: Iterable[Plane]) -> bool
def AddGeometryAndPlanes(self, geometry: GeometryBase, tag: Any, occluding_sections: bool, clips: Iterable[Plane]) -> bool
def AddGeometryAndPlanes(self, geometry: GeometryBase, xform: Transform, tag: Any, clips: Iterable[Plane]) -> bool
def AddGeometryAndPlanes(self, geometry: GeometryBase, xform: Transform, tag: Any, occluding_sections: bool, clips: Iterable[Plane]) -> boolAdd geometry and its active clipping planes to be included in the calculation
SetViewport
def SetViewport(self, viewport: RhinoViewport) -> None
def SetViewport(self, viewport: ViewportInfo) -> NoneSet the viewport for the hidden line drawing (HLD). The viewport supplies the projection that determines the visibility of curves, and the HLD coordinate system in which the resulting curves are represented. The HLD-coordinate system is a right handed system for 3-D model space, in which the 3rd coordinate direction is the projection direction. In particular the z-coordinate direction points from the scene toward the camera.
HiddenLineDrawingPoint
6 members
Points generated from source objects which correspond to point and point cloud source objects.
Permanent link · Official RhinoCommon reference
SourceObject
def SourceObject(self) -> HiddenLineDrawingObjectReturn the source object that this point came from.
SourceObjectComponentIndex
def SourceObjectComponentIndex(self) -> ComponentIndexComponent of source object part that generated this curve.
ClippingPlaneIndex
def ClippingPlaneIndex(self) -> intIndex into HiddenLineDrawing.ClippingPlanes when SilhouetteType == SilhouetteType.SectionCut.
Location
def Location(self) -> Point3dReturns the location of this object in HiddenLineDrawing coordinates.
Index
def Index(self) -> intIndex of this object in HiddenLineDrawing.Points.
PointVisibility
def PointVisibility(self) -> AnyReturns the point's visibility
HiddenLineDrawingSegment
6 members
The results of HiddenLineDrawing calculation are a collection of segments. A segment is a sub-curve of a HiddenLineDrawingObjectCurve.
Permanent link · Official RhinoCommon reference
Index
def Index(self) -> intIndex of this curve in HiddenLineDrawing.Curves.
CurveGeometry
def CurveGeometry(self) -> CurveThe actual curve geometry
ParentCurve
def ParentCurve(self) -> HiddenLineDrawingObjectCurveThis curve is a sub-curve of the returned HiddenLineDrawingFullCurve object.
SegmentVisibility
def SegmentVisibility(self) -> AnyReturns the segment's visibility
IsSceneSilhouette
def IsSceneSilhouette(self) -> boolReturns true if this curve is a scene silhouette.
CurveSideFills
def CurveSideFills(self) -> Sequence[Any]The SideFill fields are only valid for visible curves. With respect to the HiddenLineDrawing, the region to the left (or right respectively) of this curve is described by CurveSideFills[0] or CurveSideFills[1], respectively. If exactly one of these regions is empty this is a scene silhouette. If this region contains a surface it is either a surface which in 3-D is adjacent to this edge or it an surface that is further away from the camera, we call this a shadow surface. unknown is used for unset values and for projecting curves
InstanceDefinitionGeometry
13 members
Represents a block definition in a File3dm. This is the same as Rhino.DocObjects.InstanceDefinition, but not associated with a RhinoDoc.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> NoneInitializes a new block definition.
Description
def Description(self) -> strGets or sets the description of the definition.
Url
def Url(self) -> strGets or sets the URL or hyperlink of the definition.
UrlDescription
def UrlDescription(self) -> strGets or sets the description of the URL or hyperlink of the definition.
SourceArchive
def SourceArchive(self) -> strGets the full file path for linked instance definitions.
ComponentType
def ComponentType(self) -> AnyReturns Rhino.DocObjects.ModelComponentType.InstanceDefinition.
UserStringCount
def UserStringCount(self) -> intGets the amount of user strings.
DeleteAllUserStrings
def DeleteAllUserStrings(self) -> NoneDeletes all user strings attached to this geometry.
DeleteUserString
def DeleteUserString(self, key: str) -> boolDeletes the user string with the specified key from this geometry.
GetObjectIds
def GetObjectIds(self) -> Sequence[Any]Returns the unique identifiers of all objects that are part of this instance definition's geometry table.
GetUserString
def GetUserString(self, key: str) -> strGets user string from this geometry.
GetUserStrings
def GetUserStrings(self) -> AnyGets a copy of all (user key string, user value string) pairs attached to this geometry.
SetUserString
def SetUserString(self, key: str, value: str) -> boolAttach a user string (key,value combination) to this geometry.
InstanceReferenceGeometry
3 members
Represents a reference to the geometry in a block definition.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self, instanceDefinitionId: Any, transform: Transform) -> NoneConstructor used when creating nested instance references.
ParentIdefId
def ParentIdefId(self) -> AnyThe unique id for the parent instance definition of this instance reference.
Xform
def Xform(self) -> TransformTransformation for this reference.
Interpolator
7 members
Exposes a set of standard numeric interpolation algorithms.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, amount: int, defaultValue: float) -> None
def __init__(self, collection: Iterable[float]) -> None
def __init__(self, initialCapacity: int) -> None
def __init__(self, list: Any) -> NoneConstructs a new, empty Interpolator.
Cyclical
def Cyclical(self) -> boolGets or sets a value indicating whether or not the values inside this Interpolator are to be treated as cyclical (i.e. circular).
InterpolateCatmullRom
def InterpolateCatmullRom(self, t: float) -> floatSample the list of numbers with Catmull-Rom interpolation.
InterpolateCosine
def InterpolateCosine(self, t: float) -> floatSample the list of numbers with cosine interpolation.
InterpolateCubic
def InterpolateCubic(self, t: float) -> floatSample the list of numbers with cubic interpolation.
InterpolateLinear
def InterpolateLinear(self, t: float) -> floatSample the list of numbers with linear interpolation.
InterpolateNearestNeighbour
def InterpolateNearestNeighbour(self, t: float) -> floatSample the list of numbers with Nearest Neighbor interpolation.
Interval
29 members
An interval is an ordered numeric domain. Endpoints can increase, decrease, or coincide; domain length is not geometric arc length.
Preserve endpoint order when it encodes direction. A collapsed interval cannot support a meaningful inverse normalization.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, other: Interval) -> None
def __init__(self, t0: float, t1: float) -> NoneSee the signature and official API documentation for this member.
Unset
Unset: ClassVar[Interval]See the signature and official API documentation for this member.
T0
def T0(self) -> floatGets or sets the lower bound of the Interval.
T1
def T1(self) -> floatGets or sets the upper bound of the Interval.
Min
def Min(self) -> floatGets the smaller of T0 and T1.
Max
def Max(self) -> floatGets the larger of T0 and T1.
Mid
def Mid(self) -> floatGets the average of T0 and T1.
Length
def Length(self) -> floatGets the signed length of the numeric range. If the interval is decreasing, a negative length will be returned.
IsValid
def IsValid(self) -> boolGets a value indicating whether or not this Interval is valid. Valid intervals must contain valid numbers.
IsSingleton
def IsSingleton(self) -> boolReturns true if T0 == T1 != ON.UnsetValue.
IsIncreasing
def IsIncreasing(self) -> boolReturns true if T0 < T1.
IsDecreasing
def IsDecreasing(self) -> boolReturns true if T[0] > T[1].
CompareTo
def CompareTo(self, other: Interval) -> intCompares this Rhino.Geometry.Interval with another interval. The lower bound has first evaluation priority.
EpsilonEquals
def EpsilonEquals(self, other: Interval, epsilon: float) -> boolCheck that all values in other are within epsilon of the values in this
Equals
def Equals(self, other: Interval) -> bool
def Equals(self, obj: Any) -> boolDetermines whether the specified Rhino.Geometry.Interval is equal to the current Rhino.Geometry.Interval, comparing by value.
FromIntersection
def FromIntersection(a: Interval, b: Interval) -> IntervalReturns a new Interval that is the Intersection of the two input Intervals.
FromUnion
def FromUnion(a: Interval, b: Interval) -> IntervalReturns a new Interval which contains both inputs.
GetHashCode
def GetHashCode(self) -> intComputes the hash code for this Rhino.Geometry.Interval object.
Grow
def Grow(self, value: float) -> NoneGrows the Rhino.Geometry.Interval to include the given number.
IncludesInterval
def IncludesInterval(self, interval: Interval) -> bool
def IncludesInterval(self, interval: Interval, strict: bool) -> boolTests another interval for Interval inclusion.
IncludesParameter
def IncludesParameter(self, t: float) -> bool
def IncludesParameter(self, t: float, strict: bool) -> boolTests a parameter for Interval inclusion.
MakeIncreasing
def MakeIncreasing(self) -> NoneEnsures this Rhino.Geometry.Interval is either singleton or increasing.
NormalizedIntervalAt
def NormalizedIntervalAt(self, intervalParameter: Interval) -> IntervalConverts interval value, or pair of values, to normalized parameter.
NormalizedParameterAt
def NormalizedParameterAt(self, intervalParameter: float) -> floatConvert a domain parameter to normalized interval coordinates. A collapsed interval has no meaningful inverse mapping.
This converts a coordinate value; it does not reparameterize the geometry or change a curve's Domain.
ParameterAt
def ParameterAt(self, normalizedParameter: float) -> floatMap a normalized coordinate s to T0 + s*(T1-T0). Values outside [0,1] extrapolate.
For a curve domain, s=0.5 gives its parameter midpoint. This is not generally the halfway point along the curve's arc length.
Rhino 8 Python example · geometry in memory
import Rhino.Geometry as rg
domain = rg.Interval(10, 20)
assert domain.ParameterAt(0.25) == 12.5ParameterIntervalAt
def ParameterIntervalAt(self, normalizedInterval: Interval) -> IntervalConverts normalized parameter to interval value, or pair of values.
Reverse
def Reverse(self) -> NoneReverse negates and exchanges the endpoints. Swap only exchanges them.
Reversing [a,b] produces [-b,-a]. Use Swap when you intend to exchange direction without negating the endpoint coordinates.
Swap
def Swap(self) -> NoneExchanges T0 and T1.
ToString
def ToString(self) -> strReturns a string representation of this Rhino.Geometry.Interval.
InvalidDimensionStyleIdException
1 members
General exception that can be thrown by annotations
Permanent link · Official RhinoCommon reference
__init__
def __init__(self, msg: str) -> NoneSee the signature and official API documentation for this member.
IsoStatus
0 members
Defines enumerated values for isoparametric curve direction on a surface, such as X or Y, and curve sides, such as North or West boundary. Note: odd values are all x-constant; even values > 0 are all y-constant.
KnotStyle
0 members
Knot styles for NURBS curves and surfaces. If a knot vector meets the conditions of two styles, then the style with the lowest value is used.
Leader
16 members
Leader geometry class
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> NoneConstructor
Curve
def Curve(self) -> NurbsCurveGets the curve used by this leader
Points2D
def Points2D(self) -> Sequence[Point2d]Get or set the 2d points defining the curve used by this leader
Points3D
def Points3D(self) -> Sequence[Point3d]Get or set the 3d points defining the curve used by this leader
LeaderTextHorizontalAlignment
def LeaderTextHorizontalAlignment(self) -> AnyGets or sets the horizontal alignment of the leader's text
LeaderTextVerticalAlignment
def LeaderTextVerticalAlignment(self) -> AnyGets or sets the vertical alignment of the leader's text
LeaderArrowType
def LeaderArrowType(self) -> AnyThe arrowhead type for the leader
LeaderArrowBlockId
def LeaderArrowBlockId(self) -> AnyId of the block used as the arrow for the leader when the arrow type is 'User arrow'
LeaderArrowSize
def LeaderArrowSize(self) -> floatThe size of the leader arrow
LeaderCurveStyle
def LeaderCurveStyle(self) -> AnyThe style of the leader curve: polyline or spline
LeaderContentAngleStyle
def LeaderContentAngleStyle(self) -> AnyAngle for text of leader text
LeaderHasLanding
def LeaderHasLanding(self) -> boolReturns true if the leader has a landing line
LeaderLandingLength
def LeaderLandingLength(self) -> floatGets or sets the length of the landing line
Create
def Create(text: str, plane: Plane, dimstyle: DimensionStyle, points: Iterable[Point3d]) -> LeaderCreates a Leader geometry object
CreateWithRichText
def CreateWithRichText(richText: str, plane: Plane, dimstyle: DimensionStyle, points: Iterable[Point3d]) -> LeaderCreates a Leader geometry object
Explode
def Explode(self) -> Sequence[GeometryBase]Explodes this leader into its geometric components.
LengthMassProperties
26 members
Length mass properties weight quantities continuously along a curve.
A length centroid differs from an unweighted average of sampled points, especially when sampling is uneven.
Permanent link · Official RhinoCommon reference
Length
def Length(self) -> floatGets the length solution.
LengthError
def LengthError(self) -> floatGets the uncertainty in the length calculation.
Centroid
def Centroid(self) -> Point3dGets the length centroid in the world coordinate system.
CentroidError
def CentroidError(self) -> Vector3dGets the uncertainty in the centroid calculation.
WorldCoordinatesFirstMoments
def WorldCoordinatesFirstMoments(self) -> Vector3dReturns the world coordinate first moments if they were able to be calculated. X is integral of "x dm" over the length Y is integral of "y dm" over the length Z is integral of "z dm" over the length.
WorldCoordinatesFirstMomentsError
def WorldCoordinatesFirstMomentsError(self) -> Vector3dUncertainty in world coordinates first moments calculation.
WorldCoordinatesSecondMoments
def WorldCoordinatesSecondMoments(self) -> Vector3dReturns the world coordinate second moments if they were able to be calculated. X is integral of "xx dm" over the length Y is integral of "yy dm" over the length Z is integral of "zz dm" over the length.
WorldCoordinatesSecondMomentsError
def WorldCoordinatesSecondMomentsError(self) -> Vector3dUncertainty in world coordinates second moments calculation.
WorldCoordinatesProductMoments
def WorldCoordinatesProductMoments(self) -> Vector3dReturns the world coordinate product moments if they were able to be calculated. X is integral of "xy dm" over the length Y is integral of "yz dm" over the length Z is integral of "zx dm" over the length.
WorldCoordinatesProductMomentsError
def WorldCoordinatesProductMomentsError(self) -> Vector3dUncertainty in world coordinates second moments calculation.
WorldCoordinatesMomentsOfInertia
def WorldCoordinatesMomentsOfInertia(self) -> Vector3dThe moments of inertia about the world coordinate axes. X = integral of (y^2 + z^2) dm Y = integral of (z^2 + x^2) dm Z = integral of (z^2 + y^2) dm.
WorldCoordinatesMomentsOfInertiaError
def WorldCoordinatesMomentsOfInertiaError(self) -> Vector3dUncertainty in world coordinates moments of inertia calculation.
WorldCoordinatesRadiiOfGyration
def WorldCoordinatesRadiiOfGyration(self) -> Vector3dRadii of gyration with respect to world coordinate system. X = sqrt(integral of (y^2 + z^2) dm/M) Y = sqrt(integral of (z^2 + x^2) dm/M) Z = sqrt(integral of (z^2 + y^2) dm/M)
CentroidCoordinatesSecondMoments
def CentroidCoordinatesSecondMoments(self) -> Vector3dSecond moments with respect to centroid coordinate system. X = integral of (x-x0)^2 dm Y = integral of (y-y0)^2 dm Z = integral of (z-z0)^2 dm where (x0,y0,z0) = centroid.
CentroidCoordinatesSecondMomentsError
def CentroidCoordinatesSecondMomentsError(self) -> Vector3dUncertainty in centroid coordinates second moments calculation.
CentroidCoordinatesProductMoments
def CentroidCoordinatesProductMoments(self) -> Vector3dProduct moments with respect to centroid coordinate system.
CentroidCoordinatesProductMomentsError
def CentroidCoordinatesProductMomentsError(self) -> Vector3dUncertainty in product moments with respect to centroid coordinate system.
CentroidCoordinatesMomentsOfInertia
def CentroidCoordinatesMomentsOfInertia(self) -> Vector3dMoments of inertia with respect to centroid coordinate system. X = integral of ((y-y0)^2 + (z-z0)^2) dm Y = integral of ((z-z0)^2 + (x-x0)^2) dm Z = integral of ((z-z0)^2 + (y-y0)^2) dm where (x0,y0,z0) = centroid.
CentroidCoordinatesMomentsOfInertiaError
def CentroidCoordinatesMomentsOfInertiaError(self) -> Vector3dUncertainty in centroid coordinates moments of inertia calculation.
CentroidCoordinatesRadiiOfGyration
def CentroidCoordinatesRadiiOfGyration(self) -> Vector3dRadii of gyration with respect to centroid coordinate system. X = sqrt(integral of ((y-y0)^2 + (z-z0)^2) dm/M) Y = sqrt(integral of ((z-z0)^2 + (x-x0)^2) dm/M) Z = sqrt(integral of ((z-z0)^2 + (y-y0)^2) dm/M) where (x0,y0,z0) = centroid.
CentroidCoordinatesPrincipalMoments
def CentroidCoordinatesPrincipalMoments(self) -> tuple[bool, float, Vector3d, float, Vector3d, float, Vector3d]Calculates the eigenvalues and eigenvectors of the moments matrix with respect to centroid coordinates.
CentroidCoordinatesPrincipalMomentsOfInertia
def CentroidCoordinatesPrincipalMomentsOfInertia(self) -> tuple[bool, float, Vector3d, float, Vector3d, float, Vector3d]Calculates the principal moments of inertia and principal axes with respect to centroid coordinates.
Compute
def Compute(curve: Curve) -> LengthMassProperties
def Compute(curve: Curve, length: bool, firstMoments: bool, secondMoments: bool, productMoments: bool) -> LengthMassProperties
def Compute(curves: Iterable[Curve]) -> LengthMassProperties
def Compute(curves: Iterable[Curve], length: bool, firstMoments: bool, secondMoments: bool, productMoments: bool) -> LengthMassPropertiesCalculates the length mass properties of a curve.
Dispose
def Dispose(self) -> NoneActively reclaims unmanaged resources that this instance uses.
WorldCoordinatesPrincipalMoments
def WorldCoordinatesPrincipalMoments(self) -> tuple[bool, float, Vector3d, float, Vector3d, float, Vector3d]Calculates the eigenvalues and eigenvectors of moments matrix in world coordinates.
WorldCoordinatesPrincipalMomentsOfInertia
def WorldCoordinatesPrincipalMomentsOfInertia(self) -> tuple[bool, float, Vector3d, float, Vector3d, float, Vector3d]Calculates the principal moments of inertia and principal axes with respect to world coordinates.
Light
35 members
Represents a light that shines in the modeling space.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> NoneInitializes a new light.
IsEnabled
def IsEnabled(self) -> boolGets or sets a value that defines if the light is turned on (true) or off (false).
LightStyle
def LightStyle(self) -> LightStyleGets or sets a light style on this camera.
IsPointLight
def IsPointLight(self) -> boolGets a value indicating whether the light style is Rhino.Geometry.Light.LightStyle CameraPoint or WorldPoint.
IsDirectionalLight
def IsDirectionalLight(self) -> boolGets a value indicating whether the light style is Rhino.Geometry.Light.LightStyle CameraDirectional or WorldDirectional.
IsSpotLight
def IsSpotLight(self) -> boolGets a value indicating whether the light style is Rhino.Geometry.Light.LightStyle CameraSpot or WorldSpot.
IsLinearLight
def IsLinearLight(self) -> boolGets a value indicating whether the light style is Rhino.Geometry.Light.LightStyle WorldLinear.
IsRectangularLight
def IsRectangularLight(self) -> boolGets a value indicating whether the light style is Rhino.Geometry.Light.LightStyle WorldRectangular.
IsSunLight
def IsSunLight(self) -> boolGets a value indicating whether this object is a Sun light.
CoordinateSystem
def CoordinateSystem(self) -> AnyGets a value, determined by LightStyle, that explains whether the camera directions are relative to World or Camera spaces.
Location
def Location(self) -> Point3dGets or sets the light or 3D position or location.
Direction
def Direction(self) -> Vector3dGets or sets the vector direction of the camera.
PerpendicularDirection
def PerpendicularDirection(self) -> Vector3dGets a perpendicular vector to the camera direction.
Intensity
def Intensity(self) -> floatGets or sets the light intensity.
PowerWatts
def PowerWatts(self) -> floatGets or sets the light power in watts (W).
PowerLumens
def PowerLumens(self) -> floatGets or sets the light power in lumens (lm).
PowerCandela
def PowerCandela(self) -> floatGets or sets the light power in candelas (cd).
Ambient
def Ambient(self) -> AnyGets or sets the ambient color.
Diffuse
def Diffuse(self) -> AnyGets or sets the diffuse color.
Specular
def Specular(self) -> AnyGets or sets the specular color.
AttenuationVector
def AttenuationVector(self) -> Vector3dGets or Sets the attenuation vector.
SpotAngleRadians
def SpotAngleRadians(self) -> floatGets or sets the spot angle in radians. Ignored for non-spot lights. angle = 0 to pi/2 (0 to 90 degrees).
SpotExponent
def SpotExponent(self) -> floatThe spot exponent varies from 0.0 to 128.0 and provides an exponential interface for controlling the focus or concentration of a spotlight (like the OpenGL GL_SPOT_EXPONENT parameter). The spot exponent and hot spot parameters are linked; changing one will change the other. A hot spot setting of 0.0 corresponds to a spot exponent of 128. A hot spot setting of 1.0 corresponds to a spot exponent of 0.0.
HotSpot
def HotSpot(self) -> floatThe hot spot setting runs from 0.0 to 1.0 and is used to provides a linear interface for controlling the focus or concentration of a spotlight. A hot spot setting of 0.0 corresponds to a spot exponent of 128. A hot spot setting of 1.0 corresponds to a spot exponent of 0.0.
Length
def Length(self) -> Vector3dGets or sets the height in linear and rectangular lights. (ignored for non-linear/rectangular lights.)
Width
def Width(self) -> Vector3dGets or sets the width in linear and rectangular lights. (ignored for non-linear/rectangular lights.)
SpotLightShadowIntensity
def SpotLightShadowIntensity(self) -> floatGets or sets the spot light shadow intensity. (ignored for non-spot lights.)
ShadowIntensity
def ShadowIntensity(self) -> floatGets or sets the shadow intensity for the light.
Name
def Name(self) -> strGets or sets the light name.
Id
def Id(self) -> AnyGets the ID of this light.
AttenuationType
def AttenuationType(self) -> AnyGet the type of attenuation for this light.
CreateSunLight
def CreateSunLight(northAngleDegrees: float, azimuthDegrees: float, altitudeDegrees: float) -> Light
def CreateSunLight(northAngleDegrees: float, when: Any, latitudeDegrees: float, longitudeDegrees: float) -> Light
def CreateSunLight(sun: Any) -> LightConstructs a light that represents the Sun.
GetAttenuation
def GetAttenuation(self, d: float) -> floatGets the attenuation settings (ignored for "directional" and "ambient" lights). attenuation = 1/(a0 + d*a1 + d^2*a2) where d = distance to light.
GetSpotLightRadii
def GetSpotLightRadii(self) -> tuple[bool, float, float]Gets the spot light radii.
SetAttenuation
def SetAttenuation(self, a0: float, a1: float, a2: float) -> NoneSets the attenuation settings (ignored for "directional" and "ambient" lights). attenuation = 1/(a0 + d*a1 + d^2*a2) where d = distance to light.
LightStyle
0 members
Defines enumerated values to represent light styles or types, such as directional or spotlight.
Line
34 members
A Line is a finite segment parameterized by From + t*Direction. Its segment corresponds to t in [0,1].
Parameters outside that interval lie on the infinite extension. A LineCurve has its own Curve domain, which need not use the same parameterization.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, from_: Point3d, to: Point3d) -> None
def __init__(self, start: Point3d, direction: Vector3d, length: float) -> None
def __init__(self, start: Point3d, span: Vector3d) -> None
def __init__(self, x0: float, y0: float, z0: float, x1: float, y1: float, z1: float) -> NoneSee the signature and official API documentation for this member.
From
def From(self) -> Point3dStart point of line segment.
FromX
def FromX(self) -> floatGets or sets the X coordinate of the line From point.
FromY
def FromY(self) -> floatGets or sets the Y coordinate of the line From point.
FromZ
def FromZ(self) -> floatGets or sets the Z coordinate of the line From point.
To
def To(self) -> Point3dEnd point of line segment.
ToX
def ToX(self) -> floatGets or sets the X coordinate of the line To point.
ToY
def ToY(self) -> floatGets or sets the Y coordinate of the line To point.
ToZ
def ToZ(self) -> floatGets or sets the Z coordinate of the line To point.
Unset
Unset: ClassVar[Line]See the signature and official API documentation for this member.
IsValid
def IsValid(self) -> boolGets a value indicating whether or not this line is valid. Valid lines must have valid start and end points, and the points must not be equal.
Length
def Length(self) -> floatGets or sets the length of this line segment. Note that a negative length will invert the line segment without making the actual length negative. The line From point will remain fixed when a new Length is set.
Direction
def Direction(self) -> Vector3dGets the direction of this line segment. The length of the direction vector equals the length of the line segment.
UnitTangent
def UnitTangent(self) -> Vector3dGets the tangent of the line segment. Note that tangent vectors are always unit vectors.
BoundingBox
def BoundingBox(self) -> BoundingBoxGets the line's 3d axis aligned bounding box.
ClosestParameter
def ClosestParameter(self, testPoint: Point3d) -> floatThe parameter is normalized along the segment and can lie outside [0,1].
For a valid nonzero line, PointAt(t) reconstructs the supporting-line projection. Clamp explicitly when the result must remain on the finite segment.
ClosestPoint
def ClosestPoint(self, testPoint: Point3d, limitToFiniteSegment: bool) -> Point3dlimitToFiniteSegment controls whether projection is clamped to the segment endpoints.
Unconstrained projection can lie beyond an endpoint. Choose according to whether your algorithm models a bounded edge or its infinite supporting line.
Rhino 8 Python example · geometry in memory
import Rhino.Geometry as rg
line = rg.Line(rg.Point3d(0, 0, 0), rg.Point3d(10, 0, 0))
p = line.ClosestPoint(rg.Point3d(15, 2, 0), True)
assert abs(p.X - 10) < 1e-9DistanceTo
def DistanceTo(self, testPoint: Point3d, limitToFiniteSegment: bool) -> floatCompute the shortest distance between this line segment and a test point.
EpsilonEquals
def EpsilonEquals(self, other: Line, epsilon: float) -> boolCheck that all values in other are within epsilon of the values in this
Equals
def Equals(self, other: Line) -> bool
def Equals(self, obj: Any) -> boolDetermines whether a line has the same value as this line.
Extend
def Extend(self, startLength: float, endLength: float) -> boolExtend the line by custom distances on both sides.
ExtendThroughBox
def ExtendThroughBox(self, box: BoundingBox) -> bool
def ExtendThroughBox(self, box: BoundingBox, additionalLength: float) -> bool
def ExtendThroughBox(self, box: Box) -> bool
def ExtendThroughBox(self, box: Box, additionalLength: float) -> boolEnsure the line extends all the way through a box. Note, this does not result in the shortest possible line that overlaps the box.
Flip
def Flip(self) -> NoneFlip the endpoints of the line segment.
GetHashCode
def GetHashCode(self) -> intComputes a hash number that represents this line.
MaximumDistanceTo
def MaximumDistanceTo(self, testLine: Line) -> float
def MaximumDistanceTo(self, testPoint: Point3d) -> floatFinds the largest distance between this line as a finite segment and another finite segment.
MinimumDistanceTo
def MinimumDistanceTo(self, testLine: Line) -> float
def MinimumDistanceTo(self, testPoint: Point3d) -> floatFinds the shortest distance between this line as a finite segment and another finite segment.
PointAt
def PointAt(self, t: float) -> Point3dEvaluates the line at the specified parameter.
PointAtLength
def PointAtLength(self, distance: float) -> Point3dComputes a point located at a specific metric distance from the line origin (Rhino.Geometry.Line.From). If line start and end coincide, then the start point is always returned.
ToNurbsCurve
def ToNurbsCurve(self) -> NurbsCurveConversion preserves the straight shape while changing its representation to NurbsCurve.
Check parameter correspondence before reusing saved values on the converted curve. Identical shape does not imply identical parameterization.
ToString
def ToString(self) -> str
def ToString(self, format: str, formatProvider: Any) -> strConstructs the string representation of this line, in the form "From,To".
Transform
def Transform(self, xform: Transform) -> boolTransform the line using a Transformation matrix.
TryCreateBetweenCurves
def TryCreateBetweenCurves(curve0: Curve, curve1: Curve, t0: float, t1: float, perpendicular0: bool, perpendicular1: bool) -> tuple[bool, float, float, Line]t0 and t1 are ref inputs. Python returns success, their updated values, and the resulting line.
The input parameters are initial guesses. Keep the updated parameters when later geometry must correspond to the solver's endpoints.
TryFitLineToPoints
def TryFitLineToPoints(points: Iterable[Point3d]) -> tuple[bool, Line]Attempt to fit a line through a set of points.
TryGetPlane
def TryGetPlane(self) -> tuple[bool, Plane]Gets a plane that contains the line. The origin of the plane is at the start of the line. If possible, a plane parallel to the world XY, YZ, or ZX plane is returned.
LinearDimension
16 members
Represents a linear dimension
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, dimensionPlane: Plane, extensionLine1End: Point2d, extensionLine2End: Point2d, pointOnDimensionLine: Point2d) -> NoneSee the signature and official API documentation for this member.
DistanceBetweenArrowTips
def DistanceBetweenArrowTips(self) -> floatGets the distance between arrow tips.
Aligned
def Aligned(self) -> boolGets or sets a value indicating whether this annotation is aligned.
AnnotationType
def AnnotationType(self) -> AnnotationTypeSee the signature and official API documentation for this member.
ExtensionLine1End
def ExtensionLine1End(self) -> Point2dEnd of the first extension line.
ExtensionLine2End
def ExtensionLine2End(self) -> Point2dEnd of the second extension line.
Arrowhead1End
def Arrowhead1End(self) -> Point2dGets the arrow head end of the first extension line.
Arrowhead2End
def Arrowhead2End(self) -> Point2dGets the arrow head end of the second extension line.
DimensionLinePoint
def DimensionLinePoint(self) -> Point2dPoint on annotation plane where dimension line starts
Create
def Create(dimtype: AnnotationType, dimStyle: DimensionStyle, plane: Plane, horizontal: Vector3d, defpoint1: Point3d, defpoint2: Point3d, dimlinepoint: Point3d, rotationInPlane: float) -> LinearDimensionInitialize Dimension parameters
FromPoints
def FromPoints(extensionLine1End: Point3d, extensionLine2End: Point3d, pointOnDimensionLine: Point3d) -> LinearDimensionInitializes a new instance of the Rhino.Geometry.LinearDimension class, based on three points.
Get3dPoints
def Get3dPoints(self) -> tuple[bool, Point3d, Point3d, Point3d, Point3d, Point3d, Point3d]Get locations of dimension's 3d points
GetDisplayLines
def GetDisplayLines(self, style: DimensionStyle, scale: float) -> tuple[bool, Sequence[Line]]See the signature and official API documentation for this member.
GetDistanceDisplayText
def GetDistanceDisplayText(self, unitsystem: UnitSystem, style: DimensionStyle) -> strSee the signature and official API documentation for this member.
GetTextRectangle
def GetTextRectangle(self) -> tuple[bool, Sequence[Point3d]]See the signature and official API documentation for this member.
SetLocations
def SetLocations(self, extensionLine1End: Point2d, extensionLine2End: Point2d, pointOnDimensionLine: Point2d) -> NoneSets the three locations of the point, using two-dimensional points that refer to the plane of the annotation.
LineCurve
2 members
A LineCurve represents a straight segment through Curve. Its Domain need not be [0,1].
Use the underlying Line for normalized segment coordinates or query the Curve domain. Shape equality does not imply parameter equality.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, from_: Point2d, to: Point2d) -> None
def __init__(self, from_: Point3d, to: Point3d) -> None
def __init__(self, line: Line) -> None
def __init__(self, line: Line, t0: float, t1: float) -> None
def __init__(self, other: LineCurve) -> NoneInitializes a new instance of the Rhino.Geometry.LineCurve class.
Line
def Line(self) -> LineGets or sets the Line value inside this curve.
LoftType
0 members
Specifies enumerated constants for all supported loft types.
MatchSrfSettings
13 members
Settings for matching a surface edge to other edge(s)
Permanent link · Official RhinoCommon reference
__init__
def __init__(self, match: Continuity, otherEnd: Continuity) -> NoneConstructor
Continuity
def Continuity(self) -> ContinuityMatch the shape of the edge being edited to the target edge Rhino.Geometry.Continuity.C0_continuous: edge position only Rhino.Geometry.Continuity.G1_continuous: edge position and tangency Rhino.Geometry.Continuity.G2_continuous: edge position, tangency and curvature
OtherEnd
def OtherEnd(self) -> ContinuityMaintain the shape of the edge opposite the one being edited Rhino.Geometry.Continuity.None: opposite edge is free to change Rhino.Geometry.Continuity.C0_continuous: opposite edge position only Rhino.Geometry.Continuity.G1_continuous: opposite edge position and tangency Rhino.Geometry.Continuity.G2_continuous: opposite edge position, tangency and curvature
Average
def Average(self) -> boolIf true, change both surfaces
MatchClosestPoints
def MatchClosestPoints(self) -> boolMatch the edge to the closest points on the target edge
RefineMatch
def RefineMatch(self) -> boolAdd control point rows to the surface if necessary
RefinePositionalTolerance
def RefinePositionalTolerance(self) -> floatAbsolute distance tolerance for refinement
RefineAngleToleranceRadians
def RefineAngleToleranceRadians(self) -> floatAngle between surface normals during refinement
RefineCurvatureTolerance
def RefineCurvatureTolerance(self) -> floatPercentage radius of curvature difference during refinement
PreserveIso
def PreserveIso(self) -> PreserveIsoCurveMethodThe way the surface iso-lines align with the target
ReverseMatchDirection
def ReverseMatchDirection(self) -> boolReverse the direction of the edge to match.
ReverseAverageTargetDirection
def ReverseAverageTargetDirection(self) -> boolReverse the direction of the target for the averaged edge.
EnableRefinement
def EnableRefinement(self, enabled: bool, positionalTolerance: float=..., angleToleranceRadians: float=..., curvatureTolerance: float=...) -> NoneEnable refinement of the surface being edited
Matrix
22 members
Represents an arbitrarily sized matrix of System.Double-precision floating point numbers. If you are working with a 4x4 matrix, then you may want to use the Rhino.Geometry.Transform class instead.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self, rowCount: int, columnCount: int) -> None
def __init__(self, xform: Transform) -> NoneInitializes a new instance of the matrix.
IsValid
def IsValid(self) -> boolGets a value indicating whether this matrix is valid.
IsSquare
def IsSquare(self) -> boolGets a value indicating whether this matrix has the same number of rows and columns. 0x0 matrices are not considered square.
RowCount
def RowCount(self) -> intGets the amount of rows.
ColumnCount
def ColumnCount(self) -> intGets the amount of columns.
IsRowOrthogonal
def IsRowOrthogonal(self) -> boolGets a value indicating whether the matrix is row orthogonal.
IsColumnOrthogonal
def IsColumnOrthogonal(self) -> boolGets a value indicating whether the matrix is column orthogonal.
IsRowOrthoNormal
def IsRowOrthoNormal(self) -> boolGets a value indicating whether the matrix is row orthonormal.
IsColumnOrthoNormal
def IsColumnOrthoNormal(self) -> boolGets a value indicating whether the matrix is column orthonormal.
BackSolve
def BackSolve(self, zeroTolerance: float, b: Iterable[float]) -> Sequence[float]Solves M*x=b where M is upper triangular with a unit diagonal and b is a column of values.
BackSolvePoints
def BackSolvePoints(self, zeroTolerance: float, b: Iterable[Point3d]) -> Sequence[Point3d]Solves M*x=b where M is upper triangular with a unit diagonal and b is a column of 3d points.
Dispose
def Dispose(self) -> NoneActively reclaims unmanaged resources that this instance uses.
Duplicate
def Duplicate(self) -> MatrixCreate a duplicate of this matrix.
GetHashCode
def GetHashCode(self) -> intGets the hash code for this matrix. The hash code will change when the matrix changes so you cannot change matrices while they are stored in hash tables.
Invert
def Invert(self, zeroTolerance: float) -> boolModifies this matrix to become its own inverse. Matrix might be non-invertible (singular) and the return value will be false.
RowReduce
def RowReduce(self, zeroTolerance: float) -> tuple[int, float, float]
def RowReduce(self, zeroTolerance: float, b: Iterable[float]) -> tuple[int, float]
def RowReduce(self, zeroTolerance: float, b: Iterable[Point3d]) -> tuple[int, float]Row reduces a matrix to calculate rank and determinant.
Scale
def Scale(self, s: float) -> NoneModifies the current matrix by multiplying its values by a number.
SetDiagonal
def SetDiagonal(self, d: float) -> NoneSets diagonal value and zeros off all non-diagonal values.
SwapColumns
def SwapColumns(self, columnA: int, columnB: int) -> boolExchanges two columns.
SwapRows
def SwapRows(self, rowA: int, rowB: int) -> boolExchanges two rows.
Transpose
def Transpose(self) -> boolModifies this matrix to be its transpose. This is like swapping rows with columns. http://en.wikipedia.org/wiki/Transpose
Zero
def Zero(self) -> NoneSets all values inside the matrix to zero.
Mesh
135 members
A polygon mesh approximates shape with vertices and faces. Density alone does not ensure quality: topology, normals, degeneracy, and manifoldness also matter.
Interpolated normals can create visual smoothness without geometrically smooth faces. Assess connectivity and task-specific error rather than appearance alone.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> NoneInitializes a new empty mesh.
DisjointMeshCount
def DisjointMeshCount(self) -> intGets the number of disjoint (topologically unconnected) pieces in this mesh.
IsClosed
def IsClosed(self) -> boolA closed mesh has no open boundary according to its connectivity. This alone does not establish a suitable solid.
Check manifoldness, consistent orientation, degeneracies, and self-intersection as needed. Visually coincident vertices may still be disconnected.
IsOriented
def IsOriented(self) -> boolReturns true if the mesh is manifold and every pair of faces that share an "edge" have compatible orientations.
IsSolid
def IsSolid(self) -> boolReturns true if the mesh is solid. A "solid" is a closed oriented manifold.
HasCachedTextureCoordinates
def HasCachedTextureCoordinates(self) -> boolWill return true if SetCachedTextureCoordinates has been called; otherwise will return false.
HasPrincipalCurvatures
def HasPrincipalCurvatures(self) -> boolHasPrincipalCurvatures
Vertices
def Vertices(self) -> AnyGets access to the vertices set of this mesh.
TopologyVertices
def TopologyVertices(self) -> AnyGets the Rhino.Geometry.Collections.MeshTopologyVertexList object associated with this mesh. This object stores vertex connectivity and the indices of vertices that were unified while computing the edge topology.
TopologyEdges
def TopologyEdges(self) -> AnyGets the Rhino.Geometry.Collections.MeshTopologyEdgeList object associated with this mesh. This object stores edge connectivity.
Normals
def Normals(self) -> AnyGets access to the vertex normal collection in this mesh.
Faces
def Faces(self) -> AnyGets access to the mesh face list.
Ngons
def Ngons(self) -> AnyGets access to the mesh ngon list. Ngons represent groups of Faces (triangles + quads). Faces are used to tessellate an Ngon internally. When a triangle or quad is referenced in the Ngon list, it is no longer visualized and conceived as a single entity, but takes part of the Ngon. If you need to get access to both Ngons and the faces that are not referenced by Ngons, that is, all polygons that are visible in the mesh, then use the Rhino.Geometry.Mesh.GetNgonAndFacesEnumerable helper method.
FaceNormals
def FaceNormals(self) -> AnyGets access to the face normal collection in this mesh.
VertexColors
def VertexColors(self) -> AnyGets access to the (optional) vertex color collection in this mesh.
TextureCoordinates
def TextureCoordinates(self) -> AnyGets access to the vertex texture coordinate collection in this mesh.
ComponentStates
def ComponentStates(self) -> AnyGets access to the vertex hidden/visibility collection in this mesh. This is a runtime property and it is not saved in the 3dm file.
PartitionCount
def PartitionCount(self) -> intNumber of partition information chunks stored on this mesh based on the last call to CreatePartitions
Append
def Append(self, meshes: Iterable[Mesh]) -> None
def Append(self, other: Mesh) -> NoneAppend a list of meshes. This function is much more efficient than making repeated calls to Mesh.Append(Mesh) when lots of meshes are being joined into a single large mesh.
Check
def Check(self, textLog: Any, parameters: MeshCheckParameters) -> tuple[bool, MeshCheckParameters]The parameters argument is a ref input. Python returns the Boolean result and updated MeshCheckParameters.
A report covers specific checks rather than every application requirement. Inspect which conditions were tested and retain diagnostic output.
ClearSurfaceData
def ClearSurfaceData(self) -> NoneRemoves surface parameters, curvature parameters and surface statistics from the mesh.
ClearTextureData
def ClearTextureData(self) -> NoneRemoves all texture coordinate information from this mesh.
ClosestMeshPoint
def ClosestMeshPoint(self, testPoint: Point3d, maximumDistance: float) -> MeshPointA MeshPoint retains face and local-coordinate correspondence as well as position.
This supports attribute interpolation. Stored face indices can become invalid after topology-changing edits.
ClosestPoint
def ClosestPoint(self, testPoint: Point3d) -> Point3d
def ClosestPoint(self, testPoint: Point3d, maximumDistance: float) -> tuple[int, Point3d, Vector3d] | tuple[int, Point3d]The closest location lies on the polygonal approximation, not necessarily on the original smooth surface.
Tessellation creates distance and normal errors. Choose density according to accuracy requirements and compare with the source when needed.
CollapseFacesByArea
def CollapseFacesByArea(self, lessThanArea: float, greaterThanArea: float) -> intCollapses multiple mesh faces, with areas less than LessThanArea and greater than GreaterThanArea, based on the principles found in Stan Melax's mesh reduction PDF, see http://pomax.nihongoresources.com/downloads/PolygonReduction.pdf
CollapseFacesByByAspectRatio
def CollapseFacesByByAspectRatio(self, aspectRatio: float) -> intCollapses a multiple mesh faces, determined by face aspect ratio, based on criteria found in Stan Melax's polygon reduction, see http://pomax.nihongoresources.com/downloads/PolygonReduction.pdf
CollapseFacesByEdgeLength
def CollapseFacesByEdgeLength(self, bGreaterThan: bool, edgeLength: float) -> intCollapses multiple mesh faces, with greater/less than edge length, based on the principles found in Stan Melax's mesh reduction PDF, see http://pomax.nihongoresources.com/downloads/PolygonReduction.pdf
ColorAt
def ColorAt(self, faceIndex: int, t0: float, t1: float, t2: float, t3: float) -> Any
def ColorAt(self, meshPoint: MeshPoint) -> AnyEvaluate a mesh normal at a set of barycentric coordinates. Barycentric coordinates must be assigned in accordance with the rules as defined by Rhino.Geometry.MeshPoint.T.
Compact
def Compact(self) -> boolRemoves any unreferenced objects from arrays, re-indexes as needed and shrinks arrays to minimum required size.
ComputeAutoCreaseInformation
def ComputeAutoCreaseInformation(self) -> Sequence[int]Do not use this method. Length: top.Mesh.Vertices.Count
ComputeCurvatureApproximation
def ComputeCurvatureApproximation(self, type: int) -> tuple[bool, Sequence[float]]Compute an approximation of the discrete curvatures of the mesh vertices, according to which type of curvature information is requested. This method will not yield meaningful values on nonmanifold vertices, and nan on naked vertices. For now, this method operates solely on the mesh topology (the fully welded mesh), but distribtes the result across all the ordinary vertices. This method is a const and thread-safe method and will leave the m_K array untouched. An integer indicating which curvature is desired. gaussian_curvature = 1, mean_curvature = 2, minimum unsigned radius of curvature = 3, maximum unsigned radius of curvature = 4 Resulting curvature array on success, null on failure. On success, the length of the array is the number of vertices.
ComputeThickness
def ComputeThickness(meshes: Iterable[Mesh], maximumThickness: float) -> Sequence[MeshThicknessMeasurement]
def ComputeThickness(meshes: Iterable[Mesh], maximumThickness: float, cancelToken: Any) -> Sequence[MeshThicknessMeasurement]
def ComputeThickness(meshes: Iterable[Mesh], maximumThickness: float, sharpAngle: float, cancelToken: Any) -> Sequence[MeshThicknessMeasurement]Compute thickness metrics for this mesh.
CopyFrom
def CopyFrom(self, other: Mesh) -> NoneCopies mesh values into this mesh from another mesh.
CreateBooleanDifference
def CreateBooleanDifference(firstSet: Iterable[Mesh], secondSet: Iterable[Mesh]) -> Sequence[Mesh]
def CreateBooleanDifference(firstSet: Iterable[Mesh], secondSet: Iterable[Mesh], options: MeshBooleanOptions) -> tuple[Sequence[Mesh], Any]Computes the solid difference of two sets of Meshes.
CreateBooleanIntersection
def CreateBooleanIntersection(firstSet: Iterable[Mesh], secondSet: Iterable[Mesh]) -> Sequence[Mesh]
def CreateBooleanIntersection(firstSet: Iterable[Mesh], secondSet: Iterable[Mesh], options: MeshBooleanOptions) -> tuple[Sequence[Mesh], Any]Computes the solid intersection of two sets of meshes.
CreateBooleanSplit
def CreateBooleanSplit(meshesToSplit: Iterable[Mesh], meshSplitters: Iterable[Mesh]) -> Sequence[Mesh]
def CreateBooleanSplit(meshesToSplit: Iterable[Mesh], meshSplitters: Iterable[Mesh], options: MeshBooleanOptions) -> tuple[Sequence[Mesh], Any]Splits a set of meshes with another set.
CreateBooleanUnion
def CreateBooleanUnion(meshes: Iterable[Mesh]) -> Sequence[Mesh]
def CreateBooleanUnion(meshes: Iterable[Mesh], options: MeshBooleanOptions) -> tuple[Sequence[Mesh], Any]
def CreateBooleanUnion(meshes: Iterable[Mesh], tolerance: float) -> Sequence[Mesh]Computes the solid union of a set of meshes. WARNING: Use the overload that takes a tolerance or options.
CreateContourCurves
def CreateContourCurves(meshToContour: Mesh, contourStart: Point3d, contourEnd: Point3d, interval: float) -> Sequence[Curve]
def CreateContourCurves(meshToContour: Mesh, contourStart: Point3d, contourEnd: Point3d, interval: float, tolerance: float) -> Sequence[Curve]
def CreateContourCurves(meshToContour: Mesh, sectionPlane: Plane) -> Sequence[Curve]
def CreateContourCurves(meshToContour: Mesh, sectionPlane: Plane, tolerance: float) -> Sequence[Curve](Old call maintained for compatibility.)
CreateConvexHull3D
def CreateConvexHull3D(points: Iterable[Point3d], tolerance: float, angleTolerance: float) -> tuple[Mesh, Sequence[Sequence[int]]]Attempts to create a 3d convex hull mesh from input points.
CreateExtrusion
def CreateExtrusion(profile: Curve, direction: Vector3d) -> Mesh
def CreateExtrusion(profile: Curve, direction: Vector3d, parameters: MeshingParameters) -> MeshConstructs a mesh by extruding a curve along a vector.
CreateFromBox
def CreateFromBox(box: BoundingBox, xCount: int, yCount: int, zCount: int) -> Mesh
def CreateFromBox(box: Box, xCount: int, yCount: int, zCount: int) -> Mesh
def CreateFromBox(corners: Iterable[Point3d], xCount: int, yCount: int, zCount: int) -> MeshConstructs new mesh that matches a bounding box.
CreateFromBrep
def CreateFromBrep(brep: Brep) -> Sequence[Mesh]
def CreateFromBrep(brep: Brep, meshingParameters: MeshingParameters) -> Sequence[Mesh]Meshing approximates Brep faces and can return several meshes.
The output connectivity is a different representation from Brep topology. Join and validate deliberately when one coherent mesh is required.
CreateFromClosedPolyline
def CreateFromClosedPolyline(polyline: Polyline) -> MeshAttempts to create a Mesh that is a triangulation of a simple closed polyline that projects onto a plane.
CreateFromCone
def CreateFromCone(cone: Cone, vertical: int, around: int) -> Mesh
def CreateFromCone(cone: Cone, vertical: int, around: int, solid: bool) -> Mesh
def CreateFromCone(cone: Cone, vertical: int, around: int, solid: bool, quadCaps: bool) -> MeshConstructs a solid mesh cone.
CreateFromCurveExtrusion
def CreateFromCurveExtrusion(curve: Curve, direction: Vector3d, parameters: MeshingParameters, boundingBox: BoundingBox) -> MeshConstructs a mesh from an extruded curve. This method is designed for projecting curves onto a mesh. In most cases, a better to use Rhino.Geometry.Mesh.CreateExtrusion(Rhino.Geometry.Curve,Rhino.Geometry.Vector3d).
CreateFromCurvePipe
def CreateFromCurvePipe(curve: Curve, radius: float, segments: int, accuracy: int, capType: MeshPipeCapStyle, faceted: bool, intervals: Iterable[Interval]=...) -> MeshConstructs a new mesh pipe from a curve.
CreateFromCylinder
def CreateFromCylinder(cylinder: Cylinder, vertical: int, around: int) -> Mesh
def CreateFromCylinder(cylinder: Cylinder, vertical: int, around: int, capBottom: bool, capTop: bool) -> Mesh
def CreateFromCylinder(cylinder: Cylinder, vertical: int, around: int, capBottom: bool, capTop: bool, circumscribe: bool, quadCaps: bool) -> Mesh
def CreateFromCylinder(cylinder: Cylinder, vertical: int, around: int, capBottom: bool, capTop: bool, quadCaps: bool) -> MeshConstructs a capped mesh cylinder.
CreateFromExtrusion
def CreateFromExtrusion(extrusion: Extrusion, meshingParameters: MeshingParameters) -> MeshConstructs a mesh from a brep.
CreateFromFilteredFaceList
def CreateFromFilteredFaceList(original: Mesh, inclusion: Iterable[bool]) -> MeshConstructs a sub-mesh, that contains a filtered list of faces.
CreateFromIterativeCleanup
def CreateFromIterativeCleanup(meshes: Iterable[Mesh], tolerance: float) -> Sequence[Mesh]Repairs meshes with vertices that are too near, using a tolerance value.
CreateFromLines
def CreateFromLines(lines: Iterable[Curve], maxFaceValence: int, tolerance: float) -> MeshCreates a mesh by analizing the edge structure. Input lines could be from the extraction of edges from an original mesh.
CreateFromPatchSingleFace
def CreateFromPatchSingleFace(mesh: Mesh, components: Iterable[ComponentIndex]) -> MeshCreates a single mesh face from the given input.
CreateFromPlanarBoundary
def CreateFromPlanarBoundary(boundary: Curve, parameters: MeshingParameters) -> Mesh
def CreateFromPlanarBoundary(boundary: Curve, parameters: MeshingParameters, tolerance: float) -> MeshDo not use this overload. Use version that takes a tolerance parameter instead.
CreateFromPlane
def CreateFromPlane(plane: Plane, xInterval: Interval, yInterval: Interval, xCount: int, yCount: int) -> MeshConstructs a planar mesh grid.
CreateFromSphere
def CreateFromSphere(sphere: Sphere, xCount: int, yCount: int) -> MeshConstructs a mesh sphere.
CreateFromSubD
def CreateFromSubD(subd: SubD, displayDensity: int) -> MeshCreate a mesh from a SubD limit surface
CreateFromSubDControlNet
def CreateFromSubDControlNet(subd: SubD) -> MeshCreate a mesh from a SubD control net
CreateFromSubDControlNetWithTextureCoordinates
def CreateFromSubDControlNetWithTextureCoordinates(subd: SubD) -> MeshCreate a mesh from a SubD control net including texture coordinates
CreateFromSurface
def CreateFromSurface(surface: Surface) -> Mesh
def CreateFromSurface(surface: Surface, meshingParameters: MeshingParameters) -> MeshConstructs a mesh from a surface
CreateFromSurfaceControlNet
def CreateFromSurfaceControlNet(surface: Surface) -> MeshCalculate a mesh representation of a surface's control net.
CreateFromTessellation
def CreateFromTessellation(points: Iterable[Point3d], edges: Iterable[Iterable[Point3d]], plane: Plane, allowNewVertices: bool) -> MeshAttempts to create a mesh that is a triangulation of a list of points, projected on a plane, including its holes and fixed edges.
CreateFromTorus
def CreateFromTorus(torus: Torus, vertical: int, around: int) -> MeshConstructs a mesh torus.
CreateIcoSphere
def CreateIcoSphere(sphere: Sphere, subdivisions: int) -> MeshConstructs a icospherical mesh. A mesh icosphere differs from a standard UV mesh sphere in that it's vertices are evenly distributed. A mesh icosphere starts from an icosahedron (a regular polyhedron with 20 equilateral triangles). It is then refined by splitting each triangle into 4 smaller triangles. This splitting can be done several times.
CreatePartitions
def CreatePartitions(self, maximumVertexCount: int, maximumTriangleCount: int) -> boolIn ancient times (or modern smart phone times), some rendering engines were only able to process small batches of triangles and the CreatePartitions() function was provided to partition the mesh into subsets of vertices and faces that those rendering engines could handle.
CreatePatch
def CreatePatch(outerBoundary: Polyline, angleToleranceRadians: float, pullbackSurface: Surface, innerBoundaryCurves: Iterable[Curve], innerBothSideCurves: Iterable[Curve], innerPoints: Iterable[Point3d], trimback: bool, divisions: int) -> MeshConstruct a mesh patch from a variety of input geometry.
CreateQuadSphere
def CreateQuadSphere(sphere: Sphere, subdivisions: int) -> MeshConstructs a quad mesh sphere. A quad mesh sphere differs from a standard UV mesh sphere in that it's vertices are evenly distributed. A quad mesh sphere starts from a cube (a regular polyhedron with 6 square sides). It is then refined by splitting each quad into 4 smaller quads. This splitting can be done several times.
CreateRefinedCatmullClarkMesh
def CreateRefinedCatmullClarkMesh(mesh: Mesh, settings: Any=...) -> MeshInstantiates a new mesh that represents a Catmull-Clark subdivision of the mesh.
CreateRefinedLoopMesh
def CreateRefinedLoopMesh(mesh: Mesh, formula: Any=..., settings: Any=...) -> MeshInstantiates a new mesh that represents a Loop subdivision of the mesh.
CreateUnweldedMesh
def CreateUnweldedMesh(mesh: Mesh) -> MeshCreates a new unwelded mesh from an existing mesh. Texture coordinates are ignored.
CreateVertexColorsFromBitmap
def CreateVertexColorsFromBitmap(self, doc: RhinoDoc, mapping: Any, xform: Transform, bitmap: Any) -> boolPopulate the vertex colors from a bitmap image.
DestroyPartition
def DestroyPartition(self) -> NoneDestroys mesh partition.
DestroyTopology
def DestroyTopology(self) -> NoneRemoves topology data, forcing all topology information to be recomputed.
DestroyTree
def DestroyTree(self) -> NoneDestroys the mesh vertex access tree.
Duplicate
def Duplicate(self) -> GeometryBaseConstructs a copy of this mesh. This is the same as Rhino.Geometry.Mesh.DuplicateMesh.
DuplicateMesh
def DuplicateMesh(self) -> MeshConstructs a copy of this mesh. This is the same as Rhino.Geometry.Mesh.Duplicate.
EvaluateMeshGeometry
def EvaluateMeshGeometry(self, surface: Surface) -> boolIf the mesh has SurfaceParameters, the surface is evaluated at these parameters and the mesh geometry is updated.
ExplodeAtUnweldedEdges
def ExplodeAtUnweldedEdges(self) -> Sequence[Mesh]Explode the mesh into sub-meshes where a sub-mesh is a collection of faces that are contained within a closed loop of "unwelded" edges. Unwelded edges are edges where the faces that share the edge have unique mesh vertices (not mesh topology vertices) at both ends of the edge.
ExtendSelectionByEdgeRidge
def ExtendSelectionByEdgeRidge(self, preselectedEdges: Iterable[int], newEdge: int, iterative: bool=...) -> Sequence[int]Suggests an extension of a selection set by using information related with topology and alignment.
ExtendSelectionByFaceLoop
def ExtendSelectionByFaceLoop(self, preselectedFaces: Iterable[int], newFace: int, iterative: bool=...) -> Sequence[int]Suggests an extension of a face selection set by using information related with topology and alignment.
ExtractNonManifoldEdges
def ExtractNonManifoldEdges(self, selective: bool) -> MeshExtracts, or removes, non-manifold mesh edges.
FileHole
def FileHole(self, topologyEdgeIndex: int) -> boolGiven a starting "naked" edge index, this function attempts to determine a "hole" by chaining additional naked edges together until if returns to the start index. Then it triangulates the closed polygon and either adds the faces to the mesh.
FillHoles
def FillHoles(self) -> boolAttempts to determine "holes" in the mesh by chaining naked edges together. Then it triangulates the closed polygons adds the faces to the mesh.
Flip
def Flip(self, vertexNormals: bool, faceNormals: bool, faceOrientation: bool) -> None
def Flip(self, vertexNormals: bool, faceNormals: bool, faceOrientation: bool, ngonsBoundaryDirection: bool) -> NoneReverses the direction of the mesh.
GetCachedTextureCoordinates
def GetCachedTextureCoordinates(self, textureMappingId: Any) -> Any
def GetCachedTextureCoordinates(self, rhinoObject: Any, texture: Any) -> AnyCall this method to get cached texture coordinates for a texture mapping with the specified Id.
GetNakedEdgePointStatus
def GetNakedEdgePointStatus(self) -> Sequence[bool]Returns an array of Boolean values equal in length to the number of vertices in this mesh. Each value corresponds to a mesh vertex and is set to true if the vertex is not completely surrounded by faces.
GetNakedEdges
def GetNakedEdges(self) -> Sequence[Polyline]Returns all edges of a mesh that are considered "naked" in the sense that the edge only has one face.
GetNgonAndFacesCount
def GetNgonAndFacesCount(self) -> intRetrieves the count of items that Rhino.Geometry.Mesh.GetNgonAndFacesEnumerable will provide.
GetNgonAndFacesEnumerable
def GetNgonAndFacesEnumerable(self) -> Sequence[MeshNgon]Retrieves a complete enumerable, i.e., one that provides an iterator over every face that is present, no matter if defined as a triangle, a quad, or a strictly over-four-sided ngon.
GetOutlines
def GetOutlines(self, plane: Plane) -> Sequence[Polyline]
def GetOutlines(self, viewport: RhinoViewport) -> Sequence[Polyline]
def GetOutlines(self, viewportInfo: ViewportInfo, plane: Plane) -> Sequence[Polyline]Constructs the outlines of a mesh projected against a plane.
GetPartition
def GetPartition(self, which: int) -> MeshPartRetrieves a partition. See Rhino.Geometry.Mesh.CreatePartitions(System.Int32,System.Int32) for details.
GetSelfIntersections
def GetSelfIntersections(self, tolerance: float, overlapsPolylines: bool, overlapsMesh: bool, textLog: Any, cancel: Any, progress: Any) -> tuple[bool, Sequence[Polyline], Sequence[Polyline], Mesh]Gets the intersections of this mesh with itself.
GetUnsafeLock
def GetUnsafeLock(self, writable: bool) -> MeshUnsafeLockAllows to obtain unsafe pointers to the underlying unmanaged data structures of the mesh.
HealNakedEdges
def HealNakedEdges(self, distance: float) -> boolAttempts to "heal" naked edges in a mesh based on a given distance. First attempts to move vertices to neighboring vertices that are within that distance away. Then it finds edges that have a closest point to the vertex within the distance and splits the edge. When it finds one it splits the edge and makes two new edges using that point.
InvalidateCachedTextureCoordinates
def InvalidateCachedTextureCoordinates(self, bOnlyInvalidateCachedSurfaceParameterMapping: bool=...) -> NoneInvalidates all cached texture coordinates. Call this function when you have made changes that will affect the texture coordinates on the mesh.
IsManifold
def IsManifold(self) -> bool
def IsManifold(self, topologicalTest: bool) -> tuple[bool, bool, bool]Returns true if every mesh "edge" has at most two faces.
IsPointInside
def IsPointInside(self, point: Point3d, tolerance: float, strictlyIn: bool) -> boolDetermines if a point is inside a solid mesh.
MatchEdges
def MatchEdges(self, distance: float, rachet: bool) -> boolMoves face edges of an open mesh to meet adjacent face edges. The method will first try to match vertices, and then it will try to split edges to make the edges match.
MergeAllCoplanarFaces
def MergeAllCoplanarFaces(self, tolerance: float) -> bool
def MergeAllCoplanarFaces(self, tolerance: float, angleTolerance: float) -> boolMerges adjacent coplanar faces into single faces.
NormalAt
def NormalAt(self, faceIndex: int, t0: float, t1: float, t2: float, t3: float) -> Vector3d
def NormalAt(self, meshPoint: MeshPoint) -> Vector3dEvaluate a mesh normal at a set of barycentric coordinates. Barycentric coordinates must be assigned in accordance with the rules as defined by MeshPoint.T.
Offset
def Offset(self, distance: float) -> Mesh
def Offset(self, distance: float, solidify: bool) -> Mesh
def Offset(self, distance: float, solidify: bool, direction: Vector3d) -> Mesh | tuple[Mesh, Sequence[int]]Makes a new mesh with vertices offset a distance in the opposite direction of the existing vertex normals. Same as Mesh.Offset(distance, false)
PartitionMesh
def PartitionMesh(mesh: Mesh, maxVertexCount: int, maxFaceCount: int) -> Sequence[Mesh]Some file formats and rendering engines are only able to process small batches of triangles. Use this function to partition the mesh into subsets of vertices and faces that those file formats and rendering engines can handle.
PatchSingleFace
def PatchSingleFace(self, components: Iterable[ComponentIndex]) -> boolCreates a single mesh face from the given input. The new mesh will be apppended to this mesh.
PointAt
def PointAt(self, faceIndex: int, t0: float, t1: float, t2: float, t3: float) -> Point3d
def PointAt(self, meshPoint: MeshPoint) -> Point3dEvaluates a mesh at a set of barycentric coordinates. Barycentric coordinates must be assigned in accordance with the rules as defined by MeshPoint.T.
PullCurve
def PullCurve(self, curve: Curve, tolerance: float) -> PolylineCurveGets a polyline approximation of the input curve and then moves its control points to the closest point on the mesh. Then it "connects the points" over edges so that a polyline on the mesh is formed.
PullPointsToMesh
def PullPointsToMesh(self, points: Iterable[Point3d]) -> Sequence[Point3d]Pulls a collection of points to a mesh.
QuadRemesh
def QuadRemesh(self, parameters: QuadRemeshParameters) -> Mesh
def QuadRemesh(self, parameters: QuadRemeshParameters, guideCurves: Iterable[Curve]) -> MeshQuad remesh this mesh.
QuadRemeshAsync
def QuadRemeshAsync(self, faceBlocks: Iterable[int], parameters: QuadRemeshParameters, guideCurves: Iterable[Curve], progress: Any, cancelToken: Any) -> Any
def QuadRemeshAsync(self, parameters: QuadRemeshParameters, guideCurves: Iterable[Curve], progress: Any, cancelToken: Any) -> Any
def QuadRemeshAsync(self, parameters: QuadRemeshParameters, progress: Any, cancelToken: Any) -> AnyQuad remesh this mesh asynchronously.
QuadRemeshBrep
def QuadRemeshBrep(brep: Brep, parameters: QuadRemeshParameters) -> Mesh
def QuadRemeshBrep(brep: Brep, parameters: QuadRemeshParameters, guideCurves: Iterable[Curve]) -> MeshCreate QuadRemesh from a Brep Set Brep Face Mode by setting QuadRemeshParameters.PreserveMeshArrayEdgesMode
QuadRemeshBrepAsync
def QuadRemeshBrepAsync(brep: Brep, parameters: QuadRemeshParameters, guideCurves: Iterable[Curve], progress: Any, cancelToken: Any) -> Any
def QuadRemeshBrepAsync(brep: Brep, parameters: QuadRemeshParameters, progress: Any, cancelToken: Any) -> AnyQuad remesh this Brep asynchronously.
RebuildMesh
def RebuildMesh(mesh: Mesh) -> Mesh
def RebuildMesh(mesh: Mesh, preserveTextureCoordinates: bool, preserveVertexColors: bool) -> MeshUse this function to rebuild meshes that are not acting properly. Vertices and faces are kept. Face normals and vertex normals are recalculated. Texture coordinates, vertex colors, surface curvatures, and surfaces parameters are not replaced.
RebuildNormals
def RebuildNormals(self) -> NoneRemoves mesh normals and reconstructs the face and vertex normals based on the orientation of the faces.
Reduce
def Reduce(self, desiredPolygonCount: int, allowDistortion: bool, accuracy: int, normalizeSize: bool) -> bool
def Reduce(self, desiredPolygonCount: int, allowDistortion: bool, accuracy: int, normalizeSize: bool, threaded: bool) -> bool
def Reduce(self, parameters: ReduceMeshParameters) -> bool
def Reduce(self, parameters: ReduceMeshParameters, threaded: bool) -> bool
def Reduce(self, desiredPolygonCount: int, allowDistortion: bool, accuracy: int, normalizeSize: bool, cancelToken: Any, progress: Any) -> tuple[bool, str]
def Reduce(self, desiredPolygonCount: int, allowDistortion: bool, accuracy: int, normalizeSize: bool, cancelToken: Any, progress: Any, threaded: bool) -> tuple[bool, str]Reduction trades face count for approximation. Important features and topology can be lost.
Measure deviation and inspect small holes or sharp edges. Lower face count alone does not establish a useful result.
ReleaseUnsafeLock
def ReleaseUnsafeLock(self, meshData: MeshUnsafeLock) -> NoneUpdates the Mesh data with the information that was stored via the Rhino.Geometry.MeshUnsafeLock.
RequireIterativeCleanup
def RequireIterativeCleanup(meshes: Iterable[Mesh], tolerance: float) -> boolAnalyzes some meshes, and determines if a pass of CreateFromIterativeCleanup would change the array. All available cleanup steps are used. Currently available cleanup steps are: - mending of single precision coincidence even though double precision vertices differ. - union of nearly identical vertices, irrespectively of their origin. - removal of t-joints along edges.
SetCachedTextureCoordinates
def SetCachedTextureCoordinates(self, tm: Any, xf: Transform) -> TransformSet cached texture coordinates using the specified mapping.
SetCachedTextureCoordinatesFromMaterial
def SetCachedTextureCoordinatesFromMaterial(self, rhinoObject: Any, material: Any) -> NoneSets up cached texture coordinate set for each texture in the material. Textures in the Material define which mapping channels are used and the RhinoObject defines what texture mapping is used for each mapping channel. After this method is called all necessary texture coordinate sets are cached and correct texture coordinates for each texture can be fetched using GetCachedTextureCoordinates(RhinoObject rhinoObject, Rhino.DocObjects.Texture texture) If any texture coordinates are already cached they will not be re-computed.
SetSurfaceParametersFromTextureCoordinates
def SetSurfaceParametersFromTextureCoordinates(self) -> boolIf the mesh does not have surface evaluation parameters, has texture coordinates, and the surface parameters can be set in a way so the existing texture coordinates can be computed from the surface parameters, then this function sets the surface parameters. This is useful when meshes that have texture coordinates and do not have surface parameters want to set the surface parameters in a way so that the texture mapping of type TextureMappingType.SurfaceParameters will restore the texture coordinates.
SetTextureCoordinates
def SetTextureCoordinates(self, tm: Any, xf: Transform, lazy: bool) -> None
def SetTextureCoordinates(self, tm: Any, xf: Transform, lazy: bool, seamCheck: bool) -> NoneSet texture coordinates using given mapping and applying given transform. Set lazy to false to generate texture coordinates right away.
ShrinkWrap
Mesh.ShrinkWrap(geometryBases: Iterable[GeometryBase], parameters: ShrinkWrapParameters, meshingParameters: MeshingParameters) -> Mesh
Mesh.ShrinkWrap(meshes: Iterable[Mesh], parameters: ShrinkWrapParameters) -> Mesh
Mesh.ShrinkWrap(pointCloud: PointCloud, parameters: ShrinkWrapParameters) -> Mesh
Mesh.ShrinkWrap(geometryBases: Iterable[GeometryBase], parameters: ShrinkWrapParameters, meshingParameters: MeshingParameters, token: Any) -> Mesh
Mesh.ShrinkWrap(meshes: Iterable[Mesh], parameters: ShrinkWrapParameters, token: Any) -> Mesh
Mesh.ShrinkWrap(pointCloud: PointCloud, parameters: ShrinkWrapParameters, token: Any) -> Mesh
<instance>.ShrinkWrap(geometryBases: Iterable[GeometryBase], parameters: ShrinkWrapParameters, meshingParameters: MeshingParameters) -> Mesh
<instance>.ShrinkWrap(meshes: Iterable[Mesh], parameters: ShrinkWrapParameters) -> Mesh
<instance>.ShrinkWrap(pointCloud: PointCloud, parameters: ShrinkWrapParameters) -> Mesh
<instance>.ShrinkWrap(parameters: ShrinkWrapParameters) -> Mesh
<instance>.ShrinkWrap(geometryBases: Iterable[GeometryBase], parameters: ShrinkWrapParameters, meshingParameters: MeshingParameters, token: Any) -> Mesh
<instance>.ShrinkWrap(meshes: Iterable[Mesh], parameters: ShrinkWrapParameters, token: Any) -> Mesh
<instance>.ShrinkWrap(pointCloud: PointCloud, parameters: ShrinkWrapParameters, token: Any) -> Mesh
<instance>.ShrinkWrap(parameters: ShrinkWrapParameters, token: Any) -> MeshSee the signature and official API documentation for this member.
Smooth
def Smooth(self, smoothFactor: float, bXSmooth: bool, bYSmooth: bool, bZSmooth: bool, bFixBoundaries: bool, coordinateSystem: SmoothingCoordinateSystem) -> bool
def Smooth(self, smoothFactor: float, bXSmooth: bool, bYSmooth: bool, bZSmooth: bool, bFixBoundaries: bool, coordinateSystem: SmoothingCoordinateSystem, plane: Plane) -> bool
def Smooth(self, smoothFactor: float, numSteps: int, bXSmooth: bool, bYSmooth: bool, bZSmooth: bool, bFixBoundaries: bool, coordinateSystem: SmoothingCoordinateSystem, plane: Plane) -> bool
def Smooth(self, vertexIndices: Iterable[int], smoothFactor: float, bXSmooth: bool, bYSmooth: bool, bZSmooth: bool, bFixBoundaries: bool, coordinateSystem: SmoothingCoordinateSystem, plane: Plane) -> bool
def Smooth(self, vertexIndices: Iterable[int], smoothFactor: float, numSteps: int, bXSmooth: bool, bYSmooth: bool, bZSmooth: bool, bFixBoundaries: bool, coordinateSystem: SmoothingCoordinateSystem, plane: Plane) -> boolSmooths a mesh by averaging the positions of mesh vertices in a specified region.
SolidOrientation
def SolidOrientation(self) -> intDetermines orientation of a "solid" mesh.
Split
def Split(self, mesh: Mesh) -> Sequence[Mesh]
def Split(self, meshes: Iterable[Mesh]) -> Sequence[Mesh]
def Split(self, plane: Plane) -> Sequence[Mesh]
def Split(self, meshes: Iterable[Mesh], tolerance: float, splitAtCoplanar: bool, createNgons: bool, textLog: Any, cancel: Any, progress: Any) -> Sequence[Mesh]
def Split(self, meshes: Iterable[Mesh], tolerance: float, splitAtCoplanar: bool, textLog: Any, cancel: Any, progress: Any) -> Sequence[Mesh]Split a mesh with another mesh. Suggestion: upgrade to overload with tolerance.
SplitDisjointPieces
def SplitDisjointPieces(self) -> Sequence[Mesh]Splits up the mesh into its unconnected pieces.
SplitMesh
def SplitMesh(mesh: Mesh, maxCount: int, countSum: bool, countTriangles: bool) -> Sequence[Mesh]Some file formats and rendering engines are only able to process small batches of triangles. Use this function to split the mesh into subsets of vertices and faces that those file formats and rendering engines can handle.
SplitWithProjectedPolylines
def SplitWithProjectedPolylines(self, curves: Iterable[PolylineCurve], tolerance: float) -> Sequence[Mesh]
def SplitWithProjectedPolylines(self, curves: Iterable[PolylineCurve], tolerance: float, textLog: Any, cancel: Any, progress: Any) -> Sequence[Mesh]Splits a mesh by adding edges in correspondence with input polylines, and divides the mesh at partitioned areas. Polyline segments that are measured not to be on the mesh will be ignored.
Subdivide
def Subdivide(self) -> bool
def Subdivide(self, faceIndices: Iterable[int]) -> boolSubdivides the faces of the mesh.
UnifyNormals
def UnifyNormals(self) -> int
def UnifyNormals(self, countOnly: bool) -> intUnifying normals seeks consistent face orientation. It does not alone choose outward orientation.
Use a solid-orientation check afterward. Disconnected components can need separate decisions about their outward sides.
Unweld
def Unweld(self, angleToleranceRadians: float, modifyNormals: bool) -> NoneMakes sure that faces sharing an edge and having a difference of normal greater than or equal to angleToleranceRadians have unique vertices along that edge, adding vertices if necessary.
UnweldEdge
def UnweldEdge(self, edgeIndices: Iterable[int], modifyNormals: bool) -> boolAdds creases to a smooth mesh by creating coincident vertices along selected edges.
UnweldVertices
def UnweldVertices(self, topologyVertexIndices: Iterable[int], modifyNormals: bool) -> boolEnsures that faces sharing a common topological vertex have unique indices into the Rhino.Geometry.Collections.MeshVertexList collection.
Volume
def Volume(self) -> floatCompute volume of the mesh.
Weld
def Weld(self, angleToleranceRadians: float) -> NoneWelding changes connectivity and normals around shared positions using an angular criterion.
It can affect sharp-edge shading. A smooth appearance does not prove that gaps or nonmanifold conditions were repaired.
WithDisplacement
def WithDisplacement(self, displacement: MeshDisplacementInfo) -> MeshConstructs new mesh from the current one, with displacement applied to it.
WithEdgeSoftening
def WithEdgeSoftening(self, softeningRadius: float, chamfer: bool, faceted: bool, force: bool, angleThreshold: float) -> MeshConstructs new mesh from the current one, with edge softening applied to it.
WithShutLining
def WithShutLining(self, faceted: bool, tolerance: float, curves: Iterable[ShutLiningCurveInfo]) -> MeshConstructs new mesh from the current one, with shut lining applied to it.
MeshBooleanOptions
5 members
Contains a set of data to pass to boolean options.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> NoneSee the signature and official API documentation for this member.
Tolerance
def Tolerance(self) -> floatGets or sets a tolerance value for intersections and overlaps. Rhino.Geometry.Intersect.Intersection.MeshIntersectionsTolerancesCoefficient
TextLog
def TextLog(self) -> AnyGets or sets a text log to write computed operations into.
CancellationToken
def CancellationToken(self) -> AnyA token that allows to request the cancellation of the operation.
ProgressReporter
def ProgressReporter(self) -> AnyGets or sets the object that is responsible to keep track of calculation progression.
MeshCheckParameters
26 members
Output of a mesh checking operations.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> NoneSee the signature and official API documentation for this member.
CheckForDegenerateFaces
def CheckForDegenerateFaces(self) -> boolIf true, then look for triangles and quads that have zero area and quads where one sub triangle has zero area.
DegenerateFaceCount
def DegenerateFaceCount(self) -> intGets the total degenerate face count for all meshes.
CheckForInvalidNgons
def CheckForInvalidNgons(self) -> boolIf true, then look for ngons that have invalid information.
InvalidNgonCount
def InvalidNgonCount(self) -> intGets the total number of invalid ngons for all meshes.
CheckForNakedEdges
def CheckForNakedEdges(self) -> boolIf true, then look for topological edges in the mesh topology where the face count is 1. Note, this check is also made if CheckForDuplicateFaces is true but the output is not shown if CheckForNakedEdges is false.
NakedEdgeCount
def NakedEdgeCount(self) -> intGets the total number of naked edges for all meshes.
CheckForNonManifoldEdges
def CheckForNonManifoldEdges(self) -> boolIf true, then look for topological edges in the mesh topology where the face count is greater than 2. Note, this check is also made if CheckForDuplicateFaces is true but the output is not shown if CheckForNonManifoldEdges is false.
NonManifoldEdgeCount
def NonManifoldEdgeCount(self) -> intGets the total number of non-manifold edges for all meshes.
CheckForExtremelyShortEdges
def CheckForExtremelyShortEdges(self) -> boolIf true, then look for topological edges where the distance between the endpoints is less than ExtremelyShortEdgeDistance.
ExtremelyShortEdgeCount
def ExtremelyShortEdgeCount(self) -> intGets the total number of extremely short edges for all meshes.
CheckForBadNormals
def CheckForBadNormals(self) -> boolIf true, then look for vertex normals that are not unit vectors, are zero length or vary greatly from the general direction of the face normals.
NonUnitVectorNormalCount
def NonUnitVectorNormalCount(self) -> intGet the total count of normals that are not unit vectors for all meshes.
ZeroLengthNormalCount
def ZeroLengthNormalCount(self) -> intGets the total count of zero length normals for all meshes.
VertexFaceNormalsDifferCount
def VertexFaceNormalsDifferCount(self) -> intGets the total count of vertex normals that differ greatly from face normals for all meshes.
CheckForDuplicateFaces
def CheckForDuplicateFaces(self) -> boolIf true, then look for faces that have vertices (not necessarily vertex indexes) that are identical.
DuplicateFaceCount
def DuplicateFaceCount(self) -> intGets the total count of duplicate faces for all meshes.
CheckForRandomFaceNormals
def CheckForRandomFaceNormals(self) -> boolIf true, then look for adjacent faces that have the same edge orientation. This typically means that clockwise/counterclockwise orientation, and face normal are not in sync.
RandomFaceNormalCount
def RandomFaceNormalCount(self) -> intGets the total count of random face normals for all meshes.
CheckForDisjointMeshes
def CheckForDisjointMeshes(self) -> boolIf true, then look for faces in the mesh that are totally isolated from other faces in the mesh. (i.e. an island of faces, or many islands, that have a boundary of naked edges)
DisjointMeshCount
def DisjointMeshCount(self) -> intGets the total count of disjoint pieces for all meshes.
CheckForUnusedVertices
def CheckForUnusedVertices(self) -> boolIf true, then look for vertices that are not referenced by any face in the mesh.
UnusedVertexCount
def UnusedVertexCount(self) -> intGets the total count of unused vertices for all meshes.
CheckForSelfIntersection
def CheckForSelfIntersection(self) -> boolIf true, then look for self intersections.
SelfIntersectingPairsCount
def SelfIntersectingPairsCount(self) -> intGets the total count of self intersections for all meshes.
Defaults
def Defaults() -> MeshCheckParametersGets the default mesh check parameters.
MeshDisplacementInfo
17 members
Contains mesh displacement information.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self, texture: Any, mapping: Any) -> NoneConstructs a displacement information instance with default values. Users of this class should not rely on default values to stay constant across service releases.
Texture
def Texture(self) -> AnyThe texture used as displacement.
Black
def Black(self) -> floatValue considered lowest point in the displacement.
White
def White(self) -> floatValue considered highest point of the displacement texture.
Mapping
def Mapping(self) -> AnyThe texture mapping of the mesh.
MappingTransform
def MappingTransform(self) -> TransformTexture mapping transform.
InstanceTransform
def InstanceTransform(self) -> TransformInstance transformation of the mesh.
BlackMove
def BlackMove(self) -> floatThe amount of displacement for the black color in the texture.
PostWeldAngle
def PostWeldAngle(self) -> floatSpecifies the maximum angle between face normals of adjacent faces that will get welded together.
RefineSensitivity
def RefineSensitivity(self) -> floatSpecifies how sensitive the divider for contrasts is on the displacement texture. Specify 1 to split all mesh edges on each refine step. Specify 0.99 to make even slight contrasts on the displacement texture cause edges to be split. Specifying 0.01 only splits edges where heavy contrast exists.
SweepPitch
def SweepPitch(self) -> floatSpecifies how densely the object is initially subdivided. The lower the value, the higher the resolution of the displaced mesh.
WhiteMove
def WhiteMove(self) -> floatThe amount of displacement for the white color in the texture.
ChannelNumber
def ChannelNumber(self) -> intMapping channel number for the displacement mapping.
FaceLimit
def FaceLimit(self) -> intRuns a mesh reduction as a post process o simplify the result of displacement to meet the specified number of faces.
FairingAmount
def FairingAmount(self) -> intStraightens rough feature edges. The value specifies the number of passes.
RefineStepCount
def RefineStepCount(self) -> intSpecifies the number of refinement passes.
MemoryLimit
def MemoryLimit(self) -> intSpecifies how much memory can be allocated for use by the displacement mesh. Value in megabytes.
MeshExtruder
12 members
Extrudes a mesh and provides preview
Permanent link · Official RhinoCommon reference
__init__
def __init__(self, inputMesh: Mesh, componentIndices: Iterable[ComponentIndex]) -> NoneConstruct object to extrude given mesh faces, edges and ngons.
PreviewLines
def PreviewLines(self) -> Sequence[Line]Gets Line objects to preview extruded mesh.
Transform
def Transform(self) -> TransformTransform of extrusion
UVN
def UVN(self) -> boolWhether or not to perform extrude in UVN basis.
EdgeBasedUVN
def EdgeBasedUVN(self) -> boolEdge based UVN defines UVN directions according to boundary edge directions
KeepOriginalFaces
def KeepOriginalFaces(self) -> boolWhether or not to keep original faces.
TextureCoordinateMode
def TextureCoordinateMode(self) -> MeshExtruderParameterModeMode for creating texture coordinates for extruded areas
SurfaceParameterMode
def SurfaceParameterMode(self) -> MeshExtruderParameterModeMode for creating surface parameters for extruded areas
FaceDirectionMode
def FaceDirectionMode(self) -> MeshExtruderFaceDirectionModeFace direction mode determines how faces are oriented
Dispose
def Dispose(self) -> NoneDispose of this object and any unmanaged memory associated with it.
ExtrudedMesh
def ExtrudedMesh(self) -> tuple[bool, Mesh, Sequence[ComponentIndex]] | tuple[bool, Mesh]Creates new extruded mesh. Returns true if any edges or faces were extruded.
GetWallFaces
def GetWallFaces(self) -> Sequence[int]Return list of faces that were added to connect transformed edges/faces to non-transformed edges/faces.
MeshExtruderFaceDirectionMode
0 members
Defines how mesh extruder decides orients faces
MeshExtruderParameterMode
0 members
Parameter mode for creating texture coordinates and surface parameters
MeshFace
18 members
A face stores vertex indices. Triangles and quads have different index relationships.
Indices belong to the owning mesh and can change after edits. A nonplanar quad's triangulation affects interpolation and measurements.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, a: int, b: int, c: int) -> None
def __init__(self, a: int, b: int, c: int, d: int) -> NoneSee the signature and official API documentation for this member.
Unset
Unset: ClassVar[MeshFace]See the signature and official API documentation for this member.
A
def A(self) -> intGets or sets the first corner index of the mesh face.
B
def B(self) -> intGets or sets the second corner index of the mesh face.
C
def C(self) -> intGets or sets the third corner index of the mesh face.
D
def D(self) -> intGets or sets the fourth corner index of the mesh face. If D equals C, the mesh face is considered to be a triangle rather than a quad.
IsTriangle
def IsTriangle(self) -> boolGets a value indicating whether or not this mesh face is a triangle. A mesh face is considered to be a triangle when C equals D, thus it is possible for an Invalid mesh face to also be a triangle.
IsQuad
def IsQuad(self) -> boolGets a value indicating whether or not this mesh face is a quad. A mesh face is considered to be a triangle when C does not equal D, thus it is possible for an Invalid mesh face to also be a quad.
CompareTo
def CompareTo(self, other: MeshFace) -> intCompares this Rhino.Geometry.MeshFace with another Rhino.Geometry.MeshFace and returns a value of 1, 0, or -1, referring to dictionary order. Index evaluation priority is first A, then B, then C, then D.
Equals
def Equals(self, other: MeshFace) -> bool
def Equals(self, obj: Any) -> boolReturns a value indicating whether the other mesh face has precisely the same value as the current one.
Flip
def Flip(self) -> MeshFaceReverses the orientation of the face by swapping corners. The first corner is always maintained.
GetHashCode
def GetHashCode(self) -> intReturns a runtime-stable hash code for the current mesh face. You are not allowed to rely on persistence of this hash code in serialization, but for each version of RhinoCommon, this hash code will be the same for each mesh face.
IsValid
def IsValid(self) -> bool
def IsValid(self, points: Iterable[Point3d]) -> bool
def IsValid(self, vertexCount: int) -> boolGets a value indicating whether or not this mesh face is considered to be valid. Note that even valid mesh faces could potentially be invalid in the context of a specific Mesh, if one or more of the corner indices exceeds the number of vertices on the mesh. If you want to perform a complete validity check, use IsValid(int) instead.
IsValidEx
def IsValidEx(self, points: Iterable[Point3d]) -> tuple[bool, Sequence[Point3d]]Gets a value indicating whether or not this mesh face is considered to be valid. Unlike the simple IsValid function, this function takes actual point locations into account.
Repair
def Repair(self, points: Iterable[Point3d]) -> boolAttempts to repair this mesh face by taking both face indexes and actual vertex locations into account.
RepairEx
def RepairEx(self, points: Iterable[Point3d]) -> tuple[bool, Sequence[Point3d]]Attempts to repair this mesh face by taking both face indexes and actual vertex locations into account.
Set
def Set(self, a: int, b: int, c: int) -> None
def Set(self, a: int, b: int, c: int, d: int) -> NoneSets all the corners for this face as a triangle.
ToString
def ToString(self) -> strReturns a string representation for this Rhino.Geometry.MeshFace. This is to provide a meaningful visualization of this structure and is subject to change in newer releases.
MeshingParameters
37 members
Meshing limits interact: edge length, angle, and geometric deviation address different approximation errors.
A density value alone is not an accuracy guarantee. Choose model-unit limits according to display, analysis, or fabrication needs.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, density: float) -> None
def __init__(self, density: float, minimumEdgeLength: float) -> None
def __init__(self, source: MeshingParameters) -> None
def __init__(self, info: Any, context: Any) -> NoneInitializes a new instance with default values. Initial values are same as Rhino.Geometry.MeshingParameters.Default.
Minimal
Minimal: ClassVar[MeshingParameters]See the signature and official API documentation for this member.
Default
Default: ClassVar[MeshingParameters]See the signature and official API documentation for this member.
Coarse
Coarse: ClassVar[MeshingParameters]See the signature and official API documentation for this member.
FastRenderMesh
FastRenderMesh: ClassVar[MeshingParameters]See the signature and official API documentation for this member.
Smooth
Smooth: ClassVar[MeshingParameters]See the signature and official API documentation for this member.
QualityRenderMesh
QualityRenderMesh: ClassVar[MeshingParameters]See the signature and official API documentation for this member.
DefaultAnalysisMesh
DefaultAnalysisMesh: ClassVar[MeshingParameters]See the signature and official API documentation for this member.
TextureRange
def TextureRange(self) -> MeshingParameterTextureRangeGets or sets how and if textures will be packed.
JaggedSeams
def JaggedSeams(self) -> boolGets or sets whether or not the mesh is allowed to have jagged seams. When this flag is set to true, meshes on either side of a Brep Edge will not match up.
RefineGrid
def RefineGrid(self) -> boolGets or sets a value indicating whether or not the sampling grid can be refined when certain tolerances are not met.
DoublePrecision
def DoublePrecision(self) -> boolGets or sets a value indicating whether or not the mesh should have double precision vertices in addition to the floats.
SimplePlanes
def SimplePlanes(self) -> boolGets or sets a value indicating whether or not planar areas are allowed to be meshed in a simplified manner.
ComputeCurvature
def ComputeCurvature(self) -> boolGets or sets a value indicating whether or not surface curvature data will be embedded in the mesh.
ClosedObjectPostProcess
def ClosedObjectPostProcess(self) -> boolGets or sets a value indicating whether or not to post process non-closed meshes that should be closed. If the Brep being meshed is closed, JaggedSeams = false, and ClosedObjectPostProcess = true, and the resulting mesh is not closed, then a post meshing process is applied to find and close gaps in the mesh. Typically the resulting mesh is not closed because the input Brep has a geometric flaw, like loops in trimming curve.
GridMinCount
def GridMinCount(self) -> intGets or sets the minimum number of grid quads in the initial sampling grid.
GridMaxCount
def GridMaxCount(self) -> intGets or sets the maximum number of grid quads in the initial sampling grid.
GridAngle
def GridAngle(self) -> floatGets or sets the maximum allowed angle difference (in radians) for a single sampling quad. The angle pertains to the surface normals.
GridAspectRatio
def GridAspectRatio(self) -> floatGets or sets the maximum allowed aspect ratio of sampling quads.
GridAmplification
def GridAmplification(self) -> floatGets or sets the grid amplification factor. Values lower than 1.0 will decrease the number of initial quads, values higher than 1.0 will increase the number of initial quads.
Tolerance
def Tolerance(self) -> floatGets or sets the maximum allowed edge deviation. This tolerance is measured between the center of the mesh edge and the surface.
MinimumTolerance
def MinimumTolerance(self) -> floatGets or sets the minimum tolerance.
RelativeTolerance
def RelativeTolerance(self) -> floatGets or sets the relative tolerance.
MinimumEdgeLength
def MinimumEdgeLength(self) -> floatGets or sets the minimum allowed mesh edge length.
MaximumEdgeLength
def MaximumEdgeLength(self) -> floatGets or sets the maximum allowed mesh edge length.
RefineAngle
def RefineAngle(self) -> floatGets or sets the mesh parameter refine angle in radians.
RefineAngleInDegrees
def RefineAngleInDegrees(self) -> floatGets or sets the mesh parameter refine angle in degrees.
CopyFrom
def CopyFrom(self, source: MeshingParameters) -> NoneCall this method to copy MeshingParameters from another instance.
Dispose
def Dispose(self) -> NoneActively reclaims unmanaged resources that this instance uses.
DocumentCurrentSetting
def DocumentCurrentSetting(doc: RhinoDoc) -> MeshingParametersGets the MeshingParameters that are currently set for a document. These are the same settings that are shown in the DocumentProperties "mesh settings" user interface.
Equals
def Equals(self, other: MeshingParameters) -> bool
def Equals(self, obj: Any) -> boolDetermines whether the specified MeshingParameters has the same values as the present MeshingParameters.
FromEncodedString
def FromEncodedString(value: str) -> MeshingParametersConverts encoded serialized string into a MeshingParameters
GetHashCode
def GetHashCode(self) -> intComputes a hash number that represents the current MeshingParameters.
GetObjectData
def GetObjectData(self, info: Any, context: Any) -> NoneSee the signature and official API documentation for this member.
SetSubDDisplayParameters
def SetSubDDisplayParameters(self, subDDisplayParameters: SubDDisplayParameters) -> NoneSets the SubD display parameters.
SubDDisplayParameters
def SubDDisplayParameters(self) -> SubDDisplayParametersGets the SubD display parameters.
ToEncodedString
def ToEncodedString(self) -> strReturns a encoded string that represents the MeshingParameters.
MeshingParameterStyle
0 members
Type of Mesh Parameters used by the RhinoDoc for meshing objects
MeshingParameterTextureRange
0 members
Defines how to pack render/meshes textures.
MeshNgon
11 members
An ngon groups underlying faces under a polygonal boundary; it does not remove those faces.
Use face membership for calculations. Ngon count is not a replacement for the underlying computational triangle count.
Permanent link · Official RhinoCommon reference
Empty
Empty: ClassVar[MeshNgon]See the signature and official API documentation for this member.
BoundaryVertexCount
def BoundaryVertexCount(self) -> intGet the number of vertices in this ngon. Rhino.Geometry.MeshNgon about length information.
FaceCount
def FaceCount(self) -> intGet the number of faces in this ngon.
BoundaryVertexIndexList
def BoundaryVertexIndexList(self) -> Sequence[int]Get the outer boundary mesh vertex list of the ngon. Vertices are sorted counterclockwise with respect to the direction of the face, although the degree by which vertex normals will respect this might vary.
CompareTo
def CompareTo(self, otherNgon: MeshNgon) -> intCompares this Rhino.Geometry.MeshNgon with otherNgon and returns a value of 1, 0, or -1. Priority is for vertex count, then face count, then vertex index list values, then face index list values.
Create
def Create(meshVertexIndexList: Iterable[int], meshFaceIndexList: Iterable[int]) -> MeshNgonConstructs an ngon from lists of mesh vertex and face indexes.
Equals
def Equals(self, otherNgon: MeshNgon) -> bool
def Equals(self, otherObj: Any) -> boolDetermines if this ngon and otherNgon are identical.
FaceIndexList
def FaceIndexList(self) -> Sequence[int]Get the ngon's mesh face index list.
GetHashCode
def GetHashCode(self) -> intReturns a runtime-stable hash code for the current mesh ngon. You are not allowed to rely on persistence of this hash code in serialization, but for each instance of the application, this hash code will be the same for ngons with identical vertex and face lists.
Set
def Set(self, meshVertexIndexList: Iterable[int], meshFaceIndexList: Iterable[int]) -> NoneSet the ngon vertex and face index lists.
ToString
def ToString(self) -> strReturns a string representation for this Rhino.Geometry.MeshNgon. This is to provide a meaningful visualization of this structure and is subject to change in newer releases.
MeshPart
6 members
Represents a portion of a mesh for partitioning
Permanent link · Official RhinoCommon reference
StartVertexIndex
def StartVertexIndex(self) -> intStart of subinterval of parent mesh vertex array
EndVertexIndex
def EndVertexIndex(self) -> intEnd of subinterval of parent mesh vertex array
StartFaceIndex
def StartFaceIndex(self) -> intStart of subinterval of parent mesh face array
EndFaceIndex
def EndFaceIndex(self) -> intEnd of subinterval of parent mesh face array
VertexCount
def VertexCount(self) -> intEndVertexIndex - StartVertexIndex
TriangleCount
def TriangleCount(self) -> intSee the signature and official API documentation for this member.
MeshPipeCapStyle
0 members
Enumerates methods to end a mesh pipe.
MeshPoint
9 members
A mesh point describes a location relative to a mesh face and its interpolation coordinates.
Keep the mesh unchanged while reusing stored indices and weights. Topology changes can invalidate correspondence.
Permanent link · Official RhinoCommon reference
Mesh
def Mesh(self) -> MeshThe mesh that is related to this point.
EdgeParameter
def EdgeParameter(self) -> floatEdge parameter when found.
ComponentIndex
def ComponentIndex(self) -> ComponentIndexGets the component index of the intersecting element in the mesh.
EdgeIndex
def EdgeIndex(self) -> intWhen set, EdgeIndex is an index of an edge in the mesh's edge list.
FaceIndex
def FaceIndex(self) -> intFaceIndex is an index of a face in mesh.Faces. When ComponentIndex refers to a vertex, any face that uses the vertex may appear as FaceIndex. When ComponenctIndex refers to an Edge or EdgeIndex is set, then any face that uses that edge may appear as FaceIndex.
Triangle
def Triangle(self) -> strFace triangle where the intersection takes place: 0 is unset A is 0,1,2 B is 0,2,3 C is 0,1,3 D is 1,2,3
T
def T(self) -> Sequence[float]Barycentric quad coordinates for the point on the mesh face mesh.Faces[FaceIndex]. If the face is a triangle disregard T[3] (it should be set to 0.0). If the face is a quad and is split between vertices 0 and 2, then T[3] will be 0.0 when point is on the triangle defined by vi[0], vi[1], vi[2], and T[1] will be 0.0 when point is on the triangle defined by vi[0], vi[2], vi[3]. If the face is a quad and is split between vertices 1 and 3, then T[2] will be 0.0 when point is on the triangle defined by vi[0], vi[1], vi[3], and m_t[0] will be 0.0 when point is on the triangle defined by vi[1], vi[2], vi[3].
Point
def Point(self) -> Point3dGets the location (position) of this point.
GetTriangle
def GetTriangle(self) -> tuple[bool, int, int, int]Gets the mesh face indices of the triangle where the intersection is on the face takes into consideration the way the quad was split during the intersection.
MeshThicknessMeasurement
6 members
Thickness measurement used in the mesh thickness solver.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, meshIndex: int, vertexIndex: int, thickness: float, point: Point3d, oppositePoint: Point3d) -> NoneSee the signature and official API documentation for this member.
MeshIndex
def MeshIndex(self) -> intGets the index of the mesh associated with this thickness measurement.
VertexIndex
def VertexIndex(self) -> intGets the index of the vertex associated with this thickness measurement.
Thickness
def Thickness(self) -> floatGets the local thickness of the mesh.
Point
def Point(self) -> Point3dGets the location of the thickness measurement.
OppositePoint
def OppositePoint(self) -> Point3dGets the point opposite to the measurement point.
MeshType
0 members
Defines enumerated values for various mesh types.
MeshUnsafeLock
7 members
Permits access to the underlying mesh raw data structures in an unsafe way.
Permanent link · Official RhinoCommon reference
FaceNormalsArray
def FaceNormalsArray(self) -> tuple[Any, int]Retrieves a pointer to the raw mesh face normals array, which uses vectors defined with single precision floating point numbers, or throws an exception if none is available.
FacesArray
def FacesArray(self) -> tuple[Any, int]Retrieves a pointer to the raw faces array, which uses 4 integers for each face. Rhino.Geometry.MeshFace.
NormalVector3fArray
def NormalVector3fArray(self) -> tuple[Any, int]Retrieves a pointer to the raw mesh vertex normal array, which uses vectors defined with single precision floating point numbers, or throws an exception if none is available.
Release
def Release(self) -> NoneReleases the lock and updates the underlying unmanaged data structures.
VertexColorsArray
def VertexColorsArray(self) -> tuple[Any, int]Retrieves a pointer to the raw mesh vertex colors array, which uses RGBA integers or throws an exception if none is available.
VertexPoint3dArray
def VertexPoint3dArray(self) -> tuple[Any, int]Retrieves a pointer to the raw mesh vertex array, which uses coordinates defined with double precision floating point numbers, or throws an exception if none is available.
VertexPoint3fArray
def VertexPoint3fArray(self) -> tuple[Any, int]Retrieves a pointer to the raw mesh vertex array, which uses coordinates defined with single precision floating point numbers, or null if none is available.
MeshUnwrapMethod
0 members
Unwrapping method used
MeshUnwrapper
3 members
Unwraps meshes and stores the result in their texture coordinates
Permanent link · Official RhinoCommon reference
__init__
def __init__(self, mesh: Mesh) -> None
def __init__(self, meshes: Iterable[Mesh]) -> NoneCreates a mesh unwrapper for a single mesh
Dispose
def Dispose(self) -> NoneDispose of this object and any unmanaged memory associated with it.
Unwrap
def Unwrap(self, method: MeshUnwrapMethod) -> boolUnwraps the meshes passed in as constructor arguments and stores the results in texture coordinates.
MorphControl
7 members
Represents a geometry that is able to control the morphing behavior of some other geometry.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self, originCurve: NurbsCurve, targetCurve: NurbsCurve) -> NoneConstructs a MorphControl that allows for morphing between two curves.
SpaceMorphTolerance
def SpaceMorphTolerance(self) -> floatThe 3d fitting tolerance used when morphing surfaces and breps. The default is 0.0 and any value <= 0.0 is ignored by morphing functions. The value returned by Tolerance does not affect the way meshes and points are morphed.
QuickPreview
def QuickPreview(self) -> booltrue if the morph should be done as quickly as possible because the result is being used for some type of dynamic preview. If QuickPreview is true, the tolerance may be ignored. The QuickPreview value does not affect the way meshes and points are morphed. The default is false.
PreserveStructure
def PreserveStructure(self) -> booltrue if the morph should be done in a way that preserves the structure of the geometry. In particular, for NURBS objects, true means that only the control points are moved. The PreserveStructure value does not affect the way meshes and points are morphed. The default is false.
Curve
def Curve(self) -> NurbsCurveReturns the morph control's curve. While this should never be null, the calling function should check.
Surface
def Surface(self) -> NurbsSurfaceReturns the morph control's surface. While this should never be null, the calling function should check.
Morph
def Morph(self, geometry: GeometryBase) -> boolApplies the space morph to geometry.
NurbsCurve
38 members
A NURBS curve combines control points, weights, degree, and knots. Control points generally do not lie on the curve. Degree and knot multiplicity affect smoothness.
Basis functions over knot spans determine shape. Moving a control point and constraining an evaluated point are different geometric operations.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self, degree: int, pointCount: int) -> None
def __init__(self, dimension: int, rational: bool, order: int, pointCount: int) -> None
def __init__(self, other: NurbsCurve) -> NoneConstructs a new NURBS curve with a specific degree and control point count.
Order
def Order(self) -> intGets the order of the curve. Order = Degree + 1.
IsRational
def IsRational(self) -> boolRational NURBS allow nonunit weights and exact conic representation.
Equal weights can represent a nonrational shape within rational storage. The property describes representation; changing individual weights changes relative control influence.
Knots
def Knots(self) -> AnyKnots divide parameter space. Repeated interior knots can reduce parametric continuity.
For ordinary interior multiplicity m and degree p, continuity is generally C^(p-m). Geometric continuity can be higher in special configurations.
Points
def Points(self) -> AnyControl points influence a curve through basis functions. Most do not lie on the evaluated shape.
Control-point edits affect a neighborhood determined by knots and degree. Inspect PointAt results rather than relying on the control polygon alone.
HasBezierSpans
def HasBezierSpans(self) -> boolReturns true if the NURBS curve has Bezier spans (all distinct knots have multiplicity = degree)
Append
def Append(self, nurbsCurve: NurbsCurve) -> boolAppends a NURBS curve to this curve.
ConvertSpanToBezier
def ConvertSpanToBezier(self, spanIndex: int) -> BezierCurveConverts a span of the NURBS curve into a Bezier.
Create
def Create(periodic: bool, degree: int, points: Iterable[Point3d]) -> NurbsCurveConstructs a 3D NURBS curve from a list of control points.
CreateFromArc
def CreateFromArc(arc: Arc) -> NurbsCurve
def CreateFromArc(arc: Arc, degree: int, cvCount: int) -> NurbsCurveGets a rational degree 2 NURBS curve representation of the arc. Note that the parameterization of NURBS curve does not match arc's transcendental parameterization.
CreateFromCircle
def CreateFromCircle(circle: Circle) -> NurbsCurve
def CreateFromCircle(circle: Circle, degree: int, cvCount: int) -> NurbsCurveGets a rational degree 2 NURBS curve representation of the circle. Note that the parameterization of NURBS curve does not match circle's transcendental parameterization. Use GetRadianFromNurbFormParameter() and GetParameterFromRadian() to convert between the NURBS curve parameter and the transcendental parameter.
CreateFromEllipse
def CreateFromEllipse(ellipse: Ellipse) -> NurbsCurveGets a rational degree 2 NURBS curve representation of the ellipse. Note that the parameterization of the NURBS curve does not match with the transcendental parameterization of the ellipsis.
CreateFromFitPoints
def CreateFromFitPoints(points: Iterable[Point3d], tolerance: float, degree: int, periodic: bool, startTangent: Vector3d, endTangent: Vector3d) -> NurbsCurve
def CreateFromFitPoints(points: Iterable[Point3d], tolerance: float, periodic: bool) -> NurbsCurveFits a NURBS curve to a dense, ordered set of points.
CreateFromLine
def CreateFromLine(line: Line) -> NurbsCurveGets a non-rational, degree 1 NURBS curve representation of the line.
CreateHSpline
def CreateHSpline(points: Iterable[Point3d]) -> NurbsCurve
def CreateHSpline(points: Iterable[Point3d], startTangent: Vector3d, endTangent: Vector3d) -> NurbsCurveConstruct an H-spline from a sequence of interpolation points
CreateNonRationalArcBezier
def CreateNonRationalArcBezier(degree: int, center: Point3d, start: Point3d, end: Point3d, radius: float, tanSlider: float, midSlider: float) -> NurbsCurveCreates a non-rational approximation of a rational arc as a single bezier segment
CreateParabolaFromFocus
def CreateParabolaFromFocus(focus: Point3d, startPoint: Point3d, endPoint: Point3d) -> NurbsCurveCreates a parabola from focus and end points.
CreateParabolaFromPoints
def CreateParabolaFromPoints(startPoint: Point3d, innerPoint: Point3d, endPoint: Point3d) -> NurbsCurveCreates a parabola from three points.
CreateParabolaFromVertex
def CreateParabolaFromVertex(vertex: Point3d, startPoint: Point3d, endPoint: Point3d) -> NurbsCurveCreates a parabola from vertex and end points.
CreatePlanarRailFrames
def CreatePlanarRailFrames(self, parameters: Iterable[float], normal: Vector3d) -> Sequence[Plane]Computes planar rail sweep frames at specified parameters.
CreateRailFrames
def CreateRailFrames(self, parameters: Iterable[float]) -> Sequence[Plane]Computes relatively parallel rail sweep frames at specified parameters.
CreateSpiral
def CreateSpiral(axisStart: Point3d, axisDir: Vector3d, radiusPoint: Point3d, pitch: float, turnCount: float, radius0: float, radius1: float) -> NurbsCurve
def CreateSpiral(railCurve: Curve, t0: float, t1: float, radiusPoint: Point3d, pitch: float, turnCount: float, radius0: float, radius1: float, pointsPerTurn: int) -> NurbsCurveCreates a C1 cubic NURBS approximation of a helix or spiral. For a helix, you may have radius0 == radius1. For a spiral radius0 == radius1 produces a circle. Zero and negative radii are permissible.
CreateSubDFriendly
def CreateSubDFriendly(curve: Curve) -> NurbsCurve
def CreateSubDFriendly(curve: Curve, pointCount: int, periodicClosedCurve: bool) -> NurbsCurve
def CreateSubDFriendly(points: Iterable[Point3d], interpolatePoints: bool, periodicClosedCurve: bool) -> NurbsCurveCreate a NURBS curve, that is suitable for calculations like lofting SubD objects, from an existing curve.
EpsilonEquals
def EpsilonEquals(self, other: NurbsCurve, epsilon: float) -> boolCheck that all values in other are within epsilon of the values in this
GrevilleParameter
def GrevilleParameter(self, index: int) -> floatGets the greville (edit point) parameter that belongs to the control point at the specified index.
GrevilleParameters
def GrevilleParameters(self) -> Sequence[float]Gets all Greville parameters for this curve.
GrevillePoint
def GrevillePoint(self, index: int) -> Point3dGets the Greville parameter that belongs to the control point at the specified index.
GrevillePoints
def GrevillePoints(self) -> Any
def GrevillePoints(self, all: bool) -> AnyGets all Greville points for this curve.
IncreaseDegree
def IncreaseDegree(self, desiredDegree: int) -> boolDegree elevation can increase degree while preserving the represented shape.
This differs from rebuilding. Elevation changes the control representation without necessarily adding geometric detail.
IsDuplicate
def IsDuplicate(curveA: NurbsCurve, curveB: NurbsCurve, ignoreParameterization: bool, tolerance: float) -> boolDetermines if two curves are similar.
MakeCompatible
def MakeCompatible(curves: Iterable[Curve], startPt: Point3d, endPt: Point3d, simplifyMethod: int, numPoints: int, refitTolerance: float, angleTolerance: float) -> Sequence[NurbsCurve]For expert use only. From the input curves, make an array of compatible NURBS curves.
MakePiecewiseBezier
def MakePiecewiseBezier(self, setEndWeightsToOne: bool) -> boolClamps ends and adds knots so the NURBS curve has Bezier spans (all distinct knots have multiplicity = degree).
MakeUniform
def MakeUniform(self) -> boolChanges a NURBS curve so each control point affects the curve exactly the same way. This make the knot vectors uniform without changing the control point locations. This will change the object shape slightly.
MatchToCurve
def MatchToCurve(self, targetCurve: Curve, maxEndDistance: float, maxInteriorDistance: float, matchTolerance: float, maxLevel: int) -> NurbsCurveConstructs a NURBS curve with the start and end matching the start and end of targetCurve, and Greville points on targetCurve.
Reparameterize
def Reparameterize(self) -> Curve
def Reparameterize(self, c: float) -> boolReparameterizes a curve using automatic parameterization.
SetEndCondition
def SetEndCondition(self, bSetEnd: bool, continuity: Any, point: Point3d, tangent: Vector3d) -> bool
def SetEndCondition(self, bSetEnd: bool, continuity: Any, point: Point3d, tangent: Vector3d, curvature: Vector3d) -> boolSet end condition of a NURBS curve to point, tangent and curvature.
SetGrevillePoints
def SetGrevillePoints(self, points: Iterable[Point3d]) -> boolSets all Greville edit points for this curve.
UVNDirectionsAt
def UVNDirectionsAt(self, t: float) -> tuple[bool, Vector3d, Vector3d, Vector3d]Calculates the u, V, and N directions of a NURBS curve at a parameter similar to the method used by Rhino's MoveUVN command.
NurbsSurface
34 members
A tensor-product NURBS surface uses a control net and two knot directions. Its rectangular parameter domain does not imply uniform distances on the surface.
The control net defines an underlying surface. Brep topology adds trimmed regions and holes that need not follow the rectangular net.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self, other: NurbsSurface) -> NoneInitializes a new NURBS surface by copying the values from another surface.
KnotsU
def KnotsU(self) -> AnyThe U direction knot vector.
KnotsV
def KnotsV(self) -> AnyThe V direction knot vector.
Points
def Points(self) -> AnyThe control net defines the underlying surface; its points generally do not lie on that surface.
Trim boundaries belong to Brep topology. Editing the control net does not directly edit a face's UV trimming loops.
IsRational
def IsRational(self) -> boolGets a value indicating whether or not the NURBS surface is rational.
OrderU
def OrderU(self) -> intGets the order in the U direction.
OrderV
def OrderV(self) -> intGets the order in the V direction.
ConvertSpanToBezier
def ConvertSpanToBezier(self, spanIndex0: int, spanIndex1: int) -> BezierSurfaceConvert a NURBS surface bispan into a Bezier surface.
CopyFrom
def CopyFrom(self, other: NurbsSurface) -> NoneCopies this NURBS surface from another NURBS surface.
Create
def Create(dimension: int, isRational: bool, order0: int, order1: int, controlPointCount0: int, controlPointCount1: int) -> NurbsSurfaceConstructs a new NURBS surface with internal uninitialized arrays.
CreateCurveOnSurface
def CreateCurveOnSurface(surface: Surface, points: Iterable[Point2d], tolerance: float, periodic: bool) -> NurbsCurveFit a sequence of 2d points on a surface to make a curve on the surface.
CreateCurveOnSurfacePoints
def CreateCurveOnSurfacePoints(surface: Surface, fixedPoints: Iterable[Point2d], tolerance: float, periodic: bool, initCount: int, levels: int) -> Sequence[Point2d]Computes a discrete spline curve on the surface. In other words, computes a sequence of points on the surface, each with a corresponding parameter value.
CreateFromCone
def CreateFromCone(cone: Cone) -> NurbsSurfaceConstructs a new NURBS surfaces from cone data.
CreateFromCorners
def CreateFromCorners(corner1: Point3d, corner2: Point3d, corner3: Point3d) -> NurbsSurface
def CreateFromCorners(corner1: Point3d, corner2: Point3d, corner3: Point3d, corner4: Point3d) -> NurbsSurface
def CreateFromCorners(corner1: Point3d, corner2: Point3d, corner3: Point3d, corner4: Point3d, tolerance: float) -> NurbsSurfaceMakes a surface from 3 corner points.
CreateFromCylinder
def CreateFromCylinder(cylinder: Cylinder) -> NurbsSurfaceConstructs a new NURBS surfaces from cylinder data.
CreateFromPlane
def CreateFromPlane(plane: Plane, uInterval: Interval, vInterval: Interval, uDegree: int, vDegree: int, uPointCount: int, vPointCount: int) -> NurbsSurfaceCreates a NURBS surface from a plane and additional parameters.
CreateFromPoints
def CreateFromPoints(points: Iterable[Point3d], uCount: int, vCount: int, uDegree: int, vDegree: int) -> NurbsSurfaceConstructs a NURBS surface from a 2D grid of control points.
CreateFromSphere
def CreateFromSphere(sphere: Sphere) -> NurbsSurfaceConstructs a new NURBS surfaces from sphere data.
CreateFromTorus
def CreateFromTorus(torus: Torus) -> NurbsSurfaceConstructs a new NURBS surfaces from torus data.
CreateNetworkSurface
def CreateNetworkSurface(curves: Iterable[Curve], continuity: int, edgeTolerance: float, interiorTolerance: float, angleTolerance: float) -> tuple[NurbsSurface, int]
def CreateNetworkSurface(uCurves: Iterable[Curve], uContinuityStart: int, uContinuityEnd: int, vCurves: Iterable[Curve], vContinuityStart: int, vContinuityEnd: int, edgeTolerance: float, interiorTolerance: float, angleTolerance: float) -> tuple[NurbsSurface, int]Builds a surface from an auto-sorted network of curves/edges.
CreateRailRevolvedSurface
def CreateRailRevolvedSurface(profile: Curve, rail: Curve, axis: Line, scaleHeight: bool) -> NurbsSurfaceConstructs a railed Surface-of-Revolution.
CreateRuledSurface
def CreateRuledSurface(curveA: Curve, curveB: Curve) -> NurbsSurfaceConstructs a ruled surface between two curves. Curves must share the same knot-vector.
CreateSubDFriendly
def CreateSubDFriendly(surface: Surface) -> NurbsSurfaceCreate a bi-cubic SubD friendly surface from a surface.
CreateThroughPoints
def CreateThroughPoints(points: Iterable[Point3d], uCount: int, vCount: int, uDegree: int, vDegree: int, uClosed: bool, vClosed: bool) -> NurbsSurfaceConstructs a NURBS surface from a 2D grid of points.
EpsilonEquals
def EpsilonEquals(self, other: NurbsSurface, epsilon: float) -> boolCheck that all values in other are within epsilon of the values in this
FindClosestIsoCurve
def FindClosestIsoCurve(self, testPoint: Point3d) -> IsoStatusFind the closest isoparamentric curve, given a test point.
IncreaseDegreeU
def IncreaseDegreeU(self, desiredDegree: int) -> boolIncrease the degree of this surface in U direction.
IncreaseDegreeV
def IncreaseDegreeV(self, desiredDegree: int) -> boolIncrease the degree of this surface in V direction.
MakeCompatible
def MakeCompatible(surface0: Surface, surface1: Surface) -> tuple[bool, NurbsSurface, NurbsSurface]For expert use only. Makes a pair of compatible NURBS surfaces based on two input surfaces.
MakeNonRational
def MakeNonRational(self) -> boolMakes this surface non-rational.
MakeRational
def MakeRational(self) -> boolMakes this surface rational.
MakeUniform
def MakeUniform(self, direction: int) -> boolChanges a NURBS surface so each control point affects the surface exactly the same way. This make the knot vectors uniform without changing the control point locations. This will change the object shape slightly.
MatchToCurve
def MatchToCurve(self, side: IsoStatus, targetCurve: Curve, maxEndDistance: float, maxInteriorDistance: float, matchTolerance: float, maxLevel: int) -> NurbsSurfaceConstructs a NURBS surface with start and end edge isocurve matching the start and end of targetCurve, and Greville points on targetCurve.
UVNDirectionsAt
def UVNDirectionsAt(self, u: float, v: float) -> tuple[bool, Vector3d, Vector3d, Vector3d]Calculates the U, V, and N directions of a NURBS surface at a u,v parameter similar to the method used by Rhino's MoveUVN command.
OrdinateDimension
14 members
Represents an ordinate dimension
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, plane: Plane, direction: Any, basepoint: Point3d, defpoint: Point3d, leaderpoint: Point3d, kinkoffset1: float, kinkoffset2: float) -> NoneSee the signature and official API documentation for this member.
DefPoint
def DefPoint(self) -> Point2dSee the signature and official API documentation for this member.
LeaderPoint
def LeaderPoint(self) -> Point2dSee the signature and official API documentation for this member.
KinkPoint1
def KinkPoint1(self) -> Point2dSee the signature and official API documentation for this member.
KinkPoint2
def KinkPoint2(self) -> Point2dSee the signature and official API documentation for this member.
KinkOffset1
def KinkOffset1(self) -> floatSee the signature and official API documentation for this member.
KinkOffset2
def KinkOffset2(self) -> floatSee the signature and official API documentation for this member.
Direction
def Direction(self) -> AnyGets or sets the measured direction.
AdjustFromPoints
def AdjustFromPoints(self, plane: Plane, direction: Any, basepoint: Point3d, defpoint: Point3d, leaderpoint: Point3d, kinkoffset1: float, kinkoffset2: float) -> boolUpdate Dimension geometry from point locations
Create
def Create(dimStyle: DimensionStyle, plane: Plane, direction: Any, basepoint: Point3d, defpoint: Point3d, leaderpoint: Point3d, kinkoffset1: float, kinkoffset2: float) -> OrdinateDimensionInitialize Dimension parameters
Get3dPoints
def Get3dPoints(self) -> tuple[bool, Point3d, Point3d, Point3d, Point3d, Point3d]Get locations of dimension's 3d points
GetDisplayLines
def GetDisplayLines(self, style: DimensionStyle, scale: float) -> tuple[bool, Sequence[Line]]See the signature and official API documentation for this member.
GetDistanceDisplayText
def GetDistanceDisplayText(self, unitsystem: UnitSystem, style: DimensionStyle) -> strSee the signature and official API documentation for this member.
GetTextRectangle
def GetTextRectangle(self) -> tuple[bool, Sequence[Point3d]]See the signature and official API documentation for this member.
Particle
8 members
Represents a simple particle. This base class only defines position and display properties (size, color, bitmap id). You will most likely create a class that derives from this particle class to perform some sort of physical simulation (movement over time or frames).
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> NoneInitializes a new instance of the Rhino.Geometry.Particle class.
ParentSystem
def ParentSystem(self) -> ParticleSystemGets the parent particle system of this particle.
Index
def Index(self) -> intIndex in ParentSystem for this Particle. Can change when the particle system is modified.
Location
def Location(self) -> Point3d3d Location of the Particle.
Size
def Size(self) -> floatSee the signature and official API documentation for this member.
Color
def Color(self) -> AnySee the signature and official API documentation for this member.
DisplayBitmapIndex
def DisplayBitmapIndex(self) -> intSee the signature and official API documentation for this member.
Update
def Update(self) -> NoneBase class implementation does nothing.
ParticleSystem
9 members
A Rhino.Geometry.ParticleSystem object.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> NoneSee the signature and official API documentation for this member.
DrawRequiresDepthSorting
def DrawRequiresDepthSorting(self) -> boolSee the signature and official API documentation for this member.
DisplaySizesInWorldUnits
def DisplaySizesInWorldUnits(self) -> boolSee the signature and official API documentation for this member.
BoundingBox
def BoundingBox(self) -> BoundingBoxSee the signature and official API documentation for this member.
Add
def Add(self, particle: Particle) -> boolAdds a particle to this ParticleSystem. A Particle can only be in one system at a time. If the Particle already exists in a different system, this function will return false. You should remove the particle from the other system first before adding it.
Clear
def Clear(self) -> NoneRemove all Particles from this system.
GetEnumerator
def GetEnumerator(self) -> AnySee the signature and official API documentation for this member.
Remove
def Remove(self, particle: Particle) -> NoneRemoves a single particle from this system.
Update
def Update(self) -> NoneCalls Update on every particle in the system.
PipeCapMode
0 members
Styles used for creating Brep pipes.
Plane
38 members
A valid plane is an oriented frame with an origin and orthonormal axes. Its Z axis is the normal.
Projection into plane coordinates loses the normal offset. Retain signed distance separately when the original 3D point must be reconstructed.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, a: float, b: float, c: float, d: float) -> None
def __init__(self, origin: Point3d, normal: Vector3d) -> None
def __init__(self, origin: Point3d, xDirection: Vector3d, yDirection: Vector3d) -> None
def __init__(self, origin: Point3d, xPoint: Point3d, yPoint: Point3d) -> None
def __init__(self, other: Plane) -> NoneSee the signature and official API documentation for this member.
Origin
def Origin(self) -> Point3dGets or sets the origin point of this plane.
OriginX
def OriginX(self) -> floatGets or sets the X coordinate of the origin of this plane.
OriginY
def OriginY(self) -> floatGets or sets the Y coordinate of the origin of this plane.
OriginZ
def OriginZ(self) -> floatGets or sets the Z coordinate of the origin of this plane.
XAxis
def XAxis(self) -> Vector3dGets or sets the X axis vector of this plane.
YAxis
def YAxis(self) -> Vector3dGets or sets the Y axis vector of this plane.
ZAxis
def ZAxis(self) -> Vector3dGets or sets the Z axis vector of this plane.
WorldXY
WorldXY: ClassVar[Plane]See the signature and official API documentation for this member.
WorldYZ
WorldYZ: ClassVar[Plane]See the signature and official API documentation for this member.
WorldZX
WorldZX: ClassVar[Plane]See the signature and official API documentation for this member.
Unset
Unset: ClassVar[Plane]See the signature and official API documentation for this member.
Normal
def Normal(self) -> Vector3dGets the normal of this plane. This is essentially the ZAxis of the plane.
IsValid
def IsValid(self) -> boolGets a value indicating whether or not this is a valid plane. A plane is considered to be valid when all fields contain reasonable information and the equation jibes with point and z-axis.
Clone
def Clone(self) -> PlaneReturns a deep copy of this instance.
ClosestParameter
def ClosestParameter(self, testPoint: Point3d) -> tuple[bool, float, float]Python returns (success, u, v). Check success before evaluating PointAt(u,v).
For a valid orthonormal plane, the local axes measure model distances. Unlike a general surface domain, this parameterization has a uniform metric.
Rhino 8 Python example · geometry in memory
import Rhino.Geometry as rg
plane = rg.Plane.WorldXY
ok, u, v = plane.ClosestParameter(rg.Point3d(2, 3, 7))
if not ok:
raise ValueError("Projection failed")
projected = plane.PointAt(u, v)ClosestPoint
def ClosestPoint(self, testPoint: Point3d) -> Point3dGets the point on the plane closest to a test point.
CreateFromFrame
def CreateFromFrame(origin: Point3d, xDirection: Vector3d, yDirection: Vector3d) -> PlaneConstructs a plane from a point, and two vectors in the plane.
CreateFromNormal
def CreateFromNormal(origin: Point3d, normal: Vector3d) -> PlaneConstructs a plane from a point and normal vector.
CreateFromNormalYup
def CreateFromNormalYup(origin: Point3d, normal: Vector3d, yDirection: Vector3d) -> PlaneConstruct a plane from a point, a normal vector, and a vector that projects to the positive YAxis.
CreateFromPoints
def CreateFromPoints(origin: Point3d, xPoint: Point3d, yPoint: Point3d) -> PlaneConstruct a plane from three non-collinear points.
DistanceTo
def DistanceTo(self, bbox: BoundingBox) -> tuple[bool, float, float]
def DistanceTo(self, testPoint: Point3d) -> floatThe point overload returns signed distance. Its sign depends on the plane normal.
Reversing the normal changes the sign without changing the plane's point set. Use absolute distance for orientation-independent proximity.
EpsilonEquals
def EpsilonEquals(self, other: Plane, epsilon: float) -> boolCheck that all values in other are within epsilon of the values in this
Equals
def Equals(self, plane: Plane) -> bool
def Equals(self, obj: Any) -> boolDetermines if another plane has the same components as this plane.
ExtendThroughBox
def ExtendThroughBox(self, box: BoundingBox) -> tuple[bool, Interval, Interval]
def ExtendThroughBox(self, box: Box) -> tuple[bool, Interval, Interval]Extends this plane through a bounding box.
FitPlaneToPoints
def FitPlaneToPoints(points: Iterable[Point3d]) -> tuple[PlaneFitResult, Plane, float] | tuple[PlaneFitResult, Plane]Fit a plane through a collection of points.
Flip
def Flip(self) -> NoneFlip exchanges X and Y axes and reverses orientation. It changes the plane and returns None.
The same geometric plane can have opposite normals. Orientation affects signed distance and apparent winding of planar curves.
Rhino 8 Python example · geometry in memory
import Rhino.Geometry as rg
plane = rg.Plane(rg.Plane.WorldXY)
plane.Flip()
assert plane.Normal.Z < 0GetHashCode
def GetHashCode(self) -> intGets a non-unique hashing code for this entity.
GetPlaneEquation
def GetPlaneEquation(self) -> Sequence[float]Gets the plane equation for this plane in the format of Ax+By+Cz+D=0.
IsCoplanar
def IsCoplanar(self, plane: Plane) -> bool
def IsCoplanar(self, plane: Plane, tolerance: float) -> boolTest if this plane is co-planar with a another plane.
PointAt
def PointAt(self, u: float, v: float) -> Point3d
def PointAt(self, u: float, v: float, w: float) -> Point3dEvaluate local plane coordinates. The three-coordinate overload includes displacement along the normal.
Use the frame rather than assuming WorldXY. Local coordinates describe positions relative to the plane's translated and rotated axes.
RemapToPlaneSpace
def RemapToPlaneSpace(self, ptSample: Point3d) -> tuple[bool, Point3d]Convert a point from World space coordinates into Plane space coordinates.
Rotate
def Rotate(self, angle: float, axis: Vector3d) -> bool
def Rotate(self, angle: float, axis: Vector3d, centerOfRotation: Point3d) -> bool
def Rotate(self, sinAngle: float, cosAngle: float, axis: Vector3d) -> bool
def Rotate(self, sinAngle: float, cosAngle: float, axis: Vector3d, centerOfRotation: Point3d) -> boolRotate the plane about its origin point.
ToString
def ToString(self) -> str
def ToString(self, format: str, formatProvider: Any) -> strConstructs the string representation of this plane.
Transform
def Transform(self, xform: Transform) -> boolTransform the plane with a Transformation matrix.
Translate
def Translate(self, delta: Vector3d) -> boolTranslate (move) the plane along a vector.
UpdateEquation
def UpdateEquation(self) -> boolUpdate Equations
ValueAt
def ValueAt(self, p: Point3d) -> floatGet the value of the plane equation at the point.
PlaneFitResult
0 members
Enumerates all possible outcomes of a Least-Squares plane fitting operation.
PlaneSurface
6 members
A plane surface is a bounded surface portion, distinct from the infinite mathematical plane frame.
Domain and extents control evaluation. Converting it to Brep adds boundaries rather than making a solid.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, plane: Plane) -> None
def __init__(self, plane: Plane, xExtents: Interval, yExtents: Interval) -> NoneConstructs a new plane surface.
Plane
def Plane(self) -> PlaneGets or sets the plane surface's plane.
CreateThroughBox
def CreateThroughBox(lineInPlane: Line, vectorInPlane: Vector3d, box: BoundingBox) -> PlaneSurface
def CreateThroughBox(plane: Plane, box: BoundingBox) -> PlaneSurfaceCreate a plane that contains the intersection of a bounding box.
GetExtents
def GetExtents(self, direction: int) -> IntervalGets the extents of the plane surface.
SetExtents
def SetExtents(self, direction: int, extents: Interval, syncDomain: bool) -> NoneSets the extents of the plane surface.
ToMesh
def ToMesh(self) -> MeshComputes a polygon mesh of the surface made of one quad.
Point
2 members
Point is a GeometryBase object containing a location. Point3d is a numeric value type.
Use Point for geometry-object behavior and Point3d for calculations. Convert explicitly when moving between numeric coordinates and document geometry.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self, location: Point3d) -> NoneInitializes a new point instance with a location.
Location
def Location(self) -> Point3dGets or sets the location (position) of this point.
Point2d
20 members
A 2D point is an ordered pair. UV coordinates describe a parameter domain and need not measure physical distance.
Keep the frame explicit when moving between image coordinates, a plane, and a surface domain. Equal UV offsets can correspond to different distances on a curved surface.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, point: Point2d) -> None
def __init__(self, point: Point3d) -> None
def __init__(self, vector: Vector2d) -> None
def __init__(self, x: float, y: float) -> NoneSee the signature and official API documentation for this member.
X
def X(self) -> floatGets or sets the X (first) coordinate of the point.
Y
def Y(self) -> floatGets or sets the Y (second) coordinate of the point.
IsValid
def IsValid(self) -> boolIf any coordinate of a point is UnsetValue, then the point is not valid.
MinimumCoordinate
def MinimumCoordinate(self) -> floatGets the smallest (both positive and negative) valid coordinate, or RhinoMath.UnsetValue if no coordinate is valid.
MaximumCoordinate
def MaximumCoordinate(self) -> floatGets the largest valid coordinate, or RhinoMath.UnsetValue if no coordinate is valid.
Origin
Origin: ClassVar[Point2d]See the signature and official API documentation for this member.
Unset
Unset: ClassVar[Point2d]See the signature and official API documentation for this member.
Add
def Add(point: Point2d, vector: Vector2d) -> Point2d
def Add(point1: Point2d, point2: Point2d) -> Point2d
def Add(vector: Vector2d, point: Point2d) -> Point2dAdds a point with a vector. (Provided for languages that do not support operator overloading. You can use the + operator otherwise)
CompareTo
def CompareTo(self, other: Point2d) -> intCompares this Rhino.Geometry.Point2d with another Rhino.Geometry.Point2d. Coordinates evaluation priority is first X, then Y.
DistanceTo
def DistanceTo(self, other: Point2d) -> floatComputes the distance between two points.
DistanceToSquared
def DistanceToSquared(self, other: Point2d) -> floatComputes the square of the distance between two 2d points. This method is usually largely faster than DistanceTo().
Divide
def Divide(point: Point2d, t: float) -> Point2dDivides a Rhino.Geometry.Point2d by a number. (Provided for languages that do not support operator overloading. You can use the / operator otherwise)
EpsilonEquals
def EpsilonEquals(self, other: Point2d, epsilon: float) -> boolCheck that all values in other are within epsilon of the values in this
Equals
def Equals(self, point: Point2d) -> bool
def Equals(self, obj: Any) -> boolDetermines whether the specified Point2d has the same values as the present point.
GetHashCode
def GetHashCode(self) -> intComputes a hash number that represents the current point.
Multiply
def Multiply(point: Point2d, t: float) -> Point2d
def Multiply(t: float, point: Point2d) -> Point2dMultiplies a Rhino.Geometry.Point2d by a number. (Provided for languages that do not support operator overloading. You can use the * operator otherwise)
Subtract
def Subtract(point: Point2d, vector: Vector2d) -> Point2d
def Subtract(point1: Point2d, point2: Point2d) -> Vector2dSubtracts a vector from a point. (Provided for languages that do not support operator overloading. You can use the - operator otherwise)
ToString
def ToString(self) -> str
def ToString(self, format: str, formatProvider: Any) -> strConstructs the string representation for the current point.
Transform
def Transform(self, xform: Transform) -> NoneTransforms the present point in place. The transformation matrix acts on the left of the point. i.e., result = transformation*point
Point2f
12 members
Represents the two coordinates of a point in two-dimensional space, using System.Single-precision floating point numbers.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, x: float, y: float) -> NoneSee the signature and official API documentation for this member.
Unset
Unset: ClassVar[Point2f]See the signature and official API documentation for this member.
IsValid
def IsValid(self) -> boolGets a value indicating whether this point is considered valid.
X
def X(self) -> floatGets or sets the X (first) component of the vector.
Y
def Y(self) -> floatGets or sets the Y (second) component of the vector.
CompareTo
def CompareTo(self, other: Point2f) -> intCompares this Rhino.Geometry.Point2f with another Rhino.Geometry.Point2f. Coordinates evaluation priority is first X, then Y.
DistanceTo
def DistanceTo(self, other: Point2f) -> floatComputes the distance between two points.
DistanceToSquared
def DistanceToSquared(self, other: Point2f) -> floatComputes the squared distance between two points.
EpsilonEquals
def EpsilonEquals(self, other: Point2f, epsilon: float) -> boolCheck that all values in other are within epsilon of the values in this
Equals
def Equals(self, point: Point2f) -> bool
def Equals(self, obj: Any) -> boolDetermines whether the specified Rhino.Geometry.Point2f has the same values as the present point.
GetHashCode
def GetHashCode(self) -> intComputes a hash number that represents the current point.
ToString
def ToString(self) -> str
def ToString(self, format: str, formatProvider: Any) -> strConstructs the string representation for the current point.
Point3d
27 members
A point is a location, while a vector is a displacement. Coordinates use model units; subtracting two points produces a vector.
An independent Point3d stores numbers without a unit label. Keep unit conversions explicit when exchanging coordinates between documents.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, point: Point3d) -> None
def __init__(self, point: Point3f) -> None
def __init__(self, point: Point4d) -> None
def __init__(self, vector: Vector3d) -> None
def __init__(self, x: float, y: float, z: float) -> NoneSee the signature and official API documentation for this member.
Origin
Origin: ClassVar[Point3d]See the signature and official API documentation for this member.
Unset
Unset: ClassVar[Point3d]See the signature and official API documentation for this member.
X
def X(self) -> floatGets or sets the X (first) coordinate of this point.
Y
def Y(self) -> floatGets or sets the Y (second) coordinate of this point.
Z
def Z(self) -> floatGets or sets the Z (third) coordinate of this point.
IsValid
def IsValid(self) -> boolEach coordinate of the point must pass the Rhino.RhinoMath.IsValidDouble(System.Double) test.
MinimumCoordinate
def MinimumCoordinate(self) -> floatGets the smallest (both positive and negative) coordinate value in this point.
MaximumCoordinate
def MaximumCoordinate(self) -> floatGets the largest (both positive and negative) valid coordinate in this point, or RhinoMath.UnsetValue if no coordinate is valid, as an absolute value.
Add
def Add(point: Point3d, vector: Vector3d) -> Point3d
def Add(point: Point3d, vector: Vector3f) -> Point3d
def Add(point1: Point3d, point2: Point3d) -> Point3d
def Add(vector: Vector3d, point: Point3d) -> Point3dSums up a point and a vector, and returns a new point. (Provided for languages that do not support operator overloading. You can use the + operator otherwise)
ArePointsCoplanar
def ArePointsCoplanar(points: Iterable[Point3d], tolerance: float) -> boolDetermines whether a set of points is coplanar within a given tolerance.
CompareTo
def CompareTo(self, other: Point3d) -> intCompares this Rhino.Geometry.Point3d with another Rhino.Geometry.Point3d. Component evaluation priority is first X, then Y, then Z.
CullDuplicates
def CullDuplicates(points: Iterable[Point3d], tolerance: float) -> Sequence[Point3d]Removes duplicates in the supplied set of points.
DistanceTo
def DistanceTo(self, other: Point3d) -> floatEuclidean distance measures the straight segment between points, not travel along a curve or surface.
For distance along a path, use the curve's length methods. Coincident endpoints can have zero straight-line distance while the path between them has substantial length.
DistanceToSquared
def DistanceToSquared(self, other: Point3d) -> floatSquared distance avoids a square root in comparisons. Compare it with a squared threshold.
A threshold of d model units becomes d*d in squared units. Nearest-point ordering is unchanged for finite nonnegative distances.
Rhino 8 Python example · geometry in memory
import Rhino.Geometry as rg
a, b = rg.Point3d(0, 0, 0), rg.Point3d(3, 4, 0)
assert a.DistanceToSquared(b) == 25.0
assert a.DistanceTo(b) == 5.0Divide
def Divide(point: Point3d, t: float) -> Point3dDivides a Rhino.Geometry.Point3d by a number. (Provided for languages that do not support operator overloading. You can use the / operator otherwise)
EpsilonEquals
def EpsilonEquals(self, other: Point3d, epsilon: float) -> boolTolerance equality is not an exact identity and is generally not transitive.
A can be close to B and B close to C while A is not close to C. Use an explicit clustering policy when deduplicating points.
Equals
def Equals(self, point: Point3d) -> bool
def Equals(self, obj: Any) -> boolDetermines whether the specified Rhino.Geometry.Point3d has the same values as the present point.
FromPoint3f
def FromPoint3f(point: Point3f) -> Point3dConverts a single-precision point in a double-precision point.
GetHashCode
def GetHashCode(self) -> intComputes a hash code for the present point.
Interpolate
def Interpolate(self, pA: Point3d, pB: Point3d, t: float) -> NoneInterpolate between two points.
Multiply
def Multiply(point: Point3d, t: float) -> Point3d
def Multiply(t: float, point: Point3d) -> Point3dMultiplies a Rhino.Geometry.Point3d by a number. (Provided for languages that do not support operator overloading. You can use the * operator otherwise)
SortAndCullPointList
def SortAndCullPointList(points: Iterable[Point3d], minimumDistance: float) -> Sequence[Point3d]Orders a set of points so they will be connected in a "reasonable polyline" order. Also, removes points from the list if their common distance exceeds a specified threshold.
Subtract
def Subtract(point: Point3d, vector: Vector3d) -> Point3d
def Subtract(point1: Point3d, point2: Point3d) -> Vector3dSubtracts a vector from a point. (Provided for languages that do not support operator overloading. You can use the - operator otherwise)
ToString
def ToString(self) -> str
def ToString(self, format: str, formatProvider: Any) -> strConstructs the string representation for the current point.
Transform
def Transform(self, xform: Transform) -> NoneThis method changes the point in place and returns None. Keep a copy if the original coordinates are needed.
Translation affects points because they represent positions. A pure translation leaves a direction vector unchanged.
Rhino 8 Python example · geometry in memory
import Rhino.Geometry as rg
p = rg.Point3d(1, 2, 3)
p.Transform(rg.Transform.Translation(10, 0, 0))
assert abs(p.X - 11) < 1e-9TryParse
def TryParse(input: str) -> tuple[bool, Point3d]Converts the string representation of a point to the equivalent Point3d structure.
Point3dGrid
1 members
Represents a rectangular grid of 3D points.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, rows: int, columns: int) -> NoneInitializes a rectangular grid of points, with no points in it.
Point3f
16 members
Represents the three coordinates of a point in three-dimensional space, using System.Single-precision floating point numbers.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, x: float, y: float, z: float) -> NoneSee the signature and official API documentation for this member.
Origin
Origin: ClassVar[Point3f]See the signature and official API documentation for this member.
Unset
Unset: ClassVar[Point3f]See the signature and official API documentation for this member.
X
def X(self) -> floatGets or sets the X (first) component of the vector.
Y
def Y(self) -> floatGets or sets the Y (second) component of the vector.
Z
def Z(self) -> floatGets or sets the Z (third) component of the vector.
IsValid
def IsValid(self) -> boolEach coordinate of the point must pass the Rhino.RhinoMath.IsValidSingle(System.Single) test.
CompareTo
def CompareTo(self, other: Point3f) -> intCompares this Rhino.Geometry.Point3f with another Rhino.Geometry.Point3f. Component evaluation priority is first X, then Y, then Z.
DistanceTo
def DistanceTo(self, other: Point3f) -> floatComputes the distance between two points.
DistanceToSquared
def DistanceToSquared(self, other: Point3f) -> floatComputes the squared distance between two points.
EpsilonEquals
def EpsilonEquals(self, other: Point3f, epsilon: float) -> boolCheck that all values in other are within epsilon of the values in this
Equals
def Equals(self, point: Point3f) -> bool
def Equals(self, obj: Any) -> boolDetermines whether the specified Point3f has the same values as the present point.
GetHashCode
def GetHashCode(self) -> intComputes a hash code for the present point.
Subtract
def Subtract(point1: Point3f, point2: Point3f) -> Vector3fSubtracts a point from another point. (Provided for languages that do not support operator overloading. You can use the - operator otherwise)
ToString
def ToString(self) -> str
def ToString(self, format: str, formatProvider: Any) -> strConstructs the string representation for the current point.
Transform
def Transform(self, xform: Transform) -> NoneTransforms the present point in place. The transformation matrix acts on the left of the point. i.e., result = transformation*point
Point4d
15 members
Represents the four coordinates of a point in four-dimensional space. The W (fourth) dimension is often considered the weight of the point as seen in 3D space.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, point: Point3d) -> None
def __init__(self, point: Point4d) -> None
def __init__(self, x: float, y: float, z: float, w: float) -> NoneSee the signature and official API documentation for this member.
X
def X(self) -> floatGets or sets the X (first) coordinate of this point.
Y
def Y(self) -> floatGets or sets the Y (second) coordinate of this point.
Z
def Z(self) -> floatGets or sets the Z (third) coordinate of this point.
W
def W(self) -> floatGets or sets the W (fourth) coordinate -or weight- of this point.
Unset
Unset: ClassVar[Point4d]See the signature and official API documentation for this member.
IsValid
def IsValid(self) -> boolReturns an indication regarding the validity of this point.
Add
def Add(point1: Point4d, point2: Point4d) -> Point4dSums two Rhino.Geometry.Point4d together. (Provided for languages that do not support operator overloading. You can use the + operator otherwise)
EpsilonEquals
def EpsilonEquals(self, other: Point4d, epsilon: float) -> boolCheck that all values in other are within epsilon of the values in this
Equals
def Equals(self, point: Point4d) -> bool
def Equals(self, obj: Any) -> boolDetermines whether the specified point has same value as the present point.
GetHashCode
def GetHashCode(self) -> intComputes the hash code for the present point.
Multiply
def Multiply(point: Point4d, d: float) -> Point4dMultiplies a point by a number. (Provided for languages that do not support operator overloading. You can use the * operator otherwise)
Subtract
def Subtract(point1: Point4d, point2: Point4d) -> Point4dSubtracts the second point from the first point. (Provided for languages that do not support operator overloading. You can use the - operator otherwise)
ToString
def ToString(self) -> str
def ToString(self, format: str, formatProvider: Any) -> strSee the signature and official API documentation for this member.
Transform
def Transform(self, xform: Transform) -> NoneTransforms the present point in place. The transformation matrix acts on the left of the point. i.e., result = transformation*point
PointCloud
35 members
A point cloud is a sample collection, not a connected surface.
Nearest-sample distance differs from distance to a reconstructed surface. Account for density, noise, and coordinate units.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, other: PointCloud) -> None
def __init__(self, points: Iterable[Point3d]) -> NoneInitializes a new instance of the Rhino.Geometry.PointCloud class that is empty.
Count
def Count(self) -> intGets the number of points in this point cloud.
HiddenPointCount
def HiddenPointCount(self) -> intGets the number of points that have their Hidden flag set.
ContainsColors
def ContainsColors(self) -> boolGets a value indicating whether or not the points in this point cloud have colors assigned to them.
ContainsNormals
def ContainsNormals(self) -> boolGets a value indicating whether or not the points in this point cloud have normals assigned to them.
ContainsHiddenFlags
def ContainsHiddenFlags(self) -> boolGets a value indicating whether or not the points in this point cloud have hidden flags assigned to them.
ContainsPointValues
def ContainsPointValues(self) -> boolGets a value indicating whether or not the points in this point cloud have extra values assigned to them. Extra values can be used to store a user-defined values, such as intensity.
Add
def Add(self, point: Point3d) -> None
def Add(self, point: Point3d, normal: Vector3d) -> None
def Add(self, point: Point3d, color: Any) -> None
def Add(self, point: Point3d, normal: Vector3d, color: Any) -> None
def Add(self, point: Point3d, normal: Vector3d, color: Any, value: float) -> NoneAppend a new point to the end of the list.
AddRange
def AddRange(self, points: Iterable[Point3d]) -> None
def AddRange(self, points: Iterable[Point3d], normals: Iterable[Vector3d]) -> None
def AddRange(self, points: Iterable[Point3d], colors: Iterable[Any]) -> None
def AddRange(self, points: Iterable[Point3d], normals: Iterable[Vector3d], colors: Iterable[Any]) -> None
def AddRange(self, points: Iterable[Point3d], normals: Iterable[Vector3d], colors: Iterable[Any], values: Iterable[float]) -> NoneAppends a collection of points to this point cloud.
AppendNew
def AppendNew(self) -> PointCloudItemAppends a new PointCloudItem to the end of this point cloud.
AsReadOnlyListOfPoints
def AsReadOnlyListOfPoints(self) -> Sequence[Point3d]Returns an enumerator and list indexer over point cloud locations.
ClearColors
def ClearColors(self) -> NoneDestroys the color information in this point cloud.
ClearHiddenFlags
def ClearHiddenFlags(self) -> NoneDestroys the hidden flag information in this point cloud.
ClearNormals
def ClearNormals(self) -> NoneDestroys the normal vector information in this point cloud.
ClearPointValues
def ClearPointValues(self) -> NoneDestroys the extra value information in this point cloud. Extra values can be used to store a user-defined values, such as intensity.
ClosestPoint
def ClosestPoint(self, testPoint: Point3d) -> intThe result identifies the nearest stored sample, rather than projecting onto a surface between samples.
Check the index before accessing an item. Sparse regions can have large errors relative to an underlying physical shape.
CreateContourCurves
def CreateContourCurves(self, contourStart: Point3d, contourEnd: Point3d, interval: float, absoluteTolerance: float) -> Sequence[Curve]
def CreateContourCurves(self, startPoint: Point3d, endPoint: Point3d, interval: float, absoluteTolerance: float, maxDistance: float, minDistance: float, openCurves: bool, createSpline: bool, createPolyline: bool, fitTolerance: float) -> Sequence[Curve]Creates a planar curves by intersecting a plane with a point cloud.
CreateFromMesh
def CreateFromMesh(mesh: Mesh) -> PointCloudCreates a point cloud from a mesh.
CreateSectionCurve
def CreateSectionCurve(self, plane: Plane, absoluteTolerance: float) -> Sequence[Curve]
def CreateSectionCurve(self, plane: Plane, absoluteTolerance: float, maxDistance: float, minDistance: float, openCurves: bool, createSpline: bool, createPolyline: bool, fitTolerance: float) -> Sequence[Curve]Creates planar curves by intersecting a plane with a point cloud.
GetColors
def GetColors(self) -> Sequence[Any]Copy all the point colors in this point cloud to an array.
GetEnumerator
def GetEnumerator(self) -> AnyGets an enumerator that allows to modify each point cloud point.
GetNormals
def GetNormals(self) -> Sequence[Vector3d]Copy all the normal vectors in this point cloud to an array.
GetPoints
def GetPoints(self) -> Sequence[Point3d]Copy all the point coordinates in this point cloud to an array.
GetPointValues
def GetPointValues(self) -> Sequence[float]Copy all the extra point values in this point cloud to an array. Extra values can be used to store a user-defined value, such as intensity.
GetRandomSubsample
def GetRandomSubsample(self, numberOfPoints: int) -> PointCloud
def GetRandomSubsample(self, numberOfPoints: int, cancelToken: Any, progress: Any) -> PointCloudReturns a random subsample of a point cloud.
GetUnsafeLock
def GetUnsafeLock(self, writable: bool) -> PointCloudUnsafeLockAllows the developer to obtain unsafe pointers to the underlying unmanaged data structures of the PointCloud.
Insert
def Insert(self, index: int, point: Point3d) -> None
def Insert(self, index: int, point: Point3d, normal: Vector3d) -> None
def Insert(self, index: int, point: Point3d, color: Any) -> None
def Insert(self, index: int, point: Point3d, normal: Vector3d, color: Any) -> None
def Insert(self, index: int, point: Point3d, normal: Vector3d, color: Any, value: float) -> NoneInserts a new point into the point list.
InsertNew
def InsertNew(self, index: int) -> PointCloudItemInserts a new Rhino.Geometry.PointCloudItem at a specific position of the point cloud.
InsertRange
def InsertRange(self, index: int, points: Iterable[Point3d]) -> NoneAppend a collection of points to this point cloud.
Merge
def Merge(self, other: PointCloud) -> NoneMerges, or appends, a specified point cloud into this one.
PointAt
def PointAt(self, index: int) -> Point3dReturns the location of the point at a specific index.
ReleaseUnsafeLock
def ReleaseUnsafeLock(self, pointCloudData: PointCloudUnsafeLock) -> NoneUpdates the PointCloud data with the information that was stored via the Rhino.Geometry.PointCloudUnsafeLock.
RemoveAt
def RemoveAt(self, index: int) -> NoneRemove the point at the given index.
RemoveRange
def RemoveRange(self, indices: Iterable[int]) -> intRemoves points at given indices.
ShrinkWrap
def ShrinkWrap(self, parameters: ShrinkWrapParameters) -> MeshReturns a ShrinkWrap mesh from this point cloud object.
PointCloudItem
9 members
A point-cloud item exposes one sample and its optional attributes through the owning cloud.
Indices and associated data can change after insertions or removals. Copy values that must outlive edits.
Permanent link · Official RhinoCommon reference
Location
def Location(self) -> Point3dGets or sets the location of this point cloud item.
X
def X(self) -> floatGets or sets the X component of this point cloud item location.
Y
def Y(self) -> floatGets or sets the Y component of this point cloud item location.
Z
def Z(self) -> floatGets or sets the Z component of this point cloud item location.
Normal
def Normal(self) -> Vector3dGets or sets the normal vector for this point cloud item. If this point cloud item does not have a normal vector, Vector3d.Unset is returned.
Color
def Color(self) -> AnyGets or sets the color of this point cloud item. If this point cloud item does not have a color, System.Drawing.Color.Black is returned.
Hidden
def Hidden(self) -> boolGets or sets the hidden flag of this point cloud item. If this point cloud item does not have a hidden flag, false is returned.
PointValue
def PointValue(self) -> floatGets or set the extra value of this point cloud item. The extra value can be used to store a user-defined value, such as intensity. If this point cloud item does not have an extra value, RhinoMath.UnsetValue is returned.
Index
def Index(self) -> intGets the index of this point cloud item.
PointCloudUnsafeLock
5 members
Permits access to the underlying PointCloud raw data structures in an unsafe way.
Permanent link · Official RhinoCommon reference
ColorArray
def ColorArray(self) -> tuple[Any, int]Retrieves a pointer to the raw array of colors, which are represented as 32-bit integers in ARGB format, or null if none is available.
NormalArray
def NormalArray(self) -> tuple[Any, int]Retrieves a pointer to the raw array of point normals, or null if none is available.
PointArray
def PointArray(self) -> tuple[Any, int]Retrieves a pointer to the raw point array, which uses coordinates defined with double precision floating point numbers, or null if none is available.
Release
def Release(self) -> NoneReleases the lock and updates the underlying unmanaged data structures.
ValueArray
def ValueArray(self) -> tuple[Any, int]Retrieves a pointer to the raw array of point values, or null if none is available.
PointContainment
0 members
Defines enumerated values for closed curve/point spatial relationships.
PointFaceRelation
0 members
Enumerates the possible point/BrepFace spatial relationships.
PolyCurve
17 members
A polycurve joins curve segments into a composite. Global parameters differ from segment-local parameters.
Use mapping methods to transfer parameters. A joined sequence can retain gaps or discontinuities needing validation.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> NoneInitializes a new, empty polycurve.
SegmentCount
def SegmentCount(self) -> intGets the number of segments that make up this Polycurve.
IsNested
def IsNested(self) -> boolGets a value indicating whether or not a PolyCurve contains nested PolyCurves.
HasGap
def HasGap(self) -> boolThis is a quick way to see if the curve has gaps between the sub curve segments.
Append
def Append(self, arc: Arc) -> bool
def Append(self, curve: Curve) -> bool
def Append(self, line: Line) -> boolAppends and matches the start of the arc to the end of polycurve. This function will fail if the polycurve is closed or if SegmentCount > 0 and the arc is closed.
AppendSegment
def AppendSegment(self, curve: Curve) -> boolAppends the curve to the polycurve without changing the new segment's geometry. This function will fail if the PolyCurve is closed or if SegmentCount > 0 and the new segment is closed.
CleanUp
def CleanUp(self) -> CurveRemoves any nesting of polycurves. If this polycurve has just a single segment, the segment is returned. If, after nest removal, there are adjacent segments which are polylines, they are combined into a single polyline. The new curve may have a different domain from this polycurve. If the start and end segments of a closed input are polylines, the result may have a different seam location since the start and end segments will be combined.
Duplicate
def Duplicate(self) -> GeometryBaseDuplicates this polycurve. When not overridden in a derived class, this calls Rhino.Geometry.PolyCurve.DuplicatePolyCurve.
DuplicatePolyCurve
def DuplicatePolyCurve(self) -> PolyCurveDuplicates this polycurve. This is the same as Rhino.Geometry.PolyCurve.Duplicate.
Explode
def Explode(self) -> Sequence[Curve]Exploding returns component curves with their own parameterizations and identities.
Keep original segment order when transferring attributes. A global polycurve parameter cannot be blindly reused on a component.
PolyCurveParameter
def PolyCurveParameter(self, segmentIndex: int, segmentCurveParameter: float) -> floatConverts a segment curve parameter to a polycurve parameter.
RemoveNesting
def RemoveNesting(self) -> boolExplodes nested polycurve segments and reconstructs this curve from the shattered remains. The result will have not have any PolyCurves as segments but it will have identical locus and parameterization.
SegmentCurve
def SegmentCurve(self, index: int) -> CurveGets the segment curve at the given index.
SegmentCurveParameter
def SegmentCurveParameter(self, polycurveParameter: float) -> floatConverts a polycurve parameter to a segment curve parameter.
SegmentDomain
def SegmentDomain(self, segmentIndex: int) -> IntervalReturns the polycurve sub-domain assigned to a segment curve.
SegmentIndex
def SegmentIndex(self, polycurveParameter: float) -> intFinds the segment used for evaluation at polycurve_parameter.
SegmentIndexes
def SegmentIndexes(self, subdomain: Interval) -> tuple[int, int, int]Finds the segments that overlap the Polycurve sub domain.
Polyline
30 members
A polyline is an ordered point sequence connected by straight segments. Corners are usually not tangent continuous.
Polyline and PolylineCurve provide different APIs and parameter conventions. Closedness does not imply smoothness.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, collection: Iterable[Point3d]) -> None
def __init__(self, initialCapacity: int) -> NoneInitializes a new empty polyline.
IsValid
def IsValid(self) -> boolGets a value that indicates whether this polyline is valid. Valid polylines have at least one segment, no Invalid points and no zero length segments. Closed polylines with only two segments are also not considered valid.
SegmentCount
def SegmentCount(self) -> intGets the number of segments for this polyline.
IsClosed
def IsClosed(self) -> boolTest a polyline to see if it is closed.
Length
def Length(self) -> floatGets the total length of the polyline.
BreakAtAngles
def BreakAtAngles(self, angle: float) -> Sequence[Polyline]Breaks this polyline into sections at sharp kinks. Closed polylines will also be broken at the first and last vertex.
CenterPoint
def CenterPoint(self) -> Point3dCompute the center point of the polyline as the weighted average of all segments.
ClosestParameter
def ClosestParameter(self, testPoint: Point3d) -> floatGets the parameter along the polyline which is closest to a test-point.
ClosestPoint
def ClosestPoint(self, testPoint: Point3d) -> Point3dGets the point on the polyline which is closest to a test-point.
CollapseShortSegments
def CollapseShortSegments(self, tolerance: float) -> intCollapses all segments until none are shorter than tolerance. This function is significantly slower than DeleteShortSegments, since it recursively operates on the shortest segment. When a segment is collapsed the end-points are placed in the center of the segment.
CreateByJoiningLines
def CreateByJoiningLines(lines: Iterable[Line], tolerance: float, splitAtIntersections: bool) -> Sequence[Polyline]Creates polylines by joining lines.
CreateCircumscribedPolygon
def CreateCircumscribedPolygon(circle: Circle, sideCount: int) -> PolylineCreate a regular polygon circumscribe about a circle. The midpoints of the polygon's edges will be tangent to the circle.
CreateInscribedPolygon
def CreateInscribedPolygon(circle: Circle, sideCount: int) -> PolylineCreate a regular polygon inscribed in a circle. The vertices of the polygon will be on the circle.
CreateStarPolygon
def CreateStarPolygon(circle: Circle, radius: float, cornerCount: int) -> PolylineCreate a regular star polygon. The star begins at circle.PointAt(0) and the vertices alternate between being on circle and begin on a concentric circle of other_radius.
DeleteShortSegments
def DeleteShortSegments(self, tolerance: float) -> intRemoves all points that are closer than tolerance to the previous point. Start and end points are left intact.
Duplicate
def Duplicate(self) -> PolylineReturns a deep copy of this polyline instance.
GetSegments
def GetSegments(self) -> Sequence[Line]Constructs an array of line segments that make up the entire polyline.
IsClosedWithinTolerance
def IsClosedWithinTolerance(self, tolerance: float) -> boolTest a polyline to see if it is closed.
IsConvexLoop
def IsConvexLoop(self, strictlyConvex: bool) -> boolDetermines if a polyline is convex.
MergeColinearSegments
def MergeColinearSegments(self, angleTolerance: float, includeSeam: bool) -> intMerge co-linear consecutive segments in a polyline. This method will automatically remove any zero-length segments as well.
PointAt
def PointAt(self, t: float) -> Point3dPolyline parameters combine a segment index with a local segment fraction.
Segments of different lengths each occupy a parameter interval of length one. Use length-based sampling for uniform physical spacing.
ReduceSegments
def ReduceSegments(self, tolerance: float) -> intConstructs a reduction of this polyline by recursively removing the least significant segments.
RemoveNearlyEqualSubsequentPoints
def RemoveNearlyEqualSubsequentPoints(self, tolerance: float) -> NoneRemoves one copy of a point that is equal to the previous or later point, by an absolute tolerance factor.
SegmentAt
def SegmentAt(self, index: int) -> LineGets the line segment at the given index.
Smooth
def Smooth(self, amount: float) -> boolSmoothen the polyline segments by averaging adjacent vertices. Smoothing requires a polyline with exclusively valid vertices.
TangentAt
def TangentAt(self, t: float) -> Vector3dGets the unit tangent vector along the polyline at the given parameter. The integer part of the parameter indicates the index of the segment.
ToNurbsCurve
def ToNurbsCurve(self) -> NurbsCurveConstructs a nurbs curve representation of this polyline.
ToPolylineCurve
def ToPolylineCurve(self) -> PolylineCurveConstructs a polyline curve representation of this polyline.
TriangulateClosedPolyline
def TriangulateClosedPolyline(self) -> Sequence[MeshFace]Attempts to create a list of triangles which represent a triangulation of a closed polyline
Trim
def Trim(self, domain: Interval) -> PolylineConstructs a polyline out of a parameter sub-domain in this curve.
PolylineCurve
10 members
PolylineCurve wraps piecewise-linear geometry in the Curve interface and can have its own parameterization.
Use Domain and conversion methods. Do not assume raw Polyline parameters and Curve parameters are interchangeable.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, other: PolylineCurve) -> None
def __init__(self, points: Iterable[Point3d]) -> NoneInitializes a new empty polyline curve.
PointCount
def PointCount(self) -> intGets the number of points in this polyline.
CreateConvexHull2d
def CreateConvexHull2d(points: Iterable[Point2d]) -> tuple[PolylineCurve, Sequence[int]]Attempts to create a closed PolylineCurve that is the anti-clockwise planar convex hull of the input points. In addition, the indices of the extremal points among the input points are returned in correct order. Possible duplicates among the input points are taken care of. The input pointsThe indices into the input points such that points[hullIndices[i]] = result[i]. Since the result is a closed polyline if successful, the start/end index is repeated at the beginning and end of the hullIndices. The closed PolylineCurve encompassing the input points, or null if the input points were either too few, or were found to be collinear.
Parameter
def Parameter(self, index: int) -> floatGets a parameter at a specified index in the polyline curve.
Point
def Point(self, index: int) -> Point3dGets a point at a specified index in the polyline curve.
SetArcLengthParameterization
def SetArcLengthParameterization(self, tolerance: float) -> NoneSets the polyline curve to use arc length parameterization for higher quality geometry.
SetParameter
def SetParameter(self, index: int, parameter: float) -> NoneSets a parameter at a specified index in the polyline curve.
SetPoint
def SetPoint(self, index: int, point: Point3d) -> NoneSets a point at a specified index in the polyline curve.
ToArray
def ToArray(self) -> Sequence[Point3d]Returns the underlying Polyline points as an array.
ToPolyline
def ToPolyline(self) -> Polyline
def ToPolyline(self, mainSegmentCount: int, subSegmentCount: int, maxAngleRadians: float, maxChordLengthRatio: float, maxAspectRatio: float, tolerance: float, minEdgeLength: float, maxEdgeLength: float, keepStartPoint: bool) -> PolylineCurve
def ToPolyline(self, mainSegmentCount: int, subSegmentCount: int, maxAngleRadians: float, maxChordLengthRatio: float, maxAspectRatio: float, tolerance: float, minEdgeLength: float, maxEdgeLength: float, keepStartPoint: bool, curveDomain: Interval) -> PolylineCurve
def ToPolyline(self, tolerance: float, angleTolerance: float, minimumLength: float, maximumLength: float) -> PolylineCurveReturns the underlying Polyline, or points. Interop note: this CLR method group hides or extends a base method in a way Python override checking cannot fully represent.
PreserveEnd
0 members
Preserves, or maintains, the shape of the opposite the one being edited.
PreserveIsoCurveMethod
0 members
The way the surface iso-lines align with the target
QuadRemeshParameters
9 members
Parameters for QuadRemesh method
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> NoneSee the signature and official API documentation for this member.
TargetEdgeLength
def TargetEdgeLength(self) -> floatWhen TargetEdgeLength is greater than 0 TargetQuadCount will be re-computed with the target goal of an approximated edge length based on the area of the input mesh e.g TargetQuadCount = Input mesh Area * sqr(TargetEdgeLength) AdaptiveSize as well as AdaptiveQuadCount will also be ignored;
TargetQuadCount
def TargetQuadCount(self) -> intThe number of quads to try to achieve in the final re-meshed object Note: This value is overridden if TargetEdgeLength > 0
AdaptiveSize
def AdaptiveSize(self) -> floatLarger values results in for quad sizes that adjust to match input curvature. Smaller values results in more uniform quad sizes at the risk of less feature preservation. Range [0 - 100] Note: this value is ignored when TargetEdgeLength > 0
AdaptiveQuadCount
def AdaptiveQuadCount(self) -> boolRespect the original Target Quad Count value as much as possible. True returns more quads than TargetQuadCount depending on amount of high-curvature areas. Note: this value is ignored when TargetEdgeLength > 0
DetectHardEdges
def DetectHardEdges(self) -> boolWhen enabled the hard edges in models will be retained.
GuideCurveInfluence
def GuideCurveInfluence(self) -> int0 = Approximate 1 = Interpolate Edge Ring 2 = Interpolate Edge Loop This value is ignored if Guide Curves are not supplied
PreserveMeshArrayEdgesMode
def PreserveMeshArrayEdgesMode(self) -> int0=off, 1=On(Smart), 2=On(Strict) : Mesh array's created from Breps will have their brep face edge boundaries retained. Smart - Small or insignificant input faces are ignored. Strict - All input faces are factored in re-meshed result.
SymmetryAxis
def SymmetryAxis(self) -> QuadRemeshSymmetryAxisSymmetry axis to use for symmetric re-meshing
QuadRemeshSymmetryAxis
0 members
Symmetrical meshing axis
Quaternion
43 members
A unit quaternion represents a rotation; q and -q represent the same rotation.
Normalize inputs when needed and maintain sign correspondence across sequences. Euler-angle singularities are avoided, but interpolation still needs a deliberate path convention.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, a: float, b: float, c: float, d: float) -> NoneSee the signature and official API documentation for this member.
Zero
Zero: ClassVar[Quaternion]See the signature and official API documentation for this member.
Identity
Identity: ClassVar[Quaternion]See the signature and official API documentation for this member.
I
I: ClassVar[Quaternion]See the signature and official API documentation for this member.
J
J: ClassVar[Quaternion]See the signature and official API documentation for this member.
K
K: ClassVar[Quaternion]See the signature and official API documentation for this member.
A
def A(self) -> floatGets or sets the real part of the quaternion.
B
def B(self) -> floatGets or sets the first imaginary coefficient of the quaternion.
C
def C(self) -> floatGets or sets the second imaginary coefficient of the quaternion.
D
def D(self) -> floatGets or sets the third imaginary coefficient of the quaternion.
IsValid
def IsValid(self) -> boolDetermines if the four coefficients are valid numbers within RhinoCommon. See Rhino.RhinoMath.IsValidDouble(System.Double).
Conjugate
def Conjugate(self) -> QuaternionGets a new quaternion that is the conjugate of this quaternion. This is (a,-b,-c,-d)
Inverse
def Inverse(self) -> QuaternionComputes a new inverted quaternion, (a/L2, -b/L2, -c/L2, -d/L2), where L2 = length squared = (a*a + b*b + c*c + d*d). This is the multiplicative inverse, i.e., (a,b,c,d)*(a/L2, -b/L2, -c/L2, -d/L2) = (1,0,0,0). If this is the zero quaternion, then the zero quaternion is returned.
Length
def Length(self) -> floatReturns the length or norm of the quaternion.
LengthSquared
def LengthSquared(self) -> floatGets the result of (a^2 + b^2 + c^2 + d^2).
Vector
def Vector(self) -> Vector3dThe imaginary part of the quaternion (B,C,D)
Scalar
def Scalar(self) -> floatThe real (scalar) part of the quaternion This is Rhino.Geometry.Quaternion.A.
IsZero
def IsZero(self) -> booltrue if a, b, c, and d are all zero.
IsScalar
def IsScalar(self) -> booltrue if b, c, and d are all zero.
IsVector
def IsVector(self) -> booltrue if a = 0 and at least one of b, c, or d is not zero.
CreateFromRotationZYX
def CreateFromRotationZYX(yaw: float, pitch: float, roll: float) -> QuaternionConstructs a quaternion defined by Tait-Byran angles, also loosely known as Euler angles.
CreateFromRotationZYZ
def CreateFromRotationZYZ(alpha: float, beta: float, gamma: float) -> QuaternionConstructs a quaternion defined by Euler angles.
CrossProduct
def CrossProduct(p: Quaternion, q: Quaternion) -> QuaternionComputes the vector cross product of p and q = (0,x,y,z), where (x,y,z) = Rhino.Geometry.Vector3d.CrossProduct(Rhino.Geometry.Vector3d,Rhino.Geometry.Vector3d)(p.Rhino.Geometry.Quaternion.Vector,q.Rhino.Geometry.Quaternion.Vector). This is not the same as the quaternion product p*q.
Distance
def Distance(p: Quaternion, q: Quaternion) -> floatReturns the distance or norm of the difference between two quaternions.
DistanceTo
def DistanceTo(self, q: Quaternion) -> floatComputes the distance or norm of the difference between this and another quaternion.
EpsilonEquals
def EpsilonEquals(self, other: Quaternion, epsilon: float) -> boolCheck that all values in other are within epsilon of the values in this
Equals
def Equals(self, other: Quaternion) -> bool
def Equals(self, obj: Any) -> boolDetermines whether this quaternion has the same value of another quaternion.
GetEulerZYZ
def GetEulerZYZ(self) -> tuple[bool, float, float, float]Find the Euler angles for a rotation transformation.
GetHashCode
def GetHashCode(self) -> intGets a non-unique but repeatable hashing code for this quaternion.
GetRotation
GetRotation.Overloads[CLR signature](...)This output-only overload group requires explicit CLR selection in Rhino 8 Python.NET; a direct no-argument call is ambiguous.
Use Overloads to choose Plane, Transform, or angle-axis outputs. The selector avoids promising a direct call that fails at runtime.
GetYawPitchRoll
def GetYawPitchRoll(self) -> tuple[bool, float, float, float]Find sthe Tait-Byran angles, also loosely called Euler angles, for this quaternion.
Invert
def Invert(self) -> boolModifies this quaternion to become (a/L2, -b/L2, -c/L2, -d/L2), where L2 = length squared = (a*a + b*b + c*c + d*d). This is the multiplicative inverse, i.e., (a,b,c,d)*(a/L2, -b/L2, -c/L2, -d/L2) = (1,0,0,0).
Lerp
def Lerp(a: Quaternion, b: Quaternion, t: float) -> QuaternionInterpolates between two quaternions, using linear interpolation.
MatrixForm
def MatrixForm(self) -> TransformReturns 4x4 real valued matrix form of the quaternion a b c d -b a -d c -c d a -b -d -c b a which has the same arithmetic properties as the quaternion.
Product
def Product(p: Quaternion, q: Quaternion) -> QuaternionThe quaternion product of p and q. This is the same value as p*q.
Rotate
def Rotate(self, v: Vector3d) -> Vector3dRotates a 3d vector. This operation is also called conjugation, because the result is the same as (q.Conjugate()*(0,x,y,x)*q/q.LengthSquared).Vector.
RotateTowards
def RotateTowards(a: Quaternion, b: Quaternion, maxRadians: float) -> QuaternionReturns the quaternion obtained by rotating a towards b, limiting the rotation by MaxRadians.
Rotation
def Rotation(angle: float, axisOfRotation: Vector3d) -> Quaternion
def Rotation(plane0: Plane, plane1: Plane) -> QuaternionReturns the unit quaternion cos(angle/2), sin(angle/2)*x, sin(angle/2)*y, sin(angle/2)*z where (x,y,z) is the unit vector parallel to axis. This is the unit quaternion that represents the rotation of angle about axis.
Set
def Set(self, a: float, b: float, c: float, d: float) -> NoneSets all coefficients of the quaternion.
SetRotation
def SetRotation(self, angle: float, axisOfRotation: Vector3d) -> None
def SetRotation(self, plane0: Plane, plane1: Plane) -> NoneSets the quaternion to cos(angle/2), sin(angle/2)*x, sin(angle/2)*y, sin(angle/2)*z where (x,y,z) is the unit vector parallel to axis. This is the unit quaternion that represents the rotation of angle about axis.
Slerp
def Slerp(a: Quaternion, b: Quaternion, t: float) -> QuaternionSpherical interpolation follows a path on the unit-quaternion sphere.
Check input normalization and equivalent signs. A numeric sequence can appear discontinuous if equivalent q and -q representations alternate unexpectedly.
ToString
def ToString(self) -> strReturns a string representation of this Quaternion.
Unitize
def Unitize(self) -> boolScales the quaternion's coordinates so that a*a + b*b + c*c + d*d = 1.
RadialDimension
21 members
Represents a dimension of a circular entity that can be measured with radius or diameter.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, dimtype: AnnotationType, plane: Plane, centerpoint: Point3d, radiuspoint: Point3d, dimlinepoint: Point3d) -> NoneConstructs a radial dimension.
AnnotationType
def AnnotationType(self) -> AnnotationTypeSee the signature and official API documentation for this member.
IsDiameterDimension
def IsDiameterDimension(self) -> boolGets a value indicating whether the value refers to the diameter, rather than the radius.
CenterPoint
def CenterPoint(self) -> Point2dSee the signature and official API documentation for this member.
RadiusPoint
def RadiusPoint(self) -> Point2dSee the signature and official API documentation for this member.
DimlinePoint
def DimlinePoint(self) -> Point2dSee the signature and official API documentation for this member.
KneePoint
def KneePoint(self) -> Point2dSee the signature and official API documentation for this member.
LeaderTextHorizontalAlignment
def LeaderTextHorizontalAlignment(self) -> AnyGets or sets the horizontal alignment of the radial dimension's text
LeaderArrowType
def LeaderArrowType(self) -> AnySee the signature and official API documentation for this member.
LeaderArrowSize
def LeaderArrowSize(self) -> floatSee the signature and official API documentation for this member.
LeaderArrowBlockId
def LeaderArrowBlockId(self) -> AnySee the signature and official API documentation for this member.
LeaderCurveStyle
def LeaderCurveStyle(self) -> AnySee the signature and official API documentation for this member.
TextOrientation
def TextOrientation(self) -> AnySee the signature and official API documentation for this member.
TextLocation
def TextLocation(self) -> AnySee the signature and official API documentation for this member.
TextAngleType
def TextAngleType(self) -> AnySee the signature and official API documentation for this member.
AdjustFromPoints
def AdjustFromPoints(self, plane: Plane, centerpoint: Point3d, radiuspoint: Point3d, dimlinepoint: Point3d, rotationInPlane: float) -> boolUpdate Dimension geometry from point locations
Create
def Create(dimStyle: DimensionStyle, dimtype: AnnotationType, plane: Plane, centerpoint: Point3d, radiuspoint: Point3d, dimlinepoint: Point3d) -> RadialDimensionInitialize Dimension parameters
Get3dPoints
def Get3dPoints(self) -> tuple[bool, Point3d, Point3d, Point3d, Point3d]Get locations of dimension's 3d points
GetDisplayLines
def GetDisplayLines(self, style: DimensionStyle, scale: float) -> tuple[bool, Sequence[Line]]See the signature and official API documentation for this member.
GetDistanceDisplayText
def GetDistanceDisplayText(self, unitsystem: UnitSystem, style: DimensionStyle) -> strSee the signature and official API documentation for this member.
GetTextRectangle
def GetTextRectangle(self) -> tuple[bool, Sequence[Point3d]]See the signature and official API documentation for this member.
RailType
0 members
Rail types used for creating filleted Brep edges
Ray3d
7 members
A ray uses a position and direction. If the direction is not unit length, its parameter is not a distance.
Enforce the nonnegative parameter condition separately when modeling a physical ray. The evaluation equation can also produce points on its supporting line.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, position: Point3d, direction: Vector3d) -> NoneSee the signature and official API documentation for this member.
Position
def Position(self) -> Point3dGets the starting position of this ray.
Direction
def Direction(self) -> Vector3dGets the direction vector of this ray.
EpsilonEquals
def EpsilonEquals(self, other: Ray3d, epsilon: float) -> boolCheck that all values in other are within epsilon of the values in this
Equals
def Equals(self, ray: Ray3d) -> bool
def Equals(self, obj: Any) -> boolDetermines whether the specified Ray3d has the same value as the present ray.
GetHashCode
def GetHashCode(self) -> intComputes a hashing number that represents the current ray.
PointAt
def PointAt(self, t: float) -> Point3dEvaluates a point along the ray.
Rectangle3d
23 members
A rectangle uses a plane and two coordinate intervals. Orientation and interval direction affect evaluation.
World-axis bounds can exceed its oriented extent. Retain the local frame for planar dimensions and containment.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, plane: Plane, cornerA: Point3d, cornerB: Point3d) -> None
def __init__(self, plane: Plane, width: float, height: float) -> None
def __init__(self, plane: Plane, width: Interval, height: Interval) -> NoneSee the signature and official API documentation for this member.
Unset
Unset: ClassVar[Rectangle3d]See the signature and official API documentation for this member.
IsValid
def IsValid(self) -> boolGets a value indicating whether or not this is a valid rectangle. A rectangle is considered to be valid when the base plane and both dimensions are valid.
Plane
def Plane(self) -> PlaneGets or sets the base plane of the rectangle.
X
def X(self) -> IntervalGets or sets the dimensions of the rectangle along the base plane X-Axis (i.e. the width).
Y
def Y(self) -> IntervalGets or sets the dimensions of the rectangle along the base plane Y-Axis (i.e. the height).
Width
def Width(self) -> floatGets the signed width of the rectangle. If the X dimension is decreasing, the width will be negative.
Height
def Height(self) -> floatGets the signed height of the rectangle. If the Y dimension is decreasing, the height will be negative.
Area
def Area(self) -> floatGets the unsigned Area of the rectangle.
Circumference
def Circumference(self) -> floatGets the circumference of the rectangle.
BoundingBox
def BoundingBox(self) -> BoundingBoxGets the world aligned bounding box for this rectangle.
Center
def Center(self) -> Point3dGets the point in the center of the rectangle.
ClosestPoint
def ClosestPoint(self, point: Point3d) -> Point3d
def ClosestPoint(self, point: Point3d, includeInterior: bool) -> Point3dGets the point on the rectangle that is closest to a test-point.
Contains
def Contains(self, pt: Point3d) -> PointContainment
def Contains(self, x: float, y: float) -> PointContainmentDetermines if a point is included in this rectangle.
Corner
def Corner(self, index: int) -> Point3dGets the corner at the given index.
CreateFromPolyline
def CreateFromPolyline(polyline: Iterable[Point3d]) -> Rectangle3d | tuple[Rectangle3d, float, float]Attempts to create a rectangle from a polyline. This method only works well for polylines that already closely resemble rectangles. If the polyline contains more than four vertices, the least significant ones will be ignored. If the polylines is non-orthogonal, the discrepancies will be averaged away. This method should not be used as a Rectangle fitter.
EpsilonEquals
def EpsilonEquals(self, other: Rectangle3d, epsilon: float) -> boolCheck that all values in other are within epsilon of the values in this
MakeIncreasing
def MakeIncreasing(self) -> NoneEnsures the X and Y dimensions are increasing or singleton intervals.
PointAt
def PointAt(self, t: float) -> Point3d
def PointAt(self, x: float, y: float) -> Point3dGets a point along the rectangle boundary.
RecenterPlane
def RecenterPlane(self, index: int) -> None
def RecenterPlane(self, origin: Point3d) -> NoneRe-centers the base plane on one of the corners.
ToNurbsCurve
def ToNurbsCurve(self) -> NurbsCurveConstructs a nurbs curve representation of this rectangle.
ToPolyline
def ToPolyline(self) -> PolylineConstructs a polyline from this rectangle.
Transform
def Transform(self, xform: Transform) -> boolTransforms this rectangle. Note that rectangles cannot be skewed or tapered.
ReduceMeshParameters
10 members
Parameters for Reduce method
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> NoneConstructs a polygon reduction parameter object with default values. Users of this class should not rely on default values to stay constant across service releases.
DesiredPolygonCount
def DesiredPolygonCount(self) -> intDesired or target number of faces
AllowDistortion
def AllowDistortion(self) -> boolIf true, faces are removed until Rhino.Geometry.ReduceMeshParameters.DesiredPolygonCount is reached, distorting the shape as needed. If false, only flat (coplanar) regions are simplified, which leaves the shape unchanged and ignores Rhino.Geometry.ReduceMeshParameters.DesiredPolygonCount.
Accuracy
def Accuracy(self) -> intInteger from 1 to 10 telling how accurate reduction algorithm to use. Greater number gives more accurate results
NormalizeMeshSize
def NormalizeMeshSize(self) -> boolIf true mesh is fitted to an axis aligned unit cube until reduction is complete
Error
def Error(self) -> strSee the signature and official API documentation for this member.
FaceTags
def FaceTags(self) -> Sequence[int]See the signature and official API documentation for this member.
LockedComponents
def LockedComponents(self) -> Sequence[ComponentIndex]List of topological mesh vertices and mesh vertices that will not be moved or deleted in reduction process. Each mesh vertex will lock the corresponding topological mesh vertex. In other words it is not possible to have a locked and non-locked mesh vertex at the same location.
CancelToken
def CancelToken(self) -> AnySee the signature and official API documentation for this member.
ProgressReporter
def ProgressReporter(self) -> AnySee the signature and official API documentation for this member.
RefitTrimKnotMode
0 members
The mode for adding kinots to the surface for fitting
RefitTrimSectionMode
0 members
The mode for dividing the surface into sections
RegionContainment
0 members
Defines enumerated values for closed curve/closed curve relationships.
RevSurface
10 members
A surface of revolution rotates a profile around an axis through an angular range.
The seam and poles need care in parameter-based algorithms. A profile meeting the axis can create singular regions.
Permanent link · Official RhinoCommon reference
Curve
def Curve(self) -> CurveGets the revolute curve.
Axis
def Axis(self) -> LineGets the axis of revolution.
Angle
def Angle(self) -> IntervalGets the start and end angles of revolution in radians. The interval angle must be increasing and satisfy RhinoMath.ZeroTolerance < Angle.Length<= 2.0 * System.Math.PI.
Interval
def Interval(self) -> IntervalInterval specifies the parameterization for the angular parameter. Interval must be an increasing interval. The parameter Interval[0] corresponds to Angle[0] and the parameter Interval[1] corresponds to Angle[1].
IsTransposed
def IsTransposed(self) -> boolIf false, the "u" parameter is the angle parameter and the "v" parameter is the curve parameter. If true, the "u" parameter is the curve parameter and the "v" parameter is the angle parameter.
Create
def Create(revoluteCurve: Curve, axisOfRevolution: Line) -> RevSurface
def Create(revoluteCurve: Curve, axisOfRevolution: Line, startAngleRadians: float, endAngleRadians: float) -> RevSurface
def Create(revoluteLine: Line, axisOfRevolution: Line) -> RevSurface
def Create(revoluteLine: Line, axisOfRevolution: Line, startAngleRadians: float, endAngleRadians: float) -> RevSurface
def Create(revolutePolyline: Polyline, axisOfRevolution: Line) -> RevSurface
def Create(revolutePolyline: Polyline, axisOfRevolution: Line, startAngleRadians: float, endAngleRadians: float) -> RevSurfaceConstructs a new surface of revolution from a generatrix curve and an axis.
CreateFromCone
def CreateFromCone(cone: Cone) -> RevSurfaceConstructs a new surface of revolution from the values of a cone.
CreateFromCylinder
def CreateFromCylinder(cylinder: Cylinder) -> RevSurfaceConstructs a new surface of revolution from the values of a cylinder.
CreateFromSphere
def CreateFromSphere(sphere: Sphere) -> RevSurfaceConstructs a new surface of revolution from the values of a sphere.
CreateFromTorus
def CreateFromTorus(torus: Torus) -> RevSurfaceConstructs a new surface of revolution from the values of a torus.
RibbonOffsetParameters
10 members
Advanced parameters for RibbonOffset Parameters mimic the RibbonOffset Command.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> NoneSee the signature and official API documentation for this member.
OffsetDistance
def OffsetDistance(self) -> floatOffset curve distance from input curve.
OffsetLocation
def OffsetLocation(self) -> Point3dInside or Outside point location
OffsetTolerance
def OffsetTolerance(self) -> floatUsed to determine self-intersections of offset curve, not offset error.
OffsetPlaneVector3d
def OffsetPlaneVector3d(self) -> Vector3dA vector that indicates the normal of the plane in which the offset will occur. This vector is typically similar to a logical extrude direction for the closed input curve.
BlendRadius
def BlendRadius(self) -> floatPositive, typically the same as distance. When the offset results in a self-intersection that gets trimmed off at a kink, the kink will be blended out using this radius.
RebuildPointCount
def RebuildPointCount(self) -> intRebuild offset curve with defined number of control points 0 for disabled
RefitTolerance
def RefitTolerance(self) -> floatRefit the offset curve to a specified tolerance 0 for disabled
AlignCrossSections
def AlignCrossSections(self) -> boolWhen false: cross section slashes between input and output curve are located at the ends of ruled spans. When true: cross section slashes between input and output curve are located at the mid points of ruled spans and blends.
RibbonSurfaceGenerationMethod
def RibbonSurfaceGenerationMethod(self) -> RibbonOffsetSurfaceMethod0 - no surfaces will be created, curves only 1 - Simple Sweep 2 2 - Sweep 2 mixed with NetworkSrf corners
RibbonOffsetSurfaceMethod
0 members
Enum for RibbonOffset surface generation
RTree
15 members
A spatial index prunes candidates using bounding regions. Perform an exact geometric test on candidates when the query requires an exact intersection or distance.
An index accelerates candidate selection, not the exact geometry operation. Keep inserted bounds and identifiers synchronized with the source data.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> NoneInitializes a new, empty instance of the tree.
Count
def Count(self) -> intGets the number of items in this tree.
Clear
def Clear(self) -> NoneRemoves all elements.
CreateFromPointArray
def CreateFromPointArray(points: Iterable[Point3d]) -> RTreeConstructs a new tree with an element for each point cloud point.
CreateMeshFaceTree
def CreateMeshFaceTree(mesh: Mesh) -> RTreeConstructs a new tree with an element for each face in the mesh. The element id is set to the index of the face.
CreatePointCloudTree
def CreatePointCloudTree(cloud: PointCloud) -> RTreeConstructs a new tree with an element for each point cloud point.
Dispose
def Dispose(self) -> NoneActively reclaims unmanaged resources that this instance uses.
Insert
def Insert(self, box: BoundingBox, elementId: int) -> bool
def Insert(self, point: Point2d, elementId: int) -> bool
def Insert(self, point: Point3d, elementId: int) -> bool
def Insert(self, box: BoundingBox, elementId: Any) -> bool
def Insert(self, point: Point2d, elementId: Any) -> bool
def Insert(self, point: Point3d, elementId: Any) -> boolIdentifiers are assigned by the application. Keep a mapping to source geometry or records.
The tree stores a spatial proxy instead of owning a model object. Update entries when geometry bounds or identity change.
Rhino 8 Python example · geometry in memory
import Rhino.Geometry as rg
tree = rg.RTree()
try:
tree.Insert(rg.Point3d(1, 2, 3), 42)
assert tree.Count == 1
finally:
tree.Dispose()Point3dClosestPoints
def Point3dClosestPoints(hayPoints: Iterable[Point3d], needlePts: Iterable[Point3d], limitDistance: float) -> Sequence[Sequence[int]]Finds the point in a list of 3D points that is closest to a test point.
Point3dKNeighbors
def Point3dKNeighbors(hayPoints: Iterable[Point3d], needlePts: Iterable[Point3d], amount: int) -> Sequence[Sequence[int]]Finds a certain amount of points in a list of 3D points that are the k-closest to a test point.
PointCloudClosestPoints
def PointCloudClosestPoints(pointcloud: PointCloud, needlePts: Iterable[Point3d], limitDistance: float) -> Sequence[Sequence[int]]Finds the point in a list of 3D points that is closest to a test point.
PointCloudKNeighbors
def PointCloudKNeighbors(pointcloud: PointCloud, needlePts: Iterable[Point3d], amount: int) -> Sequence[Sequence[int]]Finds a certain amount of points in a list of 3D points that are the k-closest to a test point.
Remove
def Remove(self, box: BoundingBox, elementId: int) -> bool
def Remove(self, point: Point2d, elementId: int) -> bool
def Remove(self, point: Point3d, elementId: int) -> bool
def Remove(self, box: BoundingBox, elementId: Any) -> bool
def Remove(self, point: Point3d, elementId: Any) -> boolRemoves an element from the tree.
Search
def Search(self, box: BoundingBox, callback: Any) -> bool
def Search(self, sphere: Sphere, callback: Any) -> bool
def Search(self, box: BoundingBox, callback: Any, tag: Any) -> bool
def Search(self, sphere: Sphere, callback: Any, tag: Any) -> boolSpatial search yields candidates based on stored bounding regions. Follow it with the exact geometric predicate.
Keep bounds synchronized when geometry moves. A stale index can miss valid hits even if the final exact test is correct.
SearchOverlaps
def SearchOverlaps(treeA: RTree, treeB: RTree, tolerance: float, callback: Any) -> boolSearches two R-trees for all pairs elements whose bounding boxes overlap.
RTreeEventArgs
8 members
Callback identifiers refer to inserted entries according to the application's mapping.
Do not assume an entry ID is a Rhino document identifier. The meaning of an ID comes from the insertion contract.
Permanent link · Official RhinoCommon reference
Id
def Id(self) -> intGets the identifier of the found item.
IdPtr
def IdPtr(self) -> AnyGets the identifier pointer of the found item.
Cancel
def Cancel(self) -> boolGets or sets a value that determines if the search should be conducted farther.
IdB
def IdB(self) -> intIf search is using two r-trees, IdB is element b in the search.
IdBPtr
def IdBPtr(self) -> AnyIf search is using two r-trees, IdB is the element b pointer in the search.
Tag
def Tag(self) -> AnyGets or sets an arbitrary object that can be attached to this event args. This object will "stick" through a single search and can represent user-defined state.
SearchSphere
def SearchSphere(self) -> SphereSphere bounds used during a search. You can modify the sphere in a search callback to help reduce the bounds to search.
SearchBoundingBox
def SearchBoundingBox(self) -> BoundingBoxBounding box bounds used during a search. You may modify the box in a search callback to help reduce the bounds to search.
ShrinkWrapParameters
7 members
Parameters for ShrinkWrap method
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> NoneSee the signature and official API documentation for this member.
TargetEdgeLength
def TargetEdgeLength(self) -> floatThe desired target edge length in document units Smaller values equal more mesh resolution at the expense of larger mesh sizes
Offset
def Offset(self) -> floatDistance to offset outward or inward
SmoothingIterations
def SmoothingIterations(self) -> intNumber of times to apply smoothing
FillHolesInInputObjects
def FillHolesInInputObjects(self) -> boolAny input meshes will have "Fill Holes" applied to them before volume creation This value is ignored when input objects are Point Clouds
PolygonOptimization
def PolygonOptimization(self) -> int0 - 100 the percentage of optimization desired. Polygons will be reduced in areas of lower curvature Lower values result in better feature preservation at the cost of more polygons
InflateVerticesAndPoints
def InflateVerticesAndPoints(self) -> boolInflate mesh vertices, points and point clouds Mesh vertices will be inflated as though the mesh were a point cloud
ShutLiningCurveInfo
8 members
Contains shutlining curve information. This is used in Rhino.Geometry.Mesh.WithShutLining(System.Boolean,System.Double,System.Collections.Generic.IEnumerable{Rhino.Geometry.ShutLiningCurveInfo}).
Permanent link · Official RhinoCommon reference
__init__
def __init__(self, curve: Curve, radius: float, profile: int, pull: bool, isBump: bool, curveIntervals: Iterable[Interval]=..., enabled: bool=...) -> NoneCreates a new instance of the ShutLining curve information class.
Curve
def Curve(self) -> CurveThe profile curve.
Enabled
def Enabled(self) -> boolIf true, this curve is active.
Radius
def Radius(self) -> floatThe profile radius.
Profile
def Profile(self) -> int>The profile type.
Pull
def Pull(self) -> boolTrue if the curve should be pulled.
IsBump
def IsBump(self) -> boolTrue if profile constitutes a bump. See Rhino's Help for more information.
CurveIntervals
def CurveIntervals(self) -> AnyThe parts of the curve to use as profiles.
Silhouette
5 members
Information about silhouette curves that are generated from geometry (surfaces, brep faces, meshes)
Permanent link · Official RhinoCommon reference
SilhouetteType
def SilhouetteType(self) -> SilhouetteTypeGets the type of this silhouette curve.
GeometryComponentIndex
def GeometryComponentIndex(self) -> ComponentIndexGets the component index corresponding with this silhouette curve. This field is only set when the entire silhouette curve is part of some geometry component.
Curve
def Curve(self) -> Curve3D curve representing the shape of the silhouette.
Compute
def Compute(geometry: GeometryBase, silhouetteType: SilhouetteType, parallelCameraDirection: Vector3d, tolerance: float, angleToleranceRadians: float) -> Sequence[Silhouette]
def Compute(geometry: GeometryBase, silhouetteType: SilhouetteType, perspectiveCameraLocation: Point3d, tolerance: float, angleToleranceRadians: float) -> Sequence[Silhouette]
def Compute(geometry: GeometryBase, silhouetteType: SilhouetteType, viewport: ViewportInfo, tolerance: float, angleToleranceRadians: float) -> Sequence[Silhouette]
def Compute(geometry: GeometryBase, silhouetteType: SilhouetteType, parallelCameraDirection: Vector3d, tolerance: float, angleToleranceRadians: float, clippingPlanes: Iterable[Plane], cancelToken: Any) -> Sequence[Silhouette]
def Compute(geometry: GeometryBase, silhouetteType: SilhouetteType, perspectiveCameraLocation: Point3d, tolerance: float, angleToleranceRadians: float, clippingPlanes: Iterable[Plane], cancelToken: Any) -> Sequence[Silhouette]
def Compute(geometry: GeometryBase, silhouetteType: SilhouetteType, viewport: ViewportInfo, tolerance: float, angleToleranceRadians: float, clippingPlanes: Iterable[Plane], cancelToken: Any) -> Sequence[Silhouette]Compute silhouettes of a shape for a parallel projection.
ComputeDraftCurve
def ComputeDraftCurve(geometry: GeometryBase, draftAngle: float, pullDirection: Vector3d, tolerance: float, angleToleranceRadians: float) -> Sequence[Silhouette]
def ComputeDraftCurve(geometry: GeometryBase, draftAngle: float, pullDirection: Vector3d, tolerance: float, angleToleranceRadians: float, cancelToken: Any) -> Sequence[Silhouette]Computes draft curve silhouettes of a shape.
SilhouetteType
0 members
Enumerates the different types of silhouettes and their origins.
SmoothingCoordinateSystem
0 members
The direction of the smoothing used by Curve, Surface, and Mesh Smooth.
SpaceMorph
6 members
A nonlinear space morph differs from one global affine transform and can alter representation quality.
Inspect tolerance and structural-preservation settings. Nonlinear deformation generally changes lengths and angles.
Permanent link · Official RhinoCommon reference
Tolerance
def Tolerance(self) -> floatThe desired accuracy of the morph. This value is primarily used for deforming surfaces and breps. The default is 0.0 and any value <= 0.0 is ignored by morphing functions. The Tolerance value does not affect the way meshes and points are morphed.
QuickPreview
def QuickPreview(self) -> booltrue if the morph should be done as quickly as possible because the result is being used for some type of dynamic preview. If QuickPreview is true, the tolerance may be ignored. The QuickPreview value does not affect the way meshes and points are morphed. The default is false.
PreserveStructure
def PreserveStructure(self) -> booltrue if the morph should be done in a way that preserves the structure of the geometry. In particular, for NURBS objects, true means that only the control points are moved. The PreserveStructure value does not affect the way meshes and points are morphed. The default is false.
IsMorphable
def IsMorphable(geometry: GeometryBase) -> booltrue if the geometry can be morphed by calling SpaceMorph.Morph(geometry)
Morph
def Morph(self, geometry: GeometryBase) -> bool
def Morph(self, plane: Plane) -> tuple[bool, Plane]Apply the space morph to geometry.
MorphPoint
def MorphPoint(self, point: Point3d) -> Point3dMorphs an Euclidean point. This method is abstract.
Sphere
27 members
Angular sphere coordinates have singularities at the poles and do not give equal-area samples.
Equal longitude-latitude increments yield uneven spatial density. Use area-aware sampling for integration or unbiased coverage.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, center: Point3d, radius: float) -> None
def __init__(self, equatorialPlane: Plane, radius: float) -> NoneSee the signature and official API documentation for this member.
Unset
Unset: ClassVar[Sphere]See the signature and official API documentation for this member.
IsValid
def IsValid(self) -> boolGets a value that indicates whether the sphere is valid.
BoundingBox
def BoundingBox(self) -> BoundingBoxGets the world aligned bounding box for this Sphere. If the Sphere is Invalid, an empty box is returned.
Diameter
def Diameter(self) -> floatGets or sets the diameter for this sphere.
Radius
def Radius(self) -> floatGets or sets the Radius for this sphere.
EquitorialPlane
def EquitorialPlane(self) -> PlaneGets or sets the Equatorial plane for this sphere.
EquatorialPlane
def EquatorialPlane(self) -> PlaneGets or sets the Equatorial plane for this sphere.
Center
def Center(self) -> Point3dGets or sets the center point of the sphere.
NorthPole
def NorthPole(self) -> Point3dGets the point at the North Pole of the sphere. This is the parameterization singularity that can be obtained, at V value +Math.Pi/2.
SouthPole
def SouthPole(self) -> Point3dGets the point at the South Pole of the sphere. This is the parameterization singularity that can be obtained, at V value -Math.Pi/2.
ClosestParameter
def ClosestParameter(self, testPoint: Point3d) -> tuple[bool, float, float]Finds the angle parameters on this sphere that are closest to a test point.
ClosestPoint
def ClosestPoint(self, testPoint: Point3d) -> Point3dReturns point on sphere that is closest to given point.
EpsilonEquals
def EpsilonEquals(self, other: Sphere, epsilon: float) -> boolCheck that all values in other are within epsilon of the values in this
FitSphereToPoints
def FitSphereToPoints(points: Iterable[Point3d]) -> SphereAttempts to fit a sphere to a collection of points.
LatitudeDegrees
def LatitudeDegrees(self, degrees: float) -> CircleComputes the parallel at a specific latitude angle. The angle is specified in degrees.
LatitudeRadians
def LatitudeRadians(self, radians: float) -> CircleComputes the parallel at a specific latitude angle. The angle is specified in radians.
LongitudeDegrees
def LongitudeDegrees(self, degrees: float) -> CircleComputes the meridian at a specific longitude angle. The angle is specified in degrees.
LongitudeRadians
def LongitudeRadians(self, radians: float) -> CircleComputes the meridian at a specific longitude angle. The angle is specified in radians.
NormalAt
def NormalAt(self, longitudeRadians: float, latitudeRadians: float) -> Vector3dComputes the normal at a specific angular location on the sphere.
PointAt
def PointAt(self, longitudeRadians: float, latitudeRadians: float) -> Point3dLongitude and latitude inputs are in radians. Equal angular steps do not yield equal-area sampling.
Near a pole, longitude changes cause little spatial movement. Avoid assigning equal integration weights to an uncorrected latitude-longitude grid.
Rotate
def Rotate(self, angleRadians: float, axisOfRotation: Vector3d) -> bool
def Rotate(self, angleRadians: float, axisOfRotation: Vector3d, centerOfRotation: Point3d) -> bool
def Rotate(self, sinAngle: float, cosAngle: float, axisOfRotation: Vector3d) -> bool
def Rotate(self, sinAngle: float, cosAngle: float, axisOfRotation: Vector3d, centerOfRotation: Point3d) -> boolRotates the sphere about the center point.
ToBrep
def ToBrep(self) -> BrepConverts this sphere is it Brep representation
ToNurbsSurface
def ToNurbsSurface(self) -> NurbsSurfaceConverts this sphere to its NurbsSurface representation. This is synonymous with calling NurbsSurface.CreateFromSphere().
ToRevSurface
def ToRevSurface(self) -> RevSurfaceConverts this Sphere to a RevSurface representation. This is synonymous with calling RevSurface.CreateFromSphere().
Transform
def Transform(self, xform: Transform) -> boolTransforms this sphere. Note that non-similarity preserving transformations cannot be applied to a sphere as that would result in an ellipsoid.
Translate
def Translate(self, delta: Vector3d) -> boolMoves this sphere along a motion vector.
SquishDeformation
0 members
The types of deformation allowed in the squish process
Squisher
16 members
Squishing flattens geometry through a distortion model. It does not guarantee preservation of both area and length.
Choose constraints according to material and fabrication needs, then measure stretch and compression. Success alone does not prove distortion-free development.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> Noneconstructs a squisher with default parameters
Dispose
def Dispose(self) -> NoneActively reclaims unmanaged resources that this instance uses.
Get2dMesh
def Get2dMesh(self) -> MeshGet the 2d mesh that results from the squish operation
Get3dMesh
def Get3dMesh(self) -> MeshGet the 3d mesh that was used for squish operation
GetAreaConstrainedTrianglesIndices
def GetAreaConstrainedTrianglesIndices(self) -> Sequence[MeshFace]Gets mesh vertex indices for the triangular faces that were constrained during the squish. Indices can be used in both the 2d and 3d mesh vertices arrays.
GetLengthConstrained2dLines
def GetLengthConstrained2dLines(self) -> Sequence[Line]Gets lines at the position of the mesh edges and diagonals that were constrained during the squish, in the 2d mesh. The line at any index here corresponds to the same line in GetLengthConstrained3dLines.
GetLengthConstrained3dLines
def GetLengthConstrained3dLines(self) -> Sequence[Line]Gets lines at the position of the mesh edges and diagonals that were constrained during the squish, in the 3d mesh. The line at any index here corresponds to the same line in GetLengthConstrained2dLines.
GetMesh2dEdges
def GetMesh2dEdges(self) -> Sequence[Line]Gets lines at the position of the mesh edges and diagonals that were constrained during the squish, in the 2d mesh. The line at any index here corresponds to the same line in GetLengthConstrained3dLines.
GetMesh3dEdges
def GetMesh3dEdges(self) -> Sequence[Line]Gets lines at the position of the mesh edges and diagonals that were constrained during the squish, in the 3d mesh. The line at any index here corresponds to the same line in GetLengthConstrained2dLines.
Is2dPatternSquished
def Is2dPatternSquished(geometry: GeometryBase) -> boolReturns true if the input geometry was the result of a squish operation
SquishBack2dMarks
def SquishBack2dMarks(squishedGeometry: GeometryBase, marks: Iterable[GeometryBase]) -> Sequence[GeometryBase]Maps 2D geometry from the squished surface or mesh back to the original 3D surface or mesh
SquishCurve
def SquishCurve(self, curve: Curve) -> PolylineCurveMaps a curve on or near a previously squished 3d surface to the resulting 2d surface
SquishMesh
def SquishMesh(self, sp: SquishParameters, mesh3d: Mesh) -> Mesh
def SquishMesh(self, sp: SquishParameters, mesh3d: Mesh, marks: Iterable[GeometryBase], squished_marks_out: Iterable[GeometryBase]) -> MeshSquish the given mesh into a flat mesh
SquishPoint
def SquishPoint(self, point: Point3d) -> tuple[bool, Point3d]Maps a point on or near the previously squished 3d surface to the flattened surface
SquishSurface
def SquishSurface(self, sp: SquishParameters, surface: Surface) -> Brep
def SquishSurface(self, sp: SquishParameters, surface: Surface, marks: Iterable[GeometryBase], squished_marks_out: Iterable[GeometryBase]) -> BrepSquish the surface into a flat brep
SquishTextDot
def SquishTextDot(self, textDot: TextDot) -> TextDotMaps a TextDot on or near a previously squished 3d surface to the resulting 2d surface
SquishFlatteningAlgorithm
0 members
Represents the type of flattening to use
SquishParameters
14 members
Flattening parameters assign penalties or constraints to stretching, compression, and boundaries.
These settings describe an approximation. They do not alone define a calibrated physical material simulation.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> NoneInitializes a new instance with default values. Initial values are same as Default.
Default
Default: ClassVar[SquishParameters]See the signature and official API documentation for this member.
PreserveTopology
def PreserveTopology(self) -> boolthe mesh has coincident vertices and PreserveTopology is true, then the flattening is based on the mesh's topology and coincident vertices will remain coincident. Otherwise coincident vertices are free to move apart.
SaveMapping
def SaveMapping(self) -> boolIf SaveMapping is true, then ON_SquishMesh() will save extra information on the squished mesh so 3d points and curves near the input mesh can be mapped to the squished mesh and 2d points and curves on the squished mesh can be mapped back to the 3d mesh.
BoundaryStretchConstant
def BoundaryStretchConstant(self) -> floatSpring constant for stretched boundary edges
BoundaryCompressConstant
def BoundaryCompressConstant(self) -> floatSpring constant for compressed boundary edges times the rest length
InteriorStretchConstant
def InteriorStretchConstant(self) -> floatSpring constant for stretched boundary edges times the rest length
InteriorCompressConstant
def InteriorCompressConstant(self) -> floatSpring constant for compressed interior edges times the rest length
AbsoluteLimit
def AbsoluteLimit(self) -> floatIf -1.0 <= AnsoluteLimit < 0.0, then an absolute compression limit is applied so that (2d length)/(3d length) >= abs(AbsoluteLimit). In particular, Absolute = -1.0, then no compression is permitted(2d length) >= (3d length). If 0.0 < m_absolute_limit <= 1.0 then an absolute stretching limit is applied so that (2d length)/(3d length) <= 1/abs(AbsoluteLimit). Examples: AbsoluteLimit 1.0: no stretching, (2d length) <= 1.0*(3d length) 0.5: cap on stretching, 0.5*(2d length) <= (3d length) -0.5: cap on compression, (2d length) >= 0.5*(3d length) -1.0: no compression, (2d length) >= 1.0*(3d length)
Algorithm
def Algorithm(self) -> SquishFlatteningAlgorithmThe flattening algorithm to use: Geometric: (scale independent)the "spring" constant is proportional to 1/L^2 and the result is independent of scale. PhysicalStress: (scale dependent) the "spring" constant is proportional to 1/L.
Dispose
def Dispose(self) -> NoneActively reclaims unmanaged resources that this instance uses.
GetSpringConstants
def GetSpringConstants(self) -> tuple[bool, float, float]See if the spring constants could have been set with SetSpringConstants().
SetDeformation
def SetDeformation(self, deformation: SquishDeformation, bPreserveBoundary: bool, boundaryStretchConstant: float, boundaryCompressConstant: float, interiorStretchConstant: float, interiorCompressConstant: float) -> NoneSets the squish deformation characteristics
SetSpringConstants
def SetSpringConstants(self, boundaryBias: float, deformationBias: float) -> NoneA simplified interface for setting the Stretch and Compression spring constants
SubD
33 members
The control net and the evaluated subdivision limit surface are distinct. Control vertices usually are not points on that surface.
Creases, corners, and extraordinary vertices alter behavior. Display density changes visualization, while topology and tags determine shape.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> NoneCreate a new instance of SubD geometry
Faces
def Faces(self) -> AnyAll faces in this SubD
Vertices
def Vertices(self) -> AnyAll vertices in this SubD
Edges
def Edges(self) -> AnyAll edges in this SubD
IsSolid
def IsSolid(self) -> boolTest SubD to see if the active level is a solid. A "solid" is a closed oriented manifold, or a closed oriented manifold.
TextureCoordinateType
def TextureCoordinateType(self) -> SubDTextureCoordinateTypeGets the texture cordinate type.
Empty
Empty: ClassVar[SubD]See the signature and official API documentation for this member.
ClearEvaluationCache
def ClearEvaluationCache(self) -> NoneClear all cached evaluation information (meshes, surface points, bounding boxes, ...) that depends on edge tags, vertex tags, and the location of vertex control points.
ComponentFromComponentIndex
def ComponentFromComponentIndex(self, componentIndex: ComponentIndex) -> SubDComponentReturns a SubDComponent, either a SubDEdge, SubDFace, or SubDVertex, from a component index.
CopyEvaluationCache
def CopyEvaluationCache(self, src: SubD) -> tuple[bool, SubD]Expert function that copies cached evaluations of component subdivision points and limit surface information from src to this. Typically this is done for performance critical situations like control point editing: - Copy a SubD to be modified (this does not copy the evaluation cache) - Copy the evaluation cache from the unmodified SubD - Modify the SubD copy - Update the surface mesh cache so that only the modified parts are recalculated - Display, meshing, bounding boxes on the modified SubD are now available
CreateFromCylinder
def CreateFromCylinder(cylinder: Cylinder, circumferenceFaceCount: int, heightFaceCount: int, endCapStyle: SubDEndCapStyle, endCapEdgeTag: SubDEdgeTag, radiusLocation: SubDComponentLocation) -> SubDCreates a SubD form of a cylinder.
CreateFromLoft
def CreateFromLoft(curves: Iterable[NurbsCurve], closed: bool, addCorners: bool, addCreases: bool, divisions: int) -> SubDCreates a SubD lofted through shape curves.
CreateFromMesh
def CreateFromMesh(mesh: Mesh) -> SubD
def CreateFromMesh(mesh: Mesh, options: SubDCreationOptions) -> SubDCreate a new SubD from a mesh.
CreateFromSurface
def CreateFromSurface(surface: Surface, method: SubDFromSurfaceMethods, corners: bool) -> SubDCreate a SubD that approximates the surface. If the surface is a SubD friendly NURBS surface and withCorners is true, then the SubD and input surface will have the same geometry.
CreateFromSweep
def CreateFromSweep(rail1: NurbsCurve, rail2: NurbsCurve, shapes: Iterable[NurbsCurve], closed: bool, addCorners: bool) -> SubD
def CreateFromSweep(rail1: NurbsCurve, shapes: Iterable[NurbsCurve], closed: bool, addCorners: bool, roadlikeFrame: bool, roadlikeNormal: Vector3d) -> SubDFits a SubD through a series of profile curves that define the SubD cross-sections and two curves that defines SubD edges.
CreateGlobeSphere
def CreateGlobeSphere(sphere: Sphere, vertexLocation: SubDComponentLocation, axialFaceCount: int, equatorialFaceCount: int) -> SubDCreates a SubD sphere made from polar triangle fans and bands of quads. The result resembles a globe with triangle fans at the poles and the edges forming latitude parallels and longitude meridians.
CreateIcosahedron
def CreateIcosahedron(sphere: Sphere, vertexLocation: SubDComponentLocation) -> SubDCreates a SubD sphere based on an icosohedron (20 triangular faces and 5 valent vertices). This is a goofy topology for a Catmull-Clark subdivision surface (all triangles, all vertices have 5 edges). You may want to consider using the much behaved result from CreateSubDQuadSphere(sphere, vertexLocation, 1) or even the result from CreateSubDGlobeSphere().
CreateQuadSphere
def CreateQuadSphere(sphere: Sphere, vertexLocation: SubDComponentLocation, quadSubdivisionLevel: int) -> SubDCreates a SubD sphere made from quad faces.
CreateTriSphere
def CreateTriSphere(sphere: Sphere, vertexLocation: SubDComponentLocation, triSubdivisionLevel: int) -> SubDCreates a SubD sphere made from triangular faces. This is a goofy topology for a Catmull-Clark subdivision surface (all triangles and all vertices have 5 or 6 edges). You may want to consider using the much behaved result from CreateSubDQuadSphere() or even the result from CreateSubDGlobeSphere().
DuplicateEdgeCurves
def DuplicateEdgeCurves(self) -> Sequence[Curve]
def DuplicateEdgeCurves(self, boundaryOnly: bool, interiorOnly: bool, smoothOnly: bool, sharpOnly: bool, creaseOnly: bool, clampEnds: bool) -> Sequence[Curve]Gets Nurbs form of all edges in this SubD, with clamped knots. NB: Does not update the SubD evaluation cache before getting the edges.
Flip
def Flip(self) -> boolReverses the orientation of all SubD normals.
InterpolateSurfacePoints
def InterpolateSurfacePoints(self, surfacePoints: Iterable[Point3d]) -> bool
def InterpolateSurfacePoints(self, vertexIndices: Iterable[int], surfacePoints: Iterable[Point3d]) -> boolModifies the SubD so that the SubD vertex limit surface points are equal to surface_points[]
JoinSubDs
def JoinSubDs(subdsToJoin: Iterable[SubD], tolerance: float, joinedEdgesAreCreases: bool) -> Sequence[SubD]
def JoinSubDs(subdsToJoin: Iterable[SubD], tolerance: float, joinedEdgesAreCreases: bool, preserveSymmetry: bool) -> Sequence[SubD]Joins an enumeration of SubDs to form as few as possible resulting SubDs. There may be more than one SubD in the result array.
MergeAllCoplanarFaces
def MergeAllCoplanarFaces(self, tolerance: float) -> bool
def MergeAllCoplanarFaces(self, tolerance: float, angleTolerance: float) -> boolMerges adjacent coplanar faces into single faces.
Offset
def Offset(self, distance: float, solidify: bool) -> SubDMakes a new SubD with vertices offset at distance in the direction of the control net vertex normals. Optionally, based on the value of solidify, adds the input SubD and a ribbon of faces along any naked edges.
PackFaces
def PackFaces(self) -> intResets the SubD to the default face packing if adding creases or deleting faces breaks the quad grids. It does not change the topology or geometry of the SubD. SubD face packs always stop at creases.
SetVertexSurfacePoint
def SetVertexSurfacePoint(self, vertexIndex: int, surfacePoint: Point3d) -> boolSet the location of a single vertex surface point. This function is not suitable for setting the locations of multiple vertex surface points that are topologically near to each other.
Subdivide
def Subdivide(self) -> bool
def Subdivide(self, count: int) -> bool
def Subdivide(self, faceIndices: Iterable[int]) -> boolApply the Catmull-Clark subdivision algorithm and save the results in this SubD.
SurfaceMeshCacheExists
def SurfaceMeshCacheExists(self, bTextureCoordinatesExist: bool, bCurvaturesExist: bool, bColorsExist: bool) -> boolChecks that a surface mesh evaluation cache exists, and that it has the required options. This cache is used by - Rhino.Geometry.SubDVertex.SurfacePoint, - Rhino.Geometry.SubDEdge.ToNurbsCurve(System.Boolean), and - Rhino.Geometry.Mesh.CreateFromSubD(Rhino.Geometry.SubD,System.Int32).
ToBrep
def ToBrep(self) -> Brep
def ToBrep(self, options: SubDToBrepOptions) -> BrepConversion creates a NURBS Brep whose patch structure follows the SubD topology and chosen options.
Inspect seams, face count, and approximation. Brep indices do not directly correspond to the original SubD IDs.
TransformComponents
def TransformComponents(self, components: Iterable[ComponentIndex], xform: Transform, componentLocation: SubDComponentLocation) -> intTransforms an enumerable of SubD components.
UpdateAllTagsAndSectorCoefficients
def UpdateAllTagsAndSectorCoefficients(self) -> intUpdates vertex tag, edge tag, and edge coefficient values on the active level. After completing custom editing operations that modify the topology of the SubD control net or changing values of vertex or edge tags, the tag and sector coefficients information on nearby components in the edited areas need to be updated.
UpdateSurfaceMeshCache
def UpdateSurfaceMeshCache(self, lazyUpdate: bool) -> intUpdates limit surface information returned by - Rhino.Geometry.SubDVertex.SurfacePoint, - Rhino.Geometry.SubDEdge.ToNurbsCurve(System.Boolean), and - Rhino.Geometry.Mesh.CreateFromSubD(Rhino.Geometry.SubD,System.Int32). The density of the mesh cache is Rhino.Geometry.SubDDisplayParameters.Default.
SubDAutomaticMeshToSubDContext
0 members
ON_SubD::AutomaticMeshToSubDContext identifies a context where meshes can automatically be converted to subds.
SubDChainType
0 members
SubD::ChainType specifies what edge and vertex tag tests are used when creating edge chains.
SubDComponent
8 members
A part of SubD geometry. Common base class for vertices, faces, and edges
Permanent link · Official RhinoCommon reference
Id
def Id(self) -> intUnique id within the parent SubD for this item
ParentSubD
def ParentSubD(self) -> SubDSubD that this component belongs to
IsSelected
def IsSelected(self) -> boolReturns true if the SubD component is selected.
IsHighlighted
def IsHighlighted(self) -> boolReturns true if the SubD component is highlighted.
IsHidden
def IsHidden(self) -> boolReturns true if the SubD component is hidden.
IsLocked
def IsLocked(self) -> boolReturns true if the SubD component is locked.
IsDeleted
def IsDeleted(self) -> boolReturns true if the SubD component is deleted.
IsDamaged
def IsDamaged(self) -> boolReturns true if the SubD component is damaged.
SubDComponentLocation
0 members
The ON_SubDComponentLocation enum is used when an ON_SubD component is referenced and it is important to distinguish between the component's location in the SubD control net and its location in the SubD limit surface.
SubDCreationOptions
15 members
Options used for creating a SubD
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> NoneCreate default options
Smooth
Smooth: ClassVar[SubDCreationOptions]See the signature and official API documentation for this member.
InteriorCreases
InteriorCreases: ClassVar[SubDCreationOptions]See the signature and official API documentation for this member.
ConvexCornersAndInteriorCreases
ConvexCornersAndInteriorCreases: ClassVar[SubDCreationOptions]See the signature and official API documentation for this member.
ConvexAndConcaveCornersAndInteriorCreases
ConvexAndConcaveCornersAndInteriorCreases: ClassVar[SubDCreationOptions]See the signature and official API documentation for this member.
InteriorCreaseTest
def InteriorCreaseTest(self) -> AnyGet or sets the interior crease test option.
ConvexCornerTest
def ConvexCornerTest(self) -> AnyGet or sets the convex corner test option.
TextureCoordinateTest
def TextureCoordinateTest(self) -> AnyGets or sets the texture coordinate test option.
MaximumConvexCornerEdgeCount
def MaximumConvexCornerEdgeCount(self) -> intIf ConvexCornerTest == ConvexCornerOption.AtMeshCorner, then an input mesh boundary vertex becomes a SubD corner when the number of edges that end at the vertex is <= MaximumConvexCornerEdgeCount edges and the corner angle is <= MaximumConvexCornerAngleRadians.
MaximumConvexCornerAngleRadians
def MaximumConvexCornerAngleRadians(self) -> floatIf ConvexCornerTest == ConvexCornerOption.AtMeshCorner, then an input mesh boundary vertex becomes a SubD corner when the number of edges that end at the vertex is <= MaximumConvexCornerEdgeCount edges and the corner angle is <= MaximumConvexCornerAngleRadians.
ConcaveCornerTest
def ConcaveCornerTest(self) -> AnyGet or sets the concave corner test option.
MinimumConcaveCornerAngleRadians
def MinimumConcaveCornerAngleRadians(self) -> floatIf ConcaveCornerTest == ConcaveCornerOption.AtMeshCorner, then an input mesh boundary vertex becomes a SubD corner when the number of edges that end at the vertex is >= MinimumConcaveCornerEdgeCount edges and the corner angle is >= MinimumConcaveCornerAngleRadians.
MinimumConcaveCornerEdgeCount
def MinimumConcaveCornerEdgeCount(self) -> intIf ConcaveCornerTest == ConcaveCornerOption.AtMeshCorner, then an input mesh boundary vertex becomes a SubD corner when the number of edges that end at the vertex is >= MinimumConcaveCornerEdgeCount edges and the corner angle is >= MinimumConcaveCornerAngleRadians.
InterpolateMeshVertices
def InterpolateMeshVertices(self) -> boolIf false, input mesh vertex locations will be used to set SubD vertex control net locations. If true, input mesh vertex locations will be used to set SubD vertex limit surface locations.
Dispose
def Dispose(self) -> NoneDelete unmanaged pointer for this
SubDDisplayParameters
25 members
A collection of parameters that are passed to functions that calculate a various representations of SubD objects.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, info: Any, context: Any) -> NoneInitializes a new instance with default values.
AdaptiveDisplayMeshQuadMaximum
AdaptiveDisplayMeshQuadMaximum: ClassVar[int]See the signature and official API documentation for this member.
DisplayDensityIsAdaptive
def DisplayDensityIsAdaptive(self) -> boolTrue if the SubD display density setting is adaptive and approximate display mesh quad count is capped at SubDDisplayParameters::AdaptiveDisplayMeshQuadMaximum.
DisplayDensityIsAbsolute
def DisplayDensityIsAbsolute(self) -> boolTrue if the SubD display density setting is absolute.
MeshLocation
def MeshLocation(self) -> SubDComponentLocationThe MeshLocation property determines if the mesh is on the SubD's control net or the SubD's surface.
AbsoluteDisplayDensityFromSubD
def AbsoluteDisplayDensityFromSubD(adaptiveSubDDisplayDensity: int, subd: SubD) -> intGets absolute SubD display density for subd.
AbsoluteDisplayDensityFromSubDFaceCount
def AbsoluteDisplayDensityFromSubDFaceCount(adaptiveSubDDisplayDensity: int, subDFaceCount: int) -> intGets the absolute SubD display density for SubD with subdFaceCount faces.
ClampDisplayDensity
def ClampDisplayDensity(displayDensity: int) -> intLimits display density to a value useful in user interface code.
Coarse
def Coarse() -> SubDDisplayParametersParameters for a course limit surface display mesh. SubD display density = adaptive SubDDisplayParameters.Density.CoarseDensity.
CreateFromAbsoluteDisplayDensity
def CreateFromAbsoluteDisplayDensity(absoluteSubDDisplayDensity: int) -> SubDDisplayParametersUse of absolute display density is strongly discouraged. SubDs can have a single face or millions of faces. Adaptive display meshing produces more desirable results in almost all cases.
CreateFromDisplayDensity
def CreateFromDisplayDensity(adaptiveSubDDisplayDensity: int) -> SubDDisplayParametersIn most applications, the caller sets the mesh density and leaves the other parameters set to the default values.
CreateFromMeshDensity
def CreateFromMeshDensity(normalizedMeshDensity: float) -> SubDDisplayParametersThis function creates SubDDisplayParameters from a user interface "slider" like Rhino's simple mesh controls.
Default
def Default() -> SubDDisplayParametersParameters for the default limit surface display mesh. SubD display density = adaptive SubDDisplayParameters.Density.DefaultDensity.
DisplayDensity
def DisplayDensity(self, subd: SubD) -> intGets the absolute display density to use when creating display meshes for SubD. When adaptive reduction is enabled, subd.Faces.Count is used to determine the appropriate display density.
Dispose
def Dispose(self) -> NoneActively reclaims unmanaged resources that this instance uses.
Empty
def Empty() -> SubDDisplayParametersGet an empty SubDDisplayParameters.
ExtraCoarse
def ExtraCoarse() -> SubDDisplayParametersParameters for an extra course limit surface display mesh. SubD display density = adaptive SubDDisplayParameters.Density.ExtraCoarseDensity.
ExtraFine
def ExtraFine() -> SubDDisplayParametersParameters for an extra fine limit surface display mesh. SubD display density = adaptive SubDDisplayParameters.Density.ExtraFineDensity.
Fine
def Fine() -> SubDDisplayParametersParameters for a fine limit surface display mesh. SubD display density = adaptive SubDDisplayParameters.Density.FineDensity.
FromEncodedString
def FromEncodedString(value: str) -> SubDDisplayParametersConverts encoded serialized string into a MeshingParameters
GetObjectData
def GetObjectData(self, info: Any, context: Any) -> NoneSee the signature and official API documentation for this member.
Medium
def Medium() -> SubDDisplayParametersParameters for a medium limit surface display mesh. SubD display density = adaptive SubDDisplayParameters.Density.MediumDensity.
SetAbsoluteDisplayDensity
def SetAbsoluteDisplayDensity(self, absoluteDisplayDensity: int) -> NoneIn almast all cases, you are better off using SetAdaptiveDisplayDensity().
SetAdaptiveDisplayDensity
def SetAdaptiveDisplayDensity(self, adaptiveDisplayDensity: int) -> NoneSet an adaptive SubD display density that caps display mesh quad count at SubDDisplayParameters.AdaptiveDisplayMeshQuadMaximum.
ToEncodedString
def ToEncodedString(self) -> strReturns a encoded string that represents the MeshingParameters.
SubDEdge
8 members
A SubD edge connects control vertices and carries smoothness information such as a crease tag.
Its control-net line is an editing aid rather than the evaluated surface edge. Use the appropriate representation for measurements.
Permanent link · Official RhinoCommon reference
FaceCount
def FaceCount(self) -> intNumber of faces for this edge.
ControlNetLine
def ControlNetLine(self) -> LineLine representing the control net end points.
VertexFrom
def VertexFrom(self) -> SubDVertexStart vertex for this edge.
VertexTo
def VertexTo(self) -> SubDVertexEnd vertex for this edge.
Tag
def Tag(self) -> SubDEdgeTagidentifies the type of subdivision edge.
ComponentIndex
def ComponentIndex(self) -> ComponentIndexGets the component index of this edge.
FaceAt
def FaceAt(self, index: int) -> SubDFaceRetrieve a SubDFace from this edge.
ToNurbsCurve
def ToNurbsCurve(self, clampEnds: bool) -> NurbsCurveGet a cubic, uniform, non-rational, NURBS curve that is on the edge's limit curve.
SubDEdgeTag
0 members
ON_SubDEdgeTag identifies the type of subdivision edge. Different tags use different subdivision algorithms to calculate the subdivision point.
SubDEdgeType
0 members
ON_SubDEdgeType describes a subdivision edge. ON_SubDEdgeType is typically used when generating text descriptions or filtering edges during selection processes. Do not confuse ON_SubDEdgeType and ON_SubDEdgeTag. The unique types are single bits and suitable for use in bitwise logic.
SubDEndCapStyle
0 members
ON_SubDEndCapStyle enumerates the type of end caps functions like ON_SubD::CreateCylinder will create. Use ON_SubDEndCapStyleFromUnsigned(integer value) to convert integer values to an ON_SubDEndCapStyle. Use ON_SubDEndCapStyleToString(end_cap_style) to convert ON_SubDEndCapStyle values to string descriptions.
SubDFace
13 members
A control face and its corresponding limit-surface region have different geometric properties.
Use surface points and normals for analysis on the modeled shape. Control-net centers and normals describe the editing structure.
Permanent link · Official RhinoCommon reference
EdgeCount
def EdgeCount(self) -> intNumber of edges for this face. Note that EdgeCount is always the same as VertexCount. Two properties are provided simply for clarity.
VertexCount
def VertexCount(self) -> intNumber of vertices for this face. Note that EdgeCount is always the same as VertexCount. Two properties are provided simply for clarity.
PerFaceColor
def PerFaceColor(self) -> AnyIf per-face color is "Empty", then this face does not have a custom color
LimitSurfaceCenterPoint
def LimitSurfaceCenterPoint(self) -> Point3dGet the limit surface point location at the center of the face
ControlNetCenterPoint
def ControlNetCenterPoint(self) -> Point3dThe face's control net center point is the average of the face's vertex control net points. This is the same point as the face's subdivision point.
SurfaceCenterNormal
def SurfaceCenterNormal(self) -> Vector3dGet the limit surface normal vector at the center of the face.
ControlNetCenterNormal
def ControlNetCenterNormal(self) -> Vector3dWhen the face's control net polygon is planar, the face's control net normal is a unit vector perpendicular to the plane that points outwards. If the control net polygon is not planar, the control net normal is control net normal is a unit vector that is the average of the control polygon's corner normals.
SurfaceCenterFrame
def SurfaceCenterFrame(self) -> PlaneGet the limit surface tangent plane at the center of the face. The plane's origin is the point on the limit surface at the center of the face. The plane's z axis is the limit surface normal vector at the center of the face.
ControlNetCenterFrame
def ControlNetCenterFrame(self) -> PlaneThe face's control net center frame is a plane with normal equal to ControlNetCenterNormal and origin equal to ControlNetCenterPoint. The x and y axes of the frame have no predictable relationship to the face or SubD control net topology.
ComponentIndex
def ComponentIndex(self) -> ComponentIndexGets the component index of this face.
EdgeAt
def EdgeAt(self, index: int) -> SubDEdgeGet an edge at a given index
EdgeDirectionMatchesFaceOrientation
def EdgeDirectionMatchesFaceOrientation(self, index: int) -> boolCheck if a given edge in this face has the same direction as the face orientation
VertexAt
def VertexAt(self, index: int) -> SubDVertexGet a vertex that this face uses by index
SubDFriendlyKnotType
0 members
ON_SubD::SubDFriendlyKnotType identifies the types of subd friendly NURBS knot vectors. SubD friendly NURBS curves and surfacaes are always cubic and nonrational. Any time there is a multiple knot, the 2nd derivative is zero at the corresponding parameter. SubD friendly NURBS curves are either periodic or have zero 2nd derivative at the ends.
SubDFromSurfaceMethods
0 members
ON_SubDFromSurfaceParameters::Method are ways to create a SubD from a surface.
SubDHashType
0 members
ON_SubDHashType used used to specify what type of SubD information is hashed (topology or geometry).
SubDPatchStyle
0 members
SubD::PatchStyle identifies the style of patch used to fill holes.
SubDSurfaceInterpolator
16 members
Interpolate some or all of the vertices limit surface positions in a SubD to specified locations. NB: It is recommended not to use these methods to interpolate more than 1000 vertices. Rhino.Geometry.SubD.SetVertexSurfacePoint(System.UInt32,Rhino.Geometry.Point3d)Rhino.Geometry.SubD.InterpolateSurfacePoints(Rhino.Geometry.Point3d[])Rhino.Geometry.SubD.InterpolateSurfacePoints(System.UInt32[],Rhino.Geometry.Point3d[])Rhino.Geometry.SubDVertex.SurfacePoint
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> NoneInitialize an empty SubDSurfaceInterpolator.
MaximumRecommendedInterpolatedVertexCount
MaximumRecommendedInterpolatedVertexCount: ClassVar[int]See the signature and official API documentation for this member.
ContextId
def ContextId(self) -> AnyThe context assigned id. This id is provided for applications using ON_SubDSurfaceInterpolator. It is not inspected or used in any part of the interpolation setup or calculations.
Clear
def Clear(self) -> NoneDestroys the information needed to solve the interpolation.
CreateFromMarkedVertices
def CreateFromMarkedVertices(subd: SubD, interpolatedVerticesMark: bool) -> tuple[SubDSurfaceInterpolator, int]Create an interpolator where all the marked vertices (unmarked if interpolatedVerticesMark is false) in the SubD are free vertices in the linear system used for interpolation, and the unmarked (marked if interpolatedVerticesMark is false) are fixed to their initial positions. Free vertices are can move as a result of the interpolation, and can receive an interpolation target location.
CreateFromSelectedVertices
def CreateFromSelectedVertices(subd: SubD) -> tuple[SubDSurfaceInterpolator, int]Create an interpolator where all the selected vertices in the SubD are free vertices in the linear system used for interpolation, and the unselected are fixed to their initial positions. Free vertices are can move as a result of the interpolation, and can receive an interpolation target location.
CreateFromSubD
def CreateFromSubD(subd: SubD) -> tuple[SubDSurfaceInterpolator, int]Create an interpolator where all the vertices in the SubD are free vertices in the linear system used for interpolation (i.e. can move as a result of the interpolation, and can receive an interpolation target location).
CreateFromVertexIdList
def CreateFromVertexIdList(subd: SubD, vertexIndices: Iterable[int]) -> tuple[SubDSurfaceInterpolator, int]Create an interpolator where all the listed vertices in the SubD are free vertices in the linear system used for interpolation, and the unselected are fixed to their initial positions. Free vertices are can move as a result of the interpolation, and can receive an interpolation target location.
Dispose
def Dispose(self) -> NoneActively reclaims unmanaged resources that this instance uses.
FixedVertexCount
def FixedVertexCount(self) -> intSee the signature and official API documentation for this member.
InterpolatedVertexCount
def InterpolatedVertexCount(self) -> intSee the signature and official API documentation for this member.
InterpolatedVertexIndex
def InterpolatedVertexIndex(self, vertexId: int) -> intSee the signature and official API documentation for this member.
IsInterpolatedVertex
def IsInterpolatedVertex(self, vertex: SubDVertex) -> bool
def IsInterpolatedVertex(self, vertexId: int) -> boolSee the signature and official API documentation for this member.
Solve
def Solve(self, surfacePoints: Iterable[Point3d]) -> boolSolve the interpolation system, given target interpolation locations for the free vertices in the system. Updates the subd referenced by this system so the corresponding surface points are at the locations given by surfacePoints.
Transform
def Transform(self, transform: Transform) -> NoneApply an arbitrary transformation to the target interpolation points.
VertexIdList
def VertexIdList(self) -> Sequence[int]See the signature and official API documentation for this member.
SubDTextureCoordinateType
0 members
ON_SubDTextureCoordinateType identifies the way ON_SubDMeshFragment texture coordinates are set from an ON_SubDFace.
SubDToBrepOptions
7 members
Options used for converting a SubD to a Brep
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, packFaces: bool, vertexProcess: Any) -> NoneCreate default options
Default
Default: ClassVar[SubDToBrepOptions]See the signature and official API documentation for this member.
DefaultPacked
DefaultPacked: ClassVar[SubDToBrepOptions]See the signature and official API documentation for this member.
DefaultUnpacked
DefaultUnpacked: ClassVar[SubDToBrepOptions]See the signature and official API documentation for this member.
PackFaces
def PackFaces(self) -> boolGet or sets the pack faces option.
ExtraordinaryVertexProcess
def ExtraordinaryVertexProcess(self) -> AnyGet or sets the extraordinary vertex process option.
Dispose
def Dispose(self) -> NoneActively reclaims unmanaged resources that this instance uses.
SubDVertex
12 members
A control-net vertex and its evaluated surface point describe different locations.
Moving a vertex influences a neighborhood. Smooth and corner tags change how that neighborhood is evaluated.
Permanent link · Official RhinoCommon reference
ControlNetPoint
def ControlNetPoint(self) -> Point3dLocation of the "control net" point that this SubDVertex represents
EdgeCount
def EdgeCount(self) -> intNumber of edges for this vertex
FaceCount
def FaceCount(self) -> intNumber of faces for this vertex
Next
def Next(self) -> SubDVertexNext vertex in linked list of vertices on this level
Previous
def Previous(self) -> SubDVertexPrevious vertex in linked list of vertices on this level
Tag
def Tag(self) -> SubDVertexTagidentifies the type of subdivision vertex
Edges
def Edges(self) -> Sequence[SubDEdge]All edges that this vertex is part of
ComponentIndex
def ComponentIndex(self) -> ComponentIndexGets the component index of this vertex.
EdgeAt
def EdgeAt(self, index: int) -> SubDEdgeRetrieve a SubDEdge from this vertex
FaceAt
def FaceAt(self, index: int) -> SubDFaceRetrieve a SubDFace from this vertex
SetControlNetPoint
def SetControlNetPoint(self, position: Point3d, bClearNeighborhoodCache: bool) -> boolChange the location of the "control net" point that this SubDVertex represents
SurfacePoint
def SurfacePoint(self) -> Point3dThe SubD surface point
SubDVertexFacetType
0 members
Summarizes the number of edges in faces in the whole object.
SubDVertexTag
0 members
ON_SubDVertexTag identifies the type of subdivision vertex. Different tags use different subdivision algorithms to determine where the subdivision point and limit point are located. There are topological constraints that restrict which tags can be assigned.
SumSurface
1 members
A sum surface combines two generating curves and inherits their parameter directions.
Speed and continuity depend on the generators. A rectangular domain does not imply uniform distances on the result.
Permanent link · Official RhinoCommon reference
Create
def Create(curve: Curve, extrusionDirection: Vector3d) -> SumSurface
def Create(curveA: Curve, curveB: Curve) -> SumSurfaceConstructs a new sum surface by extruding a curve in a specified direction.
Surface
66 members
A parametric surface maps (u, v) to 3D space. Parameters usually are not physical distances. A trimmed face can cover only part of its underlying surface.
Parameter derivatives determine local metric scale. A uniform UV grid can stretch or compress in 3D, requiring geometry-aware sampling for regular spatial distances.
Permanent link · Official RhinoCommon reference
IsSolid
def IsSolid(self) -> boolGets a values indicating whether a surface is solid.
IsSubDFriendly
def IsSubDFriendly(self) -> boolReturns true if the surface is a non-rational, uniform, natural or periodic, cubic NURBS surface. Otherwise, false is returned.
ClosestPoint
def ClosestPoint(self, testPoint: Point3d) -> tuple[bool, float, float]The outputs u and v are surface coordinates. Evaluate PointAt(u, v) for the corresponding 3D point; check success first.
Underlying-surface projection ignores trimming. Use IsPointOnFace or an appropriate Brep operation when holes and face boundaries must be respected.
ClosestSide
def ClosestSide(self, u: float, v: float) -> IsoStatusGets the side that is closest, in terms of 3D-distance, to a U and V parameter.
CreateExtrusion
def CreateExtrusion(profile: Curve, direction: Vector3d) -> SurfaceConstructs a surface by extruding a curve along a vector.
CreateExtrusionToPoint
def CreateExtrusionToPoint(profile: Curve, apexPoint: Point3d) -> SurfaceConstructs a surface by extruding a curve to a point.
CreatePeriodicSurface
def CreatePeriodicSurface(surface: Surface, direction: int) -> Surface
def CreatePeriodicSurface(surface: Surface, direction: int, bSmooth: bool) -> SurfaceConstructs a periodic surface from a base surface and a direction.
CreateRollingBallFillet
def CreateRollingBallFillet(surfaceA: Surface, flipA: bool, surfaceB: Surface, flipB: bool, radius: float, tolerance: float) -> Sequence[Surface]
def CreateRollingBallFillet(surfaceA: Surface, surfaceB: Surface, radius: float, tolerance: float) -> Sequence[Surface]
def CreateRollingBallFillet(surfaceA: Surface, uvA: Point2d, surfaceB: Surface, uvB: Point2d, radius: float, tolerance: float) -> Sequence[Surface]Constructs a rolling ball fillet between two surfaces.
CreateSoftEditSurface
def CreateSoftEditSurface(surface: Surface, uv: Point2d, delta: Vector3d, uLength: float, vLength: float, tolerance: float, fixEnds: bool) -> SurfaceCreates a soft edited surface from an existing surface using a smooth field of influence.
CreateTweenSurfacesWithSampling
def CreateTweenSurfacesWithSampling(surface0: Surface, surface1: Surface, numSurfaces: int, numSamples: int, tolerance: float) -> Sequence[Surface]Create tween surfaces that gradually transition between two bounding surfaces using point sampling.
CurvatureAt
def CurvatureAt(self, u: float, v: float) -> SurfaceCurvaturePrincipal curvatures describe extremal normal curvature at a regular point. Singular points need special handling.
Gaussian curvature is their product; mean curvature is half their sum. Signs depend on normal orientation.
Degree
def Degree(self, direction: int) -> intReturns the maximum algebraic degree of any span (or a good estimate if curve spans are not algebraic).
Domain
def Domain(self, direction: int) -> IntervalDirection 0 selects U and direction 1 selects V. Values need not measure physical length.
A rectangular domain can map to stretched curved geometry. Uniform UV grids are not generally uniform spatial grids.
Evaluate
def Evaluate(self, u: float, v: float, numberDerivatives: int) -> tuple[bool, Point3d, Sequence[Vector3d]]Evaluates a surface mathematically.
Extend
def Extend(self, direction: int, interval: Interval) -> bool
def Extend(self, edge: IsoStatus, extensionLength: float, smooth: bool) -> SurfaceAnalytically extends the surface to include the interval.
Fit
def Fit(self, uDegree: int, vDegree: int, fitTolerance: float) -> SurfaceFits a new surface through an existing surface.
FitCurveToSurface
def FitCurveToSurface(self, trimCurve3d: Curve, trimProjectionDir: Vector3d, tolerance: float, Knots: Iterable[float], divideIntoSections: bool, trimCurveOnSurface: Curve, splitCurve: Curve) -> tuple[Sequence[Curve], Curve, Curve]See the signature and official API documentation for this member.
FrameAt
def FrameAt(self, u: float, v: float) -> tuple[bool, Plane]A surface frame follows local parameter derivatives and the normal at (u,v).
Derivatives can degenerate near singularities. When placing sections on faces, check both frame validity and trim membership.
GetNextDiscontinuity
def GetNextDiscontinuity(self, direction: int, continuityType: Continuity, t0: float, t1: float) -> tuple[bool, float]
def GetNextDiscontinuity(self, direction: int, continuityType: Continuity, t0: float, t1: float, cosAngleTolerance: float, curvatureTolerance: float) -> tuple[bool, float]Searches for a derivative, tangent, or curvature discontinuity.
GetNurbsFormParameterFromSurfaceParameter
def GetNurbsFormParameterFromSurfaceParameter(self, surfaceS: float, surfaceT: float) -> tuple[bool, float, float]Translates a parameter from the current surface to the parameter space of the surface returned by Rhino.Geometry.Surface.ToNurbsSurface.
GetSpanVector
def GetSpanVector(self, direction: int) -> Sequence[float]Gets array of span "knots".
GetSurfaceParameterFromNurbsFormParameter
def GetSurfaceParameterFromNurbsFormParameter(self, nurbsS: float, nurbsT: float) -> tuple[bool, float, float]Translates a parameter from a value on the surface returned by Rhino.Geometry.Surface.ToNurbsSurface to the current surface.
GetSurfaceSize
def GetSurfaceSize(self) -> tuple[bool, float, float]Gets an estimate of the size of the rectangle that would be created if the 3d surface where flattened into a rectangle.
HasNurbsForm
def HasNurbsForm(self) -> intIs there a NURBS surface representation of this surface.
InterpolatedCurveOnSurface
def InterpolatedCurveOnSurface(self, points: Iterable[Point3d], tolerance: float) -> NurbsCurveConstructs an interpolated curve on a surface, using 3D points.
InterpolatedCurveOnSurfaceUV
def InterpolatedCurveOnSurfaceUV(self, points: Iterable[Point2d], tolerance: float) -> NurbsCurve
def InterpolatedCurveOnSurfaceUV(self, points: Iterable[Point2d], tolerance: float, closed: bool, closedSurfaceHandling: int) -> NurbsCurveReturns a curve that interpolates points on a surface. The interpolant lies on the surface.
IsAtSeam
def IsAtSeam(self, u: float, v: float) -> intTests if a surface parameter value is at a seam.
IsAtSingularity
def IsAtSingularity(self, u: float, v: float, exact: bool) -> boolTests if a surface parameter value is at a singularity.
IsClosed
def IsClosed(self, direction: int) -> boolGets a value indicating if the surface is closed in a direction.
IsCone
def IsCone(self) -> bool
def IsCone(self, tolerance: float) -> boolDetermines if the surface is a portion of a cone within RhinoMath.ZeroTolerance.
IsContinuous
def IsContinuous(self, continuityType: Continuity, u: float, v: float) -> boolTests continuity at a surface parameter value.
IsCylinder
def IsCylinder(self) -> bool
def IsCylinder(self, tolerance: float) -> boolDetermines if the surface is a portion of a cylinder within RhinoMath.ZeroTolerance.
IsIsoparametric
def IsIsoparametric(self, bbox: BoundingBox) -> IsoStatus
def IsIsoparametric(self, curve: Curve) -> IsoStatus
def IsIsoparametric(self, curve: Curve, curveDomain: Interval) -> IsoStatusDetermines if a 2d bounding box is isoparametric in the parameter space of this surface.
IsoCurve
def IsoCurve(self, direction: int, constantParameter: float) -> CurveAn isoparametric curve holds one surface coordinate fixed and varies the other.
It is not necessarily a shortest path or straight line. Use trim-aware face methods when curves must stop at face boundaries.
IsPeriodic
def IsPeriodic(self, direction: int) -> boolGets a value indicating if the surface is periodic in a direction (default is false).
IsPlanar
def IsPlanar(self) -> bool
def IsPlanar(self, tolerance: float) -> boolTests a surface to see if it is planar to zero tolerance.
IsSingular
def IsSingular(self, side: int) -> booltrue if surface side is collapsed to a point.
IsSphere
def IsSphere(self) -> bool
def IsSphere(self, tolerance: float) -> boolDetermines if the surface is a portion of a sphere within RhinoMath.ZeroTolerance.
IsTorus
def IsTorus(self) -> bool
def IsTorus(self, tolerance: float) -> boolDetermines if the surface is a portion of a torus within RhinoMath.ZeroTolerance.
LocalClosestPoint
def LocalClosestPoint(self, testPoint: Point3d, seedU: float, seedV: float) -> tuple[bool, float, float]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.
NormalAt
def NormalAt(self, u: float, v: float) -> Vector3dSurface normals depend on parameter orientation. For a BrepFace, account for face orientation when interpreting an outward normal.
At regular points parameter derivatives define an oriented normal. Singularities and reversed BrepFace orientation require explicit treatment.
Offset
def Offset(self, distance: float, tolerance: float) -> SurfaceOffsets follow the normal field. Large distances can introduce singularities and self-intersections.
Distance uses model units and sign depends on orientation. Check validity and local shape before interpreting an offset as usable thickness.
PointAt
def PointAt(self, u: float, v: float) -> Point3dEvaluate the underlying surface at (u,v). The point can lie outside a BrepFace's trimming region.
Use IsPointOnFace when placement must respect holes and trimmed boundaries. Domain membership alone is insufficient.
Pullback
def Pullback(self, curve3d: Curve, tolerance: float) -> Curve
def Pullback(self, curve3d: Curve, tolerance: float, curve3dSubdomain: Interval) -> CurvePulls a 3d curve back to the surface's parameter space.
Pushup
def Pushup(self, curve2d: Curve, tolerance: float) -> Curve
def Pushup(self, curve2d: Curve, tolerance: float, curve2dSubdomain: Interval) -> CurveComputes a 3d curve that is the composite of a 2d curve and the surface map.
Rebuild
def Rebuild(self, uDegree: int, vDegree: int, uPointCount: int, vPointCount: int) -> NurbsSurfaceRebuilds an existing surface to a given degree and point count.
RebuildOneDirection
def RebuildOneDirection(self, direction: int, pointCount: int, loftType: LoftType, refitTolerance: float) -> NurbsSurfaceRebuilds an existing surface with a new surface to a given point count in either the u or v directions independently.
RefitSimplySplitSurface
def RefitSimplySplitSurface(self, trimCurve3d: Curve, trimProjectionDir: Vector3d, tolerance: float, knotAdditionMode: RefitTrimKnotMode, numInsertKnots: int, Knots: Iterable[float], sectionMode: RefitTrimSectionMode, numNonTrimSpans: int, meetCurve: bool, oneSided: bool, PtActive: Point3d, outputSurface: bool, outputCurve: bool, numSections: int, lowerSurface: Iterable[Surface], upperSurface: Iterable[Surface], edgeCurve: Iterable[Curve], FitMeasurement: float, trimCurveOnSurface: Curve, splitCurve: Curve) -> tuple[bool, int, float, Curve, Curve]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.
RefitSplit
def RefitSplit(self, curve: Curve, trimProjectionDir: Vector3d, tolerance: float, Knots: Iterable[float], bMeetCurve: bool, divideIntoSections: bool, srfLower: Iterable[Surface], srfUpper: Iterable[Surface], edgeCurve: Iterable[Curve], trimCurveOnSurface: Curve, splitCurve: Curve) -> tuple[int, Curve, Curve]Splits the surface into two and refits the split edge
Reverse
def Reverse(self, direction: int) -> Surface
def Reverse(self, direction: int, inPlace: bool) -> SurfaceReverses parameterization Domain changes from [a,b] to [-b,-a]
SetDomain
def SetDomain(self, direction: int, domain: Interval) -> boolSets the domain in a direction.
ShortPath
def ShortPath(self, start: Point2d, end: Point2d, tolerance: float) -> CurveConstructs a geodesic between 2 points, used by ShortPath command in Rhino.
Smooth
def Smooth(self, smoothFactor: float, bXSmooth: bool, bYSmooth: bool, bZSmooth: bool, bFixBoundaries: bool, coordinateSystem: SmoothingCoordinateSystem) -> Surface
def Smooth(self, smoothFactor: float, bXSmooth: bool, bYSmooth: bool, bZSmooth: bool, bFixBoundaries: bool, coordinateSystem: SmoothingCoordinateSystem, plane: Plane) -> SurfaceSmooths a surface by averaging the positions of control points in a specified region.
SpanCount
def SpanCount(self, direction: int) -> intGets number of smooth nonempty spans in the parameter direction.
Split
def Split(self, direction: int, parameter: float) -> Sequence[Surface]Splits (divides) the surface into two parts at the specified parameter
ToBrep
def ToBrep(self) -> BrepConversion adds Brep topology. It does not turn an open surface into a closed solid.
A one-face Brep can retain naked edges. Check IsSolid and validity before operations requiring a volume boundary.
ToNurbsSurface
def ToNurbsSurface(self) -> NurbsSurface
def ToNurbsSurface(self, tolerance: float) -> tuple[NurbsSurface, int]Gets a NURBS surface representation of this surface. Default tolerance of 0.0 is used.
Transpose
def Transpose(self) -> Surface
def Transpose(self, inPlace: bool) -> SurfaceTransposing exchanges U and V. Stored UV data and orientation-sensitive interpretation can change.
Exchange coordinate components to preserve point correspondence. Reevaluate normals rather than assuming their previous direction is retained.
Trim
def Trim(self, u: Interval, v: Interval) -> SurfaceConstructs a sub-surface that covers the specified UV trimming domain.
TryGetCone
def TryGetCone(self) -> tuple[bool, Cone]
def TryGetCone(self, tolerance: float) -> tuple[bool, Cone]Tests a surface to see if it is a portion of a cone within RhinoMath.ZeroTolerance and return the cone.
TryGetCylinder
def TryGetCylinder(self) -> tuple[bool, Cylinder]
def TryGetCylinder(self, tolerance: float) -> tuple[bool, Cylinder]Tests a surface to see if it is a portion of a cylinder within RhinoMath.ZeroTolerance and return the cylinder.
TryGetFiniteCylinder
def TryGetFiniteCylinder(self, tolerance: float) -> tuple[bool, Cylinder]Tests a surface with the assumption that it might be a right circular cylinder and returns this geometry.
TryGetPlane
def TryGetPlane(self) -> tuple[bool, Plane]
def TryGetPlane(self, tolerance: float) -> tuple[bool, Plane]Tests a surface for planarity and return the plane.
TryGetSphere
def TryGetSphere(self) -> tuple[bool, Sphere]
def TryGetSphere(self, tolerance: float) -> tuple[bool, Sphere]Test a surface to see if it is a portion of a sphere and return the sphere.
TryGetTorus
def TryGetTorus(self) -> tuple[bool, Torus]
def TryGetTorus(self, tolerance: float) -> tuple[bool, Torus]Tests a surface to see if it is a portion of a torus within RhinoMath.ZeroTolerance and returns the torus.
VariableOffset
def VariableOffset(self, uMinvMin: float, uMinvMax: float, uMaxvMin: float, uMaxvMax: float, interiorParameters: Iterable[Point2d], interiorDistances: Iterable[float], tolerance: float) -> Surface
def VariableOffset(self, uMinvMin: float, uMinvMax: float, uMaxvMin: float, uMaxvMax: float, tolerance: float) -> SurfaceCopies 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.
SurfaceCurvature
8 members
Gaussian curvature has inverse-length-squared units. Mean and principal curvatures have inverse-length units.
At an umbilic point principal directions are not unique. Do not treat these directions as a stable global frame field.
Permanent link · Official RhinoCommon reference
UVPoint
def UVPoint(self) -> Point2dGets the UV location where the curvature was computed.
Point
def Point(self) -> Point3dGets the surface point at UV.
Normal
def Normal(self) -> Vector3dGets the surface normal at UV.
Gaussian
def Gaussian(self) -> floatGets the Gaussian curvature value at UV.
Mean
def Mean(self) -> floatGets the Mean curvature value at UV.
Direction
def Direction(self, direction: int) -> Vector3dGets the principal curvature direction vector.
Kappa
def Kappa(self, direction: int) -> floatGets the principal curvature values. Kappa(0) - Principal curvature with maximum absolute value Kappa(1) - Principal curvature with minimum absolute value
OsculatingCircle
def OsculatingCircle(self, direction: int) -> CircleComputes the osculating circle along the given direction.
SurfaceFilletBase
19 members
New interactive FilletSrf
Permanent link · Official RhinoCommon reference
CreateG2ChordalQuinticFilletSrf
def CreateG2ChordalQuinticFilletSrf(faceA: BrepFace, uvA: Point2d, faceB: BrepFace, uvB: Point2d, radius: float, tolerance: float, trimmedBrepsA: Iterable[Brep], trimmedBrepsB: Iterable[Brep], rail_degree: int, bTrim: bool, bExtend: bool, Fillets: Iterable[Brep]) -> boolCreates a surface fillet using G2 chordal Quintic arc approximations as sections
CreateNonRationalCubicArcsFilletSrf
def CreateNonRationalCubicArcsFilletSrf(faceA: BrepFace, uvA: Point2d, faceB: BrepFace, uvB: Point2d, radius: float, tolerance: float, trimmedBrepsA: Iterable[Brep], trimmedBrepsB: Iterable[Brep], rail_degree: int, bTrim: bool, bExtend: bool, Fillets: Iterable[Brep]) -> boolCreates a surface fillet using Non-rational Cubic arc approximations as sections
CreateNonRationalCubicFilletSrf
def CreateNonRationalCubicFilletSrf(faceA: BrepFace, uvA: Point2d, faceB: BrepFace, uvB: Point2d, radius: float, tolerance: float, trimmedBrepsA: Iterable[Brep], trimmedBrepsB: Iterable[Brep], rail_degree: int, TanSlider: float, bTrim: bool, bExtend: bool, Fillets: Iterable[Brep]) -> boolCreates a fillet using non-rational Cubic sections with a tangent slider
CreateNonRationalQuarticArcsFilletSrf
def CreateNonRationalQuarticArcsFilletSrf(faceA: BrepFace, uvA: Point2d, faceB: BrepFace, uvB: Point2d, radius: float, tolerance: float, trimmedBrepsA: Iterable[Brep], trimmedBrepsB: Iterable[Brep], rail_degree: int, bTrim: bool, bExtend: bool, Fillets: Iterable[Brep]) -> boolCreates a surface fillet using Non-rational Quartic arc approximations as sections
CreateNonRationalQuarticFilletSrf
def CreateNonRationalQuarticFilletSrf(faceA: BrepFace, uvA: Point2d, faceB: BrepFace, uvB: Point2d, radius: float, tolerance: float, trimmedBrepsA: Iterable[Brep], trimmedBrepsB: Iterable[Brep], rail_degree: int, TanSlider: float, InnerSlider: float, bTrim: bool, bExtend: bool, Fillets: Iterable[Brep]) -> boolCreates a fillet using non-rational Quartic sections with a tangent and inner slider
CreateNonRationalQuinticArcsFilletSrf
def CreateNonRationalQuinticArcsFilletSrf(faceA: BrepFace, uvA: Point2d, faceB: BrepFace, uvB: Point2d, radius: float, tolerance: float, trimmedBrepsA: Iterable[Brep], trimmedBrepsB: Iterable[Brep], rail_degree: int, bTrim: bool, bExtend: bool, Fillets: Iterable[Brep]) -> boolCreates a surface fillet using Non-rational Quintic arc approximations as sections
CreateNonRationalQuinticFilletSrf
def CreateNonRationalQuinticFilletSrf(faceA: BrepFace, uvA: Point2d, faceB: BrepFace, uvB: Point2d, radius: float, tolerance: float, trimmedBrepsA: Iterable[Brep], trimmedBrepsB: Iterable[Brep], rail_degree: int, TanSlider: float, InnerSlider: float, bTrim: bool, bExtend: bool, Fillets: Iterable[Brep]) -> boolCreates a fillet using non-rational Quintic sections with a tangent and inner slider
CreateRationalArcsFilletSrf
def CreateRationalArcsFilletSrf(faceA: BrepFace, uvA: Point2d, faceB: BrepFace, uvB: Point2d, radius: float, tolerance: float, trimmedBrepsA: Iterable[Brep], trimmedBrepsB: Iterable[Brep], rail_degree: int, bTrim: bool, bExtend: bool, Fillets: Iterable[Brep]) -> boolCreates a standard surface fillet using rational arc sections
Dispose
def Dispose(self) -> NoneActively reclaims unmanaged resources that this instance uses.
G2ChordalQuintic
def G2ChordalQuintic(self, railDegree: int, bExtend: bool, Fillets: Iterable[Brep]) -> boolmake fillet surfaces and hack them up to active pieces. Adjusts cross sections
IsInitialized
def IsInitialized(self) -> boolCheck to see if the fillet is properly initialized. If it is not, then the selected curves, surfaces, and/or radius must be adjusted in some way before creating the fillet
NonRationalCubic
def NonRationalCubic(self, railDegree: int, TanSlider: float, bExtend: bool, Fillets: Iterable[Brep]) -> boolmake fillet surfaces and hack them up to active pieces. Adjusts cross sections
NonRationalCubicArcs
def NonRationalCubicArcs(self, railDegree: int, bExtend: bool, Fillets: Iterable[Brep]) -> boolmake fillet surfaces and hack them up to active pieces. Adjusts cross sections
NonRationalQuartic
def NonRationalQuartic(self, railDegree: int, TanSlider: float, InnerSlider: float, bExtend: bool, Fillets: Iterable[Brep]) -> boolmake fillet surfaces and hack them up to active pieces. Adjusts cross sections
NonRationalQuarticArcs
def NonRationalQuarticArcs(self, railDegree: int, bExtend: bool, Fillets: Iterable[Brep]) -> boolmake fillet surfaces and hack them up to active pieces. Adjusts cross sections
NonRationalQuintic
def NonRationalQuintic(self, railDegree: int, TanSlider: float, InnerSlider: float, bExtend: bool, Fillets: Iterable[Brep]) -> boolmake fillet surfaces and hack them up to active pieces. Adjusts cross sections
NonRationalQuinticArcs
def NonRationalQuinticArcs(self, railDegree: int, bExtend: bool, Fillets: Iterable[Brep]) -> boolmake fillet surfaces and hack them up to active pieces. Adjusts cross sections
RationalArcs
def RationalArcs(self, railDegree: int, bExtend: bool, Fillets: Iterable[Brep]) -> boolmake fillet surfaces and hack them up to active pieces. Adjusts cross sections
TrimBreps
def TrimBreps(self, bExtend: bool, TrimmedBreps0: Iterable[Brep], TrimmedBreps1: Iterable[Brep]) -> boolIf the two input breps are the same, TrimmedBreps[1] will be empty. The constructor idoes everything necessary for this to be called. Calles to the various fillet creation members will not change the result.
SurfaceProxy
0 members
Provides a base class to brep faces and other surface proxies.
SweepBlend
0 members
Blend types for creating swept surfaces
SweepFrame
0 members
Frame types for creating swept surfaces
SweepMiter
0 members
Miter types for creating swept surfaces
SweepOneRail
18 members
Utility class for generating Breps by sweeping cross section curves over a single rail curve. Note, this class has been superseded by the Rhino.Geometry.Brep.CreateFromSweep static functions.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> NoneSee the signature and official API documentation for this member.
IsFreeform
def IsFreeform(self) -> boolSee the signature and official API documentation for this member.
IsRoadlike
def IsRoadlike(self) -> boolSee the signature and official API documentation for this member.
IsRoadlikeTop
def IsRoadlikeTop(self) -> boolSee the signature and official API documentation for this member.
IsRoadlikeFront
def IsRoadlikeFront(self) -> boolSee the signature and official API documentation for this member.
IsRoadlineRight
def IsRoadlineRight(self) -> boolSee the signature and official API documentation for this member.
SweepTolerance
def SweepTolerance(self) -> floatSee the signature and official API documentation for this member.
AngleToleranceRadians
def AngleToleranceRadians(self) -> floatSee the signature and official API documentation for this member.
MiterType
def MiterType(self) -> int0: don't miter, 1: intersect surfaces and trim sweeps, 2: rotate shapes at kinks and don't trim.
ClosedSweep
def ClosedSweep(self) -> boolIf the input rail is closed, ClosedSweep determines if the swept breps will also be closed.
GlobalShapeBlending
def GlobalShapeBlending(self) -> boolIf true, the sweep is linearly blended from one end to the other, creating sweeps that taper from one cross-section curve to the other. If false, the sweep stays constant at the ends and changes more rapidly in the middle.
PerformSweep
def PerformSweep(self, rail: Curve, crossSection: Curve) -> Sequence[Brep]
def PerformSweep(self, rail: Curve, crossSection: Curve, crossSectionParameter: float) -> Sequence[Brep]
def PerformSweep(self, rail: Curve, crossSections: Iterable[Curve]) -> Sequence[Brep]
def PerformSweep(self, rail: Curve, crossSections: Iterable[Curve], crossSectionParameters: Iterable[float]) -> Sequence[Brep]See the signature and official API documentation for this member.
PerformSweepRebuild
def PerformSweepRebuild(self, rail: Curve, crossSection: Curve, crossSectionParameter: float, rebuildCount: int) -> Sequence[Brep]
def PerformSweepRebuild(self, rail: Curve, crossSection: Curve, rebuildCount: int) -> Sequence[Brep]
def PerformSweepRebuild(self, rail: Curve, crossSections: Iterable[Curve], crossSectionParameters: Iterable[float], rebuildCount: int) -> Sequence[Brep]
def PerformSweepRebuild(self, rail: Curve, crossSections: Iterable[Curve], rebuildCount: int) -> Sequence[Brep]See the signature and official API documentation for this member.
PerformSweepRefit
def PerformSweepRefit(self, rail: Curve, crossSection: Curve, crossSectionParameter: float, refitTolerance: float) -> Sequence[Brep]
def PerformSweepRefit(self, rail: Curve, crossSection: Curve, refitTolerance: float) -> Sequence[Brep]
def PerformSweepRefit(self, rail: Curve, crossSections: Iterable[Curve], crossSectionParameters: Iterable[float], refitTolerance: float) -> Sequence[Brep]
def PerformSweepRefit(self, rail: Curve, crossSections: Iterable[Curve], refitTolerance: float) -> Sequence[Brep]See the signature and official API documentation for this member.
SetRoadlikeUpDirection
def SetRoadlikeUpDirection(self, up: Vector3d) -> NoneSee the signature and official API documentation for this member.
SetToRoadlikeFront
def SetToRoadlikeFront(self) -> NoneSee the signature and official API documentation for this member.
SetToRoadlikeRight
def SetToRoadlikeRight(self) -> NoneSee the signature and official API documentation for this member.
SetToRoadlikeTop
def SetToRoadlikeTop(self) -> NoneSee the signature and official API documentation for this member.
SweepRebuild
0 members
Rebuild types for creating swept surfaces
SweepTwoRail
10 members
Utility class for generating Breps by sweeping cross section curves over two rail curves. Note, this class has been superseded by the Rhino.Geometry.Brep.CreateFromSweep static functions.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> NoneSee the signature and official API documentation for this member.
SweepTolerance
def SweepTolerance(self) -> floatGets or sets the sweeping tolerance.
AngleToleranceRadians
def AngleToleranceRadians(self) -> floatGets or sets the angle tolerance in radians.
MaintainHeight
def MaintainHeight(self) -> boolRemoves the association between the height scaling from the width scaling.
ClosedSweep
def ClosedSweep(self) -> boolIf the input rails are closed, ClosedSweep determines if the swept Breps will also be closed.
AutoAdjust
def AutoAdjust(self) -> boolSet to true to have shape curves adjusted, sorted, and matched automatically. This will produce results comparable to Rhino's Sweep2 command. Set to false to not have shape curves adjusted, sorted, and matched automatically.
UseLegacySweeper
def UseLegacySweeper(self) -> boolSet to true if you want to use the legacy, low-level sweeper found in earlier versions of Rhino.
PerformSweep
def PerformSweep(self, rail1: Curve, rail2: Curve, crossSection: Curve) -> Sequence[Brep]
def PerformSweep(self, rail1: Curve, rail2: Curve, crossSection: Curve, crossSectionParameterRail1: float, crossSectionParameterRail2: float) -> Sequence[Brep]
def PerformSweep(self, rail1: Curve, rail2: Curve, crossSections: Iterable[Curve]) -> Sequence[Brep]
def PerformSweep(self, rail1: Curve, rail2: Curve, crossSections: Iterable[Curve], crossSectionParameters1: Iterable[float], crossSectionParameters2: Iterable[float]) -> Sequence[Brep]Sweep2 function that fits a surface through profile curves that define the surface cross-sections and two curves that defines a surface edge.
PerformSweepRebuild
def PerformSweepRebuild(self, rail1: Curve, rail2: Curve, crossSection: Curve, crossSectionParameterRail1: float, crossSectionParameterRail2: float, rebuildCount: int) -> Sequence[Brep]
def PerformSweepRebuild(self, rail1: Curve, rail2: Curve, crossSection: Curve, rebuildCount: int) -> Sequence[Brep]
def PerformSweepRebuild(self, rail1: Curve, rail2: Curve, crossSections: Iterable[Curve], crossSectionParametersRail1: Iterable[float], crossSectionParametersRail2: Iterable[float], rebuildCount: int) -> Sequence[Brep]
def PerformSweepRebuild(self, rail1: Curve, rail2: Curve, crossSections: Iterable[Curve], rebuildCount: int) -> Sequence[Brep]Sweep2 function that fits a surface through profile curves that define the surface cross-sections and two curves that defines a surface edge.
PerformSweepRefit
def PerformSweepRefit(self, rail1: Curve, rail2: Curve, crossSection: Curve, crossSectionParameterRail1: float, crossSectionParameterRail2: float, refitTolerance: float) -> Sequence[Brep]
def PerformSweepRefit(self, rail1: Curve, rail2: Curve, crossSection: Curve, refitTolerance: float) -> Sequence[Brep]
def PerformSweepRefit(self, rail1: Curve, rail2: Curve, crossSections: Iterable[Curve], crossSectionParametersRail1: Iterable[float], crossSectionParametersRail2: Iterable[float], refitTolerance: float) -> Sequence[Brep]
def PerformSweepRefit(self, rail1: Curve, rail2: Curve, crossSections: Iterable[Curve], refitTolerance: float) -> Sequence[Brep]Sweep2 function that fits a surface through profile curves that define the surface cross-sections and two curves that defines a surface edge.
TextDot
6 members
A text dot is a spatial label rather than curve or surface geometry.
Use its point for positioning. Use text-outline APIs when actual text geometry is required for fabrication.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self, text: str, location: Point3d) -> NoneInitializes a new text dot based on the text and the location.
Point
def Point(self) -> Point3dGets or sets the position of the text dot.
Text
def Text(self) -> strGets or sets the primary text of the text dot.
SecondaryText
def SecondaryText(self) -> strGets or sets the secondary text of the text dot.
FontHeight
def FontHeight(self) -> intHeight of font used for displaying the dot
FontFace
def FontFace(self) -> strFont face used for displaying the dot
TextEntity
18 members
Text geometry depends on font, layout, plane, and content.
After conversion to outlines, check closure and holes before building regions. Display bounds do not replace geometric topology checks.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> NoneInitializes a new instance of the Rhino.Geometry.TextEntity class.
Justification
def Justification(self) -> TextJustificationGets or sets the justification of text in relation to its base point.
TextHorizontalAlignment
def TextHorizontalAlignment(self) -> AnySee the signature and official API documentation for this member.
TextVerticalAlignment
def TextVerticalAlignment(self) -> AnySee the signature and official API documentation for this member.
TextOrientation
def TextOrientation(self) -> AnySee the signature and official API documentation for this member.
Create
def Create(text: str, plane: Plane, style: DimensionStyle, wrapped: bool, rectWidth: float, rotationRadians: float) -> TextEntityCreate Text geometry or null if input is invalid
CreateCurves
def CreateCurves(self, dimstyle: DimensionStyle, allowOpen: bool, smallCapsScale: float=..., spacing: float=...) -> Sequence[Curve]Returns the outline curves.
CreateCurvesGrouped
def CreateCurvesGrouped(self, dimstyle: DimensionStyle, allowOpen: bool, smallCapsScale: float, spacing: float) -> Sequence[Sequence[Curve]]Creates planar curve from text outline curves. Curves are grouped such that each element in the list being returned represents a single character.
CreateExtrusions
def CreateExtrusions(self, dimstyle: DimensionStyle, height: float, smallCapsScale: float=..., spacing: float=...) -> Sequence[Extrusion]Creates extrusions from the outline curves with specified height.
CreateExtrusionsGrouped
def CreateExtrusionsGrouped(self, dimstyle: DimensionStyle, smallCapsScale: float, height: float, spacing: float) -> Sequence[Sequence[Extrusion]]Creates 3d Breps from text outline curves. Breps are grouped such that each element in the list being returned represents a single character.
CreatePolySurfaces
def CreatePolySurfaces(self, dimstyle: DimensionStyle, height: float, smallCapsScale: float=..., spacing: float=...) -> Sequence[Brep]Creates breps from the outline curves with specified height.
CreatePolysurfacesGrouped
def CreatePolysurfacesGrouped(self, dimstyle: DimensionStyle, smallCapsScale: float, height: float, spacing: float) -> Sequence[Sequence[Brep]]Creates 3d Breps from text outline curves. Breps are grouped such that each element in the list being returned represents a single character.
CreateSurfaces
def CreateSurfaces(self, dimstyle: DimensionStyle, smallCapsScale: float=..., spacing: float=...) -> Sequence[Brep]Creates planar breps from the outline curves.
CreateSurfacesGrouped
def CreateSurfacesGrouped(self, dimstyle: DimensionStyle, smallCapsScale: float, spacing: float) -> Sequence[Sequence[Brep]]Creates planar Breps from text outline curves. Breps are grouped such that each element in the list being returned represents a single character.
CreateWithRichText
def CreateWithRichText(richTextString: str, plane: Plane, style: DimensionStyle, wrapped: bool, rectWidth: float, rotationRadians: float) -> TextEntityCreate RichText geometry or null if input is invalid
Explode
def Explode(self) -> Sequence[Curve]Explodes this text entity into an array of curves.
GetTextTransform
def GetTextTransform(self, textscale: float, dimstyle: DimensionStyle) -> TransformGet the transform for this text object's text geometry
Transform
def Transform(self, transform: Transform, style: DimensionStyle) -> bool
def Transform(self, xform: Transform) -> boolTransform the object by a 4x4 transform matrix and change text height override to accommodate scaling in the transform if necessary
TextJustification
0 members
Specifies enumerated constants used to indicate the internal alignment and justification of text.
TextRunType
0 members
See the signature and official API documentation for this member.
Torus
10 members
A torus revolves a circle around an axis in its plane. Radius relationships determine its geometric form.
Special radius choices can introduce singular or self-intersecting cases. Validate the object and converted topology before treating it as a solid.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, basePlane: Plane, majorRadius: float, minorRadius: float) -> NoneSee the signature and official API documentation for this member.
Unset
Unset: ClassVar[Torus]See the signature and official API documentation for this member.
IsValid
def IsValid(self) -> boolGets a value indicating whether this torus is valid.
Plane
def Plane(self) -> PlaneGets or sets the plane for the torus large circle.
MajorRadius
def MajorRadius(self) -> floatGets or sets the radius of the circle that lies at the heart of the torus.
MinorRadius
def MinorRadius(self) -> floatGets or sets the radius of the torus section.
EpsilonEquals
def EpsilonEquals(self, other: Torus, epsilon: float) -> boolCheck that all values in other are within epsilon of the values in this
ToBrep
def ToBrep(self) -> BrepConverts this torus to a Brep. This is synonymous with calling Rhino.Geometry.Brep.CreateFromTorus(Rhino.Geometry.Torus).
ToNurbsSurface
def ToNurbsSurface(self) -> NurbsSurfaceConverts this torus to its NURBS surface representation. This is synonymous with calling Rhino.Geometry.NurbsSurface.CreateFromTorus(Rhino.Geometry.Torus).
ToRevSurface
def ToRevSurface(self) -> RevSurfaceConverts this torus to a surface of revolution representation. This is synonymous with calling Rhino.Geometry.RevSurface.CreateFromTorus(Rhino.Geometry.Torus).
Transform
71 members
Transformations use homogeneous coordinates. Composition order matters: translating then rotating usually differs from rotating then translating. Non-uniform scaling can change angles.
Points and direction vectors respond differently to translation. Singular transforms such as projection lose information and cannot always be inverted.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, diagonalValue: float) -> None
def __init__(self, value: Transform) -> NoneSee the signature and official API documentation for this member.
Identity
Identity: ClassVar[Transform]See the signature and official API documentation for this member.
ZeroTransformation
ZeroTransformation: ClassVar[Transform]See the signature and official API documentation for this member.
Unset
Unset: ClassVar[Transform]See the signature and official API documentation for this member.
M00
def M00(self) -> floatGets or sets this[0,0].
M01
def M01(self) -> floatGets or sets this[0,1].
M02
def M02(self) -> floatGets or sets this[0,2].
M03
def M03(self) -> floatGets or sets this[0,3].
M10
def M10(self) -> floatGets or sets this[1,0].
M11
def M11(self) -> floatGets or sets this[1,1].
M12
def M12(self) -> floatGets or sets this[1,2].
M13
def M13(self) -> floatGets or sets this[1,3].
M20
def M20(self) -> floatGets or sets this[2,0].
M21
def M21(self) -> floatGets or sets this[2,1].
M22
def M22(self) -> floatGets or sets this[2,2].
M23
def M23(self) -> floatGets or sets this[2,3].
M30
def M30(self) -> floatGets or sets this[3,0].
M31
def M31(self) -> floatGets or sets this[3,1].
M32
def M32(self) -> floatGets or sets this[3,2].
M33
def M33(self) -> floatGets or sets this[3,3].
IsIdentity
def IsIdentity(self) -> boolReturn true if this Transform is the identity transform
IsValid
def IsValid(self) -> boolGets a value indicating whether or not this Transform is a valid matrix. A valid transform matrix is not allowed to have any invalid numbers.
IsZero
def IsZero(self) -> boolTrue if matrix is Zero4x4, ZeroTransformation, or some other type of zero. The value xform[3][3] can be anything.
IsZero4x4
def IsZero4x4(self) -> boolTrue if all values are 0
IsZeroTransformation
def IsZeroTransformation(self) -> boolTrue if all values are 0, except for M33 which is 1.
SimilarityType
def SimilarityType(self) -> TransformSimilarityTypeGets a value indicating whether or not the Transform maintains similarity. The easiest way to think of Similarity is that any circle, when transformed, remains a circle. Whereas a non-similarity Transform deforms circles into ellipses.
RigidType
def RigidType(self) -> TransformRigidTypeGets a value indicating whether or not the Transform is rigid. A rigid transformation can be broken into a proper rotation and a translation, while an isometry transformation could also include a reflection.
IsAffine
def IsAffine(self) -> boolTests for an affine transformation. A transformation is affine if it is valid and its last row is [0, 0, 0, 1]. An affine transformation can be broken into a linear transformation and a translation.
IsLinear
def IsLinear(self) -> boolTests for a linear transformation. A transformation is affine if it is valid and its last row is [0, 0, 0, 1]. If in addition its last column is ( 0, 0, 0, 1)^T then it is linear. An affine transformation can be broken into a linear transformation and a translation.
IsRotation
def IsRotation(self) -> boolReturns true if this is a proper rotation.
Determinant
def Determinant(self) -> floatThe determinant of this 4x4 matrix.
Affineize
def Affineize(self) -> NoneReplaces the last row with (0 0 0 1), discarding any perspective part of this transform
ChangeBasis
def ChangeBasis(P0: Point3d, X0: Vector3d, Y0: Vector3d, Z0: Vector3d, P1: Point3d, X1: Vector3d, Y1: Vector3d, Z1: Vector3d) -> Transform
def ChangeBasis(plane0: Plane, plane1: Plane) -> Transform
def ChangeBasis(X0: Vector3d, Y0: Vector3d, Z0: Vector3d, X1: Vector3d, Y1: Vector3d, Z1: Vector3d) -> TransformChangeBasis converts coordinate descriptions between frames, rather than orienting geometry from one plane to another.
Local coordinates and world coordinates can describe the same spatial point. Check source and destination order using a known point.
Clone
def Clone(self) -> TransformReturns a deep copy of the transform. For languages that treat structures as value types, this can be accomplished by a simple assignment.
CompareTo
def CompareTo(self, other: Transform) -> intCompares this transform with another transform. M33 has highest value, then M32, etc..
DecomposeAffine
DecomposeAffine.Overloads[CLR signature](...)Rhino 8 Python.NET needs explicit CLR selection for this ambiguous output-only overload group.
Choose the required decomposition through Overloads and use its matching tuple. Decomposition conventions and available result shapes differ.
DecomposeRigid
def DecomposeRigid(self, tolerance: float) -> tuple[TransformRigidType, Vector3d, Transform]Decomposes a rigid transformation. The transformation must be affine.
DecomposeSimilarity
def DecomposeSimilarity(self, tolerance: float) -> tuple[TransformSimilarityType, Vector3d, float, Transform]Decomposes a similarity transformation. The transformation must be affine. A similarity transformation can be broken into a sequence of a dilation, translation, rotation, and a reflection.
DecomposeSymmetric
def DecomposeSymmetric(self) -> tuple[bool, Transform, Vector3d]A Symmetric linear transformation can be decomposed A = Q * Diag * Q ^ T, where Diag is a diagonal transformation. Diag[i][i] is an eigenvalue of A and the i-th column of Q is a corresponding unit length eigenvector. Note, this transformation must be Linear and Symmetric.
DecomposeTextureMapping
def DecomposeTextureMapping(self) -> tuple[Vector3d, Vector3d, Vector3d]Decomposition of a uvw transform into components
Diagonal
def Diagonal(d0: float, d1: float, d2: float) -> Transform
def Diagonal(diagonal: Vector3d) -> TransformConstructs a new transformation with diagonal (d0,d1,d2,1.0).
Equals
def Equals(self, other: Transform) -> bool
def Equals(self, obj: Any) -> boolDetermines if another transform equals this transform value.
GetEulerZYZ
def GetEulerZYZ(self) -> tuple[bool, float, float, float]Find the Euler angles for a rotation transformation.
GetHashCode
def GetHashCode(self) -> intGets a non-unique hashing code for this transform.
GetQuaternion
def GetQuaternion(self) -> tuple[bool, Quaternion]If this transform is a proper rotation, then find the equivalent quaternion.
GetYawPitchRoll
def GetYawPitchRoll(self) -> tuple[bool, float, float, float]Find the Tait-Byran angles (also loosely called Euler angles) for a rotation transformation.
IsRigid
def IsRigid(self, tolerance: float) -> TransformRigidTypeGets a value indicating whether or not the Transform is rigid. A rigid transformation can be broken into a proper rotation and a translation, while an isometry transformation could also include a reflection.
IsSimilarity
def IsSimilarity(self, tolerance: float) -> TransformSimilarityTypeGets a value indicating whether or not the Transform maintains similarity. A similarity transformation can be broken into a sequence of a dilation, translation, rotation, and a reflection.
IsZeroTransformationWithTolerance
def IsZeroTransformationWithTolerance(self, zeroTolerance: float) -> boolTrue if all values are 0 within tolerance, except for M33 which is exactly 1.
IsZeroTransformaton
def IsZeroTransformaton(self, zeroTolerance: float) -> boolTrue if all values are 0 within tolerance, except for M33 which is exactly 1.
Linearize
def Linearize(self) -> NoneAffinitize() and replaces the last column with (0 0 0 1)^T, discarding any translation part of this transform.
Mirror
def Mirror(mirrorPlane: Plane) -> Transform
def Mirror(pointOnMirrorPlane: Point3d, normalToMirrorPlane: Vector3d) -> TransformConstructs a new Mirror transformation.
Multiply
def Multiply(a: Transform, b: Transform) -> TransformComposition is ordered. For A*B applied to a point, B acts first, followed by A.
Translation and rotation generally do not commute. Test composition on a known point and frame when assembling transforms from multiple sources.
Rhino 8 Python example · geometry in memory
import Rhino.Geometry as rg
translate = rg.Transform.Translation(10, 0, 0)
scale = rg.Transform.Scale(rg.Point3d(0, 0, 0), 2)
combined = rg.Transform.Multiply(translate, scale)
p = rg.Point3d(1, 0, 0)
p.Transform(combined)
assert abs(p.X - 12) < 1e-9Orthogonalize
def Orthogonalize(self, tolerance: float) -> boolForce the linear part of this transformation to be a rotation (or a rotation with reflection). Use DecomposeRigid(T,R) to find the nearest rotation.
PlanarProjection
def PlanarProjection(plane: Plane) -> TransformConstructs a projection transformation.
PlaneToPlane
def PlaneToPlane(plane0: Plane, plane1: Plane) -> TransformPlaneToPlane moves geometry from one plane frame onto another.
This active transform differs from ChangeBasis, which converts coordinate descriptions. Choose according to whether geometry moves or only its coordinates change frame.
ProjectAlong
def ProjectAlong(plane: Plane, direction: Vector3d) -> TransformConstruct a projection onto a plane along a specific direction.
Rotation
def Rotation(angleRadians: float, rotationAxis: Vector3d, rotationCenter: Point3d) -> Transform
def Rotation(angleRadians: float, rotationCenter: Point3d) -> Transform
def Rotation(sinAngle: float, cosAngle: float, rotationAxis: Vector3d, rotationCenter: Point3d) -> Transform
def Rotation(startDirection: Vector3d, endDirection: Vector3d, rotationCenter: Point3d) -> Transform
def Rotation(x0: Vector3d, y0: Vector3d, z0: Vector3d, x1: Vector3d, y1: Vector3d, z1: Vector3d) -> TransformRotations depend on axis, angle, and sometimes center. Angle-based overloads generally use radians.
Read the selected overload: direction alignment and angle-axis rotation express different inputs. Rotation about a distant center also moves positions.
RotationZYX
def RotationZYX(yaw: float, pitch: float, roll: float) -> TransformCreate rotation transformation From Tait-Byran angles (also loosely known as Euler angles).
RotationZYZ
def RotationZYZ(alpha: float, beta: float, gamma: float) -> TransformCreate rotation transformation From Euler angles.
Scale
def Scale(anchor: Point3d, scaleFactor: float) -> Transform
def Scale(plane: Plane, xScaleFactor: float, yScaleFactor: float, zScaleFactor: float) -> TransformUniform scaling preserves angles; nonuniform scaling generally changes them. Negative factors can reverse orientation.
Factors are dimensionless. Verify handedness, normals, and solid orientation after reflections or a negative determinant transform.
Shear
def Shear(plane: Plane, x: Vector3d, y: Vector3d, z: Vector3d) -> TransformConstructs a Shear transformation.
TextureMapping
def TextureMapping(offset: Vector3d, repeat: Vector3d, rotation: Vector3d) -> TransformConstruct a UVW Transform from components.
ToDoubleArray
def ToDoubleArray(self, rowDominant: bool) -> Sequence[float]Return the matrix as a linear array of 16 double values.
ToFloatArray
def ToFloatArray(self, rowDominant: bool) -> Sequence[float]Return the matrix as a linear array of 16 float values.
ToString
def ToString(self) -> strReturns a string representation of this transform.
TransformBoundingBox
def TransformBoundingBox(self, bbox: BoundingBox) -> BoundingBoxComputes a new bounding box that is the smallest axis aligned bounding box that contains the transformed result of its 8 original corner points.
TransformList
def TransformList(self, points: Iterable[Point3d]) -> Sequence[Point3d]Given a list, an array or any enumerable set of points, computes a new array of transformed points.
Translation
def Translation(dx: float, dy: float, dz: float) -> Transform
def Translation(motion: Vector3d) -> TransformTranslation moves positions by a displacement while leaving pure directions unchanged.
Homogeneous coordinates distinguish positions and directions. Ensure displacement coordinates use the same model units as the geometry.
Transpose
def Transpose(self) -> TransformFlip row/column values
TryGetInverse
def TryGetInverse(self) -> tuple[bool, Transform]Only nonsingular transforms have a unique inverse. Check success before using the output.
Projection and zero scaling lose information. Near-singular transforms can amplify floating-point errors even when inversion succeeds.
TransformRigidType
0 members
Lists all possible outcomes for rigid transformation.
TransformSimilarityType
0 members
Lists all possible outcomes for transform similarity.
Triangle3d
39 members
Collinear or coincident triangle vertices produce zero area and degenerate barycentric calculations.
Very thin triangles can also be numerically sensitive. Validate before using triangles for normals, interpolation, or collision predicates.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, a: Point3d, b: Point3d, c: Point3d) -> NoneSee the signature and official API documentation for this member.
A
def A(self) -> Point3dGets the first triangle corner.
B
def B(self) -> Point3dGets the second triangle corner.
C
def C(self) -> Point3dGets the third triangle corner.
Circumcircle
def Circumcircle(self) -> CircleGets the circumcircle of this triangle.
BoundingBox
def BoundingBox(self) -> BoundingBoxGets the bounding box of this triangle.
AngleA
def AngleA(self) -> floatGets the angle at the A corner.
AngleB
def AngleB(self) -> floatGets the angle at the B corner.
AngleC
def AngleC(self) -> floatGets the angle at the C corner.
AB
def AB(self) -> LineGets the triangle edge connecting the A and B corners.
BC
def BC(self) -> LineGets the triangle edge connecting the B and C corners.
CA
def CA(self) -> LineGets the triangle edge connecting the C and A corners.
MedianA
def MedianA(self) -> LineGets the median line starting at corner A.
MedianB
def MedianB(self) -> LineGets the median line starting at corner B.
MedianC
def MedianC(self) -> LineGets the median line starting at corner C.
AltitudeA
def AltitudeA(self) -> LineGets the altitude line starting at corner A.
AltitudeB
def AltitudeB(self) -> LineGets the altitude line starting at corner B.
AltitudeC
def AltitudeC(self) -> LineGets the altitude line starting at corner C.
PerpendicularAB
def PerpendicularAB(self) -> LineGets the perpendicular bisector for edge AB.
PerpendicularBC
def PerpendicularBC(self) -> LineGets the perpendicular bisector for edge BC.
PerpendicularCA
def PerpendicularCA(self) -> LineGets the perpendicular bisector for edge CA.
Perimeter
def Perimeter(self) -> floatGets the perimeter of this triangle. This is the sum of the lengths of all edges.
Area
def Area(self) -> floatGets the area inside this triangle.
AreaCenter
def AreaCenter(self) -> Point3dGets the triangle area centroid.
Orthocenter
def Orthocenter(self) -> Point3dGets the triangle orthocenter.
Circumcenter
def Circumcenter(self) -> Point3dGets the triangle circumcenter.
BarycentricCoordsAt
def BarycentricCoordsAt(self, point: Point3d) -> tuple[Point2d, float]Gets the projection of a point onto the barycentric coordinates.
ClosestParameterOnBoundary
def ClosestParameterOnBoundary(self, point: Point3d) -> floatGets the parameter on the triangle boundary closest to a test point.
ClosestPointOnBoundary
def ClosestPointOnBoundary(self, point: Point3d) -> Point3dGets the point on the triangle boundary closest to a test point.
PointAlongBoundary
def PointAlongBoundary(self, t: float) -> Point3dGets the point along the boundary of the triangle. The triangle boundary has a domain [0, 3] where each subsequent unit domain maps to a different edge.
PointAtBarycentricCoords
def PointAtBarycentricCoords(self, coords: Point2d) -> Point3dBarycentric weights interpolate relative to triangle vertices. Interior weights are nonnegative and sum to one.
Out-of-range weights extrapolate. Degenerate triangles cannot support a stable inverse barycentric mapping.
PointOnInterior
def PointOnInterior(self, u: float, v: float) -> Point3dGets the point on the triangle using the AB and AC primary axes.
ToMesh
def ToMesh(self) -> MeshCreate a mesh from this triangle.
ToPolyline
def ToPolyline(self) -> PolylineCreate a polyline from this triangle.
Transform
def Transform(self, transform: Transform) -> Triangle3dTransform this triangle.
TrySmallestEnclosingTriangle
def TrySmallestEnclosingTriangle(points: Iterable[Point2d], tolerance: float) -> tuple[bool, Triangle3d]Attempt to create the smallest triangle containing a set of planar points.
WithA
def WithA(self, a: Point3d) -> Triangle3dReplace the A corner.
WithB
def WithB(self, b: Point3d) -> Triangle3dReplace the B corner.
WithC
def WithC(self, c: Point3d) -> Triangle3dReplace the C corner.
Unroller
8 members
Unrolling aims to flatten developable geometry while retaining correspondence to associated objects.
Surfaces with nonzero Gaussian curvature cannot generally flatten isometrically. Check distortion before using flattened geometry for fabrication.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self, brep: Brep) -> None
def __init__(self, surface: Surface) -> NoneInitializes a new instance of the Rhino.Geometry.Unroller class with a brep.
ExplodeOutput
def ExplodeOutput(self) -> boolGets or sets a value determining whether geometry should be exploded.
ExplodeSpacing
def ExplodeSpacing(self) -> floatGets or sets a value determining whether spacing should be exploded.
AbsoluteTolerance
def AbsoluteTolerance(self) -> floatGets or sets the absolute tolerance for the unrolling operation. Absolute tolerance is used in the evaluation of new entities, such as intersections, re-projections and splits. In the current implementation, absolute tolerance is used in tessellating rails, fitting curves and pulling back trims.
RelativeTolerance
def RelativeTolerance(self) -> floatGets or sets the relative tolerance for the unrolling operation. Relative tolerance is used in the evaluation of intrinsic properties, such as computations "along" the surface or brep. In the current implementation, relative tolerance is used to decide if a surface is flat enough to try to unroll. That helps ease the scale dependency. The surface has to be linear in one direction within (length * RelativeTolerance) to be considered linear for that purpose. Otherwise smash will ignore that tolerance and unroll anything.
AddFollowingGeometry
def AddFollowingGeometry(self, curve: Curve) -> None
def AddFollowingGeometry(self, curves: Iterable[Curve]) -> None
def AddFollowingGeometry(self, dot: TextDot) -> None
def AddFollowingGeometry(self, dotLocation: Point3d, dotText: str) -> None
def AddFollowingGeometry(self, dotLocations: Iterable[Point3d], dotText: Iterable[str]) -> None
def AddFollowingGeometry(self, dots: Iterable[TextDot]) -> None
def AddFollowingGeometry(self, point: Point) -> None
def AddFollowingGeometry(self, point: Point3d) -> None
def AddFollowingGeometry(self, points: Iterable[Point3d]) -> NoneAdds a curve that should be unrolled along with the surface/brep.
FollowingGeometryIndex
def FollowingGeometryIndex(self, curve: Curve) -> int
def FollowingGeometryIndex(self, dot: TextDot) -> intGiven an unrolled curve, returns the index of the source, or following curve.
PerformUnroll
def PerformUnroll(self) -> tuple[Sequence[Brep], Sequence[Curve], Sequence[Point3d], Sequence[TextDot]]
def PerformUnroll(self, flatbreps: Iterable[Brep]) -> intExecutes unrolling operations.
Vector2d
21 members
Represents the two components of a vector in two-dimensional space, using System.Double-precision floating point numbers.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, x: float, y: float) -> NoneSee the signature and official API documentation for this member.
X
def X(self) -> floatGets or sets the X (first) component of this vector.
Y
def Y(self) -> floatGets or sets the Y (second) component of this vector.
Length
def Length(self) -> floatComputes the length (or magnitude, or size) of this vector. This is an application of Pythagoras' theorem.
Zero
Zero: ClassVar[Vector2d]See the signature and official API documentation for this member.
Unset
Unset: ClassVar[Vector2d]See the signature and official API documentation for this member.
IsValid
def IsValid(self) -> boolGets a value indicating whether this vector is valid. A valid vector must be formed of valid component values for x, y and z.
SquareLength
def SquareLength(self) -> floatReturns the square of the length of the vector.
Add
def Add(vector1: Vector2d, vector2: Vector2d) -> Vector2dSums up two vectors. (Provided for languages that do not support operator overloading. You can use the + operator otherwise)
CompareTo
def CompareTo(self, other: Vector2d) -> intCompares this Rhino.Geometry.Vector2d with another Rhino.Geometry.Vector2d. Components evaluation priority is first X, then Y.
Divide
def Divide(vector: Vector2d, t: float) -> Vector2dDivides a Rhino.Geometry.Vector2d by a number, having the effect of shrinking it. (Provided for languages that do not support operator overloading. You can use the / operator otherwise)
EpsilonEquals
def EpsilonEquals(self, other: Vector2d, epsilon: float) -> boolCheck that all values in other are within epsilon of the values in this
Equals
def Equals(self, vector: Vector2d) -> bool
def Equals(self, obj: Any) -> boolDetermines whether the specified vector has the same value as the present vector.
GetHashCode
def GetHashCode(self) -> intProvides a hashing value for the present vector.
IsTiny
def IsTiny(self) -> bool
def IsTiny(self, tolerance: float) -> boolUses RhinoMath.ZeroTolerance for IsTiny calculation.
Multiply
def Multiply(t: float, vector: Vector2d) -> Vector2d
def Multiply(vector: Vector2d, t: float) -> Vector2d
def Multiply(vector1: Vector2d, vector2: Vector2d) -> floatMultiplies a vector by a number, having the effect of scaling it. (Provided for languages that do not support operator overloading. You can use the * operator otherwise)
Negate
def Negate(vector: Vector2d) -> Vector2dComputes the reversed vector. (Provided for languages that do not support operator overloading. You can use the - unary operator otherwise)
Rotate
def Rotate(self, angleRadians: float) -> boolRotates this vector.
Subtract
def Subtract(vector1: Vector2d, vector2: Vector2d) -> Vector2dSubtracts the second vector from the first one. (Provided for languages that do not support operator overloading. You can use the - operator otherwise)
ToString
def ToString(self) -> str
def ToString(self, format: str, formatProvider: Any) -> strConstructs a string representation of the current vector.
Unitize
def Unitize(self) -> boolUnitizes the vector in place. A unit vector has length 1 unit. An invalid or zero length vector cannot be unitized.
Vector2f
24 members
Represents the two components of a vector in two-dimensional space, using System.Single-precision floating point numbers.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, x: float, y: float) -> NoneSee the signature and official API documentation for this member.
Zero
Zero: ClassVar[Vector2f]See the signature and official API documentation for this member.
XAxis
XAxis: ClassVar[Vector2f]See the signature and official API documentation for this member.
YAxis
YAxis: ClassVar[Vector2f]See the signature and official API documentation for this member.
Unset
Unset: ClassVar[Vector2f]See the signature and official API documentation for this member.
X
def X(self) -> floatGets or sets the X (first) component of this vector.
Y
def Y(self) -> floatGets or sets the Y (second) component of this vector.
IsZero
def IsZero(self) -> boolGets a value indicating whether the X, Y, and Z values are all equal to 0.0.
IsUnitVector
def IsUnitVector(self) -> boolGets a value indicating whether or not this is a unit vector. A unit vector has length 1.
IsValid
def IsValid(self) -> boolReturns an indication regarding the validity of this vector.
SquareLength
def SquareLength(self) -> floatReturns the square of the length of this vector. This method does not check for the validity of its inputs.
Length
def Length(self) -> floatComputes the length (or magnitude, or size) of this vector. This is an application of Pythagoras' theorem. If this vector is invalid, its length is considered 0.
Add
def Add(point: Point2f, vector: Vector2f) -> Point2f
def Add(vector1: Vector2f, vector2: Vector2f) -> Vector2fSums up a point and a vector, and returns a new point. (Provided for languages that do not support operator overloading. You can use the + operator otherwise)
CompareTo
def CompareTo(self, other: Vector2f) -> intCompares this Rhino.Geometry.Vector2f with another Rhino.Geometry.Vector2f. Components evaluation priority is first X, then Y.
EpsilonEquals
def EpsilonEquals(self, other: Vector2f, epsilon: float) -> boolCheck that all values in other are within epsilon of the values in this
Equals
def Equals(self, vector: Vector2f) -> bool
def Equals(self, obj: Any) -> boolDetermines whether the specified vector has the same values as the present vector.
GetHashCode
def GetHashCode(self) -> intComputes a hash number that represents the current vector.
Multiply
def Multiply(point1: Vector2f, point2: Vector2f) -> floatMultiplies two Rhino.Geometry.Vector2f together, returning the dot (internal) product of the two. (Provided for languages that do not support operator overloading. You can use the * operator otherwise)
Negate
def Negate(vector: Vector2f) -> Vector2fComputes the reversed vector. (Provided for languages that do not support operator overloading. You can use the - unary operator otherwise)
PerpendicularTo
def PerpendicularTo(self, other: Vector2f) -> boolSets this vector to be perpendicular to another vector. Result is not unitized.
Reverse
def Reverse(self) -> boolReverses this vector in place (reverses the direction). If this vector contains RhinoMath.UnsetValue, the reverse will also be invalid and false will be returned.
Subtract
def Subtract(vector1: Vector2f, vector2: Vector2f) -> Vector2fSubtracts the second vector from the first one. (Provided for languages that do not support operator overloading. You can use the - operator otherwise)
ToString
def ToString(self) -> str
def ToString(self, format: str, formatProvider: Any) -> strConstructs the string representation of the current vector.
Unitize
def Unitize(self) -> boolUnitizes the vector in place. A unit vector has length 1 unit. An invalid or zero length vector cannot be unitized.
Vector3d
39 members
A vector has direction and magnitude but no position. The zero vector cannot define a usable direction.
Displacements carry length units, while unit normals and directions are dimensionless. Validate and normalize before constructing a frame from directions.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, point: Point3d) -> None
def __init__(self, vector: Vector3d) -> None
def __init__(self, vector: Vector3f) -> None
def __init__(self, x: float, y: float, z: float) -> NoneSee the signature and official API documentation for this member.
Zero
Zero: ClassVar[Vector3d]See the signature and official API documentation for this member.
XAxis
XAxis: ClassVar[Vector3d]See the signature and official API documentation for this member.
YAxis
YAxis: ClassVar[Vector3d]See the signature and official API documentation for this member.
ZAxis
ZAxis: ClassVar[Vector3d]See the signature and official API documentation for this member.
Unset
Unset: ClassVar[Vector3d]See the signature and official API documentation for this member.
X
def X(self) -> floatGets or sets the X (first) component of the vector.
Y
def Y(self) -> floatGets or sets the Y (second) component of the vector.
Z
def Z(self) -> floatGets or sets the Z (third) component of the vector.
IsValid
def IsValid(self) -> boolGets a value indicating whether this vector is valid. A valid vector must be formed of valid component values for x, y and z.
MinimumCoordinate
def MinimumCoordinate(self) -> floatGets the smallest (both positive and negative) component value in this vector.
MaximumCoordinate
def MaximumCoordinate(self) -> floatGets the largest (both positive and negative) component value in this vector, as an absolute value.
Length
def Length(self) -> floatComputes the length (or magnitude, or size) of this vector. This is an application of Pythagoras' theorem. If this vector is invalid, its length is considered 0.
SquareLength
def SquareLength(self) -> floatComputes the squared length (or magnitude, or size) of this vector. This is an application of Pythagoras' theorem. While the Length property checks for input validity, this property does not. You should check validity in advance, if this vector can be invalid.
IsUnitVector
def IsUnitVector(self) -> boolGets a value indicating whether or not this is a unit vector. A unit vector has length 1.
IsZero
def IsZero(self) -> boolGets a value indicating whether the X, Y, and Z values are all equal to 0.0.
Add
def Add(vector1: Vector3d, vector2: Vector3d) -> Vector3dSums up two vectors. (Provided for languages that do not support operator overloading. You can use the + operator otherwise)
AreOrthogonal
def AreOrthogonal(x: Vector3d, y: Vector3d, z: Vector3d) -> boolTest whether three vectors describe an orthogonal axis system. All vectors must be mutually perpendicular this to be the case.
AreOrthonormal
def AreOrthonormal(x: Vector3d, y: Vector3d, z: Vector3d) -> boolTest whether three vectors describe an orthogonal, unit axis system. All vectors must be mutually perpendicular and have unit length for this to be the case.
AreRighthanded
def AreRighthanded(x: Vector3d, y: Vector3d, z: Vector3d) -> boolTest whether three vectors describe a right-handed, orthogonal, unit axis system. The vectors must be orthonormal and follow the right-hand ordering; index-finger=x, middle-finger=y, thumb=z.
CompareTo
def CompareTo(self, other: Vector3d) -> intCompares this Rhino.Geometry.Vector3d with another Rhino.Geometry.Vector3d. Component evaluation priority is first X, then Y, then Z.
CrossProduct
def CrossProduct(a: Vector3d, b: Vector3d) -> Vector3dThe cross product is perpendicular to both inputs. Reversing their order reverses its direction.
Its magnitude equals the area of the parallelogram spanned by the inputs. Parallel inputs produce a zero vector, so check before normalizing the result.
Rhino 8 Python example · geometry in memory
import Rhino.Geometry as rg
x, y = rg.Vector3d(1, 0, 0), rg.Vector3d(0, 1, 0)
z = rg.Vector3d.CrossProduct(x, y)
assert z.Z == 1.0Divide
def Divide(vector: Vector3d, t: float) -> Vector3dDivides a Rhino.Geometry.Vector3d by a number, having the effect of shrinking it. (Provided for languages that do not support operator overloading. You can use the / operator otherwise)
EpsilonEquals
def EpsilonEquals(self, other: Vector3d, epsilon: float) -> boolCheck that all values in other are within epsilon of the values in this
Equals
def Equals(self, vector: Vector3d) -> bool
def Equals(self, obj: Any) -> boolDetermines whether the specified vector has the same value as the present vector.
GetHashCode
def GetHashCode(self) -> intComputes the hash code for the current vector.
IsParallelTo
def IsParallelTo(self, other: Vector3d) -> int
def IsParallelTo(self, other: Vector3d, angleTolerance: float) -> intThe result is an integer classification: 1 parallel, -1 antiparallel, and 0 neither.
Do not interpret every nonzero result as identical direction. Supply an explicit angular tolerance when the decision depends on it.
IsPerpendicularTo
def IsPerpendicularTo(self, other: Vector3d) -> bool
def IsPerpendicularTo(self, other: Vector3d, angleTolerance: float) -> boolTest to see whether this vector is perpendicular to within one degree of another one.
IsTiny
def IsTiny(self) -> bool
def IsTiny(self, tolerance: float) -> boolUses RhinoMath.ZeroTolerance for IsTiny calculation.
Multiply
def Multiply(t: float, vector: Vector3d) -> Vector3d
def Multiply(vector: Vector3d, t: float) -> Vector3d
def Multiply(vector1: Vector3d, vector2: Vector3d) -> floatVector-vector multiplication returns a dot product; vector-scalar multiplication changes magnitude. RhinoCommon has no Vector3d.DotProduct method.
The dot product equals the product of lengths times the cosine of the angle. It supports projection and perpendicularity tests for valid nonzero vectors.
Rhino 8 Python example · geometry in memory
import Rhino.Geometry as rg
a = rg.Vector3d(1, 0, 0)
b = rg.Vector3d(0, 1, 0)
assert rg.Vector3d.Multiply(a, b) == 0.0Negate
def Negate(vector: Vector3d) -> Vector3dComputes the reversed vector. (Provided for languages that do not support operator overloading. You can use the - unary operator otherwise)
PerpendicularTo
def PerpendicularTo(self, other: Vector3d) -> bool
def PerpendicularTo(self, point0: Point3d, point1: Point3d, point2: Point3d) -> boolSets this vector to be perpendicular to another vector. Result is not unitized.
Reverse
def Reverse(self) -> boolReverse modifies the vector and returns a Boolean. Its direction changes sign while magnitude is preserved.
Reversing a normal changes its positive side. It does not change the underlying surface's topological orientation.
Rotate
def Rotate(self, angleRadians: float, rotationAxis: Vector3d) -> boolRotates this vector around a given axis.
Subtract
def Subtract(vector1: Vector3d, vector2: Vector3d) -> Vector3dSubtracts the second vector from the first one. (Provided for languages that do not support operator overloading. You can use the - operator otherwise)
ToString
def ToString(self) -> str
def ToString(self, format: str, formatProvider: Any) -> strReturns the string representation of the current vector, in the form X,Y,Z.
Transform
def Transform(self, transformation: Transform) -> NoneTransforms the vector in place. The transformation matrix acts on the left of the vector; i.e., result = transformation*vector
Unitize
def Unitize(self) -> boolUnitize modifies this vector and reports success. A zero or invalid vector cannot provide a normalized direction.
Check the Boolean return. Normalization discards magnitude, so copy the vector first when its original length is needed.
Rhino 8 Python example · geometry in memory
import Rhino.Geometry as rg
v = rg.Vector3d(3, 0, 0)
if not v.Unitize():
raise ValueError("A direction requires a nonzero vector")
assert abs(v.Length - 1) < 1e-9VectorAngle
def VectorAngle(a: Vector3d, b: Vector3d) -> float
def VectorAngle(a: Vector3d, b: Vector3d, plane: Plane) -> float
def VectorAngle(v1: Vector3d, v2: Vector3d, vNormal: Vector3d) -> floatAngles are in radians. Choose a plane or normal overload when orientation of the angle matters.
The two-vector overload gives an unsigned angle. Zero vectors do not define an angle; validate inputs before interpreting the measurement.
Vector3f
30 members
Represents the three components of a vector in three-dimensional space, using System.Single-precision floating point numbers.
Permanent link · Official RhinoCommon reference
__init__
def __init__(self) -> None
def __init__(self, x: float, y: float, z: float) -> NoneSee the signature and official API documentation for this member.
Zero
Zero: ClassVar[Vector3f]See the signature and official API documentation for this member.
XAxis
XAxis: ClassVar[Vector3f]See the signature and official API documentation for this member.
YAxis
YAxis: ClassVar[Vector3f]See the signature and official API documentation for this member.
ZAxis
ZAxis: ClassVar[Vector3f]See the signature and official API documentation for this member.
Unset
Unset: ClassVar[Vector3f]See the signature and official API documentation for this member.
X
def X(self) -> floatGets or sets the X (first) component of this vector.
Y
def Y(self) -> floatGets or sets the Y (second) component of this vector.
Z
def Z(self) -> floatGets or sets the Z (third) component of this vector.
IsZero
def IsZero(self) -> boolGets a value indicating whether the X, Y, and Z values are all equal to 0.0.
IsUnitVector
def IsUnitVector(self) -> boolGets a value indicating whether or not this is a unit vector. A unit vector has length 1.
IsValid
def IsValid(self) -> boolReturns an indication regarding the validity of this vector.
SquareLength
def SquareLength(self) -> floatReturns the square length of the vector. This property does not check for the validity of the inputs.
Length
def Length(self) -> floatComputes the length (or magnitude, or size) of this vector. This is an application of Pythagoras' theorem. If this vector is invalid, its length is considered 0.
Add
def Add(point: Point3f, vector: Vector3f) -> Point3f
def Add(vector1: Vector3f, vector2: Vector3f) -> Vector3fSums up a point and a vector, and returns a new point. (Provided for languages that do not support operator overloading. You can use the + operator otherwise)
CompareTo
def CompareTo(self, other: Vector3f) -> intCompares this Rhino.Geometry.Vector3f with another Rhino.Geometry.Vector3f. Component evaluation priority is first X, then Y, then Z.
CrossProduct
def CrossProduct(a: Vector3f, b: Vector3f) -> Vector3fComputes the cross product (or vector product, or exterior product) of two vectors. This operation is not commutative.
Divide
def Divide(vector: Vector3f, t: float) -> Vector3fDivides a Rhino.Geometry.Vector3f by a number, having the effect of shrinking it, t times. (Provided for languages that do not support operator overloading. You can use the / operator otherwise)
EpsilonEquals
def EpsilonEquals(self, other: Vector3f, epsilon: float) -> boolCheck that all values in other are within epsilon of the values in this
Equals
def Equals(self, vector: Vector3f) -> bool
def Equals(self, obj: Any) -> boolDetermines whether the specified vector has the same values as the present vector.
GetHashCode
def GetHashCode(self) -> intComputes a hash number that represents the current vector.
Multiply
def Multiply(point1: Vector3f, point2: Vector3f) -> float
def Multiply(t: float, vector: Vector3f) -> Vector3f
def Multiply(vector: Vector3f, t: float) -> Vector3fMultiplies two Rhino.Geometry.Vector3f together, returning the dot (internal) product of the two. This is not the cross product. (Provided for languages that do not support operator overloading. You can use the * operator otherwise)
Negate
def Negate(vector: Vector3f) -> Vector3fComputes the reversed vector. (Provided for languages that do not support operator overloading. You can use the - unary operator otherwise)
PerpendicularTo
def PerpendicularTo(self, other: Vector3f) -> boolSets this vector to be perpendicular to another vector. Result is not unitized.
Reverse
def Reverse(self) -> boolReverses this vector in place (reverses the direction). If this vector contains RhinoMath.UnsetValue, the reverse will also be invalid and false will be returned.
Rotate
def Rotate(self, angleRadians: float, rotationAxis: Vector3f) -> boolRotates this vector around a given axis.
Subtract
def Subtract(vector1: Vector3f, vector2: Vector3f) -> Vector3fSubtracts the second vector from the first one. (Provided for languages that do not support operator overloading. You can use the - operator otherwise)
ToString
def ToString(self) -> str
def ToString(self, format: str, formatProvider: Any) -> strConstructs the string representation of the current vector.
Transform
def Transform(self, transformation: Transform) -> NoneTransforms the vector in place. The transformation matrix acts on the left of the vector; i.e., result = transformation*vector
Unitize
def Unitize(self) -> boolUnitizes the vector in place. A unit vector has length 1 unit. An invalid or zero length vector cannot be unitized.
VolumeMassProperties
28 members
Volume has cubed model units. For a physical solid interpretation, check that the boundary is closed and valid; orientation can affect signed quantities.
Topological validity is separate from fabrication constraints. A closed volume can still violate minimum thickness or other task requirements.
Permanent link · Official RhinoCommon reference
Volume
def Volume(self) -> floatGets the volume solution.
VolumeError
def VolumeError(self) -> floatGets the uncertainty in the volume calculation.
Centroid
def Centroid(self) -> Point3dGets the volume centroid in the world coordinate system.
CentroidError
def CentroidError(self) -> Vector3dGets the uncertainty in the Centroid calculation.
WorldCoordinatesFirstMoments
def WorldCoordinatesFirstMoments(self) -> Vector3dReturns the world coordinate first moments if they were able to be calculated. X is integral of "x dm" over the volume Y is integral of "y dm" over the volume Z is integral of "z dm" over the volume.
WorldCoordinatesFirstMomentsError
def WorldCoordinatesFirstMomentsError(self) -> Vector3dUncertainty in world coordinates first moments calculation.
WorldCoordinatesSecondMoments
def WorldCoordinatesSecondMoments(self) -> Vector3dReturns the world coordinate second moments if they were able to be calculated. X is integral of "xx dm" over the volume Y is integral of "yy dm" over the volume Z is integral of "zz dm" over the volume.
WorldCoordinatesSecondMomentsError
def WorldCoordinatesSecondMomentsError(self) -> Vector3dUncertainty in world coordinates second moments calculation.
WorldCoordinatesProductMoments
def WorldCoordinatesProductMoments(self) -> Vector3dReturns the world coordinate product moments if they were able to be calculated. X is integral of "xy dm" over the volume Y is integral of "yz dm" over the volume Z is integral of "zx dm" over the volume.
WorldCoordinatesProductMomentsError
def WorldCoordinatesProductMomentsError(self) -> Vector3dUncertainty in world coordinates second moments calculation.
WorldCoordinatesMomentsOfInertia
def WorldCoordinatesMomentsOfInertia(self) -> Vector3dThe moments of inertia about the world coordinate axes. X = integral of (y^2 + z^2) dm Y = integral of (z^2 + x^2) dm Z = integral of (z^2 + y^2) dm.
WorldCoordinatesMomentsOfInertiaError
def WorldCoordinatesMomentsOfInertiaError(self) -> Vector3dUncertainty in world coordinates moments of inertia calculation.
WorldCoordinatesRadiiOfGyration
def WorldCoordinatesRadiiOfGyration(self) -> Vector3dRadii of gyration with respect to world coordinate system. X = sqrt(integral of (y^2 + z^2) dm/M) Y = sqrt(integral of (z^2 + x^2) dm/M) Z = sqrt(integral of (z^2 + y^2) dm/M)
CentroidCoordinatesSecondMoments
def CentroidCoordinatesSecondMoments(self) -> Vector3dSecond moments with respect to centroid coordinate system. X = integral of (x-x0)^2 dm Y = integral of (y-y0)^2 dm Z = integral of (z-z0)^2 dm where (x0,y0,z0) = centroid.
CentroidCoordinatesSecondMomentsError
def CentroidCoordinatesSecondMomentsError(self) -> Vector3dUncertainty in centroid coordinates second moments calculation.
CentroidCoordinatesProductMoments
def CentroidCoordinatesProductMoments(self) -> Vector3dProduct moments with respect to centroid coordinate system.
CentroidCoordinatesProductMomentsError
def CentroidCoordinatesProductMomentsError(self) -> Vector3dUncertainty in product moments with respect to centroid coordinate system.
CentroidCoordinatesMomentsOfInertia
def CentroidCoordinatesMomentsOfInertia(self) -> Vector3dMoments of inertia with respect to centroid coordinate system. X = integral of ((y-y0)^2 + (z-z0)^2) dm Y = integral of ((z-z0)^2 + (x-x0)^2) dm Z = integral of ((z-z0)^2 + (y-y0)^2) dm where (x0,y0,z0) = centroid.
CentroidCoordinatesMomentsOfInertiaError
def CentroidCoordinatesMomentsOfInertiaError(self) -> Vector3dUncertainty in centroid coordinates moments of inertia calculation.
CentroidCoordinatesRadiiOfGyration
def CentroidCoordinatesRadiiOfGyration(self) -> Vector3dRadii of gyration with respect to centroid coordinate system. X = sqrt(integral of ((y-y0)^2 + (z-z0)^2) dm/M) Y = sqrt(integral of ((z-z0)^2 + (x-x0)^2) dm/M) Z = sqrt(integral of ((z-z0)^2 + (y-y0)^2) dm/M) where (x0,y0,z0) = centroid.
CentroidCoordinatesPrincipalMoments
def CentroidCoordinatesPrincipalMoments(self) -> tuple[bool, float, Vector3d, float, Vector3d, float, Vector3d]Calculates the eigenvalues and eigenvectors of the moments matrix with respect to centroid coordinates.
CentroidCoordinatesPrincipalMomentsOfInertia
def CentroidCoordinatesPrincipalMomentsOfInertia(self) -> tuple[bool, float, Vector3d, float, Vector3d, float, Vector3d]Calculates the principal moments of inertia and principal axes with respect to centroid coordinates.
Compute
def Compute(brep: Brep) -> VolumeMassProperties
def Compute(brep: Brep, volume: bool, firstMoments: bool, secondMoments: bool, productMoments: bool) -> VolumeMassProperties
def Compute(brep: Brep, volume: bool, firstMoments: bool, secondMoments: bool, productMoments: bool, relativeTolerance: float, absoluteTolerance: float) -> VolumeMassProperties
def Compute(geometry: Iterable[GeometryBase]) -> VolumeMassProperties
def Compute(geometry: Iterable[GeometryBase], volume: bool, firstMoments: bool, secondMoments: bool, productMoments: bool) -> VolumeMassProperties
def Compute(mesh: Mesh) -> VolumeMassProperties
def Compute(mesh: Mesh, volume: bool, firstMoments: bool, secondMoments: bool, productMoments: bool) -> VolumeMassProperties
def Compute(surface: Surface) -> VolumeMassProperties
def Compute(surface: Surface, volume: bool, firstMoments: bool, secondMoments: bool, productMoments: bool) -> VolumeMassPropertiesFor a physical volume interpretation, check failure, closure, orientation, and validity.
Volume has cubed model units. An open or inconsistently oriented boundary can invalidate the physical meaning of a computed result.
Dispose
def Dispose(self) -> NoneActively reclaims unmanaged resources that this instance uses.
Sum
def Sum(self, summand: VolumeMassProperties) -> boolSum mass properties together to get an aggregate mass.
Transform
def Transform(self, xform: Transform) -> boolOn input, this contains the mass properties for some geometry G. On exit, this contains the mass properties for the transformed geometry xform(G).
WorldCoordinatesPrincipalMoments
def WorldCoordinatesPrincipalMoments(self) -> tuple[bool, float, Vector3d, float, Vector3d, float, Vector3d]Calculates the eigenvalues and eigenvectors of moments matrix in world coordinates.
WorldCoordinatesPrincipalMomentsOfInertia
def WorldCoordinatesPrincipalMomentsOfInertia(self) -> tuple[bool, float, Vector3d, float, Vector3d, float, Vector3d]Calculates the principal moments of inertia and principal axes with respect to world coordinates.