From edd64adf7729fc793f5f22b0acc1792370f52f1d Mon Sep 17 00:00:00 2001 From: Jund Thomas Date: Thu, 29 Nov 2012 18:56:49 +0100 Subject: [PATCH] correction importSVG --- include/Algo/Import/importSvg.hpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/include/Algo/Import/importSvg.hpp b/include/Algo/Import/importSvg.hpp index 8e7705f81..0a0d26d31 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 ; } } ///////////////////////////////////////////////////////////////////////////////////////////// -- GitLab