OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    XSAlgo_ShapeProcessor Class Reference

    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.
     XSAlgo_ShapeProcessor (const DE_ShapeFixParameters &theParameters)
     Constructor.
    TopoDS_Shape ProcessShape (const TopoDS_Shape &theShape, const ShapeProcess::OperationsFlags &theOperations, const Message_ProgressRange &theProgress)
     Process the shape by applying the specified operations.
    occ::handle< ShapeProcess_ShapeContext > GetContext ()
     Get the context of the last processing. Only valid after the ProcessShape() method was called.
    void MergeTransferInfo (const occ::handle< Transfer_TransientProcess > &theTransientProcess, const int theFirstTPItemIndex) const
     Merge the results of the shape processing with the transfer process.
    void MergeTransferInfo (const occ::handle< Transfer_FinderProcess > &theFinderProcess) const
     Merge the results of the shape processing with the finder process.

    Static Public Member Functions

    static bool CheckPCurve (const TopoDS_Edge &theEdge, const TopoDS_Face &theFace, const double thePrecision, const bool theIsSeam)
     Check quality of pcurve of the edge on the given face, and correct it if necessary.
    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.
    static void FillParameterMap (const DE_ShapeFixParameters &theParameters, const bool theIsReplace, ParameterMap &theMap)
     Fill the parameter map with the values from the specified parameters.
    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.
    static void SetParameter (const char *theKey, const DE_ShapeFixParameters::FixMode theValue, const bool theIsReplace, XSAlgo_ShapeProcessor::ParameterMap &theMap)
     Set the parameter in the map.
    static void SetParameter (const char *theKey, const double theValue, const bool theIsReplace, ParameterMap &theMap)
     Set the parameter in the map.
    static void SetParameter (const char *theKey, const TCollection_AsciiString &theValue, const bool theIsReplace, ParameterMap &theMap)
     Set the parameter in the map.
    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".
    static void MergeShapeTransferInfo (const occ::handle< Transfer_TransientProcess > &theFinderProcess, const NCollection_DataMap< TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher > &theModifiedShapesMap, const int theFirstTPItemIndex, const occ::handle< ShapeExtend_MsgRegistrator > &theMessages)
     Merge the results of the shape processing with the finder process.
    static void MergeShapeTransferInfo (const occ::handle< Transfer_FinderProcess > &theTransientProcess, const NCollection_DataMap< TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher > &theModifiedShapesMap, const occ::handle< ShapeExtend_MsgRegistrator > &theMessages)
     Merge the results of the shape processing with the transfer process.

    Detailed Description

    Shape Processing module. Allows to define and apply general Shape Processing as a customizable sequence of operators.

    Member Typedef Documentation

    ◆ ParameterMap

    ◆ ProcessingData

    ◆ ProcessingFlags

    Constructor & Destructor Documentation

    ◆ XSAlgo_ShapeProcessor() [1/2]

    XSAlgo_ShapeProcessor::XSAlgo_ShapeProcessor ( const ParameterMap & theParameters,
    const DE_ShapeFixParameters & theShapeFixParameters = {} )

    Constructor.

    Parameters
    theParametersPre-filled parameter map to be used in the processing.
    theShapeFixParametersShape 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() [2/2]

    XSAlgo_ShapeProcessor::XSAlgo_ShapeProcessor ( const DE_ShapeFixParameters & theParameters)

    Constructor.

    Parameters
    theParametersParameters to be used in the processing.

    Member Function Documentation

    ◆ CheckPCurve()

    bool XSAlgo_ShapeProcessor::CheckPCurve ( const TopoDS_Edge & theEdge,
    const TopoDS_Face & theFace,
    const double thePrecision,
    const bool theIsSeam )
    static

    Check quality of pcurve of the edge on the given face, and correct it if necessary.

    Parameters
    theEdgeEdge to check.
    theFaceFace on which the edge is located.
    thePrecisionPrecision to use for checking.
    theIsSeamFlag indicating whether the edge is a seam edge.
    Returns
    True if the pcurve was corrected, false if it was dropped.

    ◆ FillParameterMap()

    void XSAlgo_ShapeProcessor::FillParameterMap ( const DE_ShapeFixParameters & theParameters,
    const bool theIsReplace,
    ParameterMap & theMap )
    static

    Fill the parameter map with the values from the specified parameters.

    Parameters
    theParametersParameters to be used in the processing.
    theIsForceFlag indicating whether parameter should be replaced if it already exists in the map.
    theMapMap to fill.

    ◆ GetContext()

    occ::handle< ShapeProcess_ShapeContext > XSAlgo_ShapeProcessor::GetContext ( )
    inline

    Get the context of the last processing. Only valid after the ProcessShape() method was called.

    Returns
    Shape context.

    ◆ MergeShapeTransferInfo() [1/2]

    void XSAlgo_ShapeProcessor::MergeShapeTransferInfo ( const occ::handle< Transfer_FinderProcess > & theTransientProcess,
    const NCollection_DataMap< TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher > & theModifiedShapesMap,
    const occ::handle< ShapeExtend_MsgRegistrator > & theMessages )
    static

    Merge the results of the shape processing with the transfer process.

    Parameters
    theTransientProcessTransfer process to merge with.
    theModifiedShapesMapMap of modified shapes.
    theFirstTPItemIndexIndex of the first item in the transfer process to merge with.
    theMessagesMessages to add.

    ◆ MergeShapeTransferInfo() [2/2]

    void XSAlgo_ShapeProcessor::MergeShapeTransferInfo ( const occ::handle< Transfer_TransientProcess > & theFinderProcess,
    const NCollection_DataMap< TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher > & theModifiedShapesMap,
    const int theFirstTPItemIndex,
    const occ::handle< ShapeExtend_MsgRegistrator > & theMessages )
    static

    Merge the results of the shape processing with the finder process.

    Parameters
    theTransientProcessTransfer process to merge with.
    theModifiedShapesMapMap of modified shapes.
    theFirstTPItemIndexIndex of the first item in the transfer process to merge with.
    theMessagesMessages to add.

    ◆ MergeTransferInfo() [1/2]

    void XSAlgo_ShapeProcessor::MergeTransferInfo ( const occ::handle< Transfer_FinderProcess > & theFinderProcess) const

    Merge the results of the shape processing with the finder process.

    Parameters
    theFinderProcessFinder process to merge with.

    ◆ MergeTransferInfo() [2/2]

    void XSAlgo_ShapeProcessor::MergeTransferInfo ( const occ::handle< Transfer_TransientProcess > & theTransientProcess,
    const int theFirstTPItemIndex ) const

    Merge the results of the shape processing with the transfer process.

    Parameters
    theTransientProcessTransfer process to merge with.
    theFirstTPItemIndexIndex of the first item in the transfer process to merge with.

    ◆ PrepareForTransfer()

    void XSAlgo_ShapeProcessor::PrepareForTransfer ( )
    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".

    ◆ ProcessShape()

    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.

    Parameters
    theShapeShape to process.
    theOperationsOperations to be performed.
    theProgressProgress indicator.
    Returns
    Processed shape. May be the same as the input shape if no modifications were made.

    ◆ ReadProcessingData()

    ProcessingData XSAlgo_ShapeProcessor::ReadProcessingData ( const TCollection_AsciiString & theFileResourceName,
    const TCollection_AsciiString & theScopeResourceName )
    static

    Reads the parameter map from and operation flags from the file specified in static interface.

    Parameters
    theFileResourceNameName of the parameter in interface static that contains the name of the file. For example, parameter "read.iges.resource.name" may contain string "IGES".
    theScopeResourceNameName of the parameter in interface static that contains the name of the scope. For example, parameter "read.iges.sequence" may contain string "FromIGES".
    Returns
    Read parameter map.

    ◆ SetParameter() [1/3]

    void XSAlgo_ShapeProcessor::SetParameter ( const char * theKey,
    const DE_ShapeFixParameters::FixMode theValue,
    const bool theIsReplace,
    XSAlgo_ShapeProcessor::ParameterMap & theMap )
    static

    Set the parameter in the map.

    Parameters
    theKeyKey of the parameter.
    theValueValue of the parameter.
    theIsReplaceFlag indicating whether parameter should be replaced if it already exists in the map.
    theMapMap to set the parameter in.

    ◆ SetParameter() [2/3]

    void XSAlgo_ShapeProcessor::SetParameter ( const char * theKey,
    const double theValue,
    const bool theIsReplace,
    ParameterMap & theMap )
    static

    Set the parameter in the map.

    Parameters
    theKeyKey of the parameter.
    theValueValue of the parameter.
    theIsReplaceFlag indicating whether parameter should be replaced if it already exists in the map.
    theMapMap to set the parameter in.

    ◆ SetParameter() [3/3]

    void XSAlgo_ShapeProcessor::SetParameter ( const char * theKey,
    const TCollection_AsciiString & theValue,
    const bool theIsReplace,
    ParameterMap & theMap )
    static

    Set the parameter in the map.

    Parameters
    theKeyKey of the parameter.
    theValueValue of the parameter.
    theIsReplaceFlag indicating whether parameter should be replaced if it already exists in the map.
    theMapMap to set the parameter in.

    ◆ SetShapeFixParameters()

    void XSAlgo_ShapeProcessor::SetShapeFixParameters ( const DE_ShapeFixParameters & theParameters,
    const ParameterMap & theAdditionalParameters,
    ParameterMap & theTargetParameterMap )
    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.

    Parameters
    theParametersthe parameters for shape processing.
    theAdditionalParametersthe additional parameters for shape processing.
    theTargetParameterMapMap to set the parameters in.

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