Hi Alex,
Thank you for the file.
<blockquote id="quote"><font size="2" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">Yes, of cource I tried these values (they are default when file is opened)
These values just make more number of parts in arc or in ellipse. It's possible to set them equal to 200 or more but in fact arc and ellipse will stay polyline and it will slow down programm.<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
Please find <b>procedure</b> TsgDXFImage.DrawCircle(Sender: TObject); in the <b>DXFImage.pas</b> and change it as the following lines:
Code: Select all
<b>begin</b>
Self := Drawing;
<b>if</b> FUseWinEllipse <b>and</b> (<b>not</b> Converter.Is3D)
<b>and</b> C.Lines.IsSolid <b>and</b> (Converter.VPort.X = 0)
<b>and</b> (Converter.VPort.Y = 0) <b>and</b> (Converter.VPort.Z > 0) <b>and</b> (<b>not</b> IsDrawingRotated) <b>then</b>
<blockquote id="quote"><font size="2" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote">I found that property of TsgDXFImage UseWinEllipse doesn't work correctly even with simple circles. I've sent you e-mail with file. I think there is problem in Converter.VPort. Why do you demand it to be (0,0,1)? What if VPort.Z changes?<hr height="1" noshade id="quote"></font id="quote"></blockquote id="quote">
VPort defines a direction in which a drawing is viewed. Commonly a drawing is being deformed when changing viewing direction relative to the screen flat co-ordinate system. The reason of such behaviour is that WinAPI can draw only 2-D ellipses. That is why we always split ellipses etc. to polylines.
Furthermore, every file may contain any number of inserted blocks (INSERTs) which have their own rotation angles. It is not clear how to draw arcs, ellipses and circles in such inserted blocks using WinAPI.
BTW: AutoCAD (R) splits such arcs, ellipses and circles on polyline segments too.
Sergey.