Skip to content

Double? #654

Answered by AngusJohnson
seghier asked this question in Q&A
Sep 19, 2023 · 15 comments
Discussion options

You must be logged in to vote

If you increase decimal precision to 4 (instead of the default 2), then you will get much more precise coordinates in your solutions:

      subject.Add(Clipper.MakePath(new double[] { 12.516166, 11.34008, 11.402324, 11.972632, 
        10.329735, 11.450089, 10.357238, 10.363749, 11.539835, 10.267492, 11.36107, 10.831288, 
        12.502415, 10.886293 }));

      // note: decimal precision = 4
      PathsD solution = Clipper.InflatePaths(subject, 0.26, JoinType.Miter, EndType.Butt, 2, 4);

      double dist1 = Math.Sqrt(Clipper.PerpendicDistFromLineSqrd(solution[0][5], solution[0][11], solution[0][12]));
      double dist2 = Math.Sqrt(Clipper.PerpendicDistFromLineSqrd(solution[0][6], solut…

Replies: 15 comments

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
0 replies
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
0 replies
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
0 replies
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
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by seghier
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #653 on September 19, 2023 20:14.