|
Open CASCADE Technology
7.9.3
|
Shape Processing module. Allows to define and apply general Shape Processing as a customizable sequence of operators. More...
#include <XSAlgo_ShapeProcessor.hxx>
Public Types | |
| using | ParameterMap = NCollection_DataMap< TCollection_AsciiString, TCollection_AsciiString > |
| using | ProcessingData = std::pair< ParameterMap, ShapeProcess::OperationsFlags > |
| using | ProcessingFlags = std::pair< ShapeProcess::OperationsFlags, bool > |
Public Member Functions | |
| XSAlgo_ShapeProcessor (const ParameterMap &theParameters, const DE_ShapeFixParameters &theShapeFixParameters={}) | |
| Constructor. More... | |
| XSAlgo_ShapeProcessor (const DE_ShapeFixParameters &theParameters) | |
| Constructor. More... | |
| TopoDS_Shape | ProcessShape (const TopoDS_Shape &theShape, const ShapeProcess::OperationsFlags &theOperations, const Message_ProgressRange &theProgress) |
| Process the shape by applying the specified operations. More... | |
| Handle< ShapeProcess_ShapeContext > | GetContext () |
| Get the context of the last processing. Only valid after the ProcessShape() method was called. More... | |
| void | MergeTransferInfo (const Handle< Transfer_TransientProcess > &theTransientProcess, const Standard_Integer theFirstTPItemIndex) const |
| Merge the results of the shape processing with the transfer process. More... | |
| void | MergeTransferInfo (const Handle< Transfer_FinderProcess > &theFinderProcess) const |
| Merge the results of the shape processing with the finder process. More... | |
Static Public Member Functions | |
| static Standard_Boolean | CheckPCurve (const TopoDS_Edge &theEdge, const TopoDS_Face &theFace, const Standard_Real thePrecision, const Standard_Boolean theIsSeam) |
| Check quality of pcurve of the edge on the given face, and correct it if necessary. More... | |
| static ProcessingData | ReadProcessingData (const TCollection_AsciiString &theFileResourceName, const TCollection_AsciiString &theScopeResourceName) |
| Reads the parameter map from and operation flags from the file specified in static interface. More... | |
| static void | FillParameterMap (const DE_ShapeFixParameters &theParameters, const bool theIsReplace, ParameterMap &theMap) |
| Fill the parameter map with the values from the specified parameters. More... | |
| static void | SetShapeFixParameters (const DE_ShapeFixParameters &theParameters, const ParameterMap &theAdditionalParameters, ParameterMap &theTargetParameterMap) |
Sets parameters for shape processing. Parameters from theParameters are copied to the output map. Parameters from theAdditionalParameters are copied to the output map if they are not present in theParameters. More... | |
| static void | SetParameter (const char *theKey, const DE_ShapeFixParameters::FixMode theValue, const bool theIsReplace, XSAlgo_ShapeProcessor::ParameterMap &theMap) |
| Set the parameter in the map. More... | |
| static void | SetParameter (const char *theKey, const double theValue, const bool theIsReplace, ParameterMap &theMap) |
| Set the parameter in the map. More... | |
| static void | SetParameter (const char *theKey, const TCollection_AsciiString &theValue, const bool theIsReplace, ParameterMap &theMap) |
| Set the parameter in the map. More... | |
| static void | PrepareForTransfer () |
| The function is designed to set the length unit for the application before performing a transfer operation. It ensures that the length unit is correctly configured based on the value associated with the key "xstep.cascade.unit". More... | |
| static void | MergeShapeTransferInfo (const Handle< Transfer_TransientProcess > &theFinderProcess, const TopTools_DataMapOfShapeShape &theModifiedShapesMap, const Standard_Integer theFirstTPItemIndex, Handle< ShapeExtend_MsgRegistrator > theMessages) |
| Merge the results of the shape processing with the finder process. More... | |
| static void | MergeShapeTransferInfo (const Handle< Transfer_FinderProcess > &theTransientProcess, const TopTools_DataMapOfShapeShape &theModifiedShapesMap, Handle< ShapeExtend_MsgRegistrator > theMessages) |
| Merge the results of the shape processing with the transfer process. More... | |
Shape Processing module. Allows to define and apply general Shape Processing as a customizable sequence of operators.
| using XSAlgo_ShapeProcessor::ParameterMap = NCollection_DataMap<TCollection_AsciiString, TCollection_AsciiString> |
| using XSAlgo_ShapeProcessor::ProcessingData = std::pair<ParameterMap, ShapeProcess::OperationsFlags> |
| using XSAlgo_ShapeProcessor::ProcessingFlags = std::pair<ShapeProcess::OperationsFlags, bool> |
| XSAlgo_ShapeProcessor::XSAlgo_ShapeProcessor | ( | const ParameterMap & | theParameters, |
| const DE_ShapeFixParameters & | theShapeFixParameters = {} |
||
| ) |
Constructor.
| theParameters | Pre-filled parameter map to be used in the processing. |
| theShapeFixParameters | Shape healing parameters to be used in the processing. If theParameters has some shape healing values, they will override the corresponding values from theShapeFixParameters. |
| XSAlgo_ShapeProcessor::XSAlgo_ShapeProcessor | ( | const DE_ShapeFixParameters & | theParameters | ) |
Constructor.
| theParameters | Parameters to be used in the processing. |
|
static |
Check quality of pcurve of the edge on the given face, and correct it if necessary.
| theEdge | Edge to check. |
| theFace | Face on which the edge is located. |
| thePrecision | Precision to use for checking. |
| theIsSeam | Flag indicating whether the edge is a seam edge. |
|
static |
Fill the parameter map with the values from the specified parameters.
| theParameters | Parameters to be used in the processing. |
| theIsForce | Flag indicating whether parameter should be replaced if it already exists in the map. |
| theMap | Map to fill. |
|
inline |
Get the context of the last processing. Only valid after the ProcessShape() method was called.
|
static |
Merge the results of the shape processing with the finder process.
| theTransientProcess | Transfer process to merge with. |
| theModifiedShapesMap | Map of modified shapes. |
| theFirstTPItemIndex | Index of the first item in the transfer process to merge with. |
| theMessages | Messages to add. |
|
static |
Merge the results of the shape processing with the transfer process.
| theTransientProcess | Transfer process to merge with. |
| theModifiedShapesMap | Map of modified shapes. |
| theFirstTPItemIndex | Index of the first item in the transfer process to merge with. |
| theMessages | Messages to add. |
| void XSAlgo_ShapeProcessor::MergeTransferInfo | ( | const Handle< Transfer_TransientProcess > & | theTransientProcess, |
| const Standard_Integer | theFirstTPItemIndex | ||
| ) | const |
Merge the results of the shape processing with the transfer process.
| theTransientProcess | Transfer process to merge with. |
| theFirstTPItemIndex | Index of the first item in the transfer process to merge with. |
| void XSAlgo_ShapeProcessor::MergeTransferInfo | ( | const Handle< Transfer_FinderProcess > & | theFinderProcess | ) | const |
Merge the results of the shape processing with the finder process.
| theFinderProcess | Finder process to merge with. |
|
static |
The function is designed to set the length unit for the application before performing a transfer operation. It ensures that the length unit is correctly configured based on the value associated with the key "xstep.cascade.unit".
| TopoDS_Shape XSAlgo_ShapeProcessor::ProcessShape | ( | const TopoDS_Shape & | theShape, |
| const ShapeProcess::OperationsFlags & | theOperations, | ||
| const Message_ProgressRange & | theProgress | ||
| ) |
Process the shape by applying the specified operations.
| theShape | Shape to process. |
| theOperations | Operations to be performed. |
| theProgress | Progress indicator. |
|
static |
Reads the parameter map from and operation flags from the file specified in static interface.
| theFileResourceName | Name of the parameter in interface static that contains the name of the file. For example, parameter "read.iges.resource.name" may contain string "IGES". |
| theScopeResourceName | Name of the parameter in interface static that contains the name of the scope. For example, parameter "read.iges.sequence" may contain string "FromIGES". |
|
static |
Set the parameter in the map.
| theKey | Key of the parameter. |
| theValue | Value of the parameter. |
| theIsReplace | Flag indicating whether parameter should be replaced if it already exists in the map. |
| theMap | Map to set the parameter in. |
|
static |
Set the parameter in the map.
| theKey | Key of the parameter. |
| theValue | Value of the parameter. |
| theIsReplace | Flag indicating whether parameter should be replaced if it already exists in the map. |
| theMap | Map to set the parameter in. |
|
static |
Set the parameter in the map.
| theKey | Key of the parameter. |
| theValue | Value of the parameter. |
| theIsReplace | Flag indicating whether parameter should be replaced if it already exists in the map. |
| theMap | Map to set the parameter in. |
|
static |
Sets parameters for shape processing. Parameters from theParameters are copied to the output map. Parameters from theAdditionalParameters are copied to the output map if they are not present in theParameters.
| theParameters | the parameters for shape processing. |
| theAdditionalParameters | the additional parameters for shape processing. |
| theTargetParameterMap | Map to set the parameters in. |
1.8.10