diff --git a/include/Algo/Import/importSvg.hpp b/include/Algo/Import/importSvg.hpp index 8e7705f81247362c6f72d8ac43ff9c76a04321a0..0a0d26d31bac2d3666efbcdac07df2f29637db08 100644 --- a/include/Algo/Import/importSvg.hpp +++ b/include/Algo/Import/importSvg.hpp @@ -491,7 +491,7 @@ bool importSVG(typename PFP::MAP& map, const std::string& filename, VertexAttrib //if the valence of one of the vertex is equal to one //cut the edge to insert the quadrangular face - if (map.phi2_1(d1) == d1) + if(map.vertexDegree(d1)==2) { map.cutEdge(d2) ; brokenL.mark(map.phi1(d2)) ; @@ -502,7 +502,7 @@ bool importSVG(typename PFP::MAP& map, const std::string& filename, VertexAttrib edgePlanes[map.phi_1(d1)] = Geom::Plane3D(v, p1) ; } - if (map.phi2_1(d2) == d2) + if(map.vertexDegree(d2)==2) { map.cutEdge(d1) ; brokenL.mark(map.phi1(d1)) ; @@ -533,15 +533,21 @@ bool importSVG(typename PFP::MAP& map, const std::string& filename, VertexAttrib { if (brokenL.isMarked(d)) { + VEC3 pos; + Geom::Plane3D pl; - VEC3 pos = position[d] ; + pos = position[d] ; pl = edgePlanes[d] ; pl.project(pos) ; - pl = edgePlanes[map.phi_1(d)] ; - pl.project(pos) ; +// pl = edgePlanes[map.phi_1(d)] ; +// pl.project(pos) ; position[d] = pos ; + + pos = position[map.phi1(d)] ; + pl.project(pos) ; + position[map.phi1(d)] = pos ; } } /////////////////////////////////////////////////////////////////////////////////////////////