Lines and curves (Restored thread)

Everything DG Kernel: Technical discussions and issues
Post Reply
Guoliang
Posts: 1
Joined: Thu Jun 20, 2024 10:33 am

Lines and curves (Restored thread)

Post by Guoliang »

Hello
I need to add some straight lines and curves around an object. What is the right way? I am just learning.
Thank you
Prashant Kande
Posts: 65
Joined: Tue Jun 18, 2024 6:12 am

Re: Lines and curves (Restored thread)

Post by Prashant Kande »

Hi
There are number of ways

1) You can call IStdShape_DG.Line()
2) Using IObjectGenerator_DG.Create((int)EObjectType.eObjTypeLineStrip) call
3) By importing a VRML file with "IndexedLineSet" node.
...

With the first method you get a straight line. You can modify it to make curve by adding internal points.
See the code in Init() method of the Lines example.
Jesseseemn
Posts: 1
Joined: Fri Jun 21, 2024 5:06 am

The Intersection of Lines and Curves in DG Kernel.

Post by Jesseseemn »

How does DG Kernel handle the intersection of lines and curves in a complex geometric model? Are there any specific algorithms or methodologies that are employed to ensure accuracy and efficiency in these calculations?
Prashant Kande
Posts: 65
Joined: Tue Jun 18, 2024 6:12 am

Re: Lines and curves (Restored thread)

Post by Prashant Kande »

Hello

The algorithm depends on the geometry type. Intersections of parametric (BRep) curves is handled by the Open Cascade engine. These are very robust WRT accuracy and performance and have been extensively used and tested.

See also: ICurve_DG.GetIntersection*()

Regards
Post Reply