[Search tip detail and code files using keywords, tip number, author name, etc ]
 
Find the Center of a Triangle
Tip# 3830 By Dean Culver On 27-Feb-2012
0
Rated By 0 users
Categories : 2D Operations
Software type : AutoCAD 2012
Rename File To : No Files to download.
Two methods include using AutoCAD's internal calculator or turning the triangle into a region.

Dean Culver explains two methods for finding the center of a triangle in AutoCAD.

"I have found that there is usually more than one way to accomplish a task in AutoCAD. For example, I occasionally need to find the center or centroid of a triangle, and I've found two different ways to do so.

"First, I will use AutoCAD's internal calculator to place a point at the center of the triangle. I like to place a point there so I have something I can reference later if I need to dimension to it. Set the PDMode to the desired configuration (I prefer the setting of 3; that way, X marks the spot). Start by entering Point at the Command line, followed by the Enter key. It will then ask you to specify a point. Type in ‘CAL followed by the Enter key, which will activate AutoCAD's internal calculator (the apostrophe before the command allows it to be operated transparently while you are in another command). Next, AutoCAD will ask you for the >>>> expression: Type in the expression (INT+INT+INT)/3 followed by the Enter key. Your mouse pointer will be replaced with a pick box; carefully select the three intersections of the triangle. Although it may not appear to be picking anything, rest assured it is picking the intersections, provided your aim is good and they do indeed intersect. It will place a point at the center or centroid of the triangle.

"The second method to find the center of a triangle is to turn the triangle into a region. Start by entering Region at the Command line, followed by the Enter key. It will then ask you to select objects: pick the three sides of the triangle, if the triangle was made using lines, or the whole triangle if it is a pline, then use the Enter key to finish the command. Next use the MassProp command and select the newly created region. AutoCAD will list the x and y coordinates of the centroid of the triangle in the AutoCAD Text Window."

Notes from Cadalyst Tip Reviewer Brian Benton:
This tip actually has five tips inside it: The first is that there is usually more than one way to do something in AutoCAD. The second and third are the tips on finding the center of a triangle. (A third method to find the center is to draw a line from one vertex to the midpoint of the opposite leg. Do this again on another vertex/leg. Where your two lines intersect will be the center. But that's a geometry tip, not a CAD tip.) A fourth tip is to use the Cal command inside an active command. And yet another tip is to use the MassProp command to find information about objects (regions, solids, etc.).

 

Average Rating:
0


User comments
Comment by Cooper,Kent
Posted on 2012-02-27 08:44:43
Just be sure you know WHICH center of the triangle you need. The 'CAL method and the Region-centroid method will find the same location as the Reviewer's described intersections of the medians. That's the centroid, and the "center of gravity" of the triangle. But there are other "centers" -- incenter, circumcenter, orthocenter, and other more obscure bases -- depending on what you want from the determined location. For instance, if you need the place that is EQUIDISTANT from all three triangle EDGES, which is the center of a circle tangent to all three edges, that's the incenter (intersection of the angle bisectors), not the centroid. The point that's equidistant from all three triangle VERTICES is the circumcenter (intersection of the perpendicular bisectors of the sides). And so on.... For equilateral triangles, those are all the same, but not for others.
Comment by Rouleau,Gavin
Posted on 2012-02-27 14:42:10
Nice to have options. Another method. For an equilateral triangle, you could also use osnaps (midpoint, perpendicular, extension) and osnap tracking to find the intersection of two of the triangle side midpoints.
Comment by Stevens-Rayburn,Don
Posted on 2012-02-27 16:34:20
A note on Brian's comment. I have been reading a fascinating book on the Archimedes Codex. Archimedes described Brian's technique for finding the center of gravity of a triangle somewhere around 300 BCE. I sometimes wonder what Archimedes could have done if he had had a computer!
Comment by DeShawn,Bill
Posted on 2012-02-27 17:02:52
There is an old routine that finds the center of a closed polyline called PLCEN.lsp. It arrives at a different point. The routine actually arrives at the same point as it would if the closed polyline were to be converted to a wipeout, and you used the CENter OSNAP on the Wipeout.
Comment by challinor,keith
Posted on 2012-02-28 03:59:00
you always employ circle command TAN,TAN,TAN and then use the circle center point this will work for any regular shaped polygon !! K.I.S.S.


Log In