cgma
|
#include <TopologyBridge.hpp>
Definition at line 54 of file TopologyBridge.hpp.
anonymous enum |
TopologyBridge::TopologyBridge | ( | ) | [inline] |
Definition at line 57 of file TopologyBridge.hpp.
: bridgeOwner(0), bridgeSense(CUBIT_FORWARD) {}
TopologyBridge::~TopologyBridge | ( | ) | [virtual] |
Definition at line 29 of file TopologyBridge.cpp.
{ if (bridgeOwner) bridgeOwner->bridge_destroyed(this); }
virtual void TopologyBridge::append_simple_attribute_virt | ( | const CubitSimpleAttrib & | ) | [pure virtual] |
Implemented in PartitionSurface, FacetSurface, CompositeSurface, OCCBody, OCCSurface, CompositeCoEdge, OCCCoEdge, FacetPoint, CompositeCurve, OCCPoint, PartitionCurve, OCCLoop, OCCShell, FacetCurve, OCCLump, CompositeLump, FacetCoEdge, PartitionCoEdge, FacetBody, FacetShell, CompositeBody, OCCCurve, PartitionBody, FacetLoop, FacetLump, CompositeLoop, PartitionLump, PartitionLoop, CompositeShell, PartPTCurve, PartitionShell, CompositePoint, and PartitionPoint.
BodySM * TopologyBridge::bodysm | ( | ) |
Definition at line 44 of file TopologyBridge.cpp.
{ DLIList<BodySM*> bodies; bodysms(bodies); if (bodies.size() > 0) return bodies.get(); else return NULL; }
void TopologyBridge::bodysms | ( | DLIList< BodySM * > & | bodies, |
bool | unique = true |
||
) |
Definition at line 72 of file TopologyBridge.cpp.
{ DLIList<TopologyBridge*> parents; BodySM* this_body = dynamic_cast<BodySM*>(this); if( this_body ) { bodies.append( this_body ); } else if( dynamic_cast<Lump*>(this) ) { get_parents( parents ); parents.reset(); for ( int i = parents.size(); i--; ) bodies.append (dynamic_cast<BodySM*>(parents.get_and_step())); } else { get_parents( parents ); for( int i = parents.size(); i--; ) parents.get_and_step()->bodysms( bodies, false ); if (unique) bodies.uniquify_ordered(); } }
BridgeManager * TopologyBridge::bridge_manager | ( | ) | const |
Definition at line 443 of file TopologyBridge.cpp.
{ return dynamic_cast<BridgeManager*>(bridgeOwner); }
void TopologyBridge::bridge_manager | ( | BridgeManager * | manager | ) |
Definition at line 446 of file TopologyBridge.cpp.
{ bridgeOwner = manager; }
CubitSense TopologyBridge::bridge_sense | ( | ) | [inline] |
Definition at line 123 of file TopologyBridge.hpp.
{ return bridgeSense; }
void TopologyBridge::coedgesms | ( | DLIList< CoEdgeSM * > & | coedgesms, |
bool | unique = true |
||
) |
Definition at line 255 of file TopologyBridge.cpp.
{ DLIList<TopologyBridge*> related; CoEdgeSM* this_coedge = dynamic_cast<CoEdgeSM*>(this); if( this_coedge ) { coedges.append(this_coedge); } else if( dynamic_cast<Curve*>(this) ) { get_parents( related ); related.reset(); for (int i = related.size(); i--; ) coedges.append( dynamic_cast<CoEdgeSM*>(related.get_and_step()) ); } else if( dynamic_cast<LoopSM*>(this) ) { get_children( related ); related.reset(); for (int i = related.size(); i--; ) coedges.append( dynamic_cast<CoEdgeSM*>(related.get_and_step()) ); } else { if( dynamic_cast<TBPoint*>(this) ) get_parents( related ); else get_children( related ); related.reset(); for( int i = related.size(); i--; ) related.get_and_step()->coedgesms(coedges, false); if (unique) coedges.uniquify_ordered(); } }
void TopologyBridge::curves | ( | DLIList< Curve * > & | curves, |
bool | unique = true |
||
) |
Definition at line 379 of file TopologyBridge.cpp.
{ DLIList<TopologyBridge*> related; Curve* this_curve = dynamic_cast<Curve*>(this); if( this_curve ) { curves.append(this_curve); } else if( dynamic_cast<TBPoint*>(this) ) { get_parents( related ); related.reset(); for (int i = related.size(); i--; ) curves.append( dynamic_cast<Curve*>(related.get_and_step()) ); } else if( dynamic_cast<CoEdgeSM*>(this) ) { get_children( related ); related.reset(); for (int i = related.size(); i--; ) curves.append( dynamic_cast<Curve*>(related.get_and_step()) ); } else { get_children( related ); related.reset(); for (int i = related.size(); i--; ) related.get_and_step()->curves (curves, false); if (unique) curves.uniquify_ordered(); } }
void TopologyBridge::curves_ignore_virtual | ( | DLIList< Curve * > & | curves, |
bool | unique = true |
||
) |
Definition at line 294 of file TopologyBridge.cpp.
{ int i; if(dynamic_cast<BodySM*>(this)) { DLIList<TopologyBridge*> lumps; this->get_children_virt(lumps); for(i=lumps.size(); i>0; i--) lumps.get_and_step()->curves_ignore_virtual(curves, unique); } else if(dynamic_cast<Lump*>(this)) { DLIList<TopologyBridge*> shells; this->get_children_virt(shells); for(i=shells.size(); i>0; i--) shells.get_and_step()->curves_ignore_virtual(curves, unique); } else if(dynamic_cast<ShellSM*>(this)) { DLIList<TopologyBridge*> surfs; this->get_children_virt(surfs); for(i=surfs.size(); i>0; i--) surfs.get_and_step()->curves_ignore_virtual(curves, unique); } else if(dynamic_cast<Surface*>(this)) { DLIList<TopologyBridge*> loops; this->get_children_virt(loops); for(i=loops.size(); i>0; i--) loops.get_and_step()->curves_ignore_virtual(curves, unique); } else if(dynamic_cast<LoopSM*>(this)) { DLIList<TopologyBridge*> coedges; this->get_children_virt(coedges); for(i=coedges.size(); i>0; i--) coedges.get_and_step()->curves_ignore_virtual(curves, unique); } else if(dynamic_cast<CoEdgeSM*>(this)) { DLIList<TopologyBridge*> tmp_curves; this->get_children_virt(tmp_curves); for(i=tmp_curves.size(); i>0; i--) tmp_curves.get_and_step()->curves_ignore_virtual(curves, unique); } else if(dynamic_cast<Curve*>(this)) { curves.append(dynamic_cast<Curve*>(this)); } if(unique) curves.uniquify_ordered(); }
void TopologyBridge::get_children | ( | DLIList< TopologyBridge * > & | children, |
bool | return_hidden_entities = false , |
||
int | layer = MAX_TB_LAYER |
||
) |
Definition at line 527 of file TopologyBridge.cpp.
{ assert(this->layer() <= layer); DLIList<TopologyBridge*> child_list[2], partitions; int current = 0; get_children_virt( child_list[current] ); // Note: be careful to return result list in the same order // as the child list we got above. bool done = false; while( !done ) { done = true; int next = 1 - current; child_list[current].reset(); child_list[next].clean_out(); for( int i = child_list[current].size(); i--; ) { TopologyBridge* child = child_list[current].get_and_step(); TBOwner* owner = child->owner(); TopologyBridge* composite = 0; TBOwnerSet* partition = 0; if( !owner || dynamic_cast<BridgeManager*>(owner) ) { child_list[next].append( child ); } else if( (partition = dynamic_cast<TBOwnerSet*>(owner) ) != NULL ) { if( partition->get_owner_layer() > layer ) { child_list[next].append(child); } else { done = false; partitions.clean_out(); partition->get_owners( partitions ); partitions.reset(); child_list[next] += partitions; } } else if( (composite = dynamic_cast<TopologyBridge*>(owner) ) != NULL ) { if( composite->layer() > layer ) { child_list[next].append(child); } else { done = false; if( !child_list[current].is_in_list(composite) ) child_list[next].append_unique( composite ); } } else if( return_hidden ) { child_list[next].append( child ); } else { ; // Do nothing. This entity is hidden by some composite. } } current = next; } children = child_list[current]; }
virtual void TopologyBridge::get_children_virt | ( | DLIList< TopologyBridge * > & | children | ) | [pure virtual] |
Implemented in OCCSurface, FacetSurface, FacetCurve, OCCCurve, PartitionSurface, FacetBody, OCCBody, FacetPoint, FacetLump, OCCLump, OCCPoint, CompositeSurface, OCCCoEdge, FacetLoop, OCCLoop, OCCShell, FacetCoEdge, FacetShell, CompositeCurve, PartitionCurve, CompositeCoEdge, PartitionBody, CompositePoint, PartitionCoEdge, CompositeLump, CompositeShell, CompositeBody, PartitionLump, PartitionLoop, CompositeLoop, PartitionPoint, and PartitionShell.
virtual GeometryQueryEngine* TopologyBridge::get_geometry_query_engine | ( | ) | const [pure virtual] |
Implemented in PartitionSurface, FacetSurface, OCCPoint, FacetPoint, OCCSurface, FacetCurve, OCCLump, OCCCurve, FacetLoop, FacetLump, CompositeSurface, CompositeCurve, PartitionCurve, CompositeCoEdge, PartitionBody, PartitionCoEdge, OCCCoEdge, CompositePoint, OCCBody, OCCLoop, OCCShell, CompositeLump, CompositeShell, CompositeBody, FacetCoEdge, FacetBody, FacetShell, PartitionLump, PartitionLoop, CompositeLoop, PartitionPoint, and PartitionShell.
void TopologyBridge::get_parents | ( | DLIList< TopologyBridge * > & | parents | ) |
Definition at line 449 of file TopologyBridge.cpp.
{ parents.clean_out(); get_parents_virt( parents ); for ( int i = parents.size(); i--; ) { TopologyBridge* tb_ptr = parents.step_and_get(); TBOwnerSet* partition_body = dynamic_cast<TBOwnerSet*>(tb_ptr->owner()); if ( partition_body ) { DLIList<TopologyBridge*> owner_list; partition_body->get_owners(owner_list); assert(owner_list.size() == 1); parents.change_to(owner_list.get()); } } }
virtual void TopologyBridge::get_parents_virt | ( | DLIList< TopologyBridge * > & | parents | ) | [pure virtual] |
Implemented in OCCSurface, FacetSurface, FacetCurve, OCCCurve, PartitionSurface, FacetBody, OCCBody, FacetPoint, FacetLump, OCCLump, OCCPoint, CompositeSurface, OCCCoEdge, FacetLoop, OCCLoop, OCCShell, FacetCoEdge, FacetShell, CompositeCurve, PartitionCurve, CompositeCoEdge, CompositePoint, PartitionBody, PartitionCoEdge, CompositeLump, CompositeShell, CompositeBody, PartitionLump, PartitionLoop, CompositeLoop, PartitionPoint, and PartitionShell.
virtual CubitStatus TopologyBridge::get_simple_attribute | ( | DLIList< CubitSimpleAttrib > & | ) | [pure virtual] |
Implemented in PartitionSurface, FacetSurface, CompositeSurface, OCCBody, OCCSurface, OCCCoEdge, FacetPoint, OCCPoint, OCCLoop, OCCShell, FacetCurve, OCCLump, FacetCoEdge, CompositeCoEdge, FacetBody, FacetShell, OCCCurve, CompositeCurve, FacetLoop, FacetLump, PartitionCurve, CompositeLump, PartitionCoEdge, PartitionBody, CompositeBody, CompositeLoop, PartitionLump, PartitionLoop, CompositePoint, CompositeShell, PartPTCurve, PartitionShell, and PartitionPoint.
virtual CubitStatus TopologyBridge::get_simple_attribute | ( | const CubitString & | name, |
DLIList< CubitSimpleAttrib > & | |||
) | [pure virtual] |
Implemented in PartitionSurface, FacetSurface, CompositeSurface, OCCBody, OCCSurface, OCCCoEdge, FacetPoint, OCCPoint, OCCLoop, OCCShell, FacetCurve, OCCLump, FacetCoEdge, CompositeCoEdge, FacetBody, FacetShell, OCCCurve, CompositeCurve, FacetLoop, FacetLump, PartitionCurve, CompositeLump, PartitionCoEdge, PartitionBody, CompositeBody, CompositePoint, CompositeLoop, PartitionLump, PartitionLoop, CompositeShell, PartPTCurve, PartitionShell, and PartitionPoint.
virtual int TopologyBridge::layer | ( | ) | const [inline, virtual] |
Reimplemented in PartitionSurface, CompositeSurface, CompositeCurve, CompositeCoEdge, PartitionCurve, CompositePoint, PartitionCoEdge, PartitionBody, CompositeLump, CompositeShell, CompositeBody, PartitionLump, PartitionLoop, CompositeLoop, PartitionPoint, and PartitionShell.
Definition at line 159 of file TopologyBridge.hpp.
{ return 0; }
LoopSM * TopologyBridge::loopsm | ( | ) |
Definition at line 61 of file TopologyBridge.cpp.
{ DLIList<LoopSM*> loopsm_list; loopsms(loopsm_list); if (loopsm_list.size() > 0) return loopsm_list.get(); else return NULL; }
void TopologyBridge::loopsms | ( | DLIList< LoopSM * > & | loopsms, |
bool | unique = true |
||
) |
Definition at line 215 of file TopologyBridge.cpp.
{ DLIList<TopologyBridge*> related; LoopSM* this_loop = dynamic_cast<LoopSM*>(this); if( this_loop ) { loops.append(this_loop); } else if( dynamic_cast<CoEdgeSM*>(this ) ) { get_parents( related ); related.reset(); for (int i = related.size(); i--; ) loops.append( dynamic_cast<LoopSM*>(related.get_and_step()) ); } else if( dynamic_cast<Surface*>(this) ) { get_children( related ); related.reset(); for (int i = related.size(); i--; ) loops.append( dynamic_cast<LoopSM*>(related.get_and_step()) ); } else { if( dynamic_cast<Curve*>(this) || dynamic_cast<TBPoint*>(this) ) get_parents( related ); else get_children( related ); related.reset(); for( int i = related.size(); i--; ) related.get_and_step()->loopsms( loops, false ); if (unique) loops.uniquify_ordered(); } }
Lump * TopologyBridge::lump | ( | ) |
Definition at line 52 of file TopologyBridge.cpp.
{ DLIList<Lump*> lump_list; lumps(lump_list); if (lump_list.size() > 0) return lump_list.get(); else return NULL; }
void TopologyBridge::lumps | ( | DLIList< Lump * > & | lumps, |
bool | unique = true |
||
) |
Definition at line 98 of file TopologyBridge.cpp.
{ DLIList<TopologyBridge*> related; Lump* this_lump = dynamic_cast<Lump*>(this); if( this_lump ) { lumps.append( this_lump ); } else if( dynamic_cast<BodySM*>(this) ) { get_children( related ); related.reset(); for ( int i = related.size(); i--; ) lumps.append( dynamic_cast<Lump*>(related.get_and_step()) ); } else if( dynamic_cast<ShellSM*>(this) ) { get_parents( related ); related.reset(); for ( int i = related.size(); i--; ) lumps.append( dynamic_cast<Lump*>(related.get_and_step()) ); } else { get_parents( related ); for( int i = related.size(); i--; ) related.get_and_step()->lumps( lumps, false ); if (unique) lumps.uniquify_ordered(); } }
TBOwner* TopologyBridge::owner | ( | ) | const [inline] |
Definition at line 114 of file TopologyBridge.hpp.
{ return bridgeOwner; }
void TopologyBridge::owner | ( | TBOwner * | new_owner | ) | [inline] |
Definition at line 117 of file TopologyBridge.hpp.
{ bridgeOwner = new_owner; }
void TopologyBridge::points | ( | DLIList< TBPoint * > & | points, |
bool | unique = true |
||
) |
Definition at line 415 of file TopologyBridge.cpp.
{ DLIList<TopologyBridge*> children; TBPoint* this_point = dynamic_cast<TBPoint*>(this); if( this_point ) { points.append(this_point); } else if( dynamic_cast<Curve*>(this) ) { get_children( children ); children.reset(); for (int i = children.size(); i--; ) points.append( dynamic_cast<TBPoint*>(children.get_and_step()) ); } else { get_children( children ); for( int i = children.size(); i--; ) children.get_and_step()->points(points, false); if (unique) points.uniquify_ordered(); } }
virtual void TopologyBridge::remove_all_simple_attribute_virt | ( | ) | [pure virtual] |
Implemented in PartitionSurface, FacetSurface, CompositeSurface, OCCBody, OCCSurface, OCCCoEdge, FacetPoint, OCCPoint, OCCLoop, OCCShell, FacetCurve, CompositeCoEdge, OCCLump, FacetCoEdge, CompositeCurve, FacetBody, FacetShell, OCCCurve, FacetLoop, PartitionCurve, FacetLump, CompositeLump, PartitionCoEdge, PartitionBody, CompositeBody, CompositeLoop, PartitionLump, PartitionLoop, CompositeShell, CompositePoint, PartPTCurve, PartitionShell, and PartitionPoint.
virtual void TopologyBridge::remove_simple_attribute_virt | ( | const CubitSimpleAttrib & | ) | [pure virtual] |
Implemented in PartitionSurface, FacetSurface, CompositeSurface, OCCBody, OCCSurface, OCCCoEdge, FacetPoint, OCCPoint, CompositeCoEdge, OCCLoop, OCCShell, CompositeCurve, FacetCurve, OCCLump, PartitionCurve, FacetCoEdge, FacetBody, FacetShell, OCCCurve, FacetLoop, CompositeLump, FacetLump, PartitionCoEdge, CompositeBody, PartitionBody, CompositeLoop, PartitionLump, PartitionLoop, CompositeShell, PartPTCurve, CompositePoint, PartitionShell, and PartitionPoint.
void TopologyBridge::reverse_bridge_sense | ( | ) | [inline] |
Definition at line 125 of file TopologyBridge.hpp.
{ bridgeSense = bridgeSense == CUBIT_UNKNOWN ? CUBIT_UNKNOWN : bridgeSense == CUBIT_FORWARD ? CUBIT_REVERSED : CUBIT_FORWARD; }
void TopologyBridge::shellsms | ( | DLIList< ShellSM * > & | shellsms, |
bool | unique = true |
||
) |
Definition at line 131 of file TopologyBridge.cpp.
{ DLIList<TopologyBridge*> related; ShellSM* this_shell = dynamic_cast<ShellSM*>(this); if( this_shell ) { shells.append(this_shell); } else if( dynamic_cast<Lump*>(this) ) { get_children( related ); related.reset(); for ( int i = related.size(); i--; ) shells.append( dynamic_cast<ShellSM*>(related.get_and_step()) ); } else if( dynamic_cast<Surface*>(this) ) { get_parents( related ); related.reset(); for ( int i = related.size(); i--; ) shells.append( dynamic_cast<ShellSM*>(related.get_and_step()) ); } else if( dynamic_cast<BodySM*>(this) ) { get_children( related ); for ( int i = related.size(); i--; ) related.get_and_step()->shellsms( shells ); } else { get_parents( related ); for( int i = related.size(); i--; ) related.get_and_step()->shellsms( shells, false ); if ( unique ) shells.uniquify_ordered(); } }
void TopologyBridge::surfaces | ( | DLIList< Surface * > & | surfaces, |
bool | unique = true |
||
) |
Definition at line 171 of file TopologyBridge.cpp.
{ DLIList<TopologyBridge*> related; Surface* this_surf = dynamic_cast<Surface*>(this); if( this_surf ) { surfaces.append(this_surf); } else if( dynamic_cast<LoopSM*>(this) ) { get_parents( related ); related.reset(); for (int i = related.size(); i--; ) surfaces.append( dynamic_cast<Surface*>(related.get_and_step()) ); } else if( dynamic_cast<ShellSM*>(this) ) { get_children( related ); related.reset(); for (int i = related.size(); i--; ) surfaces.append( dynamic_cast<Surface*>(related.get_and_step()) ); } else if ( dynamic_cast<BodySM*>(this) || dynamic_cast<Lump*>(this) ) { get_children(related); related.reset(); for (int i = related.size(); i--; ) related.get_and_step()->surfaces( surfaces, false ); if (unique) surfaces.uniquify_ordered(); } else { get_parents(related); related.reset(); for (int i = related.size(); i--; ) related.get_and_step()->surfaces( surfaces, false ); if (unique && !dynamic_cast<CoEdgeSM*>(this)) related.uniquify_ordered(); } }
void TopologyBridge::surfaces_ignore_virtual | ( | DLIList< Surface * > & | surfaces, |
bool | unique = true |
||
) |
Definition at line 347 of file TopologyBridge.cpp.
{ int i; if(dynamic_cast<BodySM*>(this)) { DLIList<TopologyBridge*> lumps; this->get_children_virt(lumps); for(i=lumps.size(); i>0; i--) lumps.get_and_step()->surfaces_ignore_virtual(surfaces, unique); } else if(dynamic_cast<Lump*>(this)) { DLIList<TopologyBridge*> shells; this->get_children_virt(shells); for(i=shells.size(); i>0; i--) shells.get_and_step()->surfaces_ignore_virtual(surfaces, unique); } else if(dynamic_cast<ShellSM*>(this)) { DLIList<TopologyBridge*> surfs; this->get_children_virt(surfs); for(i=surfs.size(); i>0; i--) surfs.get_and_step()->surfaces_ignore_virtual(surfaces, unique); } else if(dynamic_cast<Surface*>(this)) { surfaces.append(dynamic_cast<Surface*>(this)); } if(unique) surfaces.uniquify_ordered(); }
TopologyEntity * TopologyBridge::topology_entity | ( | ) | const |
Definition at line 35 of file TopologyBridge.cpp.
{ BridgeManager* bridgeManager = bridge_manager(); if (bridgeManager) return bridgeManager->topology_entity(); else return NULL; }
virtual int TopologyBridge::validate | ( | const CubitString & | , |
DLIList< TopologyEntity * > & | |||
) | [inline, virtual] |
TBOwner* TopologyBridge::bridgeOwner [private] |
Definition at line 206 of file TopologyBridge.hpp.
CubitSense TopologyBridge::bridgeSense [private] |
Definition at line 208 of file TopologyBridge.hpp.