Open CASCADE Technology Reference Manual 8.0.2
Loading...
Searching...
No Matches
BRepGraph_Tool::CoEdge Class Reference

CoEdge (half-edge) parametric curve accessors. More...

#include <BRepGraph_Tool.hxx>

Static Public Member Functions

static TopAbs_Orientation Orientation (const BRepGraph &theGraph, const BRepGraph_CoEdgeId theCoEdge)
 Returns the coedge orientation relative to its parent edge.
static bool IsReversed (const BRepGraph &theGraph, const BRepGraph_CoEdgeId theCoEdge)
 Returns true if the coedge is REVERSED relative to its parent edge. Convenience shortcut for Orientation(...) == TopAbs_REVERSED.
static BRepGraph_EdgeId EdgeOf (const BRepGraph &theGraph, const BRepGraph_CoEdgeId theCoEdge)
 Returns the parent edge definition id this coedge uses.
static BRepGraph_FaceId FaceOf (const BRepGraph &theGraph, const BRepGraph_CoEdgeId theCoEdge)
 Returns the owning face definition id for this coedge.
static BRepGraph_CoEdgeId SeamPair (const BRepGraph &theGraph, const BRepGraph_CoEdgeId theCoEdge)
 Returns the seam-pair coedge for closed/seam edges.
static bool IsSeam (const BRepGraph &theGraph, const BRepGraph_CoEdgeId theCoEdge)
 Returns true if this coedge is one half of a seam pair.
static bool HasPCurve (const BRepGraph &theGraph, const BRepGraph_CoEdgeId theCoEdge)
 Returns true if the coedge has a PCurve representation.
static bool SameParameter (const BRepGraph &theGraph, const BRepGraph_CoEdgeId theCoEdge)
 Returns true if the coedge's PCurve parameter matches the 3D curve.
static bool SameRange (const BRepGraph &theGraph, const BRepGraph_CoEdgeId theCoEdge)
 Returns true if the coedge's PCurve range equals the 3D curve range.
static const occ::handle< Geom2d_Curve > & PCurve (const BRepGraph &theGraph, const BRepGraph_CoEdgeId theCoEdge)
 Returns the raw PCurve handle by coedge identifier (no Location - UV space).
static Geom2dAdaptor_Curve PCurveAdaptor (const BRepGraph &theGraph, const BRepGraph_CoEdgeId theCoEdge)
 Returns a PCurve adaptor by coedge identifier. If the coedge has a stored PCurve (Curve2DRepIdx >= 0), returns it directly. Otherwise, for planar face surfaces, computes the PCurve on-the-fly by projecting the edge's 3D curve onto the plane (CurveOnPlane), mirroring the behavior of BRep_Tool::CurveOnSurface for planar faces without stored PCurves.
static Geom2dAdaptor_Curve PCurveAdaptor (const BRepGraph &theGraph, const CoEdgeUsage &theRef)
 Returns a PCurve adaptor from a CoEdgeUsage.
static std::pair< gp_Pnt2d, gp_Pnt2d > UVPoints (const BRepGraph &theGraph, const BRepGraph_CoEdgeId theCoEdge)
 Returns the UV endpoints from a CoEdge as (UV1, UV2).
static std::pair< double, double > Range (const BRepGraph &theGraph, const BRepGraph_CoEdgeId theCoEdge)
 Returns the PCurve parameter range as (first, last).

Detailed Description

CoEdge (half-edge) parametric curve accessors.

Provides PCurve retrieval, adaptor construction, UV endpoint access, and parameter range queries for coedge definitions.

Member Function Documentation

◆ EdgeOf()

BRepGraph_EdgeId BRepGraph_Tool::CoEdge::EdgeOf ( const BRepGraph & theGraph,
const BRepGraph_CoEdgeId theCoEdge )
staticnodiscard

Returns the parent edge definition id this coedge uses.

Parameters
[in]theGraphsource graph
[in]theCoEdgetyped coedge definition identifier
Returns
parent edge id (invalid for removed coedges)

◆ FaceOf()

BRepGraph_FaceId BRepGraph_Tool::CoEdge::FaceOf ( const BRepGraph & theGraph,
const BRepGraph_CoEdgeId theCoEdge )
staticnodiscard

Returns the owning face definition id for this coedge.

Parameters
[in]theGraphsource graph
[in]theCoEdgetyped coedge definition identifier
Returns
owning face id (invalid for free-wire coedges)

◆ HasPCurve()

bool BRepGraph_Tool::CoEdge::HasPCurve ( const BRepGraph & theGraph,
const BRepGraph_CoEdgeId theCoEdge )
staticnodiscard

Returns true if the coedge has a PCurve representation.

Parameters
[in]theGraphsource graph
[in]theCoEdgetyped coedge definition identifier
Returns
true if PCurve exists

◆ IsReversed()

bool BRepGraph_Tool::CoEdge::IsReversed ( const BRepGraph & theGraph,
const BRepGraph_CoEdgeId theCoEdge )
staticnodiscard

Returns true if the coedge is REVERSED relative to its parent edge. Convenience shortcut for Orientation(...) == TopAbs_REVERSED.

◆ IsSeam()

bool BRepGraph_Tool::CoEdge::IsSeam ( const BRepGraph & theGraph,
const BRepGraph_CoEdgeId theCoEdge )
staticnodiscard

Returns true if this coedge is one half of a seam pair.

◆ Orientation()

TopAbs_Orientation BRepGraph_Tool::CoEdge::Orientation ( const BRepGraph & theGraph,
const BRepGraph_CoEdgeId theCoEdge )
staticnodiscard

Returns the coedge orientation relative to its parent edge.

Parameters
[in]theGraphsource graph
[in]theCoEdgetyped coedge definition identifier
Returns
orientation enum

◆ PCurve()

const occ::handle< Geom2d_Curve > & BRepGraph_Tool::CoEdge::PCurve ( const BRepGraph & theGraph,
const BRepGraph_CoEdgeId theCoEdge )
staticnodiscard

Returns the raw PCurve handle by coedge identifier (no Location - UV space).

Parameters
[in]theGraphsource graph
[in]theCoEdgetyped coedge definition identifier
Returns
curve handle, or null handle if no PCurve

◆ PCurveAdaptor() [1/2]

Geom2dAdaptor_Curve BRepGraph_Tool::CoEdge::PCurveAdaptor ( const BRepGraph & theGraph,
const BRepGraph_CoEdgeId theCoEdge )
staticnodiscard

Returns a PCurve adaptor by coedge identifier. If the coedge has a stored PCurve (Curve2DRepIdx >= 0), returns it directly. Otherwise, for planar face surfaces, computes the PCurve on-the-fly by projecting the edge's 3D curve onto the plane (CurveOnPlane), mirroring the behavior of BRep_Tool::CurveOnSurface for planar faces without stored PCurves.

Parameters
[in]theGraphsource graph
[in]theCoEdgetyped coedge definition identifier
Returns
2D curve adaptor, or empty adaptor if no PCurve and surface is not planar

◆ PCurveAdaptor() [2/2]

Geom2dAdaptor_Curve BRepGraph_Tool::CoEdge::PCurveAdaptor ( const BRepGraph & theGraph,
const CoEdgeUsage & theRef )
staticnodiscard

Returns a PCurve adaptor from a CoEdgeUsage.

Parameters
[in]theGraphsource graph
[in]theRefcoedge incidence reference
Returns
2D curve adaptor

◆ Range()

std::pair< double, double > BRepGraph_Tool::CoEdge::Range ( const BRepGraph & theGraph,
const BRepGraph_CoEdgeId theCoEdge )
staticnodiscard

Returns the PCurve parameter range as (first, last).

Parameters
[in]theGraphsource graph
[in]theCoEdgetyped coedge definition identifier
Returns
pair of (first, last) parameters

◆ SameParameter()

bool BRepGraph_Tool::CoEdge::SameParameter ( const BRepGraph & theGraph,
const BRepGraph_CoEdgeId theCoEdge )
staticnodiscard

Returns true if the coedge's PCurve parameter matches the 3D curve.

Parameters
[in]theGraphsource graph
[in]theCoEdgetyped coedge definition identifier
Returns
true if same parameter

◆ SameRange()

bool BRepGraph_Tool::CoEdge::SameRange ( const BRepGraph & theGraph,
const BRepGraph_CoEdgeId theCoEdge )
staticnodiscard

Returns true if the coedge's PCurve range equals the 3D curve range.

Parameters
[in]theGraphsource graph
[in]theCoEdgetyped coedge definition identifier
Returns
true if same range

◆ SeamPair()

BRepGraph_CoEdgeId BRepGraph_Tool::CoEdge::SeamPair ( const BRepGraph & theGraph,
const BRepGraph_CoEdgeId theCoEdge )
staticnodiscard

Returns the seam-pair coedge for closed/seam edges.

Parameters
[in]theGraphsource graph
[in]theCoEdgetyped coedge definition identifier
Returns
paired coedge id, or invalid if this coedge is not a seam half

◆ UVPoints()

std::pair< gp_Pnt2d, gp_Pnt2d > BRepGraph_Tool::CoEdge::UVPoints ( const BRepGraph & theGraph,
const BRepGraph_CoEdgeId theCoEdge )
staticnodiscard

Returns the UV endpoints from a CoEdge as (UV1, UV2).

Parameters
[in]theGraphsource graph
[in]theCoEdgetyped coedge definition identifier
Returns
pair of 2D points at parameter first and last

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