3
$\begingroup$

My drafting program outputs a .dwf format file. In it, arcs are encoded as

(Circle 602331619,844923003 537072960 32715,65588)

where my so-far affirmed interpretation is (Circle, X-center,Y-center Angle Unknown1,Unknown2).

The image for the arc is shown below (highlighted in Gold):

The arc in concern is the highlighted on.

Hence, each arc has its center and radius given. Are the pair of points at the end the starting and ending angles?

If you take (32715,65588) as (3.2715 rad,6.5588 rad), the output starts making sense. Is this correct?

$\endgroup$
4
  • $\begingroup$ What exactly are you trying to achieve here? Some context might help us help you. Also, is this a perfect half-circular arc? $\endgroup$ – grfrazee Aug 5 '15 at 17:46
  • $\begingroup$ This is a perfect half-circular arc. You may assume there is some negligible error in the theta span, but its theta span should be pi. I am trying to find the center point of the arc. In general, the arc can be in any orientation. $\endgroup$ – ExternCowWindows Aug 5 '15 at 19:29
  • $\begingroup$ Ok. That makes your assessment of the 32715,65588 a bit suspect, since if it were a perfect half-circle, I'd expect those to be 31416,62832. I tend to agree that that's probably what they represent, but I can't explain the difference. $\endgroup$ – grfrazee Aug 5 '15 at 19:40
  • $\begingroup$ I agree with your analysis. In fact, there is some error. The .dwf file states that there may be error, and I do not understand the format of the error statement. Thanks for the re-affirmation though. $\endgroup$ – ExternCowWindows Aug 5 '15 at 19:45
3
$\begingroup$

The file format for *.dwf files is defined. A reference for the various drawing commands can be found here. Specifically, the definition of the Draw Circle/Circular Arc/Circular Wedge function is here.

From that link an arc is described by:

X,Y,R Start,End

where:

X,Y - Center point (in logical coordinates) of the circle to be drawn

R - Radius (in logical coordinates) of the circle to be drawn

Start, End - The angles (in 360/65,536ths of a degree) that describe a "pie-slice" of the full circle to be rendered; legal values range from 0 to 65,536

$\endgroup$
1
  • $\begingroup$ Wow. Thank you so much. This is exactly what I was searching for my purpose! Unfortunately, I cannot increase your score yet until I get 15 reputation. $\endgroup$ – ExternCowWindows Aug 6 '15 at 14:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.