Jump to content
Developer Wiki and Function Reference Links ×

Running around in... Ovals.


Recommended Posts

As you know, there are 2 kinds of circles; the constrained Oval, and the 360? Arc. Which form do you want?

It is easy to program a circular Oval in VS using the Center/Radius method, you just have to do a little math.

If you have the Center point and the Second point, calculate the distance betwen both points, that is your Radius. Then fill in the blanks.

Rad := Distance(Xcen, Ycen, Pt2X, Pt2Y);Oval(Xcen-Rad, Ycen+Rad, Xcen+Rad, Ycen-Rad);

If that is not what you are looking for, then I do not understand your question.

HTH,Raymond

Link to comment

Ts, When you mention p1 and p2, you are referring to parameters passed to the ARC command in VS. Yes, they would be the DIAMETER of the ARC especially if the ARC were swept through 360?. Compared to the OVAL or the RECT, it would be analogous to the bounding box of the drawn object. For short arc segments it may seem a bit odd to define such an EMPTY box, but, think of it any way you like, as awkward as it may seem, those are the numbers that the ARC command requires. I have seen much more obtuse ways of defining arcs: Gerber RS-274D & IPC D350 come immediately to mind.

As a word of note, always use the upper left and the lower right coordinates of the bounding box, in that order, as the other combinations of corners definitely DON'T work. Been there, done that!

HTH,Raymond

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...