View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003974||Sketcher||Bug||public||2019-05-15 19:12||2019-06-22 15:22|
|Target Version||Fixed in Version|
|Summary||0003974: Feature that snaps arc angles to 45° increments don't work correctly (lack of internal precision)|
|Description||When using the feature that snaps arc angles to 45° increments, the internal precision is not sufficient & results in weird behavior.|
|Steps To Reproduce||Download attached file and try to revolve the sketch around sketch Y axis. It fails with a "Revolve axis intersects the sketch" while it is unexpected.|
Replacing 90° angles with perpendicular constraints fixes the issue.
Editing the 90° angles and reentering the value manually fixes the issue.
|Additional Information||From investigations, it seems to be due to lack of decimal precision in the angle values used by the polyline tool.|
Below the angle value first after creation by polyline then after manual reentering
Or same with values in degrees
This is also seeable by zooming on the small segment line that lies on the Y axis. Below a view just after creation by polyline.
Forum thread (FR)
OS: Ubuntu 18.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Build type: Release
Python version: 2.7.15rc1
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)
(OS: Windows 8.1 - Version: 0.19.16523 - Python version: 2.7.14 - Qt version: 4.8.7)
|Tags||No tags attached.|
arc_snap_bug.FCStd (6,013 bytes)
Still reproduced with latest 0.19 release as of today.
@abdullah as you may have missed this one because in the french subforum : interested in dealing with it ? :)
||Fix committed to master branch.|
FreeCAD: master 06358224
Committer: abdullahtahiriyo Details Diff
|Sketcher: Polyline snap arc to 45 degrees bug fix
Snapping to 45 degrees during arc creation (hold ctrl during an arc within a polyline), resulted in
reduced precision, because Gui::Command::doCommand %f defaults only to six decimal positions, which is
a poor representation in radians of, for example, 90 degrees.
A work-around could have been to hardcode a higher number of decimals, as in %0.Xf. However, I do not like
such magic numbers.
The solution chosen is to use an App.Quantity object using as units degrees, which leads to no loss of precision.
|mod - src/Mod/Sketcher/Gui/CommandCreateGeo.cpp||Diff File|
|2019-05-15 19:12||openBrain||New Issue|
|2019-05-15 19:12||openBrain||File Added: arc_snap_bug.FCStd|
|2019-06-18 20:00||openBrain||Note Added: 0013258|
|2019-06-22 13:26||abdullah||Note Added: 0013296|
|2019-06-22 15:22||abdullah||Changeset attached||=> FreeCAD master 06358224|
|2019-06-22 15:22||abdullah||Note Added: 0013297|
|2019-06-22 15:22||abdullah||Assigned To||=> abdullah|
|2019-06-22 15:22||abdullah||Status||new => closed|
|2019-06-22 15:22||abdullah||Resolution||open => fixed|