[BUG] Some dimensions seem to change value depending on scale

Discussions about the development of the TechDraw workbench
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
ToniTen
Posts: 242
Joined: Fri Sep 04, 2020 10:11 am

[BUG] Some dimensions seem to change value depending on scale

Post by ToniTen »

I've noticed that sometimes, the value shown by dimensions changes based on the scale. I decided to re-create the basic concept of the part where I saw it, in order to have something that could be easily shared here:
Weird Dimensions.png
Weird Dimensions.png (23.8 KiB) Viewed 954 times
  • Top section view uses custom scale=0.2
  • Bottom section view uses page scale=0.3
  • For each view
    • Top dimension uses the top vertices
    • Centre dimension uses vertical edges
    • Bottom dimension uses bottom vertices
As you can see, with the same section, at two different scales, when measuring between the two vertical edges, we obtain different values. If you go to the top section, and change the scale to 0.21 or greater, all dimensions show the same value, but at scale 0.2 (and smaller), the middle dimension goes to 554.75

FreeCAD version information:

Code: Select all

OS: Ubuntu 18.04.6 LTS (XFCE/xubuntu)
Word size of FreeCAD: 64-bit
Version: 0.20.
Build type: Release
Branch: unknown
Hash: 0c43dab7969a7a8ab014ea9da1398baff15bc90c
Python 3.6.9, Qt 5.9.5, Coin 4.0.0a, Vtk 7.1.1, OCC 7.5.2
Locale: Spanish/Spain (es_ES)
Installed mods: 
  * fasteners 0.11.3
  * Assembly3 0.11.3
  * fcgear 1.0.0
  * Manipulator 1.4.3
Attachments
weird dimensions.FCStd
(41.16 KiB) Downloaded 22 times
user1234
Veteran
Posts: 3475
Joined: Mon Jul 11, 2016 5:08 pm

Re: [BUG] Some dimensions seem to change value depending on scale

Post by user1234 »

Yes, see https://forum.freecadweb.org/viewtopic.php?f=35&t=68328 on the beginning (after a while, it gets off topic).

Reason: how TechDraw works: It scales the 3D Object and then the objects will be derived. So the scale underlies the TNP.

Greetings
user1234
User avatar
Shalmeneser
Veteran
Posts: 9546
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: [BUG] Some dimensions seem to change value depending on scale

Post by Shalmeneser »

:?: :idea:
Attachments
Capture d’écran 2022-06-17 134955.jpg
Capture d’écran 2022-06-17 134955.jpg (30.02 KiB) Viewed 943 times
weird dimensions_SHALM.FCStd
(11.09 KiB) Downloaded 15 times
User avatar
wandererfan
Veteran
Posts: 6309
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: [BUG] Some dimensions seem to change value depending on scale

Post by wandererfan »

ToniTen wrote: Fri Jun 17, 2022 11:43 am I've noticed that sometimes, the value shown by dimensions changes based on the scale.
Is this the same issue as https://www.forum.freecadweb.org/viewto ... 35&t=69482?
ToniTen
Posts: 242
Joined: Fri Sep 04, 2020 10:11 am

Re: [BUG] Some dimensions seem to change value depending on scale

Post by ToniTen »

wandererfan wrote: Fri Jun 17, 2022 2:04 pm
ToniTen wrote: Fri Jun 17, 2022 11:43 am I've noticed that sometimes, the value shown by dimensions changes based on the scale.
Is this the same issue as https://www.forum.freecadweb.org/viewto ... 35&t=69482?
I don't think so. It's not that dimensions don't change position on rescaling. The issue here is that dimensions do not display the right values depending on the scale
User avatar
wandererfan
Veteran
Posts: 6309
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: [BUG] Some dimensions seem to change value depending on scale

Post by wandererfan »

ToniTen wrote: Tue Jul 05, 2022 11:19 am I don't think so. It's not that dimensions don't change position on rescaling. The issue here is that dimensions do not display the right values depending on the scale
This is a real puzzler. It looks like BRepExtrema_DistShapeShape is giving a bad result when finding the closest points on the two edges. It reports a point not on Edge16 if the Scale is in [19.5, 20.1], but for other scales the point is on Edge16 as it should be.

I wonder if this is unique to OCC 7.5.2?
User avatar
wandererfan
Veteran
Posts: 6309
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: [BUG] Some dimensions seem to change value depending on scale

Post by wandererfan »

ToniTen wrote: Tue Jul 05, 2022 11:19 am
Should be fixed by git commit e0a73327c2. I learned a lot about OCC fixing this one!
Post Reply