View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0004589||FreeCAD||Bug||public||2021-03-08 02:18||2021-03-13 21:21|
|Summary||0004589: Edit|Placement generates the wrong Center when object is already translated.|
Discussed in https://forum.freecadweb.org/viewtopic.php?f=3&t=56393
|Steps To Reproduce|| Create a nominal part box.|
In the properties, set position_y to 30 mm
Click on "Center of Mass"
Try various angles and note that the body translates as well as rotating about an axis through the CG.
Note that the documentation and user expectation would expect only that the axis of rotation would shift from the box origin to through the CG.
The problem is that the "Center" should be relative to the box's local origin and should not have the translation added in. In the code, the "position" needs to be subtracted from the CG location so it is relative.
The same error occurs when using the "selected points" dialog. The point locations need to have the position vector subtracted from them to create the center.
"Now consider the case of selecting 2 points. You would select the 2 desired points, and then click the Selected points button. The coordinates of the midpoint between the 2 selected points get placed into the X, Y, and Z spinboxes within the Center section. Now any rotation done on the object will be about this center of rotation."
except this isn't what happens if the object is already translated...
|Tags||No tags attached.|
|FreeCAD Information||OS: macOS High Sierra (10.13)|
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24267 (Git)
Build type: Release
Python version: 3.8.8
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: C/Default (C)