Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Member Functions
StepTidy_DuplicateCleaner Class Reference

A class to merge STEP entities. This class is used to merge equal STEP entities in the work session and remove duplicates. It uses the child classes of StepTidy_EntityReducer class to perform the merging. The child classes of StepTidy_EntityReducer are specialized for different types of entities. StepTidy_EntityReducer implements the basic logic for searching and merging entities while child classes implement the logic for replacing specific type of entities in the specific type of sharing entities. Classes StepTidy_*Hasher are used to hash the entities and compare them. They define which entities are considered equal to each other. The hashers are used in the StepTidy_EntityReducer class to store the entities in a map. The map is used to find the duplicates and replace them. From this perspective of this module, 'equal' or 'duplicate' entities are those that has equal names and very close numerical values, like for example Cartesian points with coordinates that are equal up to 1e-12 or Vectors with equal orientations and magnitudes up to 1e-12. After the merging this class calls its own method to remove the duplicates. How to use: More...

#include <StepTidy_DuplicateCleaner.hxx>

Public Member Functions

 StepTidy_DuplicateCleaner (occ::handle< XSControl_WorkSession > theWS)
 Constructor.
 
void Perform ()
 Perform the merging of entities. All entities in a model stored in the provided work session that are considered equal to each other will be merged, and duplicates will be removed.
 

Detailed Description

A class to merge STEP entities. This class is used to merge equal STEP entities in the work session and remove duplicates. It uses the child classes of StepTidy_EntityReducer class to perform the merging. The child classes of StepTidy_EntityReducer are specialized for different types of entities. StepTidy_EntityReducer implements the basic logic for searching and merging entities while child classes implement the logic for replacing specific type of entities in the specific type of sharing entities. Classes StepTidy_*Hasher are used to hash the entities and compare them. They define which entities are considered equal to each other. The hashers are used in the StepTidy_EntityReducer class to store the entities in a map. The map is used to find the duplicates and replace them. From this perspective of this module, 'equal' or 'duplicate' entities are those that has equal names and very close numerical values, like for example Cartesian points with coordinates that are equal up to 1e-12 or Vectors with equal orientations and magnitudes up to 1e-12. After the merging this class calls its own method to remove the duplicates. How to use:

  1. Create an instance of the class by providing a pointer to the work session where the entities to process are stored.
  2. Call Perform() method to perform the merging of entities. After this call all entities that are considered equal to each other will be merged, and duplicates will be removed.

Constructor & Destructor Documentation

◆ StepTidy_DuplicateCleaner()

StepTidy_DuplicateCleaner::StepTidy_DuplicateCleaner ( occ::handle< XSControl_WorkSession > theWS)

Constructor.

Parameters
theWSthe work session to merge entities in.

Member Function Documentation

◆ Perform()

void StepTidy_DuplicateCleaner::Perform ( )

Perform the merging of entities. All entities in a model stored in the provided work session that are considered equal to each other will be merged, and duplicates will be removed.


The documentation for this class was generated from the following file: