Skip to main content

Motion Standalone Preprocessor C# library 2024 R2

Class Body

Last update: 16.07.2025

Namespace: VM.Managed.CAD
Assembly: VMAppCore.dll

This class is to represent the body(solid).

public class Body : Object<ObjectEventCore>, IObservableObject, IDisposableObject, ILinkable, IObjectBase, IObject, IEventProvider, IHasKeyObject, ILinkContainerEvent, IVerifiable, IHistoryObjectSerializable, IAttributeContainer, IReferencable, ITransformable, INavigatorItem, IContainer, ILinkContainer, IOwned, IHasID, IVisible, IMultiChangable, IEnabled, ITransparentable, IPartMarkerParent, IDrawFacet, IPostDeserialized

Inheritance

object ← ObservableObject ← LinkableBase ← ObjectBase ← Object<ObjectEventCore> ← Body

Implements

IObservableObject, IDisposableObject, ILinkable, IObjectBase, IObject, IEventProvider, IHasKeyObject, ILinkContainerEvent, IVerifiable, IHistoryObjectSerializable, IAttributeContainer, IReferencable, ITransformable, INavigatorItem, IContainer, ILinkContainer, IOwned, IHasID, IVisible, IMultiChangable, IEnabled, ITransparentable, IPartMarkerParent, IDrawFacet, IPostDeserialized

Inherited Members

Object<ObjectEventCore>.GetKey(), Object<ObjectEventCore>.Initialize(Unit.ConvertFactor), Object<ObjectEventCore>.SetIconColor(Canvas), Object<ObjectEventCore>.OnDeserialization(object), Object<ObjectEventCore>.CustomGetObjectData(SerializationInfo, StreamingContext), Object<ObjectEventCore>.RollbackEvent(), Object<ObjectEventCore>.OnDeserializedCore(object), Object<ObjectEventCore>.Key, Object<ObjectEventCore>.UntypedEventCore, Object<ObjectEventCore>.EventCore, Object<ObjectEventCore>.Attributes, ObjectBase.ReplaceEventCore(ObjectEventCore), ObjectBase.SetModifiedCore(ModifiedResult.ModifiedType), ObjectBase.AddPostDeserialize(StreamingContext), ObjectBase.LinkAddedToDocumentCore(IOwned, bool), ObjectBase.SetModified(ModifiedResult.ModifiedType), ObjectBase.SetModified(), ObjectBase.SetModified(ModifiedResult.ModifiedType, IDocument), ObjectBase.DestroyObject(object, LinkEventArgs), ObjectBase.DestroyObject(DestroyEventArgs), ObjectBase.DestroyObject(), ObjectBase.Initialize(Unit.ConvertFactor), ObjectBase.FixUp(ObjectBase), ObjectBase.DoWorkAfterUpdateContents(), ObjectBase.SetOldNameWithNewEntity(ObjectBase, ObjectBase), ObjectBase.SetIconColor(Canvas), ObjectBase.RemoveFromCreatedList(), ObjectBase.PostAddToDocument(), ObjectBase.PostRemoveFromDocument(Document), ObjectBase.GetArgumentList(LinkedList<ObjectBase>), ObjectBase.ResetInvalidEntity(), ObjectBase.OnDeserialization(object), ObjectBase.IsSerializableEvent(Delegate), ObjectBase.CustomGetObjectData(SerializationInfo, StreamingContext), ObjectBase.CheckAndUpdateLink(HashSet<ObjectBase>), ObjectBase.Verify(VerifiedResult), ObjectBase.ConnectProxy(), ObjectBase.RollbackEvent(), ObjectBase.LinkRequestUpdating(object, LinkEventArgs), ObjectBase.LinkRequestUpdate(object, LinkEventArgs), ObjectBase.LinkRequestDestroying(object, LinkEventArgs), ObjectBase.LinkRequestDestroy(object, LinkEventArgs), ObjectBase.LinkAddedToDocument(object, AddToDocEventArgs), ObjectBase.LinkRemovedFromDocument(object, RemoveFromDocEventArgs), ObjectBase.DisposeManagedResources(), ObjectBase.GetDestroyEventExtraData(), ObjectBase.OnLinkReserved(ILink, object, EventArgs), ObjectBase.CreateEntityWhenUpdateContents(Action), ObjectBase.GetObjectByKey(UIntPtr), ObjectBase.FindObjectOnXmlDeserialize(string), ObjectBase.UpdateContents(XmlReader, ObjectBase, string), ObjectBase.UpdateContents(XmlReader, ObjectBase), ObjectBase.UpdateContents(string, string), ObjectBase.UpdateContents(string), ObjectBase.SetFlagWhenXMLFile(string, bool), ObjectBase.IsEqualArray<T>(T[], T[]), ObjectBase.IsEqualList(List<double>, List<double>), ObjectBase.SetContainer(IOwned, bool), ObjectBase.GetTargetListForUpdate(), ObjectBase.SkipUpdateObjectImpl(), ObjectBase.raise_OnUpdating(object, LinkEventArgs), ObjectBase.raise_OnUpdate(object, LinkEventArgs), ObjectBase.raise_OnDestroying(object, LinkEventArgs), ObjectBase.raise_OnDestroy(object, LinkEventArgs), ObjectBase.raise_Destroying(object, Identifier), ObjectBase.raise_OnAdded(object, AddToDocEventArgs), ObjectBase.raise_OnRemoved(object, RemoveFromDocEventArgs), ObjectBase.raise_OnContentsUpdated(object, EventArgs), ObjectBase.Dispose(bool), ObjectBase.SkipModified, ObjectBase.ClearChildInfoBeforeDeserialize, ObjectBase.KeyImpl, ObjectBase.ID, ObjectBase.TopologyEntityTypeName, ObjectBase.ObjectStateForCircularError, ObjectBase.ObjectState, ObjectBase.IsChildExternable, ObjectBase.IsExternable, ObjectBase.Container, ObjectBase.Owner, ObjectBase.Document, ObjectBase.UntypedEventCore, ObjectBase.KernelKey, ObjectBase.Key, ObjectBase.OnContentsUpdated, ObjectBase.OnRemoved, ObjectBase.OnAdded, ObjectBase.Destroying, ObjectBase.OnDestroy, ObjectBase.OnDestroying, ObjectBase.OnUpdate, ObjectBase.OnUpdating, LinkableBase.OnDeserialization(object), ObservableObject.Dispose(), ObservableObject.RaisePropertyChanged(string), ObservableObject.RaisePropertyChanged(string, object, object), ObservableObject.Dispose(bool), ObservableObject.DisposeManagedResources(), ObservableObject.DisposeUnmanagedResources(), ObservableObject.IsDisposed, ObservableObject.TryDisposing, ObservableObject.Disposed, ObservableObject.Disposing, ObservableObject.PropertyChanged

