OSNAP for center of polygon
Summary: Center of polygon OSNAP
Description: I would like to see an osnap feature that snaps to the center of a symmetrical polygon regardless of orientation.
How Used: Fewer picks.
Feature Affinity: Snaps
Submitted By: Billy Wooten on October 27, 2006
RE: OSNAP for center of polygon
Until it gets written in stock...
use: 'average
You can write it into the POP0 menu...
Code:
;;; Average point of all selected points
(DEFUN c:average (/ |average| |count| |nextpoint| |pt1| |temp-pt|)
(SETQ |pt1| (GETPOINT "\nSpecify first point to Average: "))
(SETQ |count| '(1 1 1))
(SETQ |temp-pt| |pt1|)
(WHILE
(SETQ |nextpoint|
(GETPOINT |pt1|
"\nSpecify next point or RETURN to end: "
)
)
(SETQ |temp-pt| (MAPCAR '+ |nextpoint| |temp-pt|))
(SETQ |count| (MAPCAR '1+ |count|))
(PROMPT
(STRCAT "\n" (ITOA (CAR |count|)) " points specified: ")
)
)
(SETQ |average| (MAPCAR '/ |temp-pt| |count|))
(command "_non" |average|)
)
RE: OSNAP for center of polygon
Or you could use the mid between 2 points snap.
Re: OSNAP for center of polygon
I would change the phrase from center osnap grip to centriod grip. Once the polygone has been changed by streaching the polygone by it's grip making it an arbitrary shape, still a polygone, there is no longer a centroid.
Otherwise if the polygone is created such as a circle where if you try to change size of the polygone keeping it's symetry in tact at all times then a osnap centroid grip is fesible. This can also be applied to parallelograms.
Re: OSNAP for center of polygon
Instead I use Gile's Custom Osnap plugin... This provides third (TRD), quarter (QTR), centroid (CTR), and Fraction (FRC) snaps.