Hide menu
Loading...
Searching...
No Matches
cadex.ModelData.ModelElementUniqueVisitor Class Reference

Defines a visitor that visits each unique element only once. More...

Inherits cadex.ModelData.ModelElementVisitor.

Public Member Functions

 ModelElementUniqueVisitor (global::System.IntPtr cPtr, bool cMemoryOwn)
 
 ModelElementUniqueVisitor ()
 Constructor.
 
 ModelElementUniqueVisitor (cadex.ModelData.ModelElementVisitor theRef)
 
override void Apply (cadex.ModelData.Part thePart)
 
override bool VisitEnter (cadex.ModelData.Assembly theAssembly)
 Enters an assembly.
 
override void VisitLeave (cadex.ModelData.Assembly theAssembly)
 Leaves an assembly.
 
override bool VisitEnter (cadex.ModelData.Instance theInstance)
 Enters an instance.
 
override void VisitLeave (cadex.ModelData.Instance theInstance)
 Leaves an instance.
 

Protected Member Functions

override void Dispose (bool disposing)
 

Detailed Description

Defines a visitor that visits each unique element only once.

Children of already visited assemblies or referred element of already visited instances, or already visited parts will never be visited again.

Already visited instances or assemblies will be entered with Ref() visitor VisitEnter() as well as left with VisitLeave().

Uses the associated visitor (Reference()) to really visit an element.

Examples
MTKConverter/Program.cs, MTKConverter/main.cxx, machining/dfm_analyzer/Program.cs, machining/dfm_analyzer/main.cxx, machining/feature_recognizer/Program.cs, machining/feature_recognizer/main.cxx, molding/dfm_analyzer/Program.cs, molding/dfm_analyzer/main.cxx, molding/feature_recognizer/Program.cs, molding/feature_recognizer/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, wall_thickness/analyzer/Program.cs, and wall_thickness/analyzer/main.cxx.

Member Function Documentation

◆ VisitLeave() [1/2]

override void cadex.ModelData.ModelElementUniqueVisitor.VisitLeave ( cadex.ModelData.Assembly theAssembly)
inline

Leaves an assembly.

Invokes VisitLeave() of the Ref() visitor if the assembly is being visited for the first time.

◆ VisitLeave() [2/2]

override void cadex.ModelData.ModelElementUniqueVisitor.VisitLeave ( cadex.ModelData.Instance theInstance)
inline

Leaves an instance.

Invokes VisitLeave() of the Ref() visitor if the instance is being visited for the first time.