Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions
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 bool RegisterOperator (const char *const name, const occ::handle< ShapeProcess_Operator > &op)
 Registers operator to make it visible for Performer.
 
static bool FindOperator (const char *const name, occ::handle< ShapeProcess_Operator > &op)
 Finds operator by its name.
 
static bool Perform (const occ::handle< ShapeProcess_Context > &context, const char *const 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 bool Perform (const occ::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, boolToOperationFlag (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

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 bool ShapeProcess::FindOperator ( const char *const name,
occ::handle< ShapeProcess_Operator > & op )
static

Finds operator by its name.

◆ Perform() [1/2]

static bool ShapeProcess::Perform ( const occ::handle< ShapeProcess_Context > & context,
const char *const 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 bool ShapeProcess::Perform ( const occ::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 bool ShapeProcess::RegisterOperator ( const char *const name,
const occ::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: