Link to external geometry is getting lost just by moving things around. (Bug #3961)

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
chrisb
Veteran
Posts: 54124
Joined: Tue Mar 17, 2015 9:14 am

Re: Link to external geometry is getting lost just by moving things around

Post by chrisb »

This is a very good example showing how to increase robustness. If I reference Sketch001 instead of the solid the model remains stable.
Attachments
m_cb.FCStd
(30.02 KiB) Downloaded 31 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
paullee
Veteran
Posts: 5118
Joined: Wed May 04, 2016 3:58 pm

Re: Link to external geometry is getting lost just by moving things around

Post by paullee »

Seem 2 issues here... One is what kisolre describe, the Hexagon may collapse when the origins were moved in a distance - solver's 'limitation', just move in small steps I think

Another is Link to External Geometry - which I avoid in first place.

Or try at least, link to the 'master' Sketch (Sketch001) and it is less susceptible to break in some way - it would if you remove some edges in original sketch and it break the edges' order / index / it would not if you only add some edges in the original sketch...

In Sketch003 below (with Hexagonal shapes), it is linked to Sketch001 (instead of Pad001 or Pocket...)
Screenshot from 2019-05-05 07-11-48.png
Screenshot from 2019-05-05 07-11-48.png (184.97 KiB) Viewed 1827 times
Screenshot from 2019-05-05 07-21-13.png
Screenshot from 2019-05-05 07-21-13.png (212.74 KiB) Viewed 1827 times
Screenshot from 2019-05-05 07-23-09.png
Screenshot from 2019-05-05 07-23-09.png (197.17 KiB) Viewed 1827 times
Attachments
m_ r.FCStd
(39.74 KiB) Downloaded 28 times
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Link to external geometry is getting lost just by moving things around

Post by vocx »

nopx wrote: Sat May 04, 2019 3:11 pm ...
I looks like the "external geometries" get reordered in some way.
...
That's what "topological naming problem" is. Basically, objects have a speciffic name, but when you do certain operations, these names may change. If you are going to use external references, you should use objects that are relatively fixed, that is, that won't change a lot once placed. For example, a datum object like a PartDesign Plane or a PartDesign Line can be used as a reference. You should avoid as references the edges or faces of your partial bodies, as further transformation of these bodies will again result in different internal names.

See topological naming problem for a more complete explanation.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
nopx
Posts: 8
Joined: Thu May 02, 2019 4:23 pm

Re: Link to external geometry is getting lost just by moving things around

Post by nopx »

Ok. i tried with a fully constrained sketch and it works much better. But i also found a reproducable error, you could see in the video [0] and the attached file. (m_constrained)

One of the hexagons is getting a rectangle for some reason if i change the constrains. I get the same result if i select the original circles of the padded sketch. You could find this file also attached (m_constrained_2)

Kind regards,
nopx

[0]: https://cloud.vspace.one/s/bcHjLJFtF8wKE4H
Attachments
m_constrained_2.FCStd
(38.06 KiB) Downloaded 30 times
m_constrained.FCStd
(39.79 KiB) Downloaded 31 times
chrisb
Veteran
Posts: 54124
Joined: Tue Mar 17, 2015 9:14 am

Re: Link to external geometry is getting lost just by moving things around

Post by chrisb »

That's not an error, it is a sp called flipping sketch, and all constraints of the hexagon are fulfilled:
- You have 6 sides, although three of them are in the same position (here it are Edges16-18)
- All edges have the same length
- All ends of the sketches lie on a circle.

A sketch can be fully constrained, but that does not mean it is unique. After such a big move the elements are repositioned so that all constraints are fulfilled.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
kisolre
Veteran
Posts: 4166
Joined: Wed Nov 21, 2018 1:13 pm

Re: Link to external geometry is getting lost just by moving things around

Post by kisolre »

Playing with the files I noticed a message in the report vew for a DogLeg solver fail and created an issue #3961. Could somebody using recent dev build try to reproduce?
nopx
Posts: 8
Joined: Thu May 02, 2019 4:23 pm

Re: Link to external geometry is getting lost just by moving things around

Post by nopx »

Okay. How could i contrain a hexagon, so that it is not destroyed? How would you handle this projekt? Would you build a complete new sketch at the bottom side with all the measures etc.?

I played around with your file @chrisb, (m_cb) and also get a rectangle for one hexgone. See attachment.

Kind regards,
nopx
Attachments
rectangle.png
rectangle.png (10.01 KiB) Viewed 1745 times
nopx
Posts: 8
Joined: Thu May 02, 2019 4:23 pm

Re: Link to external geometry is getting lost just by moving things around

Post by nopx »

Would it be a good 3th contrain for a hexagon, that no two points are the same? Otherwise it is just a bunch of lines on top of eachother.
nopx
Posts: 8
Joined: Thu May 02, 2019 4:23 pm

Re: Link to external geometry is getting lost just by moving things around

Post by nopx »

Could one pass-through the information into a sketch of geometry, that one edge is referenced by name at some point. If so, the renaming process is not renaming these individual ones? Like a reference counter or something?
kisolre
Veteran
Posts: 4166
Joined: Wed Nov 21, 2018 1:13 pm

Re: Link to external geometry is getting lost just by moving things around

Post by kisolre »

nopx wrote: Mon May 06, 2019 9:52 pm How could i contrain a hexagon, so that it is not destroyed?
AntiCollapse.JPG
AntiCollapse.JPG (64.2 KiB) Viewed 1737 times
Post Reply