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

Provides MTK data model. More...

Inheritance diagram for cadex.ModelData.Model:
cadex.BaseObject

Public Types

enum  FileFormatType { MTK , MTKWEB }
 Defines supported formats for export. More...
 

Public Member Functions

 Model (global::System.IntPtr cPtr, bool cMemoryOwn)
 
 Model ()
 Constructor.
 
 Model (cadex.UTF16String theName)
 Constructor.
 
void SetName (cadex.UTF16String theName)
 Accepts a string as a unicode string.
 
cadex.UTF16String Name ()
 Returns empty string if the model has no name (by default).
 
bool IsEmpty ()
 Returns true if the model has no roots, i.e.
 
void Clear ()
 Detaches the model contents.
 
void AddRoot (cadex.ModelData.ModelElement theElement)
 This function adds theElement as a root element in the model.
 
cadex.Collections.ModelElementList Roots ()
 This function returns the root elements of the model as a std.vector.
 
uint NumberOfRoots ()
 Returns the number of root elements in the model.
 
void SetDrawing (cadex.Drawing.Drawing theDrawing)
 
cadex.Drawing.Drawing Drawing ()
 
void Merge (cadex.ModelData.Model theModel)
 Adds roots from another model to current.
 
void AssignUuids ()
 Assigns uuid's (persistent id's) to scene graph elements and part representations (if not assigned yet).
 
void Accept (cadex.ModelData.ModelElementVisitor theVisitor)
 Accepts a visitor.
 
bool Open (cadex.UTF16String theFileName, bool theToAppend, cadex.ProgressStatus theProgressStatus)
 
bool Open (cadex.UTF16String theFileName, bool theToAppend)
 
bool Open (cadex.UTF16String theFileName)
 
bool Save (cadex.UTF16String theFileName, cadex.ProgressStatus theProgressStatus)
 
bool Save (cadex.UTF16String theFileName)
 
bool Save (cadex.UTF16String theFileName, cadex.ModelData.Model.FileFormatType theFormat, cadex.ProgressStatus theProgressStatus)
 
bool Save (cadex.UTF16String theFileName, cadex.ModelData.Model.FileFormatType theFormat)
 
- 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 cadex.ModelData.Model Cast (cadex.BaseObject theBase)
 

Protected Member Functions

override void Dispose (bool disposing)
 

Detailed Description

Provides MTK data model.

The model encapsulates a scene graph (hierarchy of assemblies and parts) and is thus an entry point to the entire 3D model data.

A model contains a shared pointer to its internal implementation, so simple copying an object will just copy a shared pointer:

ModelData::Model aModel2 = aModel; //both objects will point to the same contents
Provides MTK data model.
Definition Model.cs:31
See also
Product Structure
Examples
MTKConverter/Program.cs, MTKConverter/main.cxx, exploring/bom/Program.cs, exploring/bom/main.cxx, exploring/brep_geometry/Program.cs, exploring/brep_geometry/main.cxx, exploring/brep_topology/Program.cs, exploring/brep_topology/main.cxx, exploring/drawings/Program.cs, exploring/drawings/main.cxx, exploring/mesh/Program.cs, exploring/mesh/main.cxx, exploring/pmi/Program.cs, exploring/pmi/main.cxx, machining/dfm_analyzer/Program.cs, machining/dfm_analyzer/main.cxx, machining/feature_recognizer/Program.cs, machining/feature_recognizer/main.cxx, meshing/mesh_generation/Program.cs, meshing/mesh_generation/main.cxx, molding/dfm_analyzer/Program.cs, molding/dfm_analyzer/main.cxx, molding/feature_recognizer/Program.cs, molding/feature_recognizer/main.cxx, projector/poly_projector/Program.cs, projector/poly_projector/main.cxx, sheet_metal/dfm_analyzer/Program.cs, sheet_metal/dfm_analyzer/main.cxx, sheet_metal/feature_recognizer/Program.cs, sheet_metal/feature_recognizer/main.cxx, sheet_metal/unfolder/Program.cs, sheet_metal/unfolder/main.cxx, utilities/progress_bar/Program.cs, utilities/progress_bar/main.cxx, utilities/thumbnail_generation/Program.cs, utilities/thumbnail_generation/main.cxx, wall_thickness/analyzer/Program.cs, and wall_thickness/analyzer/main.cxx.

Member Enumeration Documentation

◆ FileFormatType

Defines supported formats for export.

Examples
MTKConverter/Program.cs.

Constructor & Destructor Documentation

◆ Model() [1/2]

cadex.ModelData.Model.Model ( )
inline

Constructor.

◆ Model() [2/2]

cadex.ModelData.Model.Model ( cadex.UTF16String theName)
inline

Constructor.

Member Function Documentation

◆ Accept()

◆ AddRoot()

void cadex.ModelData.Model.AddRoot ( cadex.ModelData.ModelElement theElement)
inline

This function adds theElement as a root element in the model.

If the passed element is an instance of ModelData.Instance, it will be automatically nested in ModelData.Assembly.

See also
Roots(), NumberOfRoots(). Adds a root element to the model.
Examples
MTKConverter/Program.cs, and projector/poly_projector/Program.cs.

◆ AssignUuids()

void cadex.ModelData.Model.AssignUuids ( )
inline

Assigns uuid's (persistent id's) to scene graph elements and part representations (if not assigned yet).

Examples
MTKConverter/Program.cs, and MTKConverter/main.cxx.

◆ Clear()

void cadex.ModelData.Model.Clear ( )
inline

Detaches the model contents.

Only cleans up contents of this object. Other copies of this object will remain unaffected. For instance, in the following code

Model aM1;
//... populate aM1;
Model aM2 = aM1;
aM1.Clear();
void Clear()
Detaches the model contents.
Definition Model.cs:122

the aM2 object will continue to have entire previous contents. Respectively, all previous pointers (e.g. to objects of BaseObject subclasses) remain valid.

See also
IsEmpty(). Clears the model contents.

◆ Dispose()

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

Reimplemented from cadex.BaseObject.

◆ IsEmpty()

bool cadex.ModelData.Model.IsEmpty ( )
inline

Returns true if the model has no roots, i.e.

NumberOfRoots() returns 0.

See also
Clear(). Returns true if the model is empty.
Examples
MTKConverter/Program.cs, MTKConverter/main.cxx, utilities/progress_bar/Program.cs, and utilities/progress_bar/main.cxx.

◆ Merge()

void cadex.ModelData.Model.Merge ( cadex.ModelData.Model theModel)
inline

Adds roots from another model to current.

◆ Name()

◆ NumberOfRoots()

uint cadex.ModelData.Model.NumberOfRoots ( )
inline

Returns the number of root elements in the model.

See also
AddRoot(), Roots(), IsEmpty().

◆ Roots()

cadex.Collections.ModelElementList cadex.ModelData.Model.Roots ( )
inline

This function returns the root elements of the model as a std.vector.

See also
AddRoot(), NumberOfRoots(). Returns root elements of the model.

◆ SetName()

void cadex.ModelData.Model.SetName ( cadex.UTF16String theName)
inline

Accepts a string as a unicode string.

See also
Name(). Sets a model name.
Examples
MTKConverter/Program.cs, and MTKConverter/main.cxx.