Dissallowing cross coordinate-system links

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: Dissallowing cross coordinate-system links

Post by ickby »

wmayer wrote: Fri Sep 08, 2017 11:30 am @ickby is there still something you want to fix before merging the branch?
There is the one thing peter found left, but I don't know when I'm able to fix it. So I think it can be merged and I fix the bug with the next pull erquest.
wmayer
Founder
Posts: 20319
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Dissallowing cross coordinate-system links

Post by wmayer »

OK, and is there a list somewhere which bugs/features it fixes?
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: Dissallowing cross coordinate-system links

Post by ickby »

the fixes are a bit hidden in the commit messages:
0003150, 0002567, 0002871

It fixes and enables the new back-link structure for more efficient group queries. If this is a problem I can deactivate this again. Furthermore i added some test cases for better regression testing.

So the general feature is to make the GeoFeatureGroups more mature and usable. All the drag'n'drop stuff should work better way with this PR. The restrictions on links is kind of a feature. It creates some boundaries to what you can do, however, with this we ensure that all freecad document objects works like the user expects them to. So not a feature in a sense of new things, but a feature n the sense of keeping things working and logical.
wmayer
Founder
Posts: 20319
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Dissallowing cross coordinate-system links

Post by wmayer »

Open issues:
https://forum.freecadweb.org/viewtopic. ... 30#p187270
https://forum.freecadweb.org/viewtopic. ... 30#p187603
https://forum.freecadweb.org/viewtopic. ... 40#p187903
https://forum.freecadweb.org/viewtopic. ... 6&p=191300 Fixed with git commit de31528dda
issue #3150: first two issues are resolved but the third issue still exists
Part design booleans don't have the property Bodies but uses Group now. Even if 0.17 is not officially released it might be good to be able to load old project files.
The same applies to ShapeBinder that has changed a property type.
Fixed in git commit dcd7da4

As mentioned in https://forum.freecadweb.org/viewtopic. ... 30#p187603 the unit test is broken, too.
While the tests are running you have to interact four times with modal dialogs which is a bit annoying as it breaks automation. It's not a major thing but it would be good if we can find a workaround for this.
wmayer
Founder
Posts: 20319
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Dissallowing cross coordinate-system links

Post by wmayer »

@ickby the recompute of the document now uses an own algorithm (Document::topologicalSort()) instead of boost graph. As part of PR 806 an algorithm was implemented also based on boost to detect sub-graphs that are valid DAGs in case the document has cycles so that at least a part of the document can be recomputed. Is this also possible with the new method?
wmayer
Founder
Posts: 20319
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Dissallowing cross coordinate-system links

Post by wmayer »

Question:
In this thread https://forum.freecadweb.org/viewtopic.php?f=19&t=24306 there is a project with two bodies. With older versions it was possible to use Part boolean on the two pads but now it raises an error. Hence my question: Is this something that still should be possible or explicitly disallowed?

Although not related to this topic it would nice if some could explain how to use PDN boolean operations.
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: Dissallowing cross coordinate-system links

Post by ickby »

Thanks for merging. Even if not everything is perfectly adopted I think it is good that al other devs can now start port their code to the new system.
Open issues:
I'm going to adress those over the next weeks step by step.
While the tests are running you have to interact four times with modal dialogs which is a bit annoying as it breaks automatio
I'm not entirely sure when this got broken, but I'm going to fix it too. It's true that this is annoying.
@ickby the recompute of the document now uses an own algorithm... Is this also possible with the new method?
I'm not sure, I would need to look it up. But if not we could always go back to the old recompute loop. For me the important thing are the backlinks, as they make the group search algortihms much more efficient, and I have no problem in reverting the recompute back to boost algorithms.
Although not related to this topic it would nice if some could explain how to use PDN boolean operations.
I couldn't yet test the mentioned example, but in general the PartDesign boolean work like a normal PartDesign feature, they change the previous feature by adding or removing stuff. So you should be able to move every Part::Feature derived type into the boolean and dependend on the setting it should be added or substracted from the base feature in the Body.
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: Dissallowing cross coordinate-system links

Post by easyw-fc »

wmayer wrote: Sun Sep 10, 2017 11:40 am Question:
In this thread https://forum.freecadweb.org/viewtopic.php?f=19&t=24306 there is a project with two bodies. With older versions it was possible to use Part boolean on the two pads but now it raises an error. Hence my question: Is this something that still should be possible or explicitly disallowed?

Although not related to this topic it would nice if some could explain how to use PDN boolean operations.
in fact still in that example the fusing operation result is missing Body placement, that I would have expected
TwoParts-missing-placement.fcstd
(18.38 KiB) Downloaded 26 times
TwoParts-missing-placement.jpg
TwoParts-missing-placement.jpg (170.03 KiB) Viewed 1351 times
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: Dissallowing cross coordinate-system links

Post by ickby »

in fact still in that example the fusing operation result is missing Body placement, that I would have expected
The example you showed will fail with "link out of scope" error now as it should.
wmayer
Founder
Posts: 20319
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Dissallowing cross coordinate-system links

Post by wmayer »

Here is another critical bug: https://forum.freecadweb.org/viewtopic.php?f=3&t=24351
It's caused by this commit: https://github.com/FreeCAD/FreeCAD/comm ... 23f49dR428


Edit: in git commit 612fbd4 a few security checks have been added to verify that:
  • the property is owned by a DocumentObject
  • the ObjectIdentifier is part of the map and has a valid expression
Post Reply