Any idea on how I can take Curve2D and explode them?
I have some Curve2D resulted from text saving as DXF and I would need to transform it in lines.
Manually I could use Explode but I fail to automate the process.
Hi,
and what you are after? I do not fully understand, why do you need a bunch of lines (less precision) instead of a curve. Maybe an example of dxf export would be also helpful.
Although I am not sure, whether you can explode 2D curve to polylines, you can definitelly get points from a curve and then join them with lines.
I try to achieve this Link and I can do this only with lines, circles and splines but not with Curve2D's resulted from text(drafting) saved as dxf. I don't need the precision, I need the output.
I will attach a example but basically it is just a text in drafting saved afterwards as .dxf and then reopened in Catia.
I don't understand how I can get the information from the Curve2D, it has some strange properties that I don't understand.
Iscariot, you can open dxf in catdrawing, copy the view, paste as sketch in catpart, switch to GSD and Disassemble the sketch. You will get a bunch of simple wireframes.
dont search for Disassemble API, you will have to use win API for that, search the forum you should find enough info but in several posts... it wont be the easiest job. have fun.
Eric N. indocti discant et ament meminisse periti
If you have a 2D curve, then you can get any point from this curve with GetPointAtParam(double iParam, CATSafeArrayVariant oPoint) procedure. If I am not mistaken, iParam is a double between 0 and 1 (0 is a beginning point of a curve, 1 the end) and oPoint is 2D array. This way you can make your own polylines with a precision you need.