View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0002982||PartDesign||Bug||public||2017-03-24 06:57||2018-08-26 15:22|
|Target Version||0.17||Fixed in Version||0.17|
|Summary||0002982: New sketch on face impossible|
I'm facing an issue on FreeCAD master branch.
I'm not able to create a sketch on the side face of the second body, see file attached.
Iswitched to the 0.17_pre branch it seems OK but the body tree is broken (flat).
|Steps To Reproduce||Select the side face of the second body.|
Click new sketch.
The sketch is applied to the X.Y plane instead of Z.Y.
||OP, thanks for your ticket. In general, please start a forum thread before opening a ticket. Add the example file as well as the Help > About FreeCAD > Copy to clipboard info to it. Then bidirectionally link ticket <=> thread to each other.|
The document has a cyclic dependency. The report view output is
Document::recompute: The graph must be a DAG.
Exception (Sun Mar 26 13:54:27 2017): Gathering all dependencies failed, probably due to circular dependencies. Error: The graph must be a DAG.
The Dependency graph (Tools menu) shows the problem's source to be with the first Body.
The question now is, was the circular dependency due to a software bug, or due to user error?
In short, this report is poorly defined and should have been posted to the forum *first*.
Do you mean this project was started in 0.16, already showed this issue, and you migrated it to 0.17? If that's the case, do you have the original 0.16 file?
As it is, it may be impossible for us to determine how the problem was caused.
The project was started with the master branch.
I gave another try, and if i remove my crappy sketches from "Body" it's ok, i can create a sketch on any face in "Body001"
If i rebuild "Body" properly it's ok too.
The circular dep was a probleme i (as a user) introduced.
But the behavior feels strange:
"Body" has a probleme that causes strange behavior on "Body001" <-- this feels strange as a user.
New project attached.
||@normandc any advice on how to proceed ?|
||@Abdullah do you mind weighing in on this PDN ticket?|
This is what I think (which is very open to opinion):
1. There is a bug, at least in that a dependency problem on the first body causes some weird behaviour when trying to add an sketch to body2. It think something should be done about this.
2. The problem originates from not obeying the DAG. It has happen to me that I do not even realize of this after a while (the red message in the report window is lost somewhere between blue test output, that if you have the report window open). Probably we should think of another way to make this problem more apparent. I do not mean an annoying pop-up, but definitely something better.
||@yorik when you have a moment can you address Abdullah's feedback?|
@Kunda1 I'm afraid I can't solve the DAG problem alone :)
However it is true that this is a very common occurrence, that a document comes into non-DAG situation, and this is often not very clear to the user.
I think there should be a broader discussion about what to do. Maybe indeed, since the non-DAG situation in fact prevents any further work on the document, we should do something more drastic such as popping up some dialog, maybe there could be some automatic fix offered to the user (allow to choose one of the objects of the non-DAG loop to delete, for ex).
But in this case, indeed when we have a non-DAG, all kinds of weird behaviors can happen, and it seems to me a lot of hassle to try to address them individually... Better concentrate on having the non-DAG situation more "alarming"...
The biggest problem of the DAG problem is that it is very difficult to communicate to a final user (not a developer, not a forum regular, but a normal average user) what is indeed the problem. Not even talking about making him arrive to the solution he expects.
I like Yorik's idea of "offering an automatic fix". Probably deleting an object is not always the best solution (my non-DAGs mostly come from using expressions among features of a Part Body, and is solved by reordering the features within the body), but it may be good enough in an average situation for an average user that does not actually understand the problem and desperately wants a solution.
I plan to improve the notifications to the user, and non-DAG I think should be one of those. So, I can tackle that part. It should at least show a red exclamation mark, potentially a pop-up. I am waiting for Exception translation support to be merged. However it can also happen during Sketcher edit mode (due to expressions), or during any other task dialog. So, it may need some extra work.
About this specific bug and fixing it
I came to this very same kind of situations when I started working with PDN. The problem is the support of the sketches. Sometimes it is impossible to get rid of this information when you want to change it. I only managed from Python. In this file, it can be solved by:
App.ActiveDocument.getObject('Sketch').Support = 
App.ActiveDocument.getObject('Sketch001').Support = 
Yeah deleting one of the objects in the chain is a bit drastic :) But it could be offered, you know, in a kind of "We can do nothing for you, but if you insist..." way.
Actually just a better text or dialog, some explanation of what's going on and what a DAG is, and what one can try to address it, would be a huge improvement... Maybe we could write a wiki page about that, then the url could be used to direct the user to for more info (it's a large subject to explain in an error message)
Let's rename the ticket to better reflect the situation + open a new ticket to document the DAG issue?
Ok. For me. You may want to take into account:
||FreeCAD Pull Request 806 was merged. What now with this ticket?|
||Assigning to @abdullah for him to respond to when he returns to hacking on FC.|
|2017-03-24 06:firstname.lastname@example.org||New Issue|
|2017-03-24 06:email@example.com||File Added: totem_2.fcstd|
|2017-03-24 10:57||Kunda1||Note Added: 0008694|
|2017-03-26 17:58||normandc||Note Added: 0008709|
|2017-03-26 18:04||normandc||Note Added: 0008710|
|2017-03-26 18:19||normandc||Note Edited: 0008710|
|2017-03-27 07:55||Kunda1||Status||new => feedback|
|2017-03-27 09:firstname.lastname@example.org||File Added: test.fcstd|
|2017-03-27 09:email@example.com||Note Added: 0008713|
|2017-03-27 09:firstname.lastname@example.org||Status||feedback => new|
|2017-05-02 21:37||Kunda1||Note Added: 0008861|
|2017-05-25 20:32||Kunda1||Note Added: 0009139|
|2017-05-25 22:19||abdullah||Note Added: 0009141|
|2017-05-26 22:51||Kunda1||Status||new => confirmed|
|2017-05-26 22:51||Kunda1||Note Added: 0009163|
|2017-05-31 16:28||yorik||Note Added: 0009224|
|2017-05-31 17:32||Kunda1||Tag Attached: DAG|
|2017-05-31 17:33||Kunda1||Tag Attached: Post2Forum|
|2017-05-31 17:37||Kunda1||Tag Attached: #post-to-forum|
|2017-05-31 17:37||Kunda1||Tag Detached: Post2Forum|
|2017-05-31 20:53||abdullah||Note Added: 0009229|
|2017-05-31 21:52||yorik||Note Added: 0009230|
|2017-05-31 22:13||Kunda1||Relationship added||related to 0002871|
|2017-06-14 12:34||Kunda1||Tag Attached: documentation|
|2017-06-14 12:37||Kunda1||Note Added: 0009364|
|2017-06-14 12:40||abdullah||Note Added: 0009365|
|2017-08-19 19:35||Kunda1||Note Added: 0009966|
|2017-08-19 19:36||Kunda1||Tag Attached: #pending|
|2017-09-07 20:47||Kunda1||Assigned To||=> abdullah|
|2017-09-07 20:47||Kunda1||Status||confirmed => assigned|
|2017-09-07 20:47||Kunda1||Note Added: 0010088|
|2017-10-18 12:53||wmayer||Target Version||=> 0.17|
|2017-12-03 07:14||wmayer||Relationship added||related to 0003185|
|2017-12-10 16:49||wmayer||Status||assigned => closed|
|2017-12-10 16:49||wmayer||Resolution||open => fixed|
|2017-12-10 16:49||wmayer||Fixed in Version||=> 0.17|
|2017-12-10 16:49||wmayer||Note Added: 0010561|
|2018-08-26 15:22||Kunda1||Tag Detached: #pending|
|2018-08-26 15:22||Kunda1||Tag Detached: #post-to-forum|