Skip to content

Potential bug in recursive holes in polytrees #693

Answered by AngusJohnson
nsluhrs asked this question in Q&A
Discussion options

You must be logged in to vote

Using the latest Repository version ...

	Paths64 subject, solution;
	PolyTree64 tree;
	subject.push_back(MakePath({ 8,8, -8,8, -8,0, -6,0, -6,6, 6,6, 6,0, 4,0, 4,4, -4,4, -4,0, -2,0, 
		-2,2, 2,2, 2,-2, -2,-2, -2,0, -4,0, -4,-4, 4,-4, 4,0, 6,0, 6,-6, -6,-6, -6,0, -8,0, -8,-8, 8,-8 }));
	Clipper64 c;
	c.AddSubject(subject);
	c.Execute(ClipType::Union, FillRule::EvenOdd, tree);
	std::cout << tree << std::endl;
	solution = PolyTreeToPaths64(tree);

	SvgWriter svg;
	std::string filename = "test.svg";
	SvgAddSubject(svg, subject, FillRule::EvenOdd);  // pale blue lines
	SvgAddSolution(svg, solution, FillRule::EvenOdd, false); // black lines and light green fill
	SvgSaveToFile(svg, filename, 40…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by nsluhrs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants