RenderPrimitive

References

Finalizer

~RenderPrimitive

#
~RenderPrimitive()

Properties

BoundingBox

#Since v5.7
The bounding box for this primitive.
public BoundingBox BoundingBox { get; }

InstanceTransform

#Since v5.7
Instance reference transform or Identity if not an instance reference.
public Transform InstanceTransform { get; }

PrimitiveType

#Since v5.7
Call this before extracting meshes if you support render primitives to get the RenderPrimitiveType of this mesh then call the associated TryGetSphere(Sphere), TryGetPlane(PlaneSurface), TryGetCone(Cone, Plane), or TryGetBox(Box) method. Calling the Mesh() property will mesh the primitive and return a mesh always.
public RenderPrimitiveType PrimitiveType { get; }

RenderMaterial

#Since v5.7
The RenderMaterial associated with this mesh or null if there is not one.
public RenderMaterial RenderMaterial { get; }

RhinoObject

#Since v5.7
The Rhino object associated with this render primitive.
public RhinoObject RhinoObject { get; }

Methods

Dispose

#Since v5.7
public void Dispose()

Dispose

#
protected void Dispose(
isDisposing
)

Mesh

#Since v5.7
Returns the mesh associated with the object, this will mesh primitives and always return a mesh.
public Mesh Mesh()

TryGetBox

#Since v5.7
Call this method to get a Box primitive for this mesh. If this meshes PrimitiveType is not a RenderPrimitiveType.Box then the box parameter is set to Box.Empty.
public bool TryGetBox(
out Box
box
Gets set to the box primitive for this object on success or Box.Empty on error.
)
Returns true if PrimitiveType is RenderPrimitiveType.Box and the box parameter was initialized otherwise returns false.

TryGetCone

#Since v5.7
Call this method to get a Cone primitive for this mesh. If this meshes PrimitiveType is not a RenderPrimitiveType.Cone then the cone parameter is set to Cone.Unset and the truncation parameter is set to Plane.Unset.
public bool TryGetCone(
out Cone
cone,
Gets set to the cone primitive for this object on success or Cone.Unset on error.
out Plane
truncation
Gets set to the truncation plane for this object on success or Plane.Unset on error.
)
Returns true if PrimitiveType is RenderPrimitiveType.Cone and the cone and truncation parameters were initialized otherwise returns false.

TryGetPlane

#Since v5.7
Call this method to get a Plane primitive for this mesh. If this meshes PrimitiveType is not a RenderPrimitiveType.Plane then the plane parameter is set to null.
public bool TryGetPlane(
plane
Gets set to the plane primitive for this object on success or null on error.
)
Returns true if PrimitiveType is RenderPrimitiveType.Plane and the plane parameter was initialized otherwise returns false.

TryGetSphere

#Since v5.7
Call this method to get a sphere primitive for this mesh. If this meshes PrimitiveType is not a RenderPrimitiveType.Sphere then the sphere parameter is set to Sphere.Unset.
public bool TryGetSphere(
out Sphere
sphere
Gets set to the primitive sphere for this object on success.
)
Returns true if PrimitiveType is RenderPrimitiveType.Sphere and the sphere parameter was initialized otherwise returns false.