Skip to content
Discussion options

You must be logged in to vote
  Paths64 subjects, clip, lineSolution;
  clip.push_back(MakePath({ 0, 0, 4096, 0, 4096, 4096, 0, 4096 }));
  subjects.push_back(MakePath({ 3172, 2361, 3168, 2381 }));

  Clipper2Lib::Clipper64 Clipper;
  Clipper.AddOpenSubject(subjects);
  Clipper.AddClip(clip);

  Clipper2Lib::PolyTree64 PolygonSolution; //only gets **closed** paths
  bool bSucceeded = Clipper.Execute(Clipper2Lib::ClipType::Intersection, 
    Clipper2Lib::FillRule::NonZero, PolygonSolution, lineSolution);

  if (lineSolution.size())
    std::cout << lineSolution[0].size();

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@DasUberbadger
Comment options

Answer selected by DasUberbadger
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