Tangential vs intersection curves

Everything DG Kernel: Technical discussions and issues
Post Reply
Sanjay Kumar
Posts: 1
Joined: Mon Oct 14, 2024 2:51 am

Tangential vs intersection curves

Post by Sanjay Kumar »

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
Ben Davidson
Posts: 1
Joined: Tue Oct 15, 2024 12:49 am

Re: Tangential vs intersection curves

Post by Ben Davidson »

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.
Post Reply