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!
Post Reply
User avatar
jnxd
Posts: 951
Joined: Mon Mar 30, 2015 2:30 pm
Contact:

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

Post by jnxd »

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 25 times
pan_anomaly_test2.fcstd
had a PD body, copied sketch from pan_anomaly_test1.fcstd and deleted body
(3.23 KiB) Downloaded 24 times
pan_anomaly_test1.fcstd
No pan anomaly. sketch made directly from sketcher wb.
(3.25 KiB) Downloaded 25 times
My latest (or last) project: B-spline Construction Project.
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

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

Post by chrisb »

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.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
jnxd
Posts: 951
Joined: Mon Mar 30, 2015 2:30 pm
Contact:

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

Post by jnxd »

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.
My latest (or last) project: B-spline Construction Project.
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

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

Post by chrisb »

The difference is perspective view vs. orthographic view. You can toggle it in the menu->View.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
wmayer
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

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

Post by wmayer »

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 31 times
wmayer
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

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

Post by wmayer »

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
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

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

Post by wmayer »

User avatar
jnxd
Posts: 951
Joined: Mon Mar 30, 2015 2:30 pm
Contact:

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

Post by jnxd »

@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?
My latest (or last) project: B-spline Construction Project.
wmayer
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

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

Post by wmayer »

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.
Post Reply