Hide menu
cadex::ModelCheck_BRepChecker::Options Class Reference

Holds options for checker tools. More...

Public Types

enum  ModeEnum { Coarse, Moderate, Fine }
 Preset options for tools. More...
 
typedef std::shared_ptr< internal::ModelCheck_BRepCheckerOptionsImpl > ImplType
 

Public Member Functions

 Options ()
 Constructor. More...
 
bool LoadFromFile (const Base_String &theFile)
 Loads options from file. More...
 
OptionsMode (ModeEnum theMode)
 Sets a preset mode.
 
OptionsTools (Tool::FlagType theTools)
 Sets which tools will be used by checker. More...
 
Tool::FlagType Tools () const
 Returns tools flag. More...
 
OptionsSurfaceContinuity (ModelCheck_Continuity theSurfaceContinuity)
 Sets target surface continuity for Tool::Continuity.
 
ModelCheck_Continuity SurfaceContinuity () const
 Returns target surface continuity for Tool::Continuity.
 
OptionsCurveContinuity (ModelCheck_Continuity theCurveContinuity)
 Sets target curve continuity for Tool::Continuity.
 
ModelCheck_Continuity CurveContinuity () const
 Returns target curve continuity for Tool::Continuity.
 
OptionsOverlapControlPoints (size_t OverlapControlPoints)
 Sets number of control points for Tool::Overlap. More...
 
size_t OverlapControlPoints () const
 Returns number of control points for Tool::Overlap.
 
OptionsAllowedOverlap (double theAllowedOverlap)
 Sets allowed overlap for Tool::Overlap. More...
 
double AllowedOverlap () const
 Returns allowed overlap for Tool::Overlap.
 
OptionsWireBBoxDiagLength (double WireBBoxDiagLength)
 Sets target wire bounding box diagonal length for Tool::Size. More...
 
double WireBBoxDiagLength () const
 Returns target wire bounding box diagonal length for Tool::Size.
 
OptionsEdgeBBoxDiagLength (double EdgeBBoxDiagLength)
 Sets target edge bounding box diagonal length for Tool::Size. More...
 
double EdgeBBoxDiagLength () const
 Returns target edge bounding box diagonal length for Tool::Size.
 
OptionsToleranceControlPoints (size_t ToleranceControlPoints)
 Sets number of control points for Tool::Tolerance. More...
 
size_t ToleranceControlPoints () const
 Returns number of control points for Tool::Tolerance.
 
OptionsToleranceThreshold (double ToleranceThreshold)
 Sets tolerance threshold for Tool::Tolerance. More...
 
double ToleranceThreshold () const
 Returns tolerance threshold for Tool::Tolerance.
 
OptionsUseSameParam (bool UseSameParam)
 Sets "use same parameter" flag for Tool::Tolerance. More...
 
bool UseSameParam () const
 Returns "use same parameter" flag for Tool::Tolerance.
 
const ImplType & Impl () const
 

Protected Attributes

ImplType myImpl
 

Detailed Description

Holds options for checker tools.

All setter methods in class return this object to allow convenient syntax, sometimes called "chaining".

Example:

typedef ModelCheck_BRepChecker::Tool Tool;
aChecker.SetOptions()
.CurveContinuity (C2)
.ToleranceThreshold (2e-7);

Member Enumeration Documentation

◆ ModeEnum

Preset options for tools.

Enumerator
Coarse 
SurfaceContinuity      = C0
CurveContinuity        = C0
OverlapControlPoints   = 11
AllowedOverlap         = 50
WireBBoxDiagLength     = -1
EdgeBBoxDiagLength     = -1
ToleranceControlPoints = 11
ToleranceThreshold     = -1
UseSameParam           = false
Moderate 
SurfaceContinuity      = G1
CurveContinuity        = G1
OverlapControlPoints   = 21
AllowedOverlap         = 40
WireBBoxDiagLength     = -1
EdgeBBoxDiagLength     = -1
ToleranceControlPoints = 21
ToleranceThreshold     = -1
UseSameParam           = false
Fine 
SurfaceContinuity      = C1
CurveContinuity        = C1
OverlapControlPoints   = 31
AllowedOverlap         = 30
WireBBoxDiagLength     = -1
EdgeBBoxDiagLength     = -1
ToleranceControlPoints = 31
ToleranceThreshold     = -1
UseSameParam           = false

Constructor & Destructor Documentation

◆ Options()

cadex::ModelCheck_BRepChecker::Options::Options ( )

Constructor.

By default Tools() is set to Tool::All and Mode() is set to Options::Moderate.

Member Function Documentation

◆ AllowedOverlap()

Options & cadex::ModelCheck_BRepChecker::Options::AllowedOverlap ( double  theAllowedOverlap)

Sets allowed overlap for Tool::Overlap.

The percent of parametric range of edges, on which they are allowed to overlap. E.g., edge1 has parameters [0, 5] and edge2 has parameters [0, 10]; if allowed overlap is set to 50 and edges overlap from their starts, then the maximum overlap segment length for edge1 is [0, 2.5] and for edge2 is [0, 5].

Warning
Don't use too small percent - this will lead to many unimportant overlap problems. Better keep this setting with default value.

◆ EdgeBBoxDiagLength()

Options & cadex::ModelCheck_BRepChecker::Options::EdgeBBoxDiagLength ( double  theEdgeBBoxDiagLength)

Sets target edge bounding box diagonal length for Tool::Size.

Target length for edge bounding box diagonal. If set to -1 then bounding box is checked to be enough to hold edge's end vertices so their tolerances doesn't overlap each other.

◆ LoadFromFile()

bool cadex::ModelCheck_BRepChecker::Options::LoadFromFile ( const Base_String theFile)

Loads options from file.

Parameters
theFilePath to file to load options from. Must be any .ini with section [CadexBRepChecker].

Example:

[CadexBRepChecker]
; Used tools
Tools=Continuity Overlap
; Options mode; must precede other options
; Target surface continuity
; Target curve continuity
; Control points to check overlapping
; Percent of parametric range allowed to overlap
; Target minimum length of wire bounding box diagonal
WireBBoxDiag=-1
; Target minimum length of edge bounding box diagonal
EdgeBBoxDiag=-1
; Control points to check tolerance
; Allowed minimum tolerance
; Trust "same parameter" flag
Returns
true if loading was successful and false otherwise.

◆ OverlapControlPoints()

Options & cadex::ModelCheck_BRepChecker::Options::OverlapControlPoints ( size_t  theOverlapControlPoints)

Sets number of control points for Tool::Overlap.

Number of points along the edges, on which distances will be calculated. More points gives more accurate results, but slows down checking.

◆ ToleranceControlPoints()

Options & cadex::ModelCheck_BRepChecker::Options::ToleranceControlPoints ( size_t  theToleranceControlPoints)

Sets number of control points for Tool::Tolerance.

Number of points along the edges, on which distances will be calculated. More points gives more accurate results, but slows down checking.

◆ ToleranceThreshold()

Options & cadex::ModelCheck_BRepChecker::Options::ToleranceThreshold ( double  theToleranceThreshold)

Sets tolerance threshold for Tool::Tolerance.

Target threshold. If set to -1 then shape's tolerance is used as value.

◆ Tools() [1/2]

ModelCheck_BRepChecker::Tool::FlagType cadex::ModelCheck_BRepChecker::Options::Tools ( ) const

Returns tools flag.

By applying bitwise AND one can determine which tools were set in options.

Example:

typedef ModelChecker_BRepChecker::Tool Tool;
ModelChecker_BRepChecker aCheker;
auto aTools = aChecker.Options().Tools();
if (aTools & Tool::Size) {
std::cout << "Size tool is in options\n";
}

◆ Tools() [2/2]

Options & cadex::ModelCheck_BRepChecker::Options::Tools ( Tool::FlagType  theTools)

Sets which tools will be used by checker.

For convenience accepts a bitwise sequence of tools.

Example:

typedef ModelCheck_BRepChecker::Tool Tool;
aChecker.SetOptions().Tools (Tool::Continuity | Tool::Tolerance | Tool::Topology);

◆ UseSameParam()

Options & cadex::ModelCheck_BRepChecker::Options::UseSameParam ( bool  theUseSameParam)

Sets "use same parameter" flag for Tool::Tolerance.

Determines if tool should trust the "same parameter" flag in edge. If this option is checked and edge has "same parameter" flag, then tolerance checking will be much faster, but the results can be very inaccurate. Alternatively you can use this option to check if edge has correct "same parameter" flag.

◆ WireBBoxDiagLength()

Options & cadex::ModelCheck_BRepChecker::Options::WireBBoxDiagLength ( double  theWireBBoxDiagLength)

Sets target wire bounding box diagonal length for Tool::Size.

Target length for wire bounding box diagonal. If set to -1 then wires will not be checked.

double AllowedOverlap() const
Returns allowed overlap for Tool::Overlap.
Definition: ModelCheck_BRepChecker.cxx:390
Options()
Constructor.
Definition: ModelCheck_BRepChecker.cxx:326
size_t OverlapControlPoints() const
Returns number of control points for Tool::Overlap.
Definition: ModelCheck_BRepChecker.cxx:389
Tool::FlagType Tools() const
Returns tools flag.
Definition: ModelCheck_BRepChecker.cxx:386
Definition: ModelCheck_BRepChecker.hxx:54
Definition: ModelCheck_BRepChecker.hxx:72
Definition: ModelCheck_BRepChecker.hxx:55
ModelCheck_BRepChecker()
Constructor.
Definition: ModelCheck_BRepChecker.cxx:919
Definition: ModelCheck_BRepChecker.hxx:70
size_t ToleranceControlPoints() const
Returns number of control points for Tool::Tolerance.
Definition: ModelCheck_BRepChecker.cxx:393
bool UseSameParam() const
Returns "use same parameter" flag for Tool::Tolerance.
Definition: ModelCheck_BRepChecker.cxx:395
Options & Mode(ModeEnum theMode)
Sets a preset mode.
Definition: ModelCheck_BRepChecker.cxx:367
ModelCheck_Continuity CurveContinuity() const
Returns target curve continuity for Tool::Continuity.
Definition: ModelCheck_BRepChecker.cxx:388
Definition: ModelCheck_BRepChecker.hxx:53
Definition: ModelCheck_BRepChecker.hxx:50
ModelCheck_Continuity SurfaceContinuity() const
Returns target surface continuity for Tool::Continuity.
Definition: ModelCheck_BRepChecker.cxx:387
double ToleranceThreshold() const
Returns tolerance threshold for Tool::Tolerance.
Definition: ModelCheck_BRepChecker.cxx:394