Hide menu
Loading...
Searching...
No Matches

Defines a group of model elements. More...

Inheritance diagram for cadex.ModelData.Assembly:
cadex.ModelData.ModelElement cadex.BaseObject

Public Member Functions

 Assembly (global::System.IntPtr cPtr, bool cMemoryOwn)
 
 Assembly (cadex.BaseObject.Initialized arg0)
 
 Assembly (cadex.UTF16String theName)
 
cadex.ModelData.Instance AddInstance (cadex.ModelData.ModelElement theElement)
 Assemblies may only have instances as direct children.
 
cadex.ModelData.Instance AddInstance (cadex.ModelData.Part thePart, cadex.UTF16String theInstanceName)
 Adds a new part into the assembly.
 
cadex.ModelData.Instance AddInstance (cadex.ModelData.Part thePart)
 
cadex.ModelData.Instance AddInstance (cadex.ModelData.Part thePart, cadex.Geom.Transformation theTransformation, cadex.UTF16String theInstanceName)
 Adds a new part into the assembly.
 
cadex.ModelData.Instance AddInstance (cadex.ModelData.Part thePart, cadex.Geom.Transformation theTransformation)
 
cadex.ModelData.Instance AddInstance (cadex.ModelData.Assembly theAssembly, cadex.UTF16String theInstanceName)
 Adds a new assembly into the assembly.
 
cadex.ModelData.Instance AddInstance (cadex.ModelData.Assembly theAssembly)
 
cadex.ModelData.Instance AddInstance (cadex.ModelData.Assembly theAssembly, cadex.Geom.Transformation theTransformation, cadex.UTF16String theInstanceName)
 Adds a new assembly into the assembly.
 
cadex.ModelData.Instance AddInstance (cadex.ModelData.Assembly theAssembly, cadex.Geom.Transformation theTransformation)
 
bool RemoveInstance (cadex.ModelData.Instance theInstance)
 Returns a boolean value specifying whether the removal took place.
 
cadex.Collections.InstanceList Instances ()
 Returns a vector of instances.
 
uint NumberOfInstances ()
 Returns 0 if IsNull().
 
- Public Member Functions inherited from cadex.ModelData.ModelElement
 ModelElement (global::System.IntPtr cPtr, bool cMemoryOwn)
 
void SetName (cadex.UTF16String theName)
 Accepts a string as a unicode string.
 
cadex.UTF16String Name ()
 Returns empty string if the model element has no name (by default).
 
void SetUuid (System.Guid theUuid)
 Sets an object uuid.
 
System.Guid Uuid ()
 Returns an object uuid.
 
void SetPMI (cadex.PMI.Data thePMI)
 Sets the object PMI.
 
cadex.PMI.Data PMI ()
 Returns the object PMI.
 
void Accept (cadex.ModelData.ModelElementVisitor theVisitor)
 The order of visiting depends on the type of this object:
 
- Public Member Functions inherited from cadex.BaseObject
 BaseObject (global::System.IntPtr cPtr, bool cMemoryOwn)
 
void Dispose ()
 
bool IsNull ()
 
ulong Id ()
 Return unique identifier of public object.
 
bool IsEqual (cadex.BaseObject theObj)
 
override int GetHashCode ()
 
override bool Equals (System.Object o)
 

Static Public Member Functions

static new bool CompareType (cadex.BaseObject theObject)
 Returns true if theObject is an assembly.
 
static cadex.ModelData.Assembly Cast (cadex.ModelData.ModelElement theBase)
 
- Static Public Member Functions inherited from cadex.ModelData.ModelElement
static bool CompareType (cadex.BaseObject theObject)
 Returns true if theObject is a model element.
 
static cadex.ModelData.ModelElement Cast (cadex.BaseObject theBase)
 

Protected Member Functions

override void Dispose (bool disposing)
 
- Protected Member Functions inherited from cadex.ModelData.ModelElement
override void Dispose (bool disposing)
 

Detailed Description

Defines a group of model elements.

Direct children of an assembly are always instances which can refer to nested sub-assemblies or parts.

Examples
exploring/bom/Program.cs, exploring/bom/main.cxx, exploring/pmi/Program.cs, and exploring/pmi/main.cxx.

Member Function Documentation

◆ AddInstance() [1/5]

cadex.ModelData.Instance cadex.ModelData.Assembly.AddInstance ( cadex.ModelData.Assembly theAssembly,
cadex.Geom.Transformation theTransformation,
cadex.UTF16String theInstanceName )
inline

Adds a new assembly into the assembly.

◆ AddInstance() [2/5]

cadex.ModelData.Instance cadex.ModelData.Assembly.AddInstance ( cadex.ModelData.Assembly theAssembly,
cadex.UTF16String theInstanceName )
inline

Adds a new assembly into the assembly.

◆ AddInstance() [3/5]

cadex.ModelData.Instance cadex.ModelData.Assembly.AddInstance ( cadex.ModelData.ModelElement theElement)
inline

Assemblies may only have instances as direct children.

If theElement is not an instance (i.e. is a part or an assembly) then an interim instance is created which will refer to theElement.

If theElement is an instance, then it is returned; otherwise a new instance is created.

Parts and assemblies may be added to multiple assemblies to be shared. However they must be referred to by unique instances when adding to parent assemblies, i.e. each instance may not be added as a child into more than one assembly. Otherwise this will create an invalid model object with undefined behaviour. Adds a new child element into the assembly.

◆ AddInstance() [4/5]

cadex.ModelData.Instance cadex.ModelData.Assembly.AddInstance ( cadex.ModelData.Part thePart,
cadex.Geom.Transformation theTransformation,
cadex.UTF16String theInstanceName )
inline

Adds a new part into the assembly.

◆ AddInstance() [5/5]

cadex.ModelData.Instance cadex.ModelData.Assembly.AddInstance ( cadex.ModelData.Part thePart,
cadex.UTF16String theInstanceName )
inline

Adds a new part into the assembly.

◆ CompareType()

static new bool cadex.ModelData.Assembly.CompareType ( cadex.BaseObject theObject)
inlinestatic

Returns true if theObject is an assembly.

Examples
exploring/bom/Program.cs.

◆ Dispose()

override void cadex.ModelData.Assembly.Dispose ( bool disposing)
inlineprotectedvirtual

Reimplemented from cadex.BaseObject.

◆ Instances()

cadex.Collections.InstanceList cadex.ModelData.Assembly.Instances ( )
inline

Returns a vector of instances.

◆ NumberOfInstances()

uint cadex.ModelData.Assembly.NumberOfInstances ( )
inline

Returns 0 if IsNull().

Returns number of instances in this assembly.

◆ RemoveInstance()

bool cadex.ModelData.Assembly.RemoveInstance ( cadex.ModelData.Instance theInstance)
inline

Returns a boolean value specifying whether the removal took place.

Warning
A call to this function resulting in true value invalidates the instances of ModelElementVisitor and ModelElementIterator over assembly's children, making further behavior of these objects undefined. Removes an instance from an assembly.