Extension Methods

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

Constructors

Body(Builder)

Initializes a new instance of the class.

public Body(Builder builder)

Parameters

builder Builder

The body's builder.

Body()

Initializes a new instance of the class.

public Body()

Fields

g_dAccuracyForCADImportMassCalculate

This value is accuracy for [cad import mass calculate].

public static double g_dAccuracyForCADImportMassCalculate

Field Value

double

g_dAccuracyForMassCalculate

This value is accuracy for [mass calculate].

public static double g_dAccuracyForMassCalculate

Field Value

double

Properties

AccuracyForMassCalc

Gets or sets the accuracy for [mass calculate].

public double AccuracyForMassCalc { get; set; }

Property Value

double

Builder

Gets or sets the builder.

public Builder Builder { get; set; }

Property Value

Builder

Edges

Gets or sets the edges.

public Body.EdgeContainer Edges { get; set; }

Property Value

Body.EdgeContainer

Faces

Gets or sets the faces.

public Body.FaceContainer Faces { get; set; }

Property Value

Body.FaceContainer

FacetAspectRatio

Gets or sets the facet aspect ratio.

public ExpressionValueVariable FacetAspectRatio { get; set; }

Property Value

ExpressionValueVariable

IndexCont

Gets the index container.

public Body.IndexContainer IndexCont { get; set; }

Property Value

Body.IndexContainer

Invalid

public bool Invalid { get; set; }

Property Value

bool

IsEnabled

Gets or sets IsEnabled state.

bool IsEnabled { get; set; }

Property Value

bool

IsVisible

Gets or sets the layer.

bool IsVisible { get; set; }

Property Value

bool

Layer

Gets or sets the layer.

Layer Layer { get; set; }

Property Value

Layer

Material

Gets or sets the material.

public IMaterial Material { get; set; }

Property Value

IMaterial

MaximumFacetSize

Gets or sets the maximum facet size.

public ExpressionValueVariable MaximumFacetSize { get; set; }

Property Value

ExpressionValueVariable

MaximumGridLine

Gets or sets the maximum grid line.

public ExpressionValueVariable MaximumGridLine { get; set; }

Property Value

ExpressionValueVariable

NameAttribute

Gets or sets the attribute of name.

public string NameAttribute { get; set; }

Property Value

string

SkipCalcMassProp

Gets or sets a value indicating whether skip [Calculate mass property].

public bool SkipCalcMassProp { get; set; }

Property Value

bool

SkipRebuildGeometry

Gets or sets a value indicating whether skip [Rebuild Geometry].

public bool SkipRebuildGeometry { get; set; }

Property Value

bool

SurfaceAngularTolerance

Gets or sets the surface angular tolerance.

public ExpressionValueVariable SurfaceAngularTolerance { get; set; }

Property Value

ExpressionValueVariable

TransparentObject

Gets the transparent object.

ObjectBase TransparentObject { get; }

Property Value

ObjectBase

TransparentObjects

Gets the transparent objects.

ObjectBase[] TransparentObjects { get; }

Property Value

ObjectBase[]

UseApprox_eval

Gets or sets a value indicating whether use [Approx_eval].

public bool UseApprox_eval { get; set; }

Property Value

bool

UseFacetAspectRatio

Gets or sets a value indicating whether use [facet aspect ratio].

public bool UseFacetAspectRatio { get; set; }

Property Value

bool

UseGRID_TO_EDGES

Gets or sets a value indicating whether use [GRID_TO_EDGES].

public bool UseGRID_TO_EDGES { get; set; }

Property Value

bool

UseMaximumFacetSize

Gets or sets a value indicating whether use [maximum facet size].

