Freecad topoligical naming and datum planes

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!
Post Reply
lah
Posts: 40
Joined: Mon Nov 14, 2016 8:49 pm

Freecad topoligical naming and datum planes

Post by lah »

Hi,

Before when using freecad I created some sketches/solids intensively using sketches attached to face. It was very convenient to attach sketches to faces but it was a nightmare when I had to do some modifications leading to face renaming.
I found this very interesting article https://wiki.freecadweb.org/Topological_naming_problem
Recommended solution are :
Avoid attaching sketches and datums to generated geometry of the model. (Generated geometry is any face or edge created as a result of a pad, pocket, etc..)
Place your sketches on standard planes, or on custom datum planes.

Sketches with attachment offests or attached to datum planes with attachment offsets, are less at risk of being unexpectedly reattached to a different reference.

When creating datum geometry, do not attach it to generated geometry

Attach it to standard planes/axes and/or sketches and use attachment offsets to position it as needed
But it's not very convenient to create some datum planes attached for example to xy planes and find needed offset to place it on a given face.

How can I do to quickly place a datum plane on a face without using it as attachment? Maybe it's a stupid question, but, Is it a good practice to attach a datum plan to a sketch and when created removing this attachment? Or still quicker, create a sketch attach on a face and removing this attachment? Doing that, sketch does not depend on any face. What are the drawbacks of this approach compared to clean solution : creating a datum plan and manually setting offsets?

Thanks for your help
drmacro
Veteran
Posts: 8982
Joined: Sun Mar 02, 2014 4:35 pm

Re: Freecad topoligical naming and datum planes

Post by drmacro »

I agree that slapping sketches and datum planes to generated geometry with reckless abandon takes less effort than thinking through my intent ahead of time. But, it is far more convenient to use the suggested techniques than trying to figure out what went crazy when I want to modify things later.

Can you provide an example of when it is inconvenient for you? In many cases, it is simply a matter of thinking outside your current experience box or learning a different technique to accomplish your intent.

I have found that planning my model and using things like a master sketch, sketches in general, spreadsheets, named constraints, and dynamic data while modeling to, in the end, provide a more stable, more parametric, and maintainable model with or without the topo problem.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
chrisb
Veteran
Posts: 54197
Joined: Tue Mar 17, 2015 9:14 am

Re: Freecad topoligical naming and datum planes

Post by chrisb »

lah wrote: Sun Nov 22, 2020 9:54 am What are the drawbacks of this approach compared to clean solution : creating a datum plan and manually setting offsets?
There is another forum member (perhaps TheMarkster? or freeman? or freman?) who models that way. The drawback is, that it is no longer parametric. If you change something in a previous step, the model may not break as it did before, but it will not update either. So you have again to rework the attachments.

If you really want that non parametric modeling, you attach your sketch as before to a face and then you set the MapMode to deactivated and delete the attached face from the input line.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Bance
Veteran
Posts: 4255
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: Freecad topoligical naming and datum planes

Post by Bance »

The emphasis on "quickly," "convenience," etc. are the keys here.

If one want's a parametric model, one has to plan a strategy that will produce it.

For beginners that haven't developed the skills that are required this takes time.

I always take a few moments before beginning a model, thinking about symmetry, position of first sketch, which axis to form first solid in, whether to revolve or pad, naming key dimensions, etc.

All these things make modeling easier as the process progresses.

I personally prefer to use attachment offset and attachment to sketches, rather than Data objects as I find them intrusive even though they can be hidden.

YMMV.

Steve.
lah
Posts: 40
Joined: Mon Nov 14, 2016 8:49 pm

Re: Freecad topoligical naming and datum planes

Post by lah »

