Unlimited references to external geometry

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!
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Unlimited references to external geometry

Post by triplus »

Quick update:
What it looks like this is more of redundant constraint detection issue indeed. For example in sketcher fully constrained vertical line can be made. Adding new line to the sketch where we add coincident constraints between the end points of both lines should produce fully constrained sketch as it does. Adding additional vertical constraint to this second line should probably be detected as redundant constraints? Or is there a reason it is not and it was done like this intentionally?
It looks like the detection is implemented and working. Only "additional recompute" is missing as simply by closing/opening the sketch the redundant constraint will be reported!
Here is where we can observe redundant horizontal/vertical constraint is not detected and as result we get mentioned behavior. Probably it shouldn't be possible for the user to add horizontal/vertical constraint for the line where both end point are coincident or fixed onto external geometry line? As external geometry line (parent) will control the angle or vertical/horizontal position in the first place and a child could be trying to override this unsuccessfully with added horizontal/vertical constraint therefore resulting in breakage.
Here i am guessing not only "additional recompute" is missing but additional logic to always mark horizontal/vertical constraint as redundant in this specific scenario:

If both end points of a "child" line are coincident or fixed onto external geometry "parent" line any additional horizontal/vertical "child" line constraint should be detected and reported as redundant.

Added correction:

I believe we are talking about over-constrained sketch in this specific case and not about sketch containing redundant constraints!
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Unlimited references to external geometry

Post by triplus »

What i did is i created an issue report:

http://www.freecadweb.org/tracker/view.php?id=2093
atzensepp
Posts: 100
Joined: Tue Feb 24, 2015 9:37 pm

Re: Unlimited references to external geometry

Post by atzensepp »

DeepSOIC and triplus: many thanks for your investigation. I was not aware that I generated an redundant/overconstrained situation. I was on the wrong track with the orphaned edge assumption. So it is good that a fix could be done by simply removing some constraints. I am looking forward to see the detection warning soon in a FreeCAD version.
jean.thil
Posts: 209
Joined: Tue Jul 28, 2015 7:28 am

Re: Unlimited references to external geometry

Post by jean.thil »

Sorry to dig out this old post, but I am very interested in this feature but I can't build your branch (though I can build the main git source).

I have the following error

Code: Select all

Linking CXX shared library ../../../lib/libDriver.so
/usr/bin/ld: ne peut trouver -lTKAdvTools (=can't find -lTKAdvTools)
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libDriver.so] Erreur 1
make[1]: *** [src/3rdParty/salomesmesh/CMakeFiles/Driver.dir/all] Erreur 2
Thanks for your help.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Unlimited references to external geometry

Post by DeepSOIC »

If you are on Windows, and you are brave enough to take binaries from me:
https://github.com/DeepSOIC/FreeCAD-ellipse/releases
jean.thil
Posts: 209
Joined: Tue Jul 28, 2015 7:28 am

Re: Unlimited references to external geometry

Post by jean.thil »

Thanks for your answer, but I am on linux ;)

Is there any plan to incorporate your stuff in the master branch ?
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Unlimited references to external geometry

Post by DeepSOIC »

jean.thil wrote:Is there any plan to incorporate your stuff in the master branch ?
Essentially, it is incorporated into PartDesign Next, which is planned to be merged sooner or later.

I suggest you to get master to build, first. Then, it is very likely you build this branch like a breeze, as the changes are small (or, I recommend, FreeCAD_DeepSOIC6 instead - it is more fresh).

Post your build problems to Install/compile forum, and someone may come help (I have zero experience with Linux so far)
jean.thil
Posts: 209
Joined: Tue Jul 28, 2015 7:28 am

Re: Unlimited references to external geometry

Post by jean.thil »

I have already build if from source (in another directory).
I get the sources with

Code: Select all

git fetch --all
git reset --hard origin/master
I am a git noob. What should I do to move the sources to your branch ?
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Unlimited references to external geometry

Post by DeepSOIC »

I usually do it like that (note: didn't test this code!):

Code: Select all

git remote add deepsoic https://github.com/DeepSOIC/FreeCAD-ellipse.git
git fetch deepsoic
git checkout deepsoic/FreeCAD-DeepSOIC6
jean.thil
Posts: 209
Joined: Tue Jul 28, 2015 7:28 am

Re: Unlimited references to external geometry

Post by jean.thil »

Thanks.

It build. Let's try this wonderful feature ! ;)
Post Reply