public bool UseMaximumFacetSize { get; set; }

Property Value

bool

UseMaximumGridLine

Gets or sets a value indicating whether use [maximum grid line].

public bool UseMaximumGridLine { get; set; }

Property Value

bool

UseRepairPatch

Gets or sets a value indicating whether use [RepairPatch].

public bool UseRepairPatch { get; set; }

Property Value

bool

UseSurfaceAngularTolerance

Gets or sets a value indicating whether use [surface angular tolerance].

public bool UseSurfaceAngularTolerance { get; set; }

Property Value

bool

Vertices

Gets or sets the vertices.

public Body.VertexContainer Vertices { get; set; }

Property Value

Body.VertexContainer

_Material

Gets or sets the material.

public Linker<IMaterial> _Material { get; set; }

Property Value

Linker<IMaterial>

Methods

AddBodyCreatedList()

Add body to kernal's create list.

[Obsolete]
public void AddBodyCreatedList()

AddNameAttribute(string)

Add name attribute.

public void AddNameAttribute(string strNameAttribute)

Parameters

strNameAttribute string

The name attribute

CalculateMassProperty(ref double, ref double, ref TMatrix, ref double[], ref bool, double, bool)

Calculate mass property.

public void CalculateMassProperty(ref double dMass, ref double dVolume, ref TMatrix matTransform, ref double[] arInertia, ref bool bRegularized, double dDensity, bool bGlobal)

Parameters

dMass double

The mass.

dVolume double

The volume.

matTransform TMatrix

The transformation.

arInertia double[]

The inertia.

bRegularized bool

whether calculate from regularized body.

dDensity double

The density.

bGlobal bool

whether inertia is global

CalculateMassProperty(ref double, ref double, ref TMatrix, ref double[], ref bool, bool, double)

Calculate mass property.

[Obsolete]
public void CalculateMassProperty(ref double dMass, ref double dVolume, ref TMatrix matTransform, ref double[] arInertia, ref bool bRegularized, bool bUpdate, double dDensity)

Parameters

dMass double

The mass.

dVolume double

The volume.

matTransform TMatrix

The transformation.

arInertia double[]

The inertia.

bRegularized bool

whether calculate from regularized body.

bUpdate bool

update flag.

dDensity double

The density.

CalculateMassProperty(ref double, ref double, ref TMatrix, ref double[], ref bool, double)

Calculate mass property.

public void CalculateMassProperty(ref double dMass, ref double dVolume, ref TMatrix matTransform, ref double[] arInertia, ref bool bRegularized, double dDensity)

Parameters

dMass double

The mass.

dVolume double

The volume.

matTransform TMatrix

The transformation.

arInertia double[]

The inertia.

bRegularized bool

whether calculate from regularized body.

dDensity double

The density.

CalculateMassProperty(ref double, ref double, ref TMatrix, ref double[], ref bool, bool)

Calculate mass property.

[Obsolete]
public void CalculateMassProperty(ref double dMass, ref double dVolume, ref TMatrix matTransform, ref double[] arInertia, ref bool bRegularized, bool bUpdate)

Parameters

dMass double

The mass.

dVolume double

The volume.

matTransform TMatrix

The transformation.

arInertia double[]

The inertia.

bRegularized bool

whether calculate from regularized body.

bUpdate bool

update flag.

CalculateMassProperty(ref double, ref double, ref TMatrix, ref double[], ref bool)

Calculate mass property.

public void CalculateMassProperty(ref double dMass, ref double dVolume, ref TMatrix matTransform, ref double[] arInertia, ref bool bRegularized)

Parameters

dMass double

The mass.

dVolume double

The volume.

matTransform TMatrix

The transformation.

arInertia double[]

The inertia.

bRegularized bool

whether calculate from regularized body.

CalculateMassProperty(ref double, ref double, ref TMatrix, ref double[], ref bool, double, double, bool)

Calculate mass property.

public void CalculateMassProperty(ref double dMass, ref double dVolume, ref TMatrix matTransform, ref double[] arInertia, ref bool bRegularized, double dDensity, double dAccuracy, bool bGlobal)

Parameters

dMass double

The mass.

dVolume double

The volume.

matTransform TMatrix

The transformation.

arInertia double[]

The inertia.

bRegularized bool

whether calculate from regularized body.

dDensity double

dAccuracy double

The desire accuracy for mass calculate.

bGlobal bool

CalculateMassPropertyForAssembly(ref double, ref double, ref TMatrix, ref double[], ref bool, double)

Calculate mass property.

public void CalculateMassPropertyForAssembly(ref double dMass, ref double dVolume, ref TMatrix matTransform, ref double[] arInertia, ref bool bRegularized, double dDensity)

Parameters

dMass double

The mass.

dVolume double

The volume.

matTransform TMatrix

The transformation.

arInertia double[]

The inertia.

bRegularized bool

whether calculate from regularized body.

dDensity double

The density.

CheckValidationAboutBuild(string)

public virtual bool CheckValidationAboutBuild(string strXml)

Parameters

strXml string

Returns

bool

ClearFacetDictionary()

public void ClearFacetDictionary()

ConnectProxy()

protected override void ConnectProxy()

ConvertUInt32Managed2Native(ref uint[], vector<unsigned int,std::allocator<unsigned int> >*)

public void ConvertUInt32Managed2Native(ref uint[] inputAryUInt, vector<unsigned int,std::allocator<unsigned int> >* outputVecUInt)

Parameters

inputAryUInt uint[]

outputVecUInt [vector<unsigned int,std::allocator<unsigned int> >](std.vector<unsigned int,std.md)*

ConvertUInt32Native2Managed(vector<unsigned int,std::allocator<unsigned int> >*, ref uint[])

public void ConvertUInt32Native2Managed(vector<unsigned int,std::allocator<unsigned int> >* inputVecUInt, ref uint[] outputAryUInt)

Parameters

inputVecUInt [vector<unsigned int,std::allocator<unsigned int> >](std.vector<unsigned int,std.md)*

outputAryUInt uint[]

ConvertVectorManaged2Native(ref VectorBase[], vector<_VM_VECTOR,std::allocator<_VM_VECTOR> >*)

public void ConvertVectorManaged2Native(ref VectorBase[] inputAryVec, vector<_VM_VECTOR,std::allocator<_VM_VECTOR> >* outputVecVec)

Parameters

inputAryVec VectorBase[]

outputVecVec vector<_VM_VECTOR,std::allocator<_VM_VECTOR> >*

ConvertVectorNative2Managed(vector<_VM_VECTOR,std::allocator<_VM_VECTOR> >*, ref VectorBase[])

public void ConvertVectorNative2Managed(vector<_VM_VECTOR,std::allocator<_VM_VECTOR> >* inputVecVec, ref VectorBase[] outputAryVec)

Parameters

inputVecVec vector<_VM_VECTOR,std::allocator<_VM_VECTOR> >*

outputAryVec VectorBase[]

CreateNastranFile(string, VectorBase[], uint[], uint[])

public static void CreateNastranFile(string strNastranPath, VectorBase[] aryPos, uint[] aryConTria, uint[] aryConTetra)

Parameters

strNastranPath string

aryPos VectorBase[]

aryConTria uint[]

aryConTetra uint[]

DoWorkAfterUpdateContents()

After update contents, do work.

public override void DoWorkAfterUpdateContents()

DrawEdge(int, double, TMatrix, Canvas)

gets the points that are placed with some interval on edge.

public void DrawEdge(int nEdgeIndex, double dDistance, TMatrix matBase, Canvas canvas)

Parameters

nEdgeIndex int

the edge index

dDistance double

the point intaval

matBase TMatrix

the base transform

canvas Canvas

The canvas.

DrawFacet(Canvas)

Draw facet.

The canvas.
void DrawFacet(Canvas canvas)

Parameters

canvas Canvas

DrawFacetByDefaultParameters(Canvas)

Draws facet.

void DrawFacetByDefaultParameters(Canvas canvas)

Parameters

canvas Canvas

The canvas has icon information.

DrawFacetInGlobal(Canvas)

Draw facet in global.

void DrawFacetInGlobal(Canvas canvas)

Parameters

canvas Canvas

The canvas.

DrawFacetsOfFaces(IDrawFacet[], string, Canvas)

public static void DrawFacetsOfFaces(IDrawFacet[] arFaces, string strFacetOptionsXml, Canvas canvas)

Parameters

arFaces IDrawFacet[]

strFacetOptionsXml string

canvas Canvas

ExistFace(ValueType)

public bool ExistFace(ValueType nID)

Parameters

nID ValueType

Returns

bool

ExportPatch(string, ConvertFactor, string)

public void ExportPatch(string strMesherPath, Unit.ConvertFactor factor, string strPath)

Parameters

strMesherPath string

factor Unit.ConvertFactor

strPath string

ExportSolid(string, ConvertFactor, string)

public void ExportSolid(string strMesherPath, Unit.ConvertFactor factor, string strPath)

Parameters

strMesherPath string

factor Unit.ConvertFactor

strPath string

Find(string)

Find DAFUL object from the container by full name.

public virtual IObjectBase Find(string strName)

Parameters

strName string

The DAFUL object full name.

Returns

IObjectBase

The DAFUL object.

FindLocal(string)

Find DAFUL object from the container by name.

public virtual IObjectBase FindLocal(string strName)

Parameters

strName string

The DAFUL object name.

Returns

IObjectBase

The DAFUL object.

FixUp(ObjectBase)

Before destroy the old object, perform a work.

public override bool FixUp(ObjectBase ob)

Parameters

ob ObjectBase

The old object.

Returns

bool

true if success; otherwise, false.

GenerateMeshInfo(string, AttributeFacetRefinementBase, ConvertFactor, MeshFreeMeshType, ref MeshFreeMeshType, ref VectorBase[], ref uint[], ref VectorBase[], ref uint[], bool)

public void GenerateMeshInfo(string strMesherPath, AttributeFacetRefinementBase attrGeomOutputProp, Unit.ConvertFactor factor, MeshFreeMeshType reqMeshType, ref MeshFreeMeshType resMeshType, ref VectorBase[] aryPosTria, ref uint[] aryConTria, ref VectorBase[] aryPosTetra, ref uint[] aryConTetra, bool bUseDSDL)

Parameters

strMesherPath string

attrGeomOutputProp AttributeFacetRefinementBase

