View Issue Details

IDProjectCategoryView StatusLast Update
0002156PartDesignBugpublic2017-07-11 20:09
Reporterdrei Assigned Toabdullah  
Status closedResolutionfixed 
Platform64 bitOSGNU/LinuxOS VersionArch Linux
Fixed in Version0.17 
Summary0002156: Sketcher Visualization fails to represent sketch properly
DescriptionThis is one of several bugs found from the attached file.
When opening the file, one can see a trapezoid object with a certain size.
After editing the sketch, deleting a redundant constraint and closing the sketch, the Sketch view changes in both scale and position.

No output whatsoever in either Python Console, command line terminal or the Report View.
Steps To ReproduceOpen the file.
Activate hidden sketch.
Note the differences in size and position of the sketches before and during edit mode.
Additional InformationOriginal thread:

Reproducible in

OS: Windows 8.1
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.15.4671 (Git)
Branch: releases/FreeCAD-0-15
Hash: 244b3aef360841646cbfe80a1b225c8b39c8380c
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17


OS: Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.5086 (Git)
Build type: Unknown
Branch: master
Hash: 4f5534a87a7e2d224022ff98729a341bf57e7f9e
Python version: 2.7.10
Qt version: 4.8.7
Coin version: 3.1.3
OCC version: 6.8.0.oce-0.17
TagsNo tags attached.
FreeCAD Information


related to 0002157 closed Pad results in a triangle instead of a trapezoid 



2015-06-13 19:42


bugs_Basic_Part_01.FCStd (25,565 bytes)


2016-05-10 01:36


Sketch_Opened.png (22,536 bytes)   
Sketch_Opened.png (22,536 bytes)   


2016-05-10 01:36


Sketch001_Opened.png (18,701 bytes)   
Sketch001_Opened.png (18,701 bytes)   


2016-05-10 01:37

developer   ~0007076

Last edited: 2016-05-10 01:48

View 2 revisions

I can confirm this issue. I've attached some screenshots that show the problem: 'Sketch_Opened.png' shows the results of clicking on the old sketch in the object tree. The two sketches should be the same size, but as is seen in this screenshot they are not.

I will explore this issue.

OP: Can you provide step-by-step instructions on how you produced the two over-constrained sketches?


2016-05-11 09:19

administrator   ~0007079

You can force such a behaviour quite easily. Start with a sketch and set non-conflicting constraints. Leave edit mode to create the actual shape from the geometries and constraints.

Now start editing the sketch again, change some datum constraints and add further conflicting constraints. The solver will fail and won't update the last valid shape.

Save the project, leave edit mode and close the document. After reopening the project you very likely will have some inconsistencies.

When you run the ForceRecompute macro you see that the sketch objects are actually invalid. Maybe to make this more obvious we should save any flags of a document object into the project file. When loading the project the user will immediately see that something is wrong.

In the concrete example one thing is for sure: the shape of Sketch001 you see is definitely wrong (too big) because when you edit it the length constraint is set to 26mm. However, when measuring the length of the shape you get a value of 40.33 mm.
When you edit the sketch the solver does its best and at least shows a trapezoid of the correct size.


2017-05-30 21:50

administrator   ~0009201

@Abdullah this one was related to 0002157 what should we do with it?


2017-05-31 13:09

manager   ~0009220

It is similar, but not the same. Here the problem was that the file, when saved, had problems. However, "problems" (flags in what Werner says above) do not get marked when saving. So, when restoring, they do not get restored. So the "problems" do not get detected until there is a recompute.

Here, a priori, the only decent solution I can think of is the one indicated by Werner, i.e. to store (the/some of the) flags of a document object into the project file. I do not know if this would generate any other problems. The alternative would be to recompute on loading, which I don't think it is acceptable.

I will give it a go...


2017-05-31 14:18

manager   ~0009223



2017-06-01 11:15

administrator   ~0009239

Related Changesets

FreeCAD: master 749d6660

2017-06-01 05:43:41


Details Diff
fixes 0002156: Sketcher Visualization fails to represent sketch properly Affected Issues
mod - src/App/Document.cpp Diff File

Issue History

Date Modified Username Field Change
2015-06-13 19:42 drei New Issue
2015-06-13 19:42 drei File Added: bugs_Basic_Part_01.FCStd
2016-05-10 01:36 ezzieyguywuf File Added: Sketch_Opened.png
2016-05-10 01:36 ezzieyguywuf File Added: Sketch001_Opened.png
2016-05-10 01:37 ezzieyguywuf Note Added: 0007076
2016-05-10 01:48 ezzieyguywuf Note Edited: 0007076 View Revisions
2016-05-11 09:19 wmayer Note Added: 0007079
2017-01-14 01:36 Kunda1 Relationship added related to 0002157
2017-02-02 14:38 Kunda1 Tag Attached: #pending
2017-05-30 21:50 Kunda1 Note Added: 0009201
2017-05-31 13:09 abdullah Note Added: 0009220
2017-05-31 13:09 abdullah Assigned To => abdullah
2017-05-31 13:09 abdullah Status new => assigned
2017-05-31 14:18 abdullah Note Added: 0009223
2017-06-01 11:15 wmayer Status assigned => closed
2017-06-01 11:15 wmayer Resolution open => fixed
2017-06-01 11:15 wmayer Fixed in Version => 0.17
2017-06-01 11:15 wmayer Note Added: 0009239
2017-06-21 20:37 Kunda1 Changeset attached => FreeCAD master 749d6660
2017-07-11 20:09 Kunda1 Tag Detached: #pending