1
클리퍼 라이브러리를 사용하여 선으로 다각형을 분할하려고합니다. 클리핑 실행 후 빈 경로를 반환합니다. 누군가가 똑같은 일을 할 수있는 올바른 방법을 제안 할 수 있습니까? 선 및 다각형 클리핑이 클리퍼 라이브러리 (C++)를 사용하여 빈 경로를 반환합니다.
는
Paths clip(2),soln;
clip[0] << IntPoint(-264,-210) << IntPoint(650,-209);
Path sub = clip[0];
Path poly << IntPoint(531,49) << IntPoint(-21,49) << IntPoint(-970,-961) << IntPoint(-945,-1019) << IntPoint(1045,-1071) ;
Clipper c;
c.AddPath(poly,ptSubject,true);
c.AddPath(sub,ptClip,true);
c.Execute(ctIntersection,soln,pftNonZero, pftNonZero);
std::cout << soln.size() << "soln size";
SOLN 크기는 0이다.