Commit cc8261af authored by Jund Thomas's avatar Jund Thomas

modification for import svg (bug fix in progress)

parent 62c1194a
......@@ -51,6 +51,7 @@ void mergeVertex(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC
ee = map.phi2_1(ee);
} while(ee != e);
map.insertEdgeInVertex(ee,dd);
} while(dd!=d);
}
......
......@@ -42,6 +42,12 @@ namespace Import
*/
bool checkXmlNode(xmlNodePtr node, const std::string& name);
template <typename PFP>
void readCoordAndStyle(xmlNode* cur_path,
std::vector<std::vector<VEC3 > >& allPoly,
std::vector<std::vector<VEC3 > >& allBrokenLines,
std::vector<float>& allBrokenLinesWidth);
template <typename PFP>
bool importSVG(typename PFP::MAP& map, const std::string& filename, VertexAttribute<typename PFP::VEC3>& position, CellMarker<EDGE>& polygons, CellMarker<FACE>& polygonsFaces);
......
This diff is collapsed.
......@@ -222,14 +222,14 @@ public:
// * @param d dart of the vertex
// * @param e dart of the edge
// */
// virtual void insertEdgeInVertex(Dart d, Dart e);
virtual void insertEdgeInVertex(Dart d, Dart e);
//
// //! Remove an edge from a vertex orbit
// /*! \pre Dart d must be phi2 sewed
// * @param d the dart of the edge to remove from the vertex
// * @return true if the removal has been executed, false otherwise
// */
// virtual bool removeEdgeFromVertex(Dart d);
virtual bool removeEdgeFromVertex(Dart d);
//! Sew two oriented faces along oriented edges
/*! \pre Edges of darts d & e MUST be boundary edges
......
......@@ -340,21 +340,22 @@ void Map2::swapEdges(Dart d, Dart e)
//phi2sew(d2, e2);
}
//void Map2::insertEdgeInVertex(Dart d, Dart e)
//{
// assert(!sameVertex(d,e) && phi2(e) == phi_1(e));
// phi1sew(phi_1(d), phi_1(e));
//}
//
//bool Map2::removeEdgeFromVertex(Dart d)
//{
// if (!isBoundaryEdge(d))
// {
// phi1sew(phi_1(d), phi2(d)) ;
// return true ;
// }
// return false ;
//}
void Map2::insertEdgeInVertex(Dart d, Dart e)
{
assert(!sameVertex(d,e));
assert(phi2(e) == phi_1(e));
phi1sew(phi_1(d), phi_1(e));
}
bool Map2::removeEdgeFromVertex(Dart d)
{
if (!isBoundaryEdge(d))
{
phi1sew(phi_1(d), phi2(d)) ;
return true ;
}
return false ;
}
void Map2::sewFaces(Dart d, Dart e, bool withBoundary)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment