void InventorShape::computeShape() { Bnd_Box bounds; BRepBndLib::Add(shape->getShape(), bounds); bounds.SetGap(0.0); Standard_Real xMin, yMin, zMin, xMax, yMax, zMax; bounds.Get(xMin, yMin, zMin, xMax, yMax, zMax); Standard_Real deflection = ((xMax-xMin)+(yMax-yMin)+(zMax-zMin))/300.0 * 0.2; BRepMesh::Mesh(shape->getShape(), deflection); SoGroup* faces = new SoGroup(); computeFaces(faces, shape->getShape()); separator->addChild(faces); SoGroup* edges = new SoGroup(); computeEdges(edges, shape->getShape()); separator->addChild(edges); SoGroup* vertices = new SoGroup(); computeVertices(vertices, shape->getShape()); separator->addChild(vertices); }
ConstCombinatorialEmbedding::ConstCombinatorialEmbedding( const ConstCombinatorialEmbedding &C) : m_cpGraph(C.m_cpGraph), m_rightFace(*C.m_cpGraph,nullptr) { computeFaces(); if(C.m_externalFace == nullptr) m_externalFace = nullptr; else m_externalFace = m_rightFace[C.m_externalFace->firstAdj()]; }
void ConstCombinatorialEmbedding::init(const Graph &G) { m_cpGraph = &G; m_rightFace.init(G,nullptr); computeFaces(); }
ConstCombinatorialEmbedding::ConstCombinatorialEmbedding(const Graph &G) : m_cpGraph(&G), m_rightFace(G,nullptr) { computeFaces(); }