Draft WB Misbehaves with Radial and Diametric Dimensions in FC18

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
cflin
Posts: 50
Joined: Sun May 14, 2017 10:21 pm

Draft WB Misbehaves with Radial and Diametric Dimensions in FC18

Postby cflin » Mon Apr 23, 2018 6:12 am

For the past week or so, I have observed that when I try to take radial or diametric dimensions in FC18, the dimension lines appear in lala land.

While at this, a few words on taking radial and diametric dimensions: ALT-click on the arc/circle whose diameter or radius is dimensioned (the recommended way in the documentation for taking diametric or radial dimensions) has never worked for me on FC15, FC16, FC17, or FC18. To get a diametric or radial dimension, I have to first select the arc/circle, then activate the dimensioning tool (and after activating the dimensioning tool, press SHIFT to get the radius).

So, in FC18 (as in previous versions), I first select the curved edge and then activate the dimensioning tool to reproduce the above problem with diametric or radial dimension lines.

My FC18 as of now:
OS: Ubuntu 16.04.4 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13559 (Git)
Build type: None
Branch: master
Hash: 68f25713d3802b2bafef13877417ba2a416bb929
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)
chrisb
Posts: 21384
Joined: Tue Mar 17, 2015 9:14 am

Re: Draft WB Misbehaves with Radial and Diametric Dimensions in FC18

Postby chrisb » Mon Apr 23, 2018 7:35 am

Have you tried a different Mouse Model?
cflin
Posts: 50
Joined: Sun May 14, 2017 10:21 pm

Re: Draft WB Misbehaves with Radial and Diametric Dimensions in FC18

Postby cflin » Tue Apr 24, 2018 5:48 am

Have you tried a different Mouse Model?
Now that you mentioned it, yes. I have been using the Blender mouse model for several years and just as an experiment I switched to the CAD model. Same behavior. Trying different things, I found out that practically only the right ALT works as intended when taking diametric or radial dimensions. The left ALT doesn't seem to work reliably. It only worked once out of dozens of tries. That was true in both the Blender and The CAD mouse model. And it seems the "Select Edge" button in the Task Window must be pressed first and then the curved edge should be selected with (right) ALT pressed.

If I select the curved edge before activating the dimensioning tool, do the diametric or radial dimensions measured become parametric, like their straight edge counterparts? The documentation talks only about a straight-edge dimension becoming parametric if the straight edge is selected before the dimensioning tool is activated.

I am perfectly happy with selecting the curved edge before activating the dimensioning tool.

I just (early April 24, 2018 EDT) updated FreeCAD and the dimensioning lines for diametric and radial dimensions still each appear broken into two rectangular segments.
User avatar
looo
Posts: 3109
Joined: Mon Nov 11, 2013 5:29 pm

Re: Draft WB Misbehaves with Radial and Diametric Dimensions in FC18

Postby looo » Tue Apr 24, 2018 8:04 am

I can confirm this problem. Tthere is a division by zero:

Code: Select all

Traceback (most recent call last):
...
Pick center point:
Pick radius:
Pick first point:
Traceback (most recent call last):
  File "/usr/lib/freecad-daily/Mod/Draft/Draft.py", line 4193, in updateData
    u3.normalize()
<class 'Base.FreeCADError'>: Cannot normalize null vector
Traceback (most recent call last):
  File "/usr/lib/freecad-daily/Mod/Draft/Draft.py", line 4193, in updateData
    u3.normalize()
<class 'Base.FreeCADError'>: Cannot normalize null vector
Traceback (most recent call last):
  File "/usr/lib/freecad-daily/Mod/Draft/Draft.py", line 4193, in updateData
    u3.normalize()
<class 'Base.FreeCADError'>: Cannot normalize null vector
Traceback (most recent call last):
  File "/usr/lib/freecad-daily/Mod/Draft/Draft.py", line 4193, in updateData
    u3.normalize()
<class 'Base.FreeCADError'>: Cannot normalize null vector
Traceback (most recent call last):
  File "/usr/lib/freecad-daily/Mod/Draft/Draft.py", line 4193, in updateData
    u3.normalize()
<class 'Base.FreeCADError'>: Cannot normalize null vector
and the other way to add a diameter/radius doesn't work either for me.

edit: minimal fix is here: https://github.com/FreeCAD/FreeCAD/pull/1424
please help with my conda-packaging efforts: https://liberapay.com/looooo/
minimalistic blog: https://looooo.github.io/mini-blog/
User avatar
yorik
Site Admin
Posts: 11645
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Draft WB Misbehaves with Radial and Diametric Dimensions in FC18

Postby yorik » Wed Apr 25, 2018 2:18 pm

Fix is merged, thanks @looo
cflin
Posts: 50
Joined: Sun May 14, 2017 10:21 pm

Re: Draft WB Misbehaves with Radial and Diametric Dimensions in FC18

Postby cflin » Thu Apr 26, 2018 4:35 pm

Thanks to everybody for their hard work. I can confirm that after today's (April 26, 2018) update, the problem discussed in this thread no longer exists. Here is the info about the FC18 version that solved the problem today:

OS: Ubuntu 16.04.4 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13613 (Git)
Build type: None
Branch: master
Hash: 0599879e21cb7c2ce3a15adda0b59aeff6396529
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedStates (en_US)