Open CASCADE Technology Reference Manual 8.0.2
Loading...
Searching...
No Matches
BRepGraph::EditorView::WireOps Class Reference

Wire creation and editing operations. More...

#include <BRepGraph_EditorView.hxx>

Public Types

enum class  CoEdgeOrderStatus {
  Ready , Reordered , AlreadyCurrent , AlreadyContained ,
  Empty , InvalidWire , SizeMismatch , DuplicateCoEdge ,
  InvalidCoEdge , CoEdgeAlreadyBound , CoEdgeNotOwnedByWire , NotPermutation ,
  Disconnected
}
 Status returned by wire coedge-order prechecks. More...
enum class  ReplaceEdgeStatus {
  Ready , AlreadyCurrent , InvalidWire , InvalidOldEdge ,
  InvalidNewEdge , Disconnected
}
 Status returned by wire edge-replacement prechecks. More...

Public Member Functions

CoEdgeOrderStatus CheckCoEdgeOrder (const NCollection_Array1< BRepGraph_CoEdgeId > &theCoEdgeIds) const
 Precheck free-floating CoEdges for WireOps::Add().
CoEdgeOrderStatus CheckCoEdgeOrder (const BRepGraph_WireId theWire, const NCollection_Array1< BRepGraph_CoEdgeId > &theCoEdgeIds) const
 Precheck owned CoEdges for WireOps::SetCoEdgeOrder().
CoEdgeOrderStatus CheckAppendCoEdge (const BRepGraph_WireId theWire, const BRepGraph_CoEdgeId theCoEdgeId) const
 Precheck appending a free CoEdge to an existing wire.
ReplaceEdgeStatus CheckReplaceEdge (const BRepGraph_WireId theWire, const BRepGraph_EdgeId theOldEdge, const BRepGraph_EdgeId theNewEdge, const bool theReversed) const
 Precheck replacing one edge by another in an existing wire.
BRepGraph_WireId Add (const NCollection_Array1< BRepGraph_CoEdgeId > &theCoEdgeIds)
 Add a wire definition from pre-created CoEdges. Each CoEdge must be free-floating (no parent wire yet). The method binds all CoEdges to the new wire and updates relation tables.
void ReplaceEdge (const BRepGraph_WireId theChildWireId, const BRepGraph_EdgeId theOldEdgeEntity, const BRepGraph_EdgeId theNewEdgeEntity, const bool theReversed)
 Replace one edge with another in a wire definition. Updates the CoEdge's EdgeIdx to point to the new edge, adjusts orientation if theReversed, and incrementally updates relation tables.
bool RemoveCoEdge (const BRepGraph_WireId theChildWireId, const BRepGraph_CoEdgeId theCoEdgeId)
 Detach one exact coedge entry from a wire definition. Use BRepGraph_CoEdgesOfWire::CurrentId() when removing from a wire iterator. The method removes the exact ordered coedge entry, updates relation tables, and prunes the CoEdge node when it has no other active usages.
void Reverse (const BRepGraph_WireId theWire)
 Reverse the wire: flip the order of the wire's CoEdgeIds and flip each owned CoEdge's orientation. Used by healing/sewing to invert a loop.
bool SetCoEdgeOrder (const BRepGraph_WireId theWire, const NCollection_Array1< BRepGraph_CoEdgeId > &theCoEdgeIds)
 Replace the ordered CoEdge relation vector with a permutation of its current content.
BRepGraph_MutGuard< BRepGraphInc::WireDef > Mut (const BRepGraph_WireId theWire)
 Return scoped mutable wire definition guard.
BRepGraph_MutGuard< BRepGraphInc::WireRef > MutRef (const BRepGraph_WireRefId theWireRef)
 Return scoped mutable wire reference guard.
void SetRefOrientation (const BRepGraph_WireRefId theWireRef, const BRepGraphInc::ParityOrientation theOrientation)
 Set the orientation of a wire reference.
void SetRefOrientation (BRepGraph_MutGuard< BRepGraphInc::WireRef > &theMut, const BRepGraphInc::ParityOrientation theOrientation)
void SetRefChildWireId (const BRepGraph_WireRefId theWireRef, const BRepGraph_WireId theWire)
 Rewire a wire reference to a different wire def (rebinds WireToFaces if parent is Face).
void SetRefChildWireId (BRepGraph_MutGuard< BRepGraphInc::WireRef > &theMut, const BRepGraph_WireId theWire)

Detailed Description

Wire creation and editing operations.

Member Enumeration Documentation

◆ CoEdgeOrderStatus

Status returned by wire coedge-order prechecks.

Enumerator
Ready 

Input is valid and already connected in given order.

Reordered 

Input is valid after internal canonical reordering.

AlreadyCurrent 

Input equals current stored order; mutation can be skipped.

AlreadyContained 

Append precheck found the coedge already in the wire.

Empty 

Input contains no coedges.

InvalidWire 

Wire id is invalid or removed.

SizeMismatch 

Input size differs from current wire coedge count.

DuplicateCoEdge 

Input repeats a coedge id.

InvalidCoEdge 

Input references an invalid, removed, or incomplete coedge.

CoEdgeAlreadyBound 

Add precheck found a coedge already owned by a wire.

CoEdgeNotOwnedByWire 

Set-order precheck found a coedge not owned by the wire.

NotPermutation 

Set-order input is not a permutation of current coedges.

Disconnected 

Coedges cannot form a connected chain.

◆ ReplaceEdgeStatus

Status returned by wire edge-replacement prechecks.

Enumerator
Ready 

Replacement is valid and preserves wire connectivity.

AlreadyCurrent 

Old and new edge are the same and no mutation is needed.

InvalidWire 

Wire id is invalid or removed.

InvalidOldEdge 

Old edge id is invalid, removed, or not used by the wire.

InvalidNewEdge 

New edge id is invalid or removed.

Disconnected 

Replacement would break the ordered coedge chain.

Member Function Documentation

◆ Add()

BRepGraph_WireId BRepGraph::EditorView::WireOps::Add ( const NCollection_Array1< BRepGraph_CoEdgeId > & theCoEdgeIds)
nodiscard

Add a wire definition from pre-created CoEdges. Each CoEdge must be free-floating (no parent wire yet). The method binds all CoEdges to the new wire and updates relation tables.

Parameters
[in]theCoEdgeIdsordered coedge identifiers
Returns
typed wire definition identifier, or invalid if any referenced coedge is invalid or already bound to a wire

◆ CheckAppendCoEdge()

CoEdgeOrderStatus BRepGraph::EditorView::WireOps::CheckAppendCoEdge ( const BRepGraph_WireId theWire,
const BRepGraph_CoEdgeId theCoEdgeId ) const
nodiscard

Precheck appending a free CoEdge to an existing wire.

Parameters
[in]theWirewire definition identifier
[in]theCoEdgeIdfree coedge candidate
Returns
status describing whether the append can preserve connected order

◆ CheckCoEdgeOrder() [1/2]

CoEdgeOrderStatus BRepGraph::EditorView::WireOps::CheckCoEdgeOrder ( const BRepGraph_WireId theWire,
const NCollection_Array1< BRepGraph_CoEdgeId > & theCoEdgeIds ) const
nodiscard

Precheck owned CoEdges for WireOps::SetCoEdgeOrder().

Parameters
[in]theWirewire definition identifier
[in]theCoEdgeIdscandidate coedge identifiers
Returns
status describing whether the input can replace the stored order

◆ CheckCoEdgeOrder() [2/2]

CoEdgeOrderStatus BRepGraph::EditorView::WireOps::CheckCoEdgeOrder ( const NCollection_Array1< BRepGraph_CoEdgeId > & theCoEdgeIds) const
nodiscard

Precheck free-floating CoEdges for WireOps::Add().

Parameters
[in]theCoEdgeIdscandidate coedge identifiers
Returns
status describing whether the input can form a wire

◆ CheckReplaceEdge()

ReplaceEdgeStatus BRepGraph::EditorView::WireOps::CheckReplaceEdge ( const BRepGraph_WireId theWire,
const BRepGraph_EdgeId theOldEdge,
const BRepGraph_EdgeId theNewEdge,
const bool theReversed ) const
nodiscard

