I am attempting to write a dxf library that exports arcs and ellipses, and so I am trying to figure out how to get the data from the line, arc, and ellipse functions. Is there a way to gather this data (the points and angles) from these commands as the code is run? I am imagining that there should be a way to put all this data into an array, which could then be used to write the text/dxf file. (The core DXF library is quite limited and a bit buggy.)
Even if the core DXF library is limited, it can be a good idea to look at its source, to see how it "captures" calls to drawing primitives. Also look at PApplet, defining all these primitives, actually forwarding them to the PGraphics named g: it also calls the primitives on the current recorder, if there is one. This one can be PDF, DXF, or other.
Yeah, I spent about a week trying to rewrite the core library, but it only uses begin/end Raw, which appears to be limited to line segments. But I will definitely look into PApplet and the use of PGraphics, it looks like that will be a good direction to go. Thanks for your response!
Leave a comment on sethgover's reply
Change topic type
Link this topic
Provide the permalink of a topic that is related to this topic