Skip to main content
Namespace: VM.API.Pre
Assembly: VM.API.Pre.dll
This class implements APIs for SolidBody class.

Inheritance

object ← SolidBodyAPI

Extension Methods

LinkPropertyItemCache.GetLinkProperties(object, LinkPropertyType), LinkPropertyItemCache.GetLinkPropertiesAndValues(object, LinkPropertyType), LinkPropertyItemCache.GetLinkedObjects<T>(object, LinkPropertyType)

Methods

ChangeSolidBodyAnalysisSetting(Obj, BodyAnalysisType)

Change the analysis setting of solid body.

Parameters

solidBody Obj The solid body to be changed. type BodyAnalysisType The body analysis type to be changed.

Exceptions

ArgumentNullException Will be thrown if ‘solidBody’ arguments are empty. ArgumentException Will be thrown if ‘solidBody’ argument is not empty and type of ‘solidBody’ is not SolidBody.

CreateMarker(Obj, TMatrix, string, SymmetricType)

Create Marker at the given SolidBody

Parameters

body Obj The SolidBody 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. symmetricType SymmetricType The symmetric type

Returns

Obj the new Marker object created by this API.

Exceptions

ArgumentNullException Will be thrown if ‘solidBody’ is null.

CreateMeshFile(Obj, string, string, bool, bool, bool, string, FacetParameters?)

Generate mesh file with given SolidBody entity.

Parameters

body Obj The SolidBody to generate mesh file. pathMeshFile string Generated mesh file path. nodalBodyName string The name of the new nodal body. If empty, default name will be generated. importMeshAfterCreate bool The flag that indicates importing new mesh file into the SubSystemDocument or not. addToModel bool The flag that indicates adding new mesh file to the model. createGroup bool The flag that indicates creating new group by using the solid body and the new nodal body. groupName string The name of the new group. facetParameters FacetParameters? Facet parameters. If it is not given, default values will be used.

Returns

Obj The new NodalBody entity if importMeshAfterCreate flag is true. Otherwise, empty Obj will be returned.

Exceptions

ArgumentNullException Will be thrown if body or pathMeshFile arguments are empty.

CreateSolidBlock(SubSystemDocument, Vector, ExpressionValueVariable, ExpressionValueVariable, ExpressionValueVariable, string, BooleanOperationType, Color?, SymmetricType, bool)

Create SolidBody with BuilderBlockSimple builder.

Parameters

document SubSystemDocument 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. bodyName string The name of the SolidBody. If empty, default name starts with ‘BD_’ will be generated and used. If booleanOperationType argument is other than ‘None’, this argument must be the existing SolidBody name. booleanOperationType BooleanOperationType The boolean operation type. If None, new SolidBody will be created. otherwise, New block geometry will be merged to the existing SolidBody which has same name with ‘name’ argument. color Color? The color of the new block geometry. The default value is ‘0xBFAAAA’ symmetricType SymmetricType The symmetric type of the new SolidBody. isInterface bool ‘true’ if it is interface body. Otherwise, ‘false’.

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 ‘width’, ‘height’, ‘depth’ values equal to or less than 0.

CreateSolidBlock(SubSystemDocument, Vector, string)

Create SolidBody with BuilderBlockSimple builder.

Parameters

document SubSystemDocument The document to create the block solid body. position Vector The position to create the block solid body. bodyName string The name of the SolidBody. If empty, default name starts with ‘BD_’ will be generated and used. If booleanOperationType argument is other than ‘None’, this argument must be the existing SolidBody name.

Returns

Obj The new SolidBody object created by this API.

CreateSolidCylinder(SubSystemDocument, Vector, Vector, ExpressionValueVariable, string, BooleanOperationType, Color?, SymmetricType, bool)

Create SolidBody with BuilderCylinderSimple builder.

Parameters