Thanks for your support
Can you provide an example of when it is inconvenient for you? In many cases, it is simply a matter of thinking outside your current experience box or learning a different technique to accomplish your intent.
Finding offset needed is inconvenient (for distractful people) :roll: : I fully agree that when all models is based around names constraints, Spreadsheets, it really helps to find the good offset to apply. But when you don't remember the offset value to set, you have to dig into your model to find it.
I'm just trying to find an efficient way to sketch on a surface. From discussion, below are the solutions :
1-selecting solid face and create sketch : very quick 2 clicks but not reliable because prone to face renaming issue
2- finding offset of face from base plane and create a datum plane : solves topological naming problem but needs to identify first offset (prone to offset errors for forgetful users :P ) . I can find offset if I have a clean model with named constraints, spreadsheet... but if it's not the case how can I do? An obvious solution is just to put mouse on surface and find needed coordinates.
3-selecting solid face and create sketch then detach it : solves topological naming problem but creates non parametric models. I'm not sure to fully understand the last point (about model that stays parametric with solution 2). Can you give an example? For example when a sketch is on a datum plan based on xy plane with a given z offset of 10mm compared to a solution 3 where sketch is not attached to anything but at a position (0, 0, 10mm)? Why model is more parametric with plan attached to xy plane?
drmacro
Veteran
Posts: 8982
Joined: Sun Mar 02, 2014 4:35 pm

Re: Freecad topoligical naming and datum planes

Post by drmacro »

lah wrote: Sun Nov 22, 2020 5:52 pm 2- finding offset of face from base plane and create a datum plane : solves topological naming problem but needs to identify first offset (prone to offset errors for forgetful users :P
3-selecting solid face and create sketch then detach it : solves topological naming problem but creates non parametric models. I'm not sure to fully understand the last point (about model that stays parametric with solution 2). Can you give an example? For example when a sketch is on a datum plan based on xy plane with a given z offset of 10mm compared to a solution 3 where sketch is not attached to anything but at a position (0, 0, 10mm)? Why model is more parametric with plan attached to xy plane?
Um...
Option 1:
  • set a cell in a spreadsheet to the offset, name it FirstOffset
  • enter expression in attachment property of desired sketch or plane referencing FirstOffset
Parametric and nothing to forget.

Option 2:
  • create a dynamic data object, call it FirstOffset
  • enter expression in attachment property of desired sketch or plane referencing FirstOffset
Parametric and nothing to forget.

Option 3:
  • create a master sketch with representations of the offsets, lets say a line whose length represents the Z offset
  • constrain the line and name it FirstOffset
  • enter expression in attachment property of desired sketch or plane referencing FirstOffset
Parametric and nothing to forget.

Your solution #3 basically ends up with the same situation as tnp, every time you change something in the feature tree, you will need to go and fix the tree. You will need to reattach to re-establish the correct position in space, then deattach. Ok, for a feature tree that has 10 features...probably more inconvenient for a tree of 100 features.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
chrisb
Veteran
Posts: 54197
Joined: Tue Mar 17, 2015 9:14 am

Re: Freecad topoligical naming and datum planes

Post by chrisb »

There is no cure against forgetful users. If you forget to select the face for attachment it would be the same problem.

There is a 4th possibility for attaching: use a master sketch wich contains important geometry to which you can attach sketches.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Freecad topoligical naming and datum planes

Post by jmaustpc »

lah wrote: Sun Nov 22, 2020 5:52 pm 3-selecting solid face and create sketch then detach it : solves topological naming problem but creates non parametric models.
Another problem with that "detaching" idea is that it is very likely to cause another issue that makes you PartDesign body no longer valid if you update something the wrong way, due to the requirement for a Body to be a single contiguous solid.
lah wrote: Sun Nov 22, 2020 5:52 pm I'm not sure to fully understand the last point (about model that stays parametric with solution 2).
.
as others have said, it stays parametric because you do not enter a value, you enter an Expression that reads the value from somewhere else. You either store that value somewhere (in default FreeCAD without add-ons the Spreadsheet is the most obvious and simple place to store values) or directly read it from a property of constrain of another object.

Simple example, if you want a sketch on the top face of an exiting Pad named "Pad" that was created from a sketch on the xy axis plane, in most case you can just directly read the property "Length" from Pad via an Expression in the Z attachment offset of that second sketch. The Expression would just be

Code: Select all

Pad.Length



There are times where finding the plane might be much more complex and you might decide to just attach to face anyway and just take the topo naming risk, if so then try to finish as much as possible of your model before attaching to face, so that if you do have a problem, it is easy to fix.
Post Reply