Path: utzoo!utgpu!water!watmath!clyde!att!pacbell!ames!pasteur!ucbvax!decwrl!labrea!csli!rustcat From: rustcat@csli.STANFORD.EDU (Vallury Prabhakar) Newsgroups: comp.graphics Subject: AutoCAD question Keywords: polylines, bulge, arc-information Message-ID: <4406@csli.STANFORD.EDU> Date: 26 Jun 88 08:24:57 GMT Reply-To: rustcat@csli.UUCP (Vallury Prabhakar) Organization: Stanford University Lines: 37 This question is directed towards all the AutoCAD gurus/hackers out there. I looked into the entity-representation of polylines in the DXF portions of the manual. Apparently, all "sub-entities" of a polyline are stored as VERTICES with additional flags indicating various other options. One of these is the flag 42, whose value is associated with the so-called "bulge" of the segment between two VERTICES. This is defined to be "1/4 the included angle of the arc" and is set to 0.0 in the case of a straight-line segment between the two vertices. Say, for example the two vertices are (x1, y1) and (x2, y2) with the value of the bulge being z. I can calculate the value of the included angle between the arc end-points by the above definition of the bulge. Call this angle A. So, now I have two end-points and an included angle defining an arc-segment. It seems to me that this is not sufficient for uniquely defining a circular arc. Some piece of information appears to be missing. Could any of you familiar with AutoCAD/AutoLISP tell me what this information is? I have an inkling that the arc is drawn in such a way that it has first-order continuity (slopes are same) with the immediately previous sub-entity of the polyline, but that's just a guess. Or is it possible that AutoCAD does some kind of a common spline operation to draw the arc? In any case, we would still need to know the tangent vector at the first vertex, would we not? All this seems to be getting suspiciously messy. Is there a more elegant/ simple way of figuring out the nature of various sub-entities in a polyline? I was unable to find anything of that nature in the user-manual. I would really appreciate any answers to the above. Enjoy. -- Vallury Prabhakar -- rustcat@csli.stanford.edu