factor Unit.ConvertFactor

reqMeshType MeshFreeMeshType

resMeshType MeshFreeMeshType

aryPosTria VectorBase[]

aryConTria uint[]

aryPosTetra VectorBase[]

aryConTetra uint[]

bUseDSDL bool

GenerateMeshInfo(string, AttributeFacetRefinementBase, ConvertFactor, MeshFreeMeshType, ref MeshFreeMeshType, ref VectorBase[], ref uint[], ref VectorBase[], ref uint[])

public void GenerateMeshInfo(string strMesherPath, AttributeFacetRefinementBase attrGeomOutputProp, Unit.ConvertFactor factor, MeshFreeMeshType reqMeshType, ref MeshFreeMeshType resMeshType, ref VectorBase[] aryPosTria, ref uint[] aryConTria, ref VectorBase[] aryPosTetra, ref uint[] aryConTetra)

Parameters

strMesherPath string

attrGeomOutputProp AttributeFacetRefinementBase

factor Unit.ConvertFactor

reqMeshType MeshFreeMeshType

resMeshType MeshFreeMeshType

aryPosTria VectorBase[]

aryConTria uint[]

aryPosTetra VectorBase[]

aryConTetra uint[]

GetAllFacePointAndNormal(ref List<VectorBase>, ref List<VectorBase>)

public bool GetAllFacePointAndNormal(ref List<VectorBase> lstPositions, ref List<VectorBase> lstDirections)

Parameters

lstPositions List<VectorBase>

lstDirections List<VectorBase>

Returns

bool

GetAnalysisLevelInfo(double, ref List<double>, ref List<uint>)

public bool GetAnalysisLevelInfo(double dVolume, ref List<double> lstNodeDistance, ref List<uint> lstNodeCount)

Parameters

dVolume double

lstNodeDistance List<double>

lstNodeCount List<uint>

Returns

bool

GetAnalysisLevelInfo(ref List<double>, ref List<uint>)

public bool GetAnalysisLevelInfo(ref List<double> lstNodeDistance, ref List<uint> lstNodeCount)

Parameters

lstNodeDistance List<double>

lstNodeCount List<uint>

Returns

bool

GetAttrFacetRefineBase()

Get Attribute value on Facet Refinement

public AttributeFacetRefinementBase GetAttrFacetRefineBase()

Returns

AttributeFacetRefinementBase

Facet Refinement Attribute value

GetBodyGeomInfo(vector<_VM_VECTOR,std::allocator<_VM_VECTOR> >*, vector<unsigned int,std::allocator<unsigned int> >*, AttributeFacetRefinementBase, double, bool)

public bool GetBodyGeomInfo(vector<_VM_VECTOR,std::allocator<_VM_VECTOR> >* vectPosTria, vector<unsigned int,std::allocator<unsigned int> >* vecConTria, AttributeFacetRefinementBase attrGeomOutputProp, double dLengthFactor, bool bUseDSDL)

Parameters

vectPosTria vector<_VM_VECTOR,std::allocator<_VM_VECTOR> >*

vecConTria [vector<unsigned int,std::allocator<unsigned int> >](std.vector<unsigned int,std.md)*

attrGeomOutputProp AttributeFacetRefinementBase

dLengthFactor double

bUseDSDL bool

Returns

bool

GetBodyGeomInfo(ref VectorBase[], ref uint[], AttributeFacetRefinementBase, double, bool)

public bool GetBodyGeomInfo(ref VectorBase[] aryPosTria, ref uint[] aryConTria, AttributeFacetRefinementBase attrGeomOutputProp, double dLengthFactor, bool bUseDSDL)

Parameters

aryPosTria VectorBase[]

aryConTria uint[]

attrGeomOutputProp AttributeFacetRefinementBase

dLengthFactor double

bUseDSDL bool

Returns

bool

GetBodyGeomInfo(ref VectorBase[], ref uint[], AttributeFacetRefinementBase, double)

public bool GetBodyGeomInfo(ref VectorBase[] aryPosTria, ref uint[] aryConTria, AttributeFacetRefinementBase attrGeomOutputProp, double dLengthFactor)

Parameters

aryPosTria VectorBase[]

aryConTria uint[]

attrGeomOutputProp AttributeFacetRefinementBase

dLengthFactor double

Returns

bool

GetBodyGeomInfoForDFG(AttributeFacetRefinementBase, ref VectorBase[], ref uint[])

public bool GetBodyGeomInfoForDFG(AttributeFacetRefinementBase attrGeomOutputProp, ref VectorBase[] aryPosTria, ref uint[] aryConTria)

Parameters

attrGeomOutputProp AttributeFacetRefinementBase

aryPosTria VectorBase[]

aryConTria uint[]

Returns

bool

GetBoundingBox(TMatrix, ref VectorBase, ref VectorBase, BoxingMode)

public bool GetBoundingBox(TMatrix matT, ref VectorBase vecMinPt, ref VectorBase vecMaxPt, BoxingMode boxingMode)

Parameters

matT TMatrix

vecMinPt VectorBase

vecMaxPt VectorBase

boxingMode BoxingMode

Returns

bool

GetBoundingBox(TMatrix, ref VectorBase, ref VectorBase)

