Hi,
I have built two 2d bspline curves as IBSplineCurve2d_DG. I need to find its intersection points. It is also important to check whether the intersections are a touch or regular. Is there any method to do it?
Thanks
Tangential vs intersection curves
-
- Posts: 1
- Joined: Tue Oct 15, 2024 12:49 am
Re: Tangential vs intersection curves
It is pretty simple.
Query ICurve2d_DG out of the IBSplineCurve2d_DG. IBSplineCurve2d_DG has two GetIntersection() methods.
It looks like the second version should suit your better. The method returns 0 is there is no intersection or the number of them. The intersections themselves are returned via ISetR1_DG, which is an array of ranges. Normally all ranges are singletons (min == max). flagsTangential is an array of same size as the other two arrays.
flagsTangential[k] will be true if the k-th intersection was tangential.
Query ICurve2d_DG out of the IBSplineCurve2d_DG. IBSplineCurve2d_DG has two GetIntersection() methods.
It looks like the second version should suit your better. The method returns 0 is there is no intersection or the number of them. The intersections themselves are returned via ISetR1_DG, which is an array of ranges. Normally all ranges are singletons (min == max). flagsTangential is an array of same size as the other two arrays.
flagsTangential[k] will be true if the k-th intersection was tangential.