Sketcher: Anomalous behavior while panning/zooming etc(?)

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
jnxd
Posts: 162
Joined: Mon Mar 30, 2015 2:30 pm

Sketcher: Anomalous behavior while panning/zooming etc(?)

Postby jnxd » Thu Feb 23, 2017 3:30 pm

Hi, just want to know if anyone else is having the same problem as me. Take a look at the attached files, and for each one double-click on the sketch and pan and zoom around. I could see that the size of the text of the dimension scales up/down when panning horizontally or zooming in the case of pan_anomaly_test2.fcstd and pan_anomaly_test3.fcstd, but not in pan_anomaly_test1.fcstd.

How I made the files:
  • pan_anomaly_test1.fcstd: Open file -> switch to sketcher WB and new sketch -> make sketch with some measurement constraint -> close sketch.
  • pan_anomaly_test2.fcstd: Open file -> make body -> copy sketch from pan_anomaly_test1.fcstd at document level -> delete body.
  • pan_anomaly_test1.fcstd: Open file -> copy sketch from pan_anomaly_test1.fcstd at document level.
Attachments
pan_anomaly_test3.fcstd
copied sketch from pan_anomaly_test1.fcstd and did nothing else
(3.2 KiB) Downloaded 8 times
pan_anomaly_test2.fcstd
had a PD body, copied sketch from pan_anomaly_test1.fcstd and deleted body
(3.23 KiB) Downloaded 9 times
pan_anomaly_test1.fcstd
No pan anomaly. sketch made directly from sketcher wb.
(3.25 KiB) Downloaded 9 times
chrisb
Posts: 17494
Joined: Tue Mar 17, 2015 9:14 am

Re: Sketcher: Anomalous behavior while panning/zooming etc(?)

Postby chrisb » Thu Feb 23, 2017 8:36 pm

I can confirm the behaviour in

OS: Ubuntu 14.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10236 (Git)
Build type: None
Branch: master
Hash: dd20ba3d068c4a0903417d93144f8ac7fed068e9
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

Which one did you use? You talk about bodies, so I guess you used an 0.17 version. Since this is not the current stable version you definitely should mention it.
jnxd
Posts: 162
Joined: Mon Mar 30, 2015 2:30 pm

Re: Sketcher: Anomalous behavior while panning/zooming etc(?)

Postby jnxd » Thu Feb 23, 2017 9:30 pm

chrisb wrote: Which one did you use? You talk about bodies, so I guess you used an 0.17 version. Since this is not the current stable version you definitely should mention it.
Good point. Here's the version

OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10232 (Git)
Build type: None
Branch: master
Hash: 3136b42830f6da733cef1cc649760b97a6cdc836
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

I should point out though I've been seeing it since quite a while ago, maybe a binary search of sorts could get us somewhere.
chrisb
Posts: 17494
Joined: Tue Mar 17, 2015 9:14 am

Re: Sketcher: Anomalous behavior while panning/zooming etc(?)

Postby chrisb » Thu Feb 23, 2017 9:55 pm

The difference is perspective view vs. orthographic view. You can toggle it in the menu->View.
wmayer
Site Admin
Posts: 14612
Joined: Thu Feb 19, 2009 10:32 am

Re: Sketcher: Anomalous behavior while panning/zooming etc(?)

Postby wmayer » Fri Feb 24, 2017 3:58 pm

Here is a stripped down OpenInventor file showing the behaviour in perspective mode. So, it looks like it's an issue to determine the font size in the class SoDatumLabel.
Attachments
sketch.iv
(4.77 KiB) Downloaded 12 times
wmayer
Site Admin
Posts: 14612
Joined: Thu Feb 19, 2009 10:32 am

Re: Sketcher: Anomalous behavior while panning/zooming etc(?)

Postby wmayer » Fri Feb 24, 2017 4:26 pm

This line https://github.com/FreeCAD/FreeCAD/blob ... l.cpp#L436 must be the culprit. The scale factor is constant when dragging in orthographic mode while in perspective mode it gets bigger when moving to the left and smaller when moving to the right.
wmayer
Site Admin
Posts: 14612
Joined: Thu Feb 19, 2009 10:32 am

Re: Sketcher: Anomalous behavior while panning/zooming etc(?)

Postby wmayer » Fri Feb 24, 2017 6:55 pm

jnxd
Posts: 162
Joined: Mon Mar 30, 2015 2:30 pm

Re: Sketcher: Anomalous behavior while panning/zooming etc(?)

Postby jnxd » Sat Feb 25, 2017 5:40 am

@wmayer: That was fast!
wmayer wrote:Here is a stripped down OpenInventor file showing the behaviour in perspective mode. So, it looks like it's an issue to determine the font size in the class SoDatumLabel.
Can you explain how to use the iv file or point to a resource?

On the same lines I tried the red cone of the inventor mentor, except using SoQt instead of SoXt, and I get into some sort of file not foubd error whatever I do! How do I run that cpp file?
wmayer
Site Admin
Posts: 14612
Joined: Thu Feb 19, 2009 10:32 am

Re: Sketcher: Anomalous behavior while panning/zooming etc(?)

Postby wmayer » Sat Feb 25, 2017 10:46 am

Can you explain how to use the iv file or point to a resource?
Drag and drop it onto FreeCAD. You first have to activate PartDesign or Sketcher so that it can read all nodes.