public bool GetBoundingBox(TMatrix matT, ref VectorBase vecMinPt, ref VectorBase vecMaxPt)

Parameters

matT TMatrix

vecMinPt VectorBase

vecMaxPt VectorBase

Returns

bool

GetCADGeomNameAttribute(string, ref List<string>)

public void GetCADGeomNameAttribute(string strPrefix, ref List<string> lstName)

Parameters

strPrefix string

lstName List<string>

GetColor()

Get color. The color

public Color GetColor()

Returns

Color

GetDefaultMaxFacetSize()

Get default maximum facet size

public double GetDefaultMaxFacetSize()

Returns

double

Default maximum facet size

GetDefaultMaxPenetration(ref double)

Get default maximum penetration.

The maximum penetration.
public bool GetDefaultMaxPenetration(ref double dMaxPenetration)

Parameters

dMaxPenetration double

Returns

bool

GetEdgeCount()

Get the number of edge. -1 : error

public int GetEdgeCount()

Returns

int

The number of edge.

GetEdgeIndex(ValueType)

public int GetEdgeIndex(ValueType nID)

Parameters

nID ValueType

Returns

int

GetEdgePoints(int, double, TMatrix, ref List<VectorBase>)

public bool GetEdgePoints(int nEdgeIndex, double dDistance, TMatrix matBase, ref List<VectorBase> lstPoints)

Parameters

nEdgeIndex int

dDistance double

matBase TMatrix

lstPoints List<VectorBase>

Returns

bool

GetEdges(ICollection<int>)

public List<Edge> GetEdges(ICollection<int> Colors)

Parameters

Colors ICollection<int>

Returns

List<Edge>

GetEdges()

get all edges.

public List<Edge> GetEdges()

Returns

List<Edge>

list of all edges

GetFaceColors()

get all face colors.

public List<int> GetFaceColors()

Returns

List<int>

list of all face colors.

GetFaceIndex(ValueType)

public int GetFaceIndex(ValueType nID)

Parameters

nID ValueType

Returns

int

GetFaces(ICollection<int>)

public List<Face> GetFaces(ICollection<int> Colors)

Parameters

Colors ICollection<int>

Returns

List<Face>

GetFaces()

get all faces.

public List<Face> GetFaces()

Returns

List<Face>

list of all faces

GetFacesInfo_NormalAndCenterPt(List<Face>, ref Dictionary<Face, VectorBase>, ref Dictionary<Face, VectorBase>)

public void GetFacesInfo_NormalAndCenterPt(List<Face> lstFace, ref Dictionary<Face, VectorBase> dic_vecNormal, ref Dictionary<Face, VectorBase> dic_vecCenterPt)

Parameters

lstFace List<Face>

dic_vecNormal Dictionary<Face, VectorBase>

dic_vecCenterPt Dictionary<Face, VectorBase>

GetFacetInfo(ref VectorBase[], ref int[])

Get facet information.

facet point information.facet connectivity inforamtion.
public void GetFacetInfo(ref VectorBase[] arPt, ref int[] arConnectivity)

Parameters

arPt VectorBase[]

arConnectivity int[]

GetFacetPositions(Face[], string)

public static VectorBase[] GetFacetPositions(Face[] arFaces, string strFacetOptionsXml)

Parameters

arFaces Face[]

strFacetOptionsXml string

Returns

VectorBase[]

GetGeomInfoOfFaces(Body, Face[], string, bool, UIntPtr)

public static void GetGeomInfoOfFaces(Body body, Face[] arFaces, string strFacetOptionsXml, bool bSkipMidPoints, UIntPtr pGeomInfo)

Parameters

body Body

arFaces Face[]

strFacetOptionsXml string

bSkipMidPoints bool

pGeomInfo UIntPtr

GetLumpCount()

Get the number of lump. -1 : error

public int GetLumpCount()

Returns

int

The number of lump.

GetModelNavigatorInformationImpl(XmlDocument, XmlElement, bool)

Gets the model navigator information implementation.

virtual bool GetModelNavigatorInformationImpl(XmlDocument xmlDom, XmlElement xmlRootEle, bool bHasChild)

Parameters

xmlDom XmlDocument

The navigator information xml.

xmlRootEle XmlElement

The navigator information xml root element.

bHasChild bool

true if has a child object; otherwise, false.

Returns

bool

GetNearest4PointOnFaceWithRange(VectorBase, double, VectorBase, VectorBase, bool, VectorBase[])

public bool GetNearest4PointOnFaceWithRange(VectorBase vecUserPos, double dRange, VectorBase vecNormalDirection, VectorBase vecShearDirection, bool bBase, VectorBase[] vecNearest4Pos)

Parameters

vecUserPos VectorBase

dRange double

vecNormalDirection VectorBase

vecShearDirection VectorBase

bBase bool

vecNearest4Pos VectorBase[]

Returns

bool

GetNearestPointAndNormalOnFace(VectorBase, VectorBase, VectorBase)

public bool GetNearestPointAndNormalOnFace(VectorBase vCenterPoint, VectorBase vecPoint, VectorBase vecNormal)

Parameters

vCenterPoint VectorBase

vecPoint VectorBase

vecNormal VectorBase

Returns

bool

GetNearestPointOnFace(VectorBase, ref VectorBase)

