Open CASCADE Technology 7.9.0
ShapeProcess Class Reference

Shape Processing module allows to define and apply general Shape Processing as a customizable sequence of Shape Healing operators. The customization is implemented via user-editable resource file which defines sequence of operators to be executed and their parameters. More...

#include <ShapeProcess.hxx>

Public Types

enum  Operation : uint8_t {
  First = 0 , DirectFaces = First , SameParameter , SetTolerance ,
  SplitAngle , BSplineRestriction , ElementaryToRevolution , SweptToElementary ,
  SurfaceToBSpline , ToBezier , SplitContinuity , SplitClosedFaces ,
  FixWireGaps , FixFaceSize , DropSmallSolids , DropSmallEdges ,
  FixShape , SplitClosedEdges , SplitCommonVertex , Last = SplitCommonVertex
}
 Describes all available operations. C++11 enum class is not used to allow implicit conversion to underlying type. More...
 
using OperationsFlags = std::bitset<Operation::Last + 1>
 

Static Public Member Functions

static Standard_Boolean RegisterOperator (const Standard_CString name, const Handle< ShapeProcess_Operator > &op)
 Registers operator to make it visible for Performer.
 
static Standard_Boolean FindOperator (const Standard_CString name, Handle< ShapeProcess_Operator > &op)
 Finds operator by its name.
 
static Standard_Boolean Perform (const Handle< ShapeProcess_Context > &context, const Standard_CString seq, const Message_ProgressRange &theProgress=Message_ProgressRange())
 Performs a specified sequence of operators on Context Resource file and other data should be already loaded to Context (including description of sequence seq)
 
static Standard_Boolean Perform (const Handle< ShapeProcess_Context > &theContext, const OperationsFlags &theOperations, const Message_ProgressRange &theProgress=Message_ProgressRange())
 Performs a specified sequence of operators on theContext.
 
static std::pair< Operation, bool > ToOperationFlag (const char *theName)
 Converts operation name to operation flag.
 

Detailed Description

Shape Processing module allows to define and apply general Shape Processing as a customizable sequence of Shape Healing operators. The customization is implemented via user-editable resource file which defines sequence of operators to be executed and their parameters.

Member Typedef Documentation

◆ OperationsFlags

Member Enumeration Documentation

◆ Operation

enum ShapeProcess::Operation : uint8_t

Describes all available operations. C++11 enum class is not used to allow implicit conversion to underlying type.

Enumerator
First 
DirectFaces 
SameParameter 
SetTolerance 
SplitAngle 
BSplineRestriction 
ElementaryToRevolution 
SweptToElementary 
SurfaceToBSpline 
ToBezier 
SplitContinuity 
SplitClosedFaces 
FixWireGaps 
FixFaceSize 
DropSmallSolids 
DropSmallEdges 
FixShape 
SplitClosedEdges 
SplitCommonVertex 
Last 

Member Function Documentation

◆ FindOperator()

static Standard_Boolean ShapeProcess::FindOperator ( const Standard_CString name,
Handle< ShapeProcess_Operator > & op )
static

Finds operator by its name.

◆ Perform() [1/2]

static Standard_Boolean ShapeProcess::Perform ( const Handle< ShapeProcess_Context > & context,
const Standard_CString seq,
const Message_ProgressRange & theProgress = Message_ProgressRange() )
static

Performs a specified sequence of operators on Context Resource file and other data should be already loaded to Context (including description of sequence seq)

◆ Perform() [2/2]

static Standard_Boolean ShapeProcess::Perform ( const Handle< ShapeProcess_Context > & theContext,
const OperationsFlags & theOperations,
const Message_ProgressRange & theProgress = Message_ProgressRange() )
static

Performs a specified sequence of operators on theContext.

Parameters
theContextContext to perform operations on. Contains the shape to process and processing parameters. If processing parameters are not set, default values are used. Parameters should be in a scope of operation, for example, instead of "FromSTEP.FixShape.Tolerance3d" we should use just "FixShape.Tolerance3d".
theOperationsBitset of operations to perform.
theProgressProgress indicator.
Returns
true if at least one operation was performed, false otherwise.

◆ RegisterOperator()

static Standard_Boolean ShapeProcess::RegisterOperator ( const Standard_CString name,
const Handle< ShapeProcess_Operator > & op )
static

Registers operator to make it visible for Performer.

◆ ToOperationFlag()

static std::pair< Operation, bool > ShapeProcess::ToOperationFlag ( const char * theName)
static

Converts operation name to operation flag.

Parameters
theNameOperation name.
Returns
Operation flag and true if the operation name is valid, false otherwise.

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