- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
I'm having trouble with intersection detection between two halves of a circle. I've divided the circle into two arcs and am using the [Curve.Intersect] function to check for intersections.
However, even though the circles are clearly connected, I still don't get any intersection points. Am I missing something or doing something wrong?
Any help or suggestions would be greatly appreciated.
```
// Calculate the midpoint of the circle
XYZ center = circle.Center;
double radius = circle.Radius;
XYZ xDirection = circle.XDirection;
XYZ yDirection = circle.YDirection;
// Calculate the start, mid, and end points based on the circle's orientation
XYZ startPoint = center + radius * xDirection; // Point at angle 0
XYZ topHalfPoint = center + radius * yDirection; // Point at angle 90
XYZ midPoint = center + radius * (-xDirection); // Point at angle 180 (opposite side)
XYZ bottomHalfPoint = center + radius * -yDirection; // Point at angle 270
// Create the two arcs using explicit points
Arc arc1 = Arc.Create(startPoint, midPoint, topHalfPoint);
Arc arc2 = Arc.Create(startPoint, midPoint, bottomHalfPoint); // Continuation of arc1
```
SetComparisonResult setComparisonResult = arc1.Intersect(arc2, out var intersectionResults);
```
The result was disjoint.
Solved! Go to Solution.