View Full Version : Geometric Center Of A Figure?
dirtlegg
29th Jan 2008, 03:49 pm
I am using autocad 2002 and am wondering if there is a command to find the geometric center of a polygon.
lpseifert
29th Jan 2008, 03:57 pm
Create a Region from the polygon and use the Massprop command to find the centroid of the Region.
Alex_AW
29th Jan 2008, 04:01 pm
The _massprop command should help. But you'll have to make a region from your figure.
lpseifert (http://www.cadtutor.net/forum/member.php?u=2998) pass ahead of me a bit :).
dirtlegg
29th Jan 2008, 04:01 pm
thanks...that gives me the coordinates, but can I snap to the centroid? I need to do this 100 times or more for this job. To enter the coords would take forever.
lpseifert
29th Jan 2008, 04:05 pm
I hope you get paid by the hour.
You could cut/paste the centroid's coords from the Text window into Notepad, manipulate to get into x,y format, the paste at the command line.
dirtlegg
29th Jan 2008, 04:26 pm
thanks for the advice.....i better come up with something more efficient because i do several jobs each year that require this to be done.
SLW210
29th Jan 2008, 04:47 pm
I hope you get paid by the hour.
You could cut/paste the centroid's coords from the Text window into Notepad, manipulate to get into x,y format, the paste at the command line.
Or paste it into Notepad as a SCRIPT with the point command. Just save the Notepad file as a .scr. You can also save the data from Mass Properties in a .mpr file which will open with Notepad.
Something like this...
_POINT
1,2
2,3
Here is a link to a LISP at Autodesk for Placing the Point on a Solid (http://usa.autodesk.com/adsk/servlet/ps/item?siteID=123112&id=2888943&linkID=9240617), you may be able to get one for regions or get this one to work for regions.
SLW210
29th Jan 2008, 04:52 pm
thanks for the advice.....i better come up with something more efficient because i do several jobs each year that require this to be done.
Take the lisp I linked you to and see if someone in the LISP, VBA and Customisation section can whip up a LISP for you. In the mean time I will give this LISP a look and see if I can come up with something. I am working on learning VBA myself at this time, maybe I can whip something up with VBA. It may be a day or two before I can get to it, I will see what I can do. :thumbsup:
dirtlegg
29th Jan 2008, 05:06 pm
thanks...i will see what i can do with this as well
Powered by vBulletin™ Version 4.1.2 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.