Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Data Structures | Static Public Member Functions
BRepGraph_Builder Class Reference

Static helper that ingests a TopoDS_Shape into a BRepGraph. More...

#include <BRepGraph_Builder.hxx>

Data Structures

struct  Options
 Build-time options. More...
 
struct  Result
 Outcome of a single Add() call. More...
 

Static Public Member Functions

static Result Add (BRepGraph &theGraph, const TopoDS_Shape &theShape)
 Ingest a TopoDS_Shape as a new root subgraph, wrapping the topology root in a Product.
 
static Result Add (BRepGraph &theGraph, const TopoDS_Shape &theShape, const Options &theOptions)
 Ingest a TopoDS_Shape as a new root subgraph with explicit options.
 
static Result Add (BRepGraph &theGraph, const TopoDS_Shape &theShape, const BRepGraph_NodeId theParent)
 Ingest a TopoDS_Shape under an existing parent.
 
static Result Add (BRepGraph &theGraph, const TopoDS_Shape &theShape, const BRepGraph_NodeId theParent, const Options &theOptions)
 Ingest a shape under an existing parent with explicit options. Options::CreateAutoProduct is ignored.
 

Detailed Description

Static helper that ingests a TopoDS_Shape into a BRepGraph.

Member Function Documentation

◆ Add() [1/4]

static Result BRepGraph_Builder::Add ( BRepGraph & theGraph,
const TopoDS_Shape & theShape )
static

Ingest a TopoDS_Shape as a new root subgraph, wrapping the topology root in a Product.

Parameters
[in,out]theGraphgraph to populate
[in]theShapeshape to ingest
Returns
Result with TopologyRoot, Product and Occurrence set on success.

◆ Add() [2/4]

static Result BRepGraph_Builder::Add ( BRepGraph & theGraph,
const TopoDS_Shape & theShape,
const BRepGraph_NodeId theParent )
static

Ingest a TopoDS_Shape under an existing parent.

Parent kind dispatch:

  • Product: creates a child part-product, links via Occurrence with shape.Location().
  • Compound: appends topology root as a child reference.
  • Shell: appends a Face as a FaceRef; other shapes via AddChild.
  • Solid: appends a Shell as a ShellRef; other shapes via AddChild.
  • CompSolid: appends a Solid as a SolidRef. Other parent kinds (Wire, Edge, Vertex, Occurrence) are not supported and yield an invalid Result (Result::Ok == false) without modification to the graph.
    Parameters
    [in,out]theGraphgraph to populate
    [in]theShapeshape to ingest
    [in]theParentparent node receiving the topology
    Returns
    Result with TopologyRoot set, plus (Product, Occurrence, InsertedRef) for Product parents or InsertedRef for topology container parents.

◆ Add() [3/4]

static Result BRepGraph_Builder::Add ( BRepGraph & theGraph,
const TopoDS_Shape & theShape,
const BRepGraph_NodeId theParent,
const Options & theOptions )
static

Ingest a shape under an existing parent with explicit options. Options::CreateAutoProduct is ignored.

◆ Add() [4/4]

static Result BRepGraph_Builder::Add ( BRepGraph & theGraph,
const TopoDS_Shape & theShape,
const Options & theOptions )
static

Ingest a TopoDS_Shape as a new root subgraph with explicit options.

Parameters
[in,out]theGraphgraph to populate
[in]theShapeshape to ingest
[in]theOptionsbuild-time options
Returns
Result with TopologyRoot set on success; Product/Occurrence set when theOptions.CreateAutoProduct is true.

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