Open CASCADE Technology Reference Manual 8.0.2
Loading...
Searching...
No Matches
BRepGraph_Validate Class Reference

Structural invariant checker for BRepGraph. More...

#include <BRepGraph_Validate.hxx>

Data Structures

struct  Issue
 A single structural issue found in the graph. More...
struct  Options
 Validation options. More...
struct  Result
 Aggregated validation result. More...

Public Types

enum class  Severity { Warning , Error }
 Severity level for reported issues. More...
enum class  Mode { Lightweight , Audit }
 Validation mode controlling check depth/performance trade-off. More...

Public Member Functions

 BRepGraph_Validate ()=delete

Static Public Member Functions

static Result Perform (const BRepGraph &theGraph)
 Run default lightweight structural checks on a built graph. Uses Mode::Lightweight; for full structural audit use Perform(theGraph, Mode::Audit).
static Result Perform (const BRepGraph &theGraph, const Mode theMode)
 Run structural checks on a built graph with explicit mode.
static Result Perform (const BRepGraph &theGraph, const Options &theOptions)
 Run structural checks on a built graph with explicit options.

Detailed Description

Structural invariant checker for BRepGraph.

Read-only algorithm that verifies the graph's internal consistency: cross-reference bounds, relation symmetry, incidence ref consistency, geometry reference validity, removed-node isolation, and wire connectivity.

Distinct from BRepGraphCheck (geometric shape validity). This class checks the graph data structure itself.

Validation Mode Check Matrix

Check Lightweight Audit
Active entity count boundary YES YES
Document root product sanity YES YES
Cross-reference bounds - YES
Reverse-index consistency - YES
Face-count cache consistency - YES
Incidence ref consistency - YES
Geometry representation refs - YES
Removed-node isolation YES YES
Wire edge connectivity - YES
Entity ID positional integrity - YES
UID round-trip integrity - YES
Assembly DAG cycle detection - YES

Mode Guidance

Mode What it checks Cost Recommended use
Lightweight Active entity count boundary plus removed-node isolation Low Hot-path
release builds when the graph structure is already trusted Audit Full structural audit

from cross-reference bounds through assembly DAG cycle detection | Higher | Default validation mode for production pipelines, test gates, and API-boundary verification |

For production pipelines, prefer Mode::Audit; Mode::Lightweight is intended for hot-path release builds where the graph structure is already trusted.

Member Enumeration Documentation

◆ Mode

enum class BRepGraph_Validate::Mode
strong

Validation mode controlling check depth/performance trade-off.

Enumerator
Lightweight 

Fast boundary-oriented checks for frequent validation points.

Audit 

Full structural audit (superset of Lightweight).

◆ Severity

enum class BRepGraph_Validate::Severity
strong

Severity level for reported issues.

Enumerator
Warning 
Error 

Constructor & Destructor Documentation

◆ BRepGraph_Validate()

BRepGraph_Validate::BRepGraph_Validate ( )
delete

Member Function Documentation

◆ Perform() [1/3]

Result BRepGraph_Validate::Perform ( const BRepGraph & theGraph)
staticnodiscard

Run default lightweight structural checks on a built graph. Uses Mode::Lightweight; for full structural audit use Perform(theGraph, Mode::Audit).

Parameters
[in]theGraphgraph to validate (const, read-only)
Returns
validation result with all detected issues

◆ Perform() [2/3]

Result BRepGraph_Validate::Perform ( const BRepGraph & theGraph,
const Mode theMode )
staticnodiscard

Run structural checks on a built graph with explicit mode.

Parameters
[in]theGraphgraph to validate (const, read-only)
[in]theModevalidation mode
Returns
validation result with all detected issues

◆ Perform() [3/3]

Result BRepGraph_Validate::Perform ( const BRepGraph & theGraph,
const Options & theOptions )
staticnodiscard

Run structural checks on a built graph with explicit options.

Parameters
[in]theGraphgraph to validate (const, read-only)
[in]theOptionsvalidation profile/options
Returns
validation result with all detected issues

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