Assembly: VM.API.Pre.dll This class implements APIs for Body class.
Inheritance
object ← BodyAPIExtension Methods
LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType), LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType), LinkPropertyItemCache.GetLinkedObjects<T>(object, LinkPropertyType)Methods
CreateMeshFileInPart(Obj, string, bool, FacetParameters?)
Generate mesh file with given Body entity.Parameters
body Obj
The Body to generate mesh file.
pathMeshFile string
Generated mesh file path.
addToModel bool
The flag that indicates adding new mesh file to the model.
facetParameters FacetParameters?
Facet parameters. If it is not given, default values will be used.
Exceptions
ArgumentNullException Will be thrown if body or pathMeshFile arguments are empty. ArgumentException Will be thrown if the type of ‘body’ is not Body.CreatePartMarker(PartDocument, Obj, TMatrix, string)
Create PartMarkerParameters
document PartDocument
The document to create a marker.
body Obj
The Body to create a marker.
transform TMatrix
The transformation matrix for a marker.
markerName string
The name of the marker. If empty, default name starts with ‘MK_’ will be generated and used.
Returns
Obj the new PartMarker object created by this API.Exceptions
ArgumentNullException Will be thrown if ‘body’ is null. ArgumentException Will be thrown if the type of ‘body’ is not IPartMarkerParent.CreateSolidBlock(PartDocument, Vector, ExpressionValueVariable, ExpressionValueVariable, ExpressionValueVariable, Color?)
Create Body with SolidBlockSimple builder.Parameters
document PartDocument
The document to create the block solid body.
position Vector
The position to create the block solid body.
width ExpressionValueVariable
The width of the block.
height ExpressionValueVariable
The height of the block.
depth ExpressionValueVariable
The depth of the blodk.
color Color?
The color of the new block geometry. The default value is ‘0xBFAAAA’
Returns
Obj The new Body object that is created by this API.Exceptions
ArgumentNullException Will be thrown if ‘document’ is null. ArgumentOutOfRangeException Will be thrown if ‘width’, ‘height’, ‘depth’ values are equal to or less than 0.CreateSolidBlock(PartDocument, Vector)
Create Body with SolidBlockSimple builder.Parameters
document PartDocument
The document to create the block solid body.
position Vector
The position to create the block solid body.
Returns
Obj The new Body object created by this API.CreateSolidCylinder(PartDocument, Vector, Vector, ExpressionValueVariable, Color?)
Create Body with SolidCylinderSimple builder.Parameters
document PartDocument
The document to create the cylinder solid body.
bottomPosition Vector
The bottom position to create the cylinder solid body.
topPosition Vector
The top position to create the cylinder solid body.
radius ExpressionValueVariable
The radius of the cylinder.
color Color?
The color of the new cylinder geometry. The default value is ‘0xBFAAAA’
Returns
Obj The new Body object that is created by this API.Exceptions
ArgumentNullException Will be thrown if ‘document’ is null. ArgumentOutOfRangeException Will be thrown if ‘radius’ value is equal to or less than 0. ArgumentException Will be thrown if ‘bottomPosition’ is not equal to ‘topPosition’.CreateSolidCylinder(PartDocument, Vector, Vector)
Create Body with SolidCylinderSimple builder.Parameters
document PartDocument
The document to create the cylinder solid body.
bottomPosition Vector
The bottom position to create the cylinder solid body.
topPosition Vector
The top position to create the cylinder solid body.
Returns
Obj The new Body object created by this API.CreateSolidSphere(PartDocument, Vector, ExpressionValueVariable, Color?)
Create Body with BuilderSphereSimple builder.Parameters
document PartDocument
The document to create the sphere solid body.
centerPosition Vector
The center position to create the sphere solid body.
radius ExpressionValueVariable
The radius of the sphere.
color Color?
The color of the new sphere geometry. The default value is ‘0xBFAAAA’
Returns
Obj The new Body object that is created by this API.Exceptions
ArgumentNullException Will be thrown if ‘document’ is null. ArgumentOutOfRangeException Will be thrown if ‘radius’ value is equal to or less than 0.CreateSolidSphere(PartDocument, Vector)
Create Body with BuilderSphereSimple builder.Parameters
document PartDocument
The document to create the sphere solid body.
centerPosition Vector
The center position to create the sphere solid body.
Returns
Obj The new Body object created by this API.CreateSolidTriPlate(PartDocument, Vector, Vector, Vector, ExpressionValueVariable, Color?)
Create Body with BuilderTriPlateSimple builder.Parameters
document PartDocument
The document to create the triplate solid body.
firstPosition Vector
The first position to create the triplate solid body.
secondPosition Vector
The second position to create the triplate solid body.
thirdPosition Vector
The third position to create the triplate solid body.
height ExpressionValueVariable
The height of the triplate.
color Color?
The color of the new triplate geometry. The default value is ‘0xBFAAAA’
Returns
Obj The new SolidBody object that is created by this API.Exceptions
ArgumentNullException Will be thrown if ‘document’ is null. ArgumentOutOfRangeException Will be thrown if ‘height’ value is equal to or less than 0. ArgumentException Will be thrown if the condition of triangle’s crossproduct is not met.CreateSolidTriPlate(PartDocument, Vector, Vector, Vector)
Create Body with BuilderTriPlateSimple builder.Parameters
document PartDocument
The document to create the triplate solid body.
firstPosition Vector
The first position to create the triplate solid body.
secondPosition Vector
The second position to create the triplate solid body.
thirdPosition Vector
The third position to create the triplate solid body.