News:

When replying to a specific statement be sure to quote the previous post.

Main Menu
TurboCAD 2026 Platinum box
Now available

TurboCAD 2026.2

The latest update for TurboCAD 2026. It installs over any 2026 build and keeps your activation, drawings and settings. Get it from the Start Page or Help > Check for Update.

Center of irregular Area from a displaced line?

Started by Roger Emerick, April 15, 2011, 12:43:14 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Roger Emerick

TC14:  I've attached a simple drawing showing an irregular shape and a vertical line.  I can get the area of this shape, but how can I get the distance to the center of the area from the vertical line?  From that I will get a volume for a 3D revolved entity (2piR*Area).  Thanks. Roger

Dean

#1
Hi, if you use a center of extents snap Turbcad calculates the center of a bounding box. Works good with closed splines beziers,polylines. Does Tcad 14 have "geometric parameters" as seen in the picture below. Or if you create a block of the ployline turbocad will calculate the parameters. I'm using Tcad16 and 18 platinum. Those red centroid axis are generated from turbcads 2d geometric parameters tool.The "region and mass properties" was created in auto cad Lt and I pasted the report in turbocad just for curiosty. Centriod 3 picture displays turbocads calculated 2d geometric parameters or your irregular  shape. Centriod 2 display the other shape I drew just to illustrate. If you need to do a 2d geometric parameters list on a spline or beizer you will have to explode it first. Though the center extents snap seems to snap to the centroid(center of bounding box) of a rectangle,rotated rectangle,circle,elipse and polygon.Any irregular shape I would use the 2d geometric parameter tool. Sometimes things that seem so simple to explain are really complicated. ???
"What do I know, I'm still learning".
Lenovo Legion T5  Intel(R) Core(TM) i7-14th Gen 20 cores Nvidia RTX 4070 Super 16GB Windows 11 home TurboCad 2025 with Animation Lab 6.0

Henry Hubich

Quote from: Roger Emerick on April 15, 2011, 12:43:14 PM
TC14:  I've attached a simple drawing showing an irregular shape and a vertical line.  I can get the area of this shape, but how can I get the distance to the center of the area from the vertical line?  From that I will get a volume for a 3D revolved entity (2piR*Area).  Thanks. Roger

If you have the Pro version, go to AddOns>Special Tools>Analyze>2D Geometric Parameters. You'll be prompted to "Pick some closed graphic." Click the irregular shape and you'll see a display like the attached screenshot. Be aware that the CG location is reported with respect to the World origin, and if you move the object you'll have to use Format>Place on WorkPlane it order to get a correct result.

Henry H

Dean

#3
Thanks Henry for simplifying the process. Apparently in Turbocad platinum18 you do not need to explode an irregular shape Bezier or spline for genie to calculate the 2d geometric parameters. In version 16 they needed to be exploded first then genie would calculate the parameters. In version 18 the 2d geometric parameter tool is now located under the “draw” menu.  The results of using the center of extents snap on an irregular shape varies. Here is the Tcad file. All I could do is save it in Tcad pro16 format. Maybe someone could change it for you.There is a slight difference in the 2d geometric parameteres calculations as compared  to the center of extents snap position.
"What do I know, I'm still learning".
Lenovo Legion T5  Intel(R) Core(TM) i7-14th Gen 20 cores Nvidia RTX 4070 Super 16GB Windows 11 home TurboCad 2025 with Animation Lab 6.0

Henry Hubich

Quote from: Dean on April 16, 2011, 09:27:44 AM
Thanks Henry for simplifying the process. Apparently in Turbocad platinum18 you do not need to explode an irregular shape Bezier or spline for genie to calculate the 2d geometric parameters. In version 16 they needed to be exploded first then genie would calculate the parameters. In version 18 the 2d geometric parameter tool is now located under the “draw” menu.  The results of using the center of extents snap on an irregular shape varies. Here is the Tcad file. All I could do is save it in Tcad pro16 format. Maybe someone could change it for you.There is a slight difference in the 2d geometric parameteres calculations as compared  to the center of extents snap position.

Interesting. I didn't even try this in v16, since Roger's message indicates that he uses v14. That's the version in which I made the screenshot attached to my earlier post. To clarify a bit, here's another screenshot of the same drawing in the same TCad version, which indicates that it isn't necessary to explode the object in order to read its 2D geometric properties.

I've also attached a screenshot made in my v18 installation, which uses the "Standard" UI. The "2D Geometric Parameters" tool is where it's always been. In fact, I don't even have a "Draw" menu.

...The Center of Extents snap goes to the center of the bounding rectangle of the selection, which is quite different from the selection's center of gravity. ("2D Geometric Parameters" isn't fooled.) This becomes obvious if, for example, one snaps to the COE of a right triangle drawn with its legs parallel to the X and Y axes. I've been asking vainly for years for a Snap mode that would reliably find an object's center of gravity.

Henry H

Dean

#5
Hi Henry, The first picture Tcad platinum18 displays a default loaded UI and the 2d geometric parameter tool is at he bottom of the draw menu. The 2nd picture  in Tcad 16 pro diplays the error when I try to perform a 2d geometric parameter on a closed bezier or a spline. I need to explode it to a polyline to get any results. Rogers original shape is a polyline and there is no problem (i don't need to explode)with performing the 2d geometric parameters. Perhaps I wasn't not clear ,I was refering to a spline and bezier, read my first post.
" I've been asking vainly for years for a Snap mode that would reliably find an object's center of gravity."

snap to centriod? that would be great.

"What do I know, I'm still learning".
Lenovo Legion T5  Intel(R) Core(TM) i7-14th Gen 20 cores Nvidia RTX 4070 Super 16GB Windows 11 home TurboCad 2025 with Animation Lab 6.0

Henry Hubich

Quote from: Dean on April 16, 2011, 11:12:14 AM
Hi Henry, The first picture Tcad platinum18 displays a default loaded UI and the 2d geometric parameter tool is at he bottom of the draw menu. The 2nd picture  in Tcad 16 pro diplays the error when I try to perform a 2d geometric parameter on a closed bezier or a spline. I need to explode it to a polyline to get any results.



Strange. Closed Bezier and closed Spline work for me. I thought at first maybe it's a bug that was fixed in v16.2 -- but they work in my v15.2, also.

Henry H

Dean


"
Strange. Closed Bezier and closed Spline work for me. I thought at first maybe it's a bug that was fixed in v16.2 -- but they work in my v15.2, also"

Well Henry, after scratching my head on this one, would believe it is the "nearest on graphic snap. When this is activated the 2d  geometric parameters tool works on a closed spline or closed bezier. When it is not activated I receive that error message.. This is the same In Tcad 16 and 18. The “no snap” icon can be “on” or “off” it has no correlation to it. can you confirm this? It is rather obvious for me on my end. I find that the snap configurations maintain there status when you close a drawing. When you open a new drawing they are configured how they were last assigned. If I discover more on this I will post the results.
"What do I know, I'm still learning".
Lenovo Legion T5  Intel(R) Core(TM) i7-14th Gen 20 cores Nvidia RTX 4070 Super 16GB Windows 11 home TurboCad 2025 with Animation Lab 6.0

Henry Hubich

Quote from: Dean on April 16, 2011, 01:08:47 PM


Well Henry, after scratching my head on this one, would believe it is the "nearest on graphic snap. When this is activated the 2d  geometric parameters tool works on a closed spline or closed bezier. When it is not activated I receive that error message.. This is the same In Tcad 16 and 18. The “no snap” icon can be “on” or “off” it has no correlation to it. can you confirm this? It is rather obvious for me on my end. I find that the snap configurations maintain there status when you close a drawing. When you open a new drawing they are configured how they were last assigned. If I discover more on this I will post the results.


Afraid I can't confirm. I almost never use running snaps, so my "no snap" icon is almost always on.

Henry H

Dean

#9
"Afraid I can't confirm. I almost never use running snaps, so my "no snap" icon is almost always on".
Geesh, somehow I knew you were going to say that. and once again you hit the nail on the head. So after further investigating I narrowed it down to the "snaps" It is not necessarily the "nearest on graphic” snap. In  the three tests I did the first picture shows the running snaps off (icon pushed in)with the vertex snap pushed in and I get the error message. Picure#2 shows the running snaps off without any  running snaps icon pushed in and the 2d geometric parameter tool works. Picture #3 shows the running snaps off and the midpoint snap pushed in and I get the error message. As I continued to test the other snaps the results were sometimes  geometric tool worked and other times I would get the error message. The results are the same in turbocad platinum18. It‘s really not a problem for me because the tool works, before I used to explode the closed Bezier or spline.inoder to use the geometric tool. I never got that error message when analyzing closed polylines The tool always worked on a closed polyline which doesn't really make any sense but knowing this now saves me a lot of  scratching my head and hopefully this might help someone else who experiences that error message when they go to use the 2d geometric parameter tool.

One other note I wanted to be clear on is I am not using any snaps when I go and select the closed bezier or spline. It is just a matter of pushing the snap icon in.  
"What do I know, I'm still learning".
Lenovo Legion T5  Intel(R) Core(TM) i7-14th Gen 20 cores Nvidia RTX 4070 Super 16GB Windows 11 home TurboCad 2025 with Animation Lab 6.0

Roger Emerick

Dean & Henry:  Thank you both.  I learned a lot on this issue.  One last Q:  When I ask a question ...  How do you paste the examples you provided so they open up on the screen versus having to download & open on my computer?  Does anything you attach in a Question allow you to just click on it and it will expand for viewing?  Thanks, Roger.

Dean

I really don't know Roger. I just just upload them with the "additional options" when I post.
"What do I know, I'm still learning".
Lenovo Legion T5  Intel(R) Core(TM) i7-14th Gen 20 cores Nvidia RTX 4070 Super 16GB Windows 11 home TurboCad 2025 with Animation Lab 6.0

Roger Emerick

Hi Dean.  Attached is my original drawing I sent.  In Case 3, I added a rectangle to which I added another rectangle then took a dimension from the vertical line to the center of extents.  That seems not to be the centroid (as in center of gravity) rather it is, as the name implies, the center of the extents.   In Case 4 I added a little larger 'horizontal' box.  That should have moved the center of gravity from the line a bit to the left.  Using the Add On/SpecialTools/Analyze/ 2D analysis tools, I pasted the properties of each.  It appears that Xc, goes from 12.236 in Case 3, to 11.447 in Case 4.  Presuming Xc is from the left 'extent' of the shape. That would make sense.  I have no idea why Yc=0 in both cases.  If you or anyone else can confirm the Xc, Yc meaning that would be great.  Thank you.  Roger

Henry Hubich

Quote from: Roger Emerick on April 19, 2011, 06:23:52 AM
Hi Dean.  Attached is my original drawing I sent.  In Case 3, I added a rectangle to which I added another rectangle then took a dimension from the vertical line to the center of extents.  That seems not to be the centroid (as in center of gravity) rather it is, as the name implies, the center of the extents.   In Case 4 I added a little larger 'horizontal' box.  That should have moved the center of gravity from the line a bit to the left.  Using the Add On/SpecialTools/Analyze/ 2D analysis tools, I pasted the properties of each.  It appears that Xc, goes from 12.236 in Case 3, to 11.447 in Case 4.  Presuming Xc is from the left 'extent' of the shape. That would make sense.  I have no idea why Yc=0 in both cases.  If you or anyone else can confirm the Xc, Yc meaning that would be great.  Thank you.  Roger

Xc and Yc are centroid locations referred to the World origin. If you move an object, be sure to use Format>Place on Workplane before trying to read its 2D Geometric Parameters.

Henry H