document SubSystemDocument 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. bodyName string The name of the SolidBody. If empty, default name starts with ‘BD_’ will be generated and used. If booleanOperationType argument is other than ‘None’, this argument must be the existing SolidBody name. booleanOperationType BooleanOperationType The boolean operation type. If None, new SolidBody will be created. otherwise, New cylinder geometry will be merged to the existing SolidBody which has same name with ‘name’ argument. color Color? The color of the new cylinder geometry. The default value is ‘0xBFAAAA’ symmetricType SymmetricType The symmetric type of the new SolidBody. isInterface bool ‘true’ if it is interface body. Otherwise, ‘false’.

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 ‘radius’ value equal to or less than 0. ArgumentException Will be thrown if ‘bottomPosition’ equal to ‘topPosition’.

CreateSolidCylinder(SubSystemDocument, Vector, Vector, string)

Create SolidBody with BuilderCylinderSimple builder.

Parameters

document SubSystemDocument 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. bodyName string The name of the SolidBody. If empty, default name starts with ‘BD_’ will be generated and used. If booleanOperationType argument is other than ‘None’, this argument must be the existing SolidBody name.

Returns

Obj The new SolidBody object created by this API.

CreateSolidSphere(SubSystemDocument, Vector, ExpressionValueVariable, string, BooleanOperationType, Color?, SymmetricType, bool)

Create SolidBody with BuilderSphereSimple builder.

Parameters

document SubSystemDocument 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. bodyName string The name of the SolidBody. If empty, default name starts with ‘BD_’ will be generated and used. If booleanOperationType argument is other than ‘None’, this argument must be the existing SolidBody name. booleanOperationType BooleanOperationType The boolean operation type. If None, new SolidBody will be created. otherwise, New sphere geometry will be merged to the existing SolidBody which has same name with ‘name’ argument. color Color? The color of the new sphere geometry. The default value is ‘0xBFAAAA’ symmetricType SymmetricType The symmetric type of the new SolidBody. isInterface bool ‘true’ if it is interface body. Otherwise, ‘false’.

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 ‘radius’ value equal to or less than 0.

CreateSolidSphere(SubSystemDocument, Vector, string)

Create SolidBody with BuilderSphereSimple builder.

Parameters

document SubSystemDocument The document to create the sphere solid body. centerPosition Vector The center position to create the sphere solid body. bodyName string The name of the SolidBody. If empty, default name starts with ‘BD_’ will be generated and used. If booleanOperationType argument is other than ‘None’, this argument must be the existing SolidBody name.

Returns

Obj The new SolidBody object created by this API.

CreateSolidTriPlate(SubSystemDocument, Vector, Vector, Vector, ExpressionValueVariable, string, BooleanOperationType, Color?, SymmetricType, bool)

Create SolidBody with BuilderTriPlateSimple builder.

Parameters

document SubSystemDocument 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. bodyName string The name of the SolidBody. If empty, default name starts with ‘BD_’ will be generated and used. If booleanOperationType argument is other than ‘None’, this argument must be the existing SolidBody name. booleanOperationType BooleanOperationType The boolean operation type. If None, new SolidBody will be created. otherwise, New triplate geometry will be merged to the existing SolidBody which has same name with ‘name’ argument. color Color? The color of the new triplate geometry. The default value is ‘0xBFAAAA’ symmetricType SymmetricType The symmetric type of the new SolidBody. isInterface bool ‘true’ if it is interface body. Otherwise, ‘false’.

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 equal to or less than 0. ArgumentException Will be thrown if the condition of triangle’s crossproduct is not met.

CreateSolidTriPlate(SubSystemDocument, Vector, Vector, Vector, string)

Create SolidBody with BuilderTriPlateSimple builder.

Parameters

document SubSystemDocument 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. bodyName string The name of the SolidBody. If empty, default name starts with ‘BD_’ will be generated and used. If booleanOperationType argument is other than ‘None’, this argument must be the existing SolidBody name.

Returns

Obj The new SolidBody object created by this API.

UpdateBody(Obj)

Update body.

Parameters

body Obj The body to be updated.

Exceptions

ArgumentNullException Will be thrown if ‘body’ arguments are empty. ArgumentException Will be thrown if ‘body’ argument is not empty and type of ‘body’ is not SolidBody or Body.