public void GetNearestPointOnFace(VectorBase vecUserPos, ref VectorBase vecNearestPos)

Parameters

vecUserPos VectorBase

vecNearestPos VectorBase

GetNearestPointOnFaceWithDirection(VectorBase, VectorBase, double, ref VectorBase)

public bool GetNearestPointOnFaceWithDirection(VectorBase vecUserPos, VectorBase vecNormalDir, double dRange, ref VectorBase vecNearestPos)

Parameters

vecUserPos VectorBase

vecNormalDir VectorBase

dRange double

vecNearestPos VectorBase

Returns

bool

GetNewEntityName(string, bool, int, int)

Generate an unique DAFUL object name from the container using the prefix name.

public virtual string GetNewEntityName(string strPrefix, bool bUseUnderLine, int nNumFigure, int nStartIndex)

Parameters

strPrefix string

The DAFUL object prefix name.

bUseUnderLine bool

Whether use underline.

nNumFigure int

The Number of Figure.

nStartIndex int

The start index.

Returns

string

The DAFUL object name.

GetNewEntityName(string, bool, int)

Generate an unique DAFUL object name from the container using the prefix name.

public virtual string GetNewEntityName(string strPrefix, bool bUseUnderLine, int nNumFigure)

Parameters

strPrefix string

The DAFUL object prefix name.

bUseUnderLine bool

Whether use underline.

nNumFigure int

The Number of Figure.

Returns

string

The DAFUL object name.

GetNewEntityName(string)

Generate an unique DAFUL object name from the container using the prefix name.

public virtual string GetNewEntityName(string strPrefix)

Parameters

strPrefix string

The DAFUL object prefix name.

Returns

string

The DAFUL object name.

GetNormalOnFace(VectorBase, ref VectorBase)

gets the normal direction at some point on face. {1 : kernel api error} {2 : invalid body} {21 : fail to get faces} {22 : kernel function error}

public bool GetNormalOnFace(VectorBase vecPosition, ref VectorBase vecNormal)

Parameters

vecPosition VectorBase

the point position

vecNormal VectorBase

result normal direction

Returns

bool

if operation success then return true.

GetPointAndDirection(ref VectorBase, ref VectorBase)

Get point and direction.

public bool GetPointAndDirection(ref VectorBase vecPosition, ref VectorBase vecDirection)

Parameters

vecPosition VectorBase

The point.

vecDirection VectorBase

The direction.

Returns

bool

true if success; otherwise, false.

GetSortOfBody()

Gets type of body.

public BodyType GetSortOfBody()

Returns

BodyType

body type

GetStartPointOfClosedLoop(List<Edge>, ref VectorBase)

public bool GetStartPointOfClosedLoop(List<Edge> lstEdges, ref VectorBase vecPosition)

Parameters

lstEdges List<Edge>

vecPosition VectorBase

Returns

bool

GetTargetListForUpdate()

Gets the update objects.

public override List<IEventProvider> GetTargetListForUpdate()

Returns

List<IEventProvider>

GetUnnamedObjectName(object)

Get an unnamed object name.

public string GetUnnamedObjectName(object obUnnamed)

Parameters

obUnnamed object

The unnamed object.

Returns

string

The unnamed object name.

GetVertexIndex(ValueType)

public int GetVertexIndex(ValueType nID)

Parameters

nID ValueType

Returns

int

GetVoidCount()

Gets the void count.

public int GetVoidCount()

Returns

int

GetVoidPoints(double[], ref VectorBase[])

Get Inner point of void shells.

public int GetVoidPoints(double[] ardScale, ref VectorBase[] aryPoints)

Parameters

ardScale double[]

aryPoints VectorBase[]

The list of inner point of void shells.

Returns

int

-1 : error, 0 : finding successs, positive number : the number of not found case.

GetWireLastPoint(ref VectorBase)

gets the position of last point on wire body. {1 : kernel api error} {2 : invalid body} {21 : fail to get faces} {22 : kernel function error}

public bool GetWireLastPoint(ref VectorBase vecPosition)

Parameters

vecPosition VectorBase

the point position

Returns

bool

if operation success then return true.

GetWirePoints(double, ref List<VectorBase>)

public bool GetWirePoints(double dDistance, ref List<VectorBase> lstPoints)

Parameters

dDistance double

lstPoints List<VectorBase>

Returns

bool

GetWirePointsAndTangents(double, ref List<VectorBase>, ref List<VectorBase>)

public bool GetWirePointsAndTangents(double dDistance, ref List<VectorBase> lstPoints, ref List<VectorBase> lstTangents)

Parameters

dDistance double

lstPoints List<VectorBase>

lstTangents List<VectorBase>

Returns

bool

GetWirePointsAndTangentsWithSection(double, VectorBase, VectorBase, ref List<VectorBase>, ref List<VectorBase>)

public bool GetWirePointsAndTangentsWithSection(double dDistance, VectorBase vecFirst, VectorBase vecSecond, ref List<VectorBase> lstPoints, ref List<VectorBase> lstTangents)

Parameters

dDistance double

vecFirst VectorBase

vecSecond VectorBase

lstPoints List<VectorBase>

lstTangents List<VectorBase>

Returns

bool

HighlightBuilder()

highlignt for body's builder.

public void HighlightBuilder()

InitialSetBuildInfo(string)

public void InitialSetBuildInfo(string strBuilderXml)

Parameters

strBuilderXml string

Initialize(ConvertFactor)

Initializes member through unit convert factor.

public override void Initialize(Unit.ConvertFactor factor)

Parameters

factor Unit.ConvertFactor

The unit convert factor.

IsNonManifold()

determines if a body is a nonmanifold.

public bool IsNonManifold()

Returns

bool

if a body is a nonmanifold then return true.

IsWireBody()

determines if a body is a wire.

public bool IsWireBody()

Returns

bool

if a body is a wire then return true.

LinkRequestUpdate(object, LinkEventArgs)

Request for update the linked object.

protected override void LinkRequestUpdate(object objNotifier, LinkEventArgs arg)

Parameters

objNotifier object

The linked object.

arg LinkEventArgs

The instance containing the event data.

OnDeserialization(object)

Called when [deserialization].

protected override void OnDeserialization(object sender)

Parameters

sender object

The sender.

OnPostDeserialized(StreamingContext)

public virtual void OnPostDeserialized(StreamingContext context)

Parameters

context StreamingContext

PostRemoveFromDocument(Document)

Call when post [remove from document].

public override void PostRemoveFromDocument(Document document)

Parameters

document Document

The document

PrepareFacesWithColor()

prepare the face with color

public bool PrepareFacesWithColor()

Returns

bool

if a body has the face color then return true.

ReDrawChangeFacet()

public void ReDrawChangeFacet()

RebuildGeometry(object, LinkEventArgs)

Rebuild geometry.

protected virtual void RebuildGeometry(object objBuilder, LinkEventArgs args)

Parameters

objBuilder object

The builder.

args LinkEventArgs

The event handler.

RelationWithPoint(VectorBase)

A point may be in, on, or off the this body. The returned values corresponding to these relationships are: 1 : point in entity 0 : point on entity -1 : point off entity -2 : error

public int RelationWithPoint(VectorBase vecPosition)

Parameters

vecPosition VectorBase

the point position

Returns

int

1 or 0 or -1 or -2

RepairTopology()

repair the invalid topology.

public void RepairTopology()

ReplaceCAD(List<ReplaceCADInfo>)

public void ReplaceCAD(List<Body.ReplaceCADInfo> lstInfo)

Parameters

lstInfo List<Body.ReplaceCADInfo>

ResetBuildInfo(string)

Reset build Information.

build Information.
public void ResetBuildInfo(string strInfo)

Parameters

strInfo string

RunTetraMesher(string, vector<_VM_VECTOR,std::allocator<_VM_VECTOR> >*, vector<unsigned int,std::allocator<unsigned int> >*, vector<_VM_VECTOR,std::allocator<_VM_VECTOR> >*, vector<unsigned int,std::allocator<unsigned int> >*)

public bool RunTetraMesher(string strMesherPath, vector<_VM_VECTOR,std::allocator<_VM_VECTOR> >* vecPosTria, vector<unsigned int,std::allocator<unsigned int> >* vecConTria, vector<_VM_VECTOR,std::allocator<_VM_VECTOR> >* vecPosTetra, vector<unsigned int,std::allocator<unsigned int> >* vecConTetra)

Parameters

strMesherPath string

vecPosTria vector<_VM_VECTOR,std::allocator<_VM_VECTOR> >*

vecConTria [vector<unsigned int,std::allocator<unsigned int> >](std.vector<unsigned int,std.md)*

vecPosTetra vector<_VM_VECTOR,std::allocator<_VM_VECTOR> >*

vecConTetra [vector<unsigned int,std::allocator<unsigned int> >](std.vector<unsigned int,std.md)*

Returns

bool

RunTetraMesher(string, ref VectorBase[], ref uint[], ref VectorBase[], ref uint[])

public bool RunTetraMesher(string strMesherPath, ref VectorBase[] aryPosTria, ref uint[] aryConTria, ref VectorBase[] aryPosTetra, ref uint[] aryConTetra)

Parameters

strMesherPath string

aryPosTria VectorBase[]

aryConTria uint[]

aryPosTetra VectorBase[]

aryConTetra uint[]

Returns

bool

SetColor(Color)

Set color.

The color.
public void SetColor(Color color)

Parameters

color Color

SetGeometryRepresentation(string, string, bool)

Set geometry representation.

bool SetGeometryRepresentation(string strGeom, string strDefaultGeom, bool bUseRedraw)

Parameters

strGeom string

The geometry information.

strDefaultGeom string

The geometry information when checked default value.

bUseRedraw bool

The redraw flag.

Returns

bool

SetModifiedBody()

public void SetModifiedBody()

SetTransparency(double)

Set transparency.

The transparency.
public void SetTransparency(double dTransp)

Parameters

dTransp double

SortEdges(List<Edge>)

public List<Edge> SortEdges(List<Edge> lstEdges)

Parameters

lstEdges List<Edge>

Returns

List<Edge>

UpdateBody(bool)

Update body.

The body build flag.
public void UpdateBody(bool bBuild)

Parameters

bBuild bool

UpdateBody()

Update body.

public void UpdateBody()

Connect with Ansys