Precheck replacing one edge by another in an existing wire.

Parameters
[in]theWirewire definition identifier
[in]theOldEdgeedge currently used by one or more wire coedges
[in]theNewEdgereplacement edge
[in]theReversedif true, replacement coedge orientation is reversed
Returns
status describing whether replacement preserves connected order

◆ Mut()

BRepGraph_MutGuard< BRepGraphInc::WireDef > BRepGraph::EditorView::WireOps::Mut ( const BRepGraph_WireId theWire)
nodiscard

Return scoped mutable wire definition guard.

◆ MutRef()

BRepGraph_MutGuard< BRepGraphInc::WireRef > BRepGraph::EditorView::WireOps::MutRef ( const BRepGraph_WireRefId theWireRef)
nodiscard

Return scoped mutable wire reference guard.

◆ RemoveCoEdge()

bool BRepGraph::EditorView::WireOps::RemoveCoEdge ( const BRepGraph_WireId theChildWireId,
const BRepGraph_CoEdgeId theCoEdgeId )
nodiscard

Detach one exact coedge entry from a wire definition. Use BRepGraph_CoEdgesOfWire::CurrentId() when removing from a wire iterator. The method removes the exact ordered coedge entry, updates relation tables, and prunes the CoEdge node when it has no other active usages.

Parameters
[in]theChildWireIdwire definition identifier
[in]theCoEdgeIdexact wire-owned coedge identifier
Returns
true if the active wire-owned usage was removed

◆ ReplaceEdge()

void BRepGraph::EditorView::WireOps::ReplaceEdge ( const BRepGraph_WireId theChildWireId,
const BRepGraph_EdgeId theOldEdgeEntity,
const BRepGraph_EdgeId theNewEdgeEntity,
const bool theReversed )

Replace one edge with another in a wire definition. Updates the CoEdge's EdgeIdx to point to the new edge, adjusts orientation if theReversed, and incrementally updates relation tables.

Parameters
[in]theChildWireIdwire definition identifier
[in]theOldEdgeEntityedge to replace
[in]theNewEdgeEntityreplacement edge
[in]theReversedif true, reverse the orientation of the replacement

◆ Reverse()

void BRepGraph::EditorView::WireOps::Reverse ( const BRepGraph_WireId theWire)

Reverse the wire: flip the order of the wire's CoEdgeIds and flip each owned CoEdge's orientation. Used by healing/sewing to invert a loop.

Parameters
[in]theWirewire definition identifier

◆ SetCoEdgeOrder()

bool BRepGraph::EditorView::WireOps::SetCoEdgeOrder ( const BRepGraph_WireId theWire,
const NCollection_Array1< BRepGraph_CoEdgeId > & theCoEdgeIds )
nodiscard

Replace the ordered CoEdge relation vector with a permutation of its current content.

Parameters
[in]theWirewire definition identifier
[in]theCoEdgeIdsnew ordered CoEdge identifiers
Returns
true if the order was accepted and applied

◆ SetRefChildWireId() [1/2]

void BRepGraph::EditorView::WireOps::SetRefChildWireId ( BRepGraph_MutGuard< BRepGraphInc::WireRef > & theMut,
const BRepGraph_WireId theWire )

◆ SetRefChildWireId() [2/2]

void BRepGraph::EditorView::WireOps::SetRefChildWireId ( const BRepGraph_WireRefId theWireRef,
const BRepGraph_WireId theWire )

Rewire a wire reference to a different wire def (rebinds WireToFaces if parent is Face).

◆ SetRefOrientation() [1/2]

void BRepGraph::EditorView::WireOps::SetRefOrientation ( BRepGraph_MutGuard< BRepGraphInc::WireRef > & theMut,
const BRepGraphInc::ParityOrientation theOrientation )

◆ SetRefOrientation() [2/2]

void BRepGraph::EditorView::WireOps::SetRefOrientation ( const BRepGraph_WireRefId theWireRef,
const BRepGraphInc::ParityOrientation theOrientation )

Set the orientation of a wire reference.


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