Hide menu
Loading...
Searching...
No Matches
cadex::ModelCheck_BRepChecker::Options Class Reference

Holds options for checker tools. More...

#include <cadex/ModelCheck_BRepChecker.hxx>

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.
 
bool LoadFromFile (const Base_String &theFile)
 Loads options from file.
 
OptionsMode (ModeEnum theMode)
 Sets a preset mode.
 
OptionsTools (Tool::FlagType theTools)
 Sets which tools will be used by checker.
 
Tool::FlagType Tools () const
 Returns tools flag.
 
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.
 
size_t OverlapControlPoints () const
 Returns number of control points for Tool::Overlap.
 
OptionsAllowedOverlap (double theAllowedOverlap)
 Sets allowed overlap for Tool::Overlap.
 
double AllowedOverlap () const
 Returns allowed overlap for Tool::Overlap.
 
OptionsWireBBoxDiagLength (double WireBBoxDiagLength)
 Sets target wire bounding box diagonal length for Tool::Size.
 
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.
 
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.
 
size_t ToleranceControlPoints () const
 Returns number of control points for Tool::Tolerance.
 
OptionsToleranceThreshold (double ToleranceThreshold)
 Sets tolerance threshold for Tool::Tolerance.
 
double ToleranceThreshold () const
 Returns tolerance threshold for Tool::Tolerance.
 
OptionsUseSameParam (bool UseSameParam)
 Sets "use same parameter" flag for Tool::Tolerance.
 
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:

aChecker.SetOptions()
Options & CurveContinuity(ModelCheck_Continuity theCurveContinuity)
Sets target curve continuity for Tool::Continuity.
Definition: ModelCheck_BRepChecker.cxx:392
@ Fine
Definition: ModelCheck_BRepChecker.hxx:75
Options & Tools(Tool::FlagType theTools)
Sets which tools will be used by checker.
Definition: ModelCheck_BRepChecker.cxx:390
Options & Mode(ModeEnum theMode)
Sets a preset mode.
Definition: ModelCheck_BRepChecker.cxx:371
Options & ToleranceThreshold(double ToleranceThreshold)
Sets tolerance threshold for Tool::Tolerance.
Definition: ModelCheck_BRepChecker.cxx:398
Provides an interface to perform various checks to BRep shape.
Definition: ModelCheck_BRepChecker.hxx:45
OptionsType & SetOptions()
Returns an internal Options object.
Definition: ModelCheck_BRepChecker.cxx:1018
Tools flags.
Definition: ModelCheck_BRepChecker.hxx:50
@ Continuity
Definition: ModelCheck_BRepChecker.hxx:53
@ Tolerance
Definition: ModelCheck_BRepChecker.hxx:57

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
Holds options for checker tools.
Definition: ModelCheck_BRepChecker.hxx:66
size_t OverlapControlPoints() const
Returns number of control points for Tool::Overlap.
Definition: ModelCheck_BRepChecker.cxx:393
double AllowedOverlap() const
Returns allowed overlap for Tool::Overlap.
Definition: ModelCheck_BRepChecker.cxx:394
@ Coarse
Definition: ModelCheck_BRepChecker.hxx:73
ModelCheck_Continuity CurveContinuity() const
Returns target curve continuity for Tool::Continuity.
Definition: ModelCheck_BRepChecker.cxx:392
size_t ToleranceControlPoints() const
Returns number of control points for Tool::Tolerance.
Definition: ModelCheck_BRepChecker.cxx:397
double ToleranceThreshold() const
Returns tolerance threshold for Tool::Tolerance.
Definition: ModelCheck_BRepChecker.cxx:398
bool UseSameParam() const
Returns "use same parameter" flag for Tool::Tolerance.
Definition: ModelCheck_BRepChecker.cxx:399
ModelCheck_Continuity SurfaceContinuity() const
Returns target surface continuity for Tool::Continuity.
Definition: ModelCheck_BRepChecker.cxx:391
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";
}
@ Size
Definition: ModelCheck_BRepChecker.hxx:56

◆ 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:

◆ 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.