News:

Be sure your post is relevant to the current discussion.  Create a new topic within the appropriate board if you are unsure.

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.

Railsweep centre of mass

Started by Orion20036, May 05, 2011, 06:21:13 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Orion20036

Hello All, not sure if this something new or something that has been discussed before. I have recently started creating some kinetic sculptures, and find that there may be some discrepancies with the center of mass calculations for rail sweeps. To test out the theory, I created a railsweep of a circle along a symmetrical shaped polyline, which was a crankshaft  shape, and then sliced  it right down the middle creating two identical halves. The volume and also the surface area of each half was different.
In my model, I had a plate that I subtracted the full crank shape from, and found that the center of mass was off center , when both components were on center before subtraction. I am using Turbocad V15 Plat, any ideas.

Please only confirm the volume and surface areas at present, as the parts are at different horizontal positions to show the example.



Henry Hubich

Care to post the .tcw?

Henry H

Orion20036

Here is the example file Henry, hope you can make some sense of it, I have tried cutting a few objects to compare the halves, but only a few as yet, sections of a torus for example will split in half with identical properties.


Orion20036

Far more accurate results with a square profile Henry, to a couple of decimal places.

Orion20036

#4
Just tried the same with a symmetrical circular loft Henry, the loft when sliced down the middle has different volumes, but with the same surface area with both halves.

A symmetrical loft with square profile is spot on.

Orion20036

The two halves, volume and surface areas of the first example Henry, also do not add up to the total for the railsweep before it is sliced.

Orion20036

A sphere cut in half also has different volume and surface areas for both halves. I think that it is something to do with circular calculation or curves, maybe a discrepancy for PI as a constant in the calculations.

Orion20036

A cylinder sliced is quite accurate for both halves.

Orion20036

Square extrusions are very accurate.

Orion20036

Seems to definitely be all the sweep profiles that are circular or curved Henry, I just tried a more complex but symmetrical straight line profile shown below and had no problem when sliced in two halves. Spot on properties for each half.

Orion20036

#10
The fact that the very simple calculation for a sphere is wrong, means that it has to be a constant for PI in the calculation IMO.The calculation for the left hand side of the sliced solid, appears to be different for the calculation for the right hand side of the sliced solid.

The actual calculation for the sphere's surface area and volume are correct before slicing, but the routine that calculates the two separate halves after slicing is wrong, neither half is correct, as if one is calculating in a positive direction and rounding up, and the other is calculating in a negative direction, and rounding down. The two halves when added together are also wrong.

Orion20036

This calculation has to be in the Spatial Acis modeler Henry, which means it may have been solved in a later version, as all the major 3d modelling packages are using this modeler engine.

Henry Hubich

Yup. Definitely an error.

Henry H

Orion20036

Just found some Acis mass properties information on the spatial site, but not sure what version it is for. Can anyone replicate the above scenarios in Turbocad V18, to see if the problem still exists.

Here is a link to the mass properties routines within the Acis libraries

http://doc.spatial.com/qref/ACIS/html/group__INTRAPIPHYSICALPROPS.html

Henry Hubich

Quote from: Michael Geraghty on May 07, 2011, 12:50:20 PM
Just found some Acis mass properties information on the spatial site, but not sure what version it is for. Can anyone replicate the above scenarios in Turbocad V18, to see if the problem still exists.

Here is a link to the mass properties routines within the Acis libraries

http://doc.spatial.com/qref/ACIS/html/group__INTRAPIPHYSICALPROPS.html

Yup. The problem still exists in v18.

Henry H

Orion20036

Quote from: Henry Hubich on May 07, 2011, 02:47:20 PM
Quote from: Michael Geraghty on May 07, 2011, 12:50:20 PM
Just found some Acis mass properties information on the spatial site, but not sure what version it is for. Can anyone replicate the above scenarios in Turbocad V18, to see if the problem still exists.

Here is a link to the mass properties routines within the Acis libraries

http://doc.spatial.com/qref/ACIS/html/group__INTRAPIPHYSICALPROPS.html

Yup. The problem still exists in v18.

Henry H

Thanks Henry, my programming is a bit rusty, and not really a c++ person, but am going to have a look through the #include <mprop.hxx> file, and see if anything stands out, pretty sure it is a round up or down that is applied to the calculations in the positive and negative sides of the principle axis, and most likely includes PI as it only happens with circular profiles or solids.

Orion20036

Can't get any further yet, seems to be wrapped up in the ComProperties.dll in the program folder.

Orion20036

Starting to narrow this problem down a bit now Henry, A sphere sliced along the y axis results in two halves with different volume and surface area, however, a sphere sliced along the x axis results in two perfectly matching sets of properties, which means that the routine has a problem in the calculations +X and - X Directions. This is only an assumption at present, as the slice along the x axis leaves two symmetrical halves if the y axis is taken as the principle calculation axis. I may try rotating some of the earlier examples, and slicing again to see what difference, or rotating and adding a small sphere to change the entity ucs before slicing.A definite prefererence as to the orientation of the object before obtaining properties, because of a bug in the calculation routine.

Orion20036

#18
Anybody out there with either Solidworks or Autocad, who can find the volume of a sphere, slice it, and then confirm that the volume of the two halves are identical and match the overall volume, as I believe that these programs are using the same calculation routine.The strange thing about Turbocad using the Acis modeler, is that when a sphere is sliced the volume and other  mass properties are showing different results for both halves, although when added back together are showing the correct overall volume etc. It may be that the objects are holding the correct calculated property data, but the properties data displayed is incorrect.

John R

This is what I get in V18 when the new "Relative Accuracy" setting on the ACIS page is set to 0.1 (the default) and 0.0001 (max). The higher the accuracy, the closer the numbers become the same.
John R.

V17—V21, 2015—2025
Designer, Deluxe, (Basic, Expert, Professional), Platinum
RedSDK enabled
Windows 11 Pro (25H2), 64-bit

Henry Hubich

Quote from: John R on May 08, 2011, 10:10:43 AM
This is what I get in V18 when the new "Relative Accuracy" setting on the ACIS page is set to 0.1 (the default) and 0.0001 (max). The higher the accuracy, the closer the numbers become the same.

I'd forgotten all about that setting. Here's how the "Railsweep" properties look at maximum Relative Accuracy.

Henry H

Orion20036

These settings are much better results with V18, but would still be good to have a reference accuracy comparison with a sliced complex solid with another third party program. Comparing gives a greater level of confidence, when using this data, but I am happier that the later version has far better accuracy at it's max setting.

murray dickinson

#22
I tried a competitive package with similar specs to TC and the same ACIS version.  The halves had matching figures no matter how I sliced it (I thought I'd never see "no matter how you slice it" (a) used literally and contextually, and (b) not used by a politician...)

Dean

#23
"no matter how you slice it"

I wish I could say the same for tcad18 platinum. The results are un-predictable when slicing a sphere. One can always do the math. As you see in the pictures below the results are obvious. I have to agree with michael. I have narrowed the Inconsistencies down to workplanes and views when drawing the sphere. The relative accuracy seems to have no influence. It is always good to just do the math. The model below was a 4"radius sphere. The coordinates were typed in the inspector bar fields.
"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

Orion20036

#24
If you slice a sphere, the entity ucs is the same for both halves, now if you get the properties for the right or left half they are different, but if you get the properties of one half, and the add a rotated sphere to the other half and add them together , giving one half a mirror ucs, then both halves calculate the same. In other words, both halves need to be calculated in opposite directions in relation to the axis. The fact that neither half is exactly half of the original, does indicate an error in the calculation.This error only seems to happen with objects that have a circular facet to them, e.g.  circular swept profiles, lofts with circular profiles, spheres etc. Hard to say without seeing the actual routine, but I believe that it is a PI rounding error. If both the positive and negative calculations about an axis are both rounded up ,for example  to one decimal place -1.15 would be -1.1, and +1.15  would be +1.2, but I think that it is only PI in the calculation that is being rounded up. To sum it up, I believe that Pi in the calculation is rounded up in the positive and negative calculation, instead of one rounded up and one rounded down, or an average between the two.

Orion20036

Not on my machine at present, but try creating a sphere , and slice it at 45 degrees, and see what the halves properties are like.

Henry Hubich

Quote from: Michael Geraghty on May 09, 2011, 08:47:17 AM
Not on my machine at present, but try creating a sphere , and slice it at 45 degrees, and see what the halves properties are like.

They're different.

...I find myself wondering just how important these discrepancies really are. A jillion years ago, before the advent of the hand calculator, about 98% of my engineering calculations were performed on a slide rule, which yielded accuracy to three significant figures (or four, in some cases) if one was careful. And that was good enough. I'm thinking that any application requiring greater accuracy than TCad offers is likely to have a big enough budget to acquire a more specialized software suite.

Henry H

Orion20036

I agree to a point Henry, but I searched the internet, and found Autocad, Solid Edge, Solidworks and also Turbocad are having similar problems.If there is a bug in the software, which I believe is a simple bug, it should be ironed out.Yesterday, I looked at a posting on a Solidworks forum, where a man had created parts for a model plane, whose total weights when added individually tallied 4.5kg and when added together as a solid tallied 550kg.  If you can arrive at that kind of error under some circumstances, it needs looking into. The increased precision does mean that the error is reduced to an insignificant number, but our examples are pretty basic , and not yet tried on a more complex model. The other thing is a bug can very often affect other routines. Sometimes I will sweep a profile along a path , and it works okay, but the mirror image path throws an error, which may be another facet of the same bug. There appear to be two routines used in these programs which are  variants of an original routine. Some of the errors may be porting errors as the routines have been upgraded to a new language. I will try some complex examples of added known volume in the next few days, and see if the error levels increase dramatically or not. Imsi should post a bug report with Spatial, as I know that they do ask for bug information.

Orion20036


Henry Hubich

Quote from: Michael Geraghty on May 09, 2011, 09:51:07 AM
I agree to a point Henry, but I searched the internet, and found Autocad, Solid Edge, Solidworks and also Turbocad are having similar problems.If there is a bug in the software, which I believe is a simple bug, it should be ironed out.Yesterday, I looked at a posting on a Solidworks forum, where a man had created parts for a model plane, whose total weights when added individually tallied 4.5kg and when added together as a solid tallied 550kg. 


I suspect that a result that's wrong by a factor of more than 100 is caused by an entirely different problem.

Henry H

Orion20036

Possibly Henry, looks like the loft in the particular example, but there are tens of thousands of posts relating to mass properties errors amongst the software packages
mentioned.All use variants of the same routine.

Dean

#31
I have yet to discover why genie varies in her calculations at different times. As you see in the example above of a simple 4"radius sphere. After slicing the sphere sometimes genie calculated the SA of the half sphere in the negative y to be 150 or 350. The inconsistency seems to always be in the half that is sitting in the negative y in a SE iso view. The SA of the half sphere should be 1/2 the SA of the sphere + the SA of the flat side circle. Which is a total of 150. So if you added 200,(the original SA of the 4"sphere)+150 =350, =genie's calculations. The calculated volume seems to always be correct. The formula is the same with the 2” radius sphere. Genie calculated SA= 87 it should be 37. That would be the original SA of the 2” sphere + The calculated half SA. 50+37.If I can find the sequence that triggers genie’s false calculation, I will post it.
"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