FB CAD
-
- Posts: 612
- Joined: Jun 15, 2005 13:22
- Location: Upstate NY
- Contact:
methods of drawing interface
in the case of drawing a circle, in most applications, the first mouse click sets the center point of a circle and the second mouse click sets the radius.
as i investgate ideas for implimenting ellipses in fbcad, i thought of the idea to add an Additional method of drawing circles and that is:
first mouse click sets one side of the circle and second mouse click sets it's diameter.
please let me know if this is unique, in which case it will be pretty cool.
the reason behind this thought is an idea about what mouse clicks represent what attributes of an ellipse in the process or method of drawing the ellipse.
as i investgate ideas for implimenting ellipses in fbcad, i thought of the idea to add an Additional method of drawing circles and that is:
first mouse click sets one side of the circle and second mouse click sets it's diameter.
please let me know if this is unique, in which case it will be pretty cool.
the reason behind this thought is an idea about what mouse clicks represent what attributes of an ellipse in the process or method of drawing the ellipse.
-
- Posts: 612
- Joined: Jun 15, 2005 13:22
- Location: Upstate NY
- Contact:
drawing a circle between two points
Circle (x1+(x2-x1)/2,y1+(y2-y1)/2),Sqr((x1-x2)^2 + (y1-y2)^2)/2
x1,y1 is the mouse location on first click
which is the end point of the 1st line on the left
x2,y2 is the mouse location on second click
which is the end point of the 2nd line on the right
holding the shift key down while drawing the circle is now in the code
normally one would have to draw a line between the two end points of lines 1 & 2 and draw the circle by snaping to the mid point of the line in between the two points.
x1,y1 is the mouse location on first click
which is the end point of the 1st line on the left
x2,y2 is the mouse location on second click
which is the end point of the 2nd line on the right
holding the shift key down while drawing the circle is now in the code
normally one would have to draw a line between the two end points of lines 1 & 2 and draw the circle by snaping to the mid point of the line in between the two points.
Last edited by owen on Apr 24, 2010 6:12, edited 1 time in total.
arcs
this second way of drawing circles also applies to drawing arcs.
drawing an arc uses 3 mouse clicks
1st click defines the arc's center point
2nd click defines the arc's radius and beginning point of the arc
3rd click defines the arc's end point
as an option: using the shift key while drawing the arc will automatically shift the arc's center point between mouse clicks 1 and 2. after mouse click #2, release the shift key as it no longer applies while adjusting the arc's swing.
drawing an arc uses 3 mouse clicks
1st click defines the arc's center point
2nd click defines the arc's radius and beginning point of the arc
3rd click defines the arc's end point
as an option: using the shift key while drawing the arc will automatically shift the arc's center point between mouse clicks 1 and 2. after mouse click #2, release the shift key as it no longer applies while adjusting the arc's swing.
ellipses
ok, ellipses is partially coded.
just like drawing circles, you have to methods of defining the ellipse' center point (using the shift key or not).
things that are pending:
createellipse (saves in array)
detection of ellipse
box selecting
saving dxf
just like drawing circles, you have to methods of defining the ellipse' center point (using the shift key or not).
things that are pending:
createellipse (saves in array)
detection of ellipse
box selecting
saving dxf
-
- Posts: 612
- Joined: Jun 15, 2005 13:22
- Location: Upstate NY
- Contact:
3rd way of drawing arcs (from an EDA program I use):
uses 3 mouse clicks
1st click defines the arc's start point
2nd click defines the arc's end point
3rd click defines the middle point (between the start and the end point) and with that the radius
The 3rd click could also define the center...
Good work Owen.
Keep it coming...
uses 3 mouse clicks
1st click defines the arc's start point
2nd click defines the arc's end point
3rd click defines the middle point (between the start and the end point) and with that the radius
The 3rd click could also define the center...
Good work Owen.
Keep it coming...
elliptical arc
ellipses and elliptical arc are done
pending is save dfx for ellipses
thanx for 3rd way to draw arc, i'll look into it.
to draw an ellipse
first click sets center point (shift key option is available)
second click sets major radius and angle at same time
third click sets second radius
elliptical arc use the same first three clicks
4th click start angle
5th click end angle
pending is save dfx for ellipses
thanx for 3rd way to draw arc, i'll look into it.
to draw an ellipse
first click sets center point (shift key option is available)
second click sets major radius and angle at same time
third click sets second radius
elliptical arc use the same first three clicks
4th click start angle
5th click end angle
wish list
Do you plan to make the program of yours 3D, adding the Z plane?
prior to 3d are several pending 2d goals: note (pls add your wish list)
objects: multi-lines, polylines, polygons, splines, hatches, blocks, text, dim
edit features: multi-copy, stretch, trim, scale, extend, multi level undo.
snap features: tangent, intersection, quadrants or points of circles @ x degrees
layer features: change current layer of objects to x layer, lock layers
also prior to 3d, i really want to add animation, motion, timing etc...
Do you plan to switch to FB current CVS anytime soon? not yet.
Do you plan to use a real GUI some point in time?
i would like to but i don't know how.
Which OS are you using? (Windows, Linux or DOS) winxpprosp2
prior to 3d are several pending 2d goals: note (pls add your wish list)
objects: multi-lines, polylines, polygons, splines, hatches, blocks, text, dim
edit features: multi-copy, stretch, trim, scale, extend, multi level undo.
snap features: tangent, intersection, quadrants or points of circles @ x degrees
layer features: change current layer of objects to x layer, lock layers
also prior to 3d, i really want to add animation, motion, timing etc...
Do you plan to switch to FB current CVS anytime soon? not yet.
Do you plan to use a real GUI some point in time?
i would like to but i don't know how.
Which OS are you using? (Windows, Linux or DOS) winxpprosp2
manually entering coordinate
thanx for noticing there was no way to manually enter coordinates. i was delaying to impliment this idea in lieu of a command line (textbox or textarea)...
i really appreciate you noticing this. to me that's way cool.
what i did was add a sub routine that allows you to enter the xy, and z (in the future) coordinates by pressing "X","Y", or "Z" (uppercase xyz)...
what this does, is it allows you to do set the coord's of 2 situations.
for example:
1. when drawing a line, circle, arc, etc... you are setting END points.
2. when NOT drawing... you are setting the begining points or center of a circle.
when using this feature, look in the upper left area of the screen, just above the buttons. (this is my temporary command line entry area)
also, i noticed that while drawing elliptical arcs, there was a discrepancy as to what angle the start and ends were actually equal to. it's a matter of relativity. i made the my changes so now by default, the start and end angle will follow the mouse. as an option you can hold the shift key down and force the start / end angles to be relative to the ellipse itself.
i really appreciate you noticing this. to me that's way cool.
what i did was add a sub routine that allows you to enter the xy, and z (in the future) coordinates by pressing "X","Y", or "Z" (uppercase xyz)...
what this does, is it allows you to do set the coord's of 2 situations.
for example:
1. when drawing a line, circle, arc, etc... you are setting END points.
2. when NOT drawing... you are setting the begining points or center of a circle.
when using this feature, look in the upper left area of the screen, just above the buttons. (this is my temporary command line entry area)
also, i noticed that while drawing elliptical arcs, there was a discrepancy as to what angle the start and ends were actually equal to. it's a matter of relativity. i made the my changes so now by default, the start and end angle will follow the mouse. as an option you can hold the shift key down and force the start / end angles to be relative to the ellipse itself.
Last edited by owen on Mar 13, 2007 19:38, edited 2 times in total.
what is 45 degrees example
my last note was to report a discrepancy about the angles involved in ellipses. so here's an example of what i meant.
when drawing an elliptical arc by default, the start angle will follow the mouse and if the mouse is 45 degrees in respect to the center of the ellipse then the arc's starting point will be where the red and cyan lines intersect.
and if the mouse is 45 degrees
in respect to the center of the ellipse then...
if holding the shift key down while defining the arc's start angle, then the start point will be that of the intersection of the blue and cyan lines.
when drawing an elliptical arc by default, the start angle will follow the mouse and if the mouse is 45 degrees in respect to the center of the ellipse then the arc's starting point will be where the red and cyan lines intersect.
and if the mouse is 45 degrees
in respect to the center of the ellipse then...
if holding the shift key down while defining the arc's start angle, then the start point will be that of the intersection of the blue and cyan lines.
Last edited by owen on Apr 24, 2010 6:13, edited 1 time in total.
oops
this is only the case if the ellipse is not skewed (i.e. @ zero degrees or vertical)... i thought i had it nailed. oh well, that's what makes it fun. i'll work on it some more later today.