View Issue Details

IDProjectCategoryView StatusLast Update
0003905PartDesignBugpublic2021-02-06 06:43
Reportermihai.dumitresq Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status newResolutionopen 
Product Version0.18 
Target Version0.20 
Summary0003905: Editing unlinked parts of a sketch breaks other sketches that have edges linked to it
DescriptionEditing unlinked parts of a sketch breaks other sketches that have edges linked it.

When using the part design workbench, if I have multiple sketches that depend on one another (have edges linked from one another) and I try to edit one of the earlier sketches that's very likely to break later sketches, even if what I'm editing is not linked by other sketches.

Set the severity as "major" since often times there's no easy workaround. If I wanted to edit, say, the first sketch I would have to:
- remove almost all links to the initial sketch
- edit it
- then add all of the links back

"breaking" here means either:
- Weird changes in the geometry of the dependent sketches due to edge linked changing (it's like if I originally linked something else)
- Dependent sketches become invalid ("The sketch is invalid and cannot be edited")
Steps To ReproduceHere's an easy way to reproduce this.

I) Either do this or load the attached file (invalid_sketch_test.fcstd) and skip to part II):
Go to Part Design workbench.
Create a new body.

Create a new sketch in the XY plane.
Create a rectangle in the sketch (with the tool, R).
Close the sketch.

Create a new sketch in the XZ plane (we want it to be dependent and fully constrained).
Set to isometric view (0) so you can see the first sketch.
Click "Create an edge linked to external geometry (X)" and select the two sides parallel to the Y axis.
Set to front view (2).
You'll have 2 linked points (not edges).
Create a rectangle in the sketch (with the tool, R).
Make both linked points be midpoints of two edges of the created rectangle.
Make the rectangle a square by setting two adjacent sides be equal.
It's now fully constrained.
Close the sketch.

II)
Open the first sketch.
Delete Constraint1 which is the first coincident constraint and should have been the constraint for the top right corner.
Move the top right corner so it's not a rectangle anymore.
Close the first sketch.
Try to open the second sketch.

Expected:
Opens and is unchanged.

Actual:
"The sketch is invalid and cannot be edited."
Additional InformationOS: Ubuntu 16.04.6 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16079 (Git) AppImage
Build type: Release
Branch: master
Hash: 6363c90a20b296ab69d7b52230009928199d90df
Python version: 3.6.7
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)

I also tested with:
OS: Ubuntu 16.04.6 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13541 (Git) AppImage
Build type: None
Branch: releases/FreeCAD-0-17
Hash: 9948ee4f1570df9216862a79705afb367b2c6ffb
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)
TagsNo tags attached.
FreeCAD Information

Activities

mihai.dumitresq

2019-03-14 01:45

reporter  

Kunda1

2019-03-15 22:18

administrator   ~0012910

Please open a thread on the forum and link back to this ticket. (Don't forget to notate said thread URL in this ticket as well)

mihai.dumitresq

2019-03-16 12:40

reporter   ~0012917

I've started a thread but it's pending moderation. I'll post a link when it shows up.

Were you able to reproduce the issue? Do you need more information?

mihai.dumitresq

2019-03-16 13:16

reporter   ~0012918

Last edited: 2019-03-16 13:18

Also note that I had previously looked at other reported issues and found some similar ones:
https://www.freecadweb.org/tracker/view.php?id=922
However, they're not exactly the same issue.

The issues in https://www.freecadweb.org/tracker/view.php?id=922 are about sketches that have links to external geometry.
My report is specifically about sketches that have links to other sketches.

To explain more clearly, this issue is about:
create sketch -> create another sketch that depends on it -> modify original sketch (problem!)

https://www.freecadweb.org/tracker/view.php?id=922 looks to be about:
create sketch -> create geometry from sketch (pad, loft, etc.) and maybe chamfer/fillet, etc. -> create another sketch that depends on the geometry -> modify original sketch (problem!)

normandc

2019-03-16 14:15

manager   ~0012920

Once again this is the topological naming issue at work, and yes, this is what 0000922 is about. This report is therefore unnecessary because redundant.

normandc

2019-03-16 14:16

manager   ~0012921

https://www.freecadweb.org/wiki/Glossary#Topological_Naming

mihai.dumitresq

2019-03-16 14:49

reporter   ~0012922

That's the interesting thing: I don't think it's the same issue or at least this bug has a much much simpler solution than topological naming.
The ids of the edges in the sketch don't change! (in my repro case)
invalid_sketch_test.Sketch.Edge1 through Edge4 are the same in the Sketcher view, before and after removing Constraint1 as per my repro steps. See attached screenshots.

mihai.dumitresq

2019-03-16 16:40

reporter   ~0012923

Last edited: 2019-03-16 16:41

Looks like there's a mismatch between the edge names when in the full PartDesign view compared to when in the Sketcher view (i.e. when "Sketch" is opened).
The same edge is called:
invalid_sketch_test.Sketch.Edge1 when the sketch is open
invalid_sketch_test.Sketch.Edge4 when the sketch is closed

Can anyone point me to the code that assigns edge names? (i.e. the code that resulting in invalid_sketch_test.Sketch.Edge4 being assigned here?)

And yes, I realize that this is getting closer and closer to topological naming and @normandc is right but I still think that this issue has a much easier fix than topological naming.

mihai.dumitresq

2019-03-16 17:37

reporter   ~0012925

Last edited: 2019-03-16 17:38

I couldn't reproduce this issue with the latest version of https://github.com/realthunder/FreeCAD_assembly3/releases
And the more complex model that I was editing that prompted this issue works perfectly.

@realthunder Awesome!

yorik

2022-03-03 13:55

administrator   ~0016732

This ticket has been migrated to GitHub as issue 5897.

Issue History

Date Modified Username Field Change
2019-03-14 01:45 mihai.dumitresq New Issue
2019-03-14 01:45 mihai.dumitresq File Added: invalid_sketch_test.fcstd
2019-03-15 22:18 Kunda1 Status new => feedback
2019-03-15 22:18 Kunda1 Note Added: 0012910
2019-03-16 12:40 mihai.dumitresq Note Added: 0012917
2019-03-16 12:40 mihai.dumitresq Status feedback => new
2019-03-16 13:16 mihai.dumitresq Note Added: 0012918
2019-03-16 13:18 mihai.dumitresq Note Edited: 0012918
2019-03-16 14:15 normandc Note Added: 0012920
2019-03-16 14:16 normandc Note Added: 0012921
2019-03-16 14:49 mihai.dumitresq File Added: Screenshot from 2019-03-16 14-44-06.png
2019-03-16 14:49 mihai.dumitresq File Added: Screenshot from 2019-03-16 14-42-48.png
2019-03-16 14:49 mihai.dumitresq Note Added: 0012922
2019-03-16 16:40 mihai.dumitresq File Added: Screenshot from 2019-03-16 16-27-52.png
2019-03-16 16:40 mihai.dumitresq Note Added: 0012923
2019-03-16 16:41 mihai.dumitresq Note Edited: 0012923
2019-03-16 17:37 mihai.dumitresq Note Added: 0012925
2019-03-16 17:38 mihai.dumitresq Note Edited: 0012925
2021-02-06 06:43 abdullah Target Version => 0.20