I am developing a tool that requires the user to pick two crossing lines. The intersection of these two lines is used as the center for an ellipse that dynamically changes it's radius as the cursor is moved. I calculate the locations where the ellipse crosses the lines:
CurveCurve::IntersectionsXY()
With the result, I can iterate those intersections:
for each (ICurvePrimitivePtr curvePtr in *pointsOnEllipse) // this contains points ONLY IF the lines actually intersect... { DPoint3d ptOnEllipse; curvePtr->GetStartPoint(ptOnEllipse); ... }
I wish to obtain arcs between those intersection locations. I have tried this:
CurveVectorPtr testArc = ellipse->CloneBetweenCyclicIndexedFractions(0, 0.0, 0, 1.0);
but I have several questions:
CloneBetweenCyclicIndexedFractions() needs indexes and fractions. How can I go from the ICurvePrimitivePtr(s) returned from CurveCurve::IntersectionsXY() to the required indexes and fractions so that I get arcs? Also, once I've got those CurveVectorPtr "arcs", how do I get them into an EditElementHandle?
Additionally, how many indexes does an ellipse have? 4?
Bruce
Upon further reading about IntersectionsXY():
Each intersection is recorded as a "partial curve" that has fraction data indicating its position on the parent curve.
So, from that clue, I located GetPartialCurveDetailCP(), which returns a PartialCurveDetail, which DOES include a fraction.
Also, a CurveVector that has a single ellipse has a single index (index=0)....