Datum Planes (PartDesign::Plane) can have either automatic dimensions, or manually set dimensions, for the 3D viewer. In this latter case, there are 2 properties that set this dimension: Length and Width. When setting the dimension manually, the plane's visual representation becomes a rectangle, with 1 corner always the 0,0 origin of the plane. Thus, when drawing a circle for example, the circle is outside the rectangle.
It is possible to manually set the datum plane's size and position by dragging its edges in other CAD programs. While I don't ask for such feature, it would be better that the datum plane is centered around it's origin, meaning that it should extend from -Length/2 to Length/2, and from -Width/2 to Width/2.
This is defined in ~/src/Mod/PartDesign/Gui/ViewProviderDatumPlane.cpp, line #134 setExtents(double l, double w):
Code: Select all
pCoords->point.set1Value(0, l, w, 0);
pCoords->point.set1Value(1, 0, w, 0);
pCoords->point.set1Value(2, 0, 0, 0);
pCoords->point.set1Value(3, l, 0, 0);
Code: Select all
pCoords->point.set1Value(0, l/2, w/2, 0);
pCoords->point.set1Value(1, -l/2, w/2, 0);
pCoords->point.set1Value(2, -l/2, -w/2, 0);
pCoords->point.set1Value(3, l/2, -w/2, 0);
The Datum Plane should be centered. Can I make a PR for that ? Is there a very strong reason to have the current solution ?