Unlimited references to external geometry
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- DeepSOIC
- Veteran
- Posts: 7896
- Joined: Fri Aug 29, 2014 12:45 am
- Location: used to be Saint-Petersburg, Russia
Unlimited references to external geometry
Hi!
I can't stop myself from doing it because I need it BAAAD! I have disabled checks in references to external geometry in Sketcher, so now I can link sketches to anything. It seems to work well. Beware circular references!
I feel like there is a reason why this wasn't done in master by now. I guess this is probably because of future plans for object container and assembly workbench. So, should one decide to use this, beware, that your files may fail to work in future FreeCADs.
Here's the branch:
https://github.com/DeepSOIC/FreeCAD-ell ... _externals
And a teaser (works in master, you can check without compiling anything ):
I can't stop myself from doing it because I need it BAAAD! I have disabled checks in references to external geometry in Sketcher, so now I can link sketches to anything. It seems to work well. Beware circular references!
I feel like there is a reason why this wasn't done in master by now. I guess this is probably because of future plans for object container and assembly workbench. So, should one decide to use this, beware, that your files may fail to work in future FreeCADs.
Here's the branch:
https://github.com/DeepSOIC/FreeCAD-ell ... _externals
And a teaser (works in master, you can check without compiling anything ):
Re: Unlimited references to external geometry
When I try to Pad a Sketch, no matter which one I select, it is always the rectangle that Pads. But, maybe my FreeCAD version is incompatible...
- 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
Thanks for pointing that out, it is the same in my branch.bejant wrote:When I try to Pad a Sketch, no matter which one I select, it is always the rectangle that Pads.
I guess it's because of the bug mentioned here: Wrong sketch gets padded, issue #1854.
I'll try to fix it.
Re: Unlimited references to external geometry
Question related to this:
If yes: are there plans to implement it in the official releases?
Does this mean that one could use external references to surfaces of more than one object?DeepSOIC wrote: I have disabled checks in references to external geometry in Sketcher, so now I can link sketches to anything. It seems to work well. Beware circular references!
If yes: are there plans to implement it in the official releases?
- 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
You can link to vertices and edges of any number of objects in the document (except meshes). But if you create a reference that forms a loop in dependency graph, FreeCAD's recompute mechanism locks up completely (I even thought on using it to disable recomputes temporarily ).
Re: Unlimited references to external geometry
Hello DeepSOIC,
Trying out the build with unlimited external references, I can say that I would be extremely glad if it would be incorporated into the main release since it
would ease up parametric modelling a lot without weird work arounds. If it is regarded as "dangerous" it might be an idea to provide a toggle-off switch for it. But IMHO sooner or later this is a must.
Nevertheless I encountered some strange behaviour that may be worth a closer investigation:
In some cases the external geometry picker shows the edge but not the vertices. I have uploaded an example: .
The other problem (also in standard FreeCAD) is that when a solid based on a sketch is recalculated - e.g. due to a resize operation - the references to vertices and edges get lost. Constraint solver mourns with "undetermined degrees of freedom"
Trying out the build with unlimited external references, I can say that I would be extremely glad if it would be incorporated into the main release since it
would ease up parametric modelling a lot without weird work arounds. If it is regarded as "dangerous" it might be an idea to provide a toggle-off switch for it. But IMHO sooner or later this is a must.
Nevertheless I encountered some strange behaviour that may be worth a closer investigation:
In some cases the external geometry picker shows the edge but not the vertices. I have uploaded an example: .
The other problem (also in standard FreeCAD) is that when a solid based on a sketch is recalculated - e.g. due to a resize operation - the references to vertices and edges get lost. Constraint solver mourns with "undetermined degrees of freedom"
- Attachments
-
- Haus5b.fcstd
- (30.29 KiB) Downloaded 55 times
-
- After changing the length of the house (x position of clone) the right roof section is recalculated breaking references of the left roof
- Hausi2.png (145.33 KiB) Viewed 3577 times
-
- The external reference (green edge) on the right side is lacking the vertex points.
- Hausi1.png (23.18 KiB) Viewed 3581 times
Re: Unlimited references to external geometry
A parametric toy house.
The length of the house via x-position of the first clone.
"Clone of Extrude010" is the first floor. It's z-position is the ceiling height.
(B.t.w. is there a way to give names to the objects?)
The side walls can be parametrized with the first Sketch.The length of the house via x-position of the first clone.
"Clone of Extrude010" is the first floor. It's z-position is the ceiling height.
(B.t.w. is there a way to give names to the objects?)
- Attachments
-
- Parametric House.png (75.21 KiB) Viewed 3571 times
- 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
OK, I found what's going on with that green edge. Edge7 fails to link because there already is another link to "Edge7" of something else in this sketch. It is a check against adding the same reference twice, which assumes that only links to one object are possible, thus not checking object equality. I'll fix that. Thanks for reporting!