unexpected result modifying sketch

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!
rrossi
Posts: 6
Joined: Sun Dec 30, 2018 8:46 am

unexpected result modifying sketch

Postby rrossi » Sun Dec 30, 2018 10:00 am

I'm very new to freecad ad making some tests I got a very unexpected result.
I'm sure I'm doing something wrong, but I can't understand what.

The operation I followed are the following.

I opened a fresh instance of freecad, and I loaded the attached model.
The model is a simple combination of sketches pads and pokets.

Now I want to add a hole to my model.

At first I click on Carrier-Pad, I type a blank, and I make it visible. As expected I got the Carrier-Pad

Then I double click on the CarrierSketch. As expected, the sketch editor opens, and I can modify the sketch.

Now I place a circle, and everything is as expected.

The sequence of the operation is shown in the following image:
0-initialState.png
0-initialState.png (257.1 KiB) Viewed 312 times

As next I should constrain the circle, but to keep the example short I didn't that. The unexpected problem comes out also with a full constrained sketch. So I close the sketch. Again, no visible problem
4-closed-Sketch.png
4-closed-Sketch.png (56.35 KiB) Viewed 312 times
Now I click on the Chip-Pad, I type a space to make it visible, and this is the result:
5-space-on-Chip-Pad.png
5-space-on-Chip-Pad.png (55.79 KiB) Viewed 312 times
The pocket is now on the lower side, and the Chip-Pad rotated.

Freecad Version is the following,

OS: Linux Mint 19 Tara
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13541 (Git)
Build type: None
Branch: releases/FreeCAD-0-17
Hash: 9948ee4f1570df9216862a79705afb367b2c6ffb
Python version: 2.7.15rc1
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)

and no message came out on the console.

but I think this is not important, since probably something in the sequence of commands I did is wrong.....
Attachments
carrier.fcstd
(49.04 KiB) Downloaded 14 times
chrisb
Posts: 19681
Joined: Tue Mar 17, 2015 9:14 am

Re: unexpected result modifying sketch

Postby chrisb » Sun Dec 30, 2018 11:23 am

You have attached sketches to faces and are now confronted with the topological naming problem; search the forum for lots of discussions about that topic. To avoid or at at least minimize it, follow the Advice for creating stable models.
rrossi
Posts: 6
Joined: Sun Dec 30, 2018 8:46 am

Re: unexpected result modifying sketch

Postby rrossi » Sun Dec 30, 2018 4:35 pm

Thank you.
Now I know that my problem has a name. I did not understand too much of the details, but I can try to deal with it.

I believe the problem was never mentioned in the few tutorial I tried, and I found that the example project linked in the start page is affected too (try to add a couple of circles to the main sketch).

If I understood correctly I should try to keep all the sketches on the main planes, and to manage the offsets (and, if needed, rotations) manually.
It seems to me a big limitation to the "parametric" paradigm, but if there is no way out....

I believe it should be advisable to put a note somewhere on the documentation accessed by the beginner (the first couple of tutorials). Most of the people discovering the error will just conclude the program is not usable, and this is a pity.

By the way, what is the best way to give / maintain the offset of the sketches? At the moment I'm using the "placement" data on the "data" tab of the property view panel in the combo panel. Is there a better way?
GeneFC
Posts: 1025
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: unexpected result modifying sketch

Postby GeneFC » Sun Dec 30, 2018 5:05 pm

I fully agree with chrisb, but there is a quick fix in this case.

Leave the original sketch (Carrier-Sketch) unchanged, and add the hole to the final (Chip-Pad) object. The topological naming problem does not typically show up if you add supplemental features instead of returning to earlier sketches.

This can get messy as the design gets more complicated, and logically it is a bit odd, but it is a way to save some models.

Gene
triplus
Posts: 8802
Joined: Mon Dec 12, 2011 4:45 pm

Re: unexpected result modifying sketch

Postby triplus » Sun Dec 30, 2018 5:07 pm

Hi @rrossi

Just add the hole as a new feature at the end.

P.S. Just posted and seen @GeneFC already provided the same answer.
openBrain
Posts: 2391
Joined: Fri Nov 09, 2018 5:38 pm

Re: unexpected result modifying sketch

Postby openBrain » Sun Dec 30, 2018 5:26 pm

rrossi wrote:
Sun Dec 30, 2018 4:35 pm
Now I know that my problem has a name. I did not understand too much of the details, but I can try to deal with it.
Topological naming is about naming in a unique ID all the items (vertices, edges, faces) of a shape. It's done basically by internally naming them TYPEyyy (yyy is an incremental number). For example Edge6, Face2, ...
Your problem is that you attached a sketch to a face (let's say Face10). Then you modify another sketch that is used to build the shape including the Face10. By doing so you add or remove faces, and FC re-annotates all items. Thus your Face10 is no more the same and your sketch gets attached to the new Face10.
This is currently an issue inside FC (you saw the problems it leads to), but this isn't a simple thing to solve.
If I understood correctly I should try to keep all the sketches on the main planes, and to manage the offsets (and, if needed, rotations) manually.
It seems to me a big limitation to the "parametric" paradigm, but if there is no way out....
...
By the way, what is the best way to give / maintain the offset of the sketches? At the moment I'm using the "placement" data on the "data" tab of the property view panel in the combo panel. Is there a better way?
IMHO, the best solution is to attach your sketches to datum planes that are themselves referenced to main planes (by offset & rotation). This will be more flexible. ;)
OldDraftsman
Posts: 286
Joined: Sun Aug 27, 2017 4:35 pm

Re: unexpected result modifying sketch

Postby OldDraftsman » Sun Dec 30, 2018 5:44 pm

chrisb wrote:
Sun Dec 30, 2018 11:23 am
Advice for creating stable models
Chris, are there any videos on this topic? In particularly the the last bullet-point, to wit:
"If you inevitably have to reference an intermediate feature, e.g. the result of a thickness operation, use the first reference possible in the list of subsequent features where the referenced geometric element occurs. From FreeCAD 0.17 on you don't have to use the latest feature. If you take an early feature as reference, all changes to intermediate steps won't break your model. And again it is better to reference a sketch than edges and vertices of a solid."

I have **no** idea what that all means. :)
Dyslexics of the World Untie.
chrisb
Posts: 19681
Joined: Tue Mar 17, 2015 9:14 am

Re: unexpected result modifying sketch

Postby chrisb » Sun Dec 30, 2018 5:45 pm

rrossi wrote:
Sun Dec 30, 2018 4:35 pm
By the way, what is the best way to give / maintain the offset of the sketches? At the moment I'm using the "placement" data on the "data" tab of the property view panel in the combo panel. Is there a better way?
It is the right property, alas the Placement panel lacks a most important thing: you cannot use Expressions. Instead of manual positioning you can place a sketch on top of a pad by simply adding the length of the pad to the Z component of the sketches AttachmentOffset. Then you get the full parametricity back.

To create a stable model often a better planning is required, e.g. in your case you could have placed the top of the carrier pad in the XY plane.
chrisb
Posts: 19681
Joined: Tue Mar 17, 2015 9:14 am

Re: unexpected result modifying sketch

Postby chrisb » Sun Dec 30, 2018 5:49 pm

OldDraftsman wrote:
Sun Dec 30, 2018 5:44 pm
I have **no** idea what that all means. :)
I have planned for a long time to create a PartDesign tutorial, but haven't even started yet. My Sketcher tutorial has already grown to 80 pages and isn't even finished yet.

You may have a look at the videos of Harry Geier. I haven't followed all of them, but he is familiar with toponaming issues and how to avoid them.
chrisb
Posts: 19681
Joined: Tue Mar 17, 2015 9:14 am

Re: unexpected result modifying sketch

Postby chrisb » Sun Dec 30, 2018 6:33 pm

rrossi wrote:
Sun Dec 30, 2018 4:35 pm
...
I had a closer look at your model and have some remarks on the sketches. Furthermore I show in the attached model how to have a fully parametric and yet (very) stable model.
  • Carrier-Sketch contains redundant constraints. Symmetry implies the vertical/horizontal. Delete the latter or even better remove both symmetries and apply them one symmetry at two diagonal arc centers and the origin.
    If possible, use geometric constraints instead of measures. You can replace three of the radiuses with equality.
  • You have the same kind of redundancy in Pocket-Sketch.
    You can replace one of the radiuses with equality.
  • Contacts-Sketch: remove all but one of equal measures and replace them with equality.
    The 1.75 measure is implied by the 50 µm measure if you apply tangency to the horizontal lines
  • Chip-Sketch: instead of vertical and horizontal measures of 0 you should use vertical and horizontal constraints on the points. In this case it is even easier to use point-on-line constraints.
To improve robustness I have laid the top of the model in the XY plane:
  • Check the reverse flag of the carrier pad.
  • Map Pocket-Sketch to XY plane.
  • Map Contacts-Sketch to XY plane.
  • The only problem is Chip-Sketch. First it is mapped to XY plane. Then the external references should reference Pocket-Sketch and not Contacts-Pad.
    The main issue is the vertical position: To place it on the surface of the pocket set the z-component to the length of the pocket, i.e. to -Pocket.Length.
Now you have a model which is easy to fix in the rare case that anything breaks. After modeling as described above I have added the hole and nothing broke.
Attachments
Bildschirmfoto 2018-12-30 um 19.33.23.png
Bildschirmfoto 2018-12-30 um 19.33.23.png (16.46 KiB) Viewed 235 times