You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,AngusJohnson.
The two figures are sub and clip, and sub is the convex hull of clip. I perform a difference operation on sub and clip, and the result in res is two sets of points. All points in these two sets are the same as all points in sub and clip respectively. Why did I get such a result? The code is shown below.
res = Difference(sub, clip, FillRule::EvenOdd, 8);
The sub and clip are shown in the following figure, where the blue outline is sub and the red outline is clip
The final result should be all the shapes pointed by the black arrows in the figure below. Can we use a separate set of points to represent the shapes pointed by each arrow?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,AngusJohnson.
The two figures are sub and clip, and sub is the convex hull of clip. I perform a difference operation on sub and clip, and the result in res is two sets of points. All points in these two sets are the same as all points in sub and clip respectively. Why did I get such a result? The code is shown below.
PathsD sub, clip;
PathsD res;
sub.push_back(MakePathD({ 27.500, 39.500, 85.125, 39.500, 142.750, 39.500,
204.250, 41.750, 219.000, 87.500, 228.500, 122.125, 238.000, 156.750,
205.250, 195.000, 153.250, 197.750, 88.875, 185.750, 24.500, 173.750, -2.000,
132.000, -4.750, 109.375, -7.500, 86.750 }));
clip.push_back(MakePathD({ 142.750, 39.500, 145.390, 42.674, 146.625, 41.750,
159.500, 54.000, 204.250, 41.750, 190.333, 69.187, 213.750, 76.375, 209.745,
84.271, 219.000, 87.500, 207.844, 95.867, 223.250, 111.000, 219.245, 118.896,
228.500, 122.125, 216.121, 125.054, 212.666, 131.865, 238.000, 156.750, 205.250,
164.500, 205.250, 195.000, 175.901, 179.596, 153.250, 197.750, 108.000, 174.000,
88.875, 185.750, 72.000, 172.750, 24.500, 173.750, 32.000, 157.480, 21.750, 151.125,
27.297, 139.092, 27.136, 138.887, -2.000, 132.000, 14.000, 121.000, -4.750, 109.375,
4.250, 101.750, -7.500, 86.750, 33.530, 79.509, 30.250, 62.125, 31.560, 61.016, 27.500, 39.500, 68.750, 52.000, 85.125, 39.500, 88.155, 42.383, 89.000, 41.750, 110.609, 48.298 }));
res = Difference(sub, clip, FillRule::EvenOdd, 8);
The sub and clip are shown in the following figure, where the blue outline is sub and the red outline is clip
The final result should be all the shapes pointed by the black arrows in the figure below. Can we use a separate set of points to represent the shapes pointed by each arrow?
Beta Was this translation helpful? Give feedback.
All reactions