GeometryBase
- class rhino3dm.GeometryBase
- ObjectType
ObjectType: Useful for switch statements that need to differentiate between basic object types like points, curves, surfaces, and so on.
- IsDeformable
bool: True if object can be accurately modified with “squishy” transformations like projections, shears, and non-uniform scaling.
- HasBrepForm
bool: Returns True if the Brep.TryConvertBrep function will be successful for this object
- Transform(xform)
Transforms the geometry. If the input Transform has a SimilarityType of OrientationReversing, you may want to consider flipping the transformed geometry after calling this function when it makes sense. For example, you may want to call Flip() on a Brep after transforming it.
- Parameters:
xform (Transform) – Transformation to apply to geometry.
- Returns:
True if geometry successfully transformed.
- Return type:
bool
- Translate(translationVector)
Translates the object along the specified vector.
- Parameters:
translationVector (rhino3dm.Vector3d) – A moving vector.
- Returns:
True if geometry successfully translated.
- Return type:
bool
- Scale(scaleFactor)
Scales the object by the specified factor. The scale is centered at the origin.
- Parameters:
scaleFactor (float) – The uniform scaling factor.
- Returns:
True if geometry successfully scaled.
- Return type:
bool
- Rotate(rotationAngle, rotationAxis, rotationCenter)
Rotates the object about the specified axis. A positive rotation angle results in a counter-clockwise rotation about the axis (right hand rule).
- Parameters:
angleRadians (float) – Angle of rotation in radians.
rotationAxis (rhino3dm.Vector3d) – Direction of the axis of rotation.
rotationCenter (rhino3dm.Point3d) – Point on the axis of rotation.
- Returns:
True if geometry successfully rotated.
- Return type:
bool
- GetBoundingBox()
Bounding box solver. Gets the world axis aligned bounding box for the geometry.
- Parameters:
accurate (bool) – If true, a physically accurate bounding box will be computed. If not, a bounding box estimate will be computed. For some geometry types there is no difference between the estimate and the accurate bounding box. Estimated bounding boxes can be computed much (much) faster than accurate (or “tight”) bounding boxes. Estimated bounding boxes are always similar to or larger than accurate bounding boxes.
- Returns:
The bounding box of the geometry in world coordinates or BoundingBox.Empty if not bounding box could be found.
- Return type:
- MakeDeformable()
If possible, converts the object into a form that can be accurately modified with “squishy” transformations like projections, shears, an non-uniform scaling.
- Returns:
False if object cannot be converted to a deformable object. True if object was already deformable or was converted into a deformable object.
- Return type:
bool
- Duplicate()
Constructs a deep (full) copy of this object.
- Returns:
An object of the same type as this, with the same properties and behavior.
- Return type: