Reading ARC from DXF

Reading ARC from DXF

Anonymous
Not applicable
1,428 Views
2 Replies
Message 1 of 3

Reading ARC from DXF

Anonymous
Not applicable

Hello,

 

I created pies using SketchUp Make 2016 and exported them to AutoCAD DXF.

 

When I take a look at the DXF files the arcs seem to be ill-defined. For instance, I drew two pies matching a quarter of a circle, one being the bottom right quarter and the other the bottom left one. In both cases, the start angle (50) is stored as 270 and the end angle (51) as 0. This cannot be correct since otherwise both pies would have to be the bottom right quarter of a circle!

 

In another file I also drew a quarter of a circle and got start angle = 0.0 and end angle = 3.642388066480673, which is definitely not correct since a quarter always has an angle difference of 90 degrees.

 

And yet, SketchUp correctly displays the pies when I close the files and import them again.

 

What's wrong?

0 Likes
1,429 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable

For the first question I guess the records 210,220,230 would show something different. That records should contain the vector Normal to arc plane, and sometimes I've found 0,0,-1 instead of 0,0,1. This means angles are on the inverse plane and the arc is drawn clockwise.

For the second example I cannot say. Angles are expressed in degrees and to me there is no way 3.64 would become 90°... but if it's loaded correctly there must be some record that does the magic!

Message 3 of 3

FRFR1426
Collaborator
Collaborator

@Anonymous is right, DXF is a 3D format, so you have to take in account the DXF codes 210, 220 and 230 which are the extrusion direction of the arc (the normal of the plane). For the angle of 3.64 degrees, please post your DXF file.

Maxence DELANNOY
Manager
Add-ins development for Autodesk software products
http://wiip.fr
0 Likes