Correct workflow to avoid TNP issue.

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!
tonyaimer
Posts: 242
Joined: Mon Sep 30, 2019 4:17 pm

Correct workflow to avoid TNP issue.

Post by tonyaimer »

First the mandatory information.

Code: Select all

OS: Linux Mint 20 (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.21.29485 (Git) AppImage
Build type: Release
Branch: master
Hash: a236ca843fdd6674afb6d7ed1454fbd3b547f5ea
Python 3.10.5, Qt 5.12.9, Coin 4.0.0, Vtk 9.1.0, OCC 7.5.3
Locale: English/South Africa (en_ZA)
Installed mods: 
  * Help 1.0.3
Hi all,

I am obviously missing something simple and basic. I am putting this question in the simplest way I can
think of so the principal can be established without making things too difficult.

I can sketch a rectangle, constrain it and pad it to a particular thickness.

I am not wanting to encounter TNP further down the line so I don't want to define a datum plane on the top surface of the
padded solid.

I have tried to define a datum plane by selecting three vertices first but the option to do so does not seem to be in the list.

Could some kind soul give me the steps I need to define the new datum plane without attaching it to the padded geometry
please?

I thought maybe I could do a sketch on the XY plane and then offset it but that might my model no longer parametric.

This may be a silly question but the examples book I was using simply defined the new datum plane on top of the padded geometry which could expose one to the risk of TNP further down the line.

Thanks in advance

Tony Aimer

Btestdwg.FCStd[/attachment]
Attachments
Btestdwg.FCStd
(9.32 KiB) Downloaded 16 times
drmacro
Veteran
Posts: 8979
Joined: Sun Mar 02, 2014 4:35 pm

Re: Correct workflow to avoid TNP issue.

Post by drmacro »

The way TNP works is the internal name of generated geometry changes and things that are attached, by the name, are still attached to the old name.

So, if you attach a sketch to generated geometry (in this case the top face of your pad) it can cause TNP.

Attaching a Datum plane to generated geometry, is no different.

Attach the sketch to base planes and use attachment offsets.

You can even use an expression in the sketch attachment offset referencing the the pad so that the sketch will track changing in the Pad.

Pad.Length as the expression, for example, for z if you are using the XY_Plane.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Haavard
Posts: 221
Joined: Wed Feb 17, 2021 10:48 pm

Re: Correct workflow to avoid TNP issue.

Post by Haavard »

Try to attach sketches and datum planes to origin, and offset in property view to the desired offset.

Your pad sketch is attached to XY plane, so here i created a datum plane attached to XY plane, offset by Pad.Length.

Edit: doctor was faster :)
Attachments
Btestdwg_Datum_Plane.FCStd
(9.97 KiB) Downloaded 15 times
drmacro
Veteran
Posts: 8979
Joined: Sun Mar 02, 2014 4:35 pm

Re: Correct workflow to avoid TNP issue.

Post by drmacro »

Learn to model with sketches...

Datum planes to support a single sketch is redundant and superfluous.

Just offset the sketch...it even uses the same dialog as Datum plane.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
onekk
Veteran
Posts: 6202
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Correct workflow to avoid TNP issue.

Post by onekk »

Usually I don't encounter TNP as I use Scripting.

But the workflow could be reproduced even with GUI.

if you create shapes using a proper axis (I tend to model around origin and position sub-assemblies after having modelled them)

A pad (height) could be made as variable as other has explained and this "length" could used as pad height and even as displacement for other shapes that could be made.

if you modify the "length" all the related "length" are modified accordingly, no reference on faces or other topological objects that are affected by TNP.

it could be extended to almost all objects if they have planar faces, and with some maths even to curved faces if the curvature is predictable and could be calculated.

You need a place to store these "lengths" and a reliable manner to retrieve them.

but Expressions and Spreadsheet could be used and are made to fulfill this needs, ask eventually for more advices.

Hope it helps

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
User avatar
mfro
Posts: 666
Joined: Sat Sep 23, 2017 8:15 am

Re: Correct workflow to avoid TNP issue.

Post by mfro »

Apart from the TN implications already discussed,
tonyaimer wrote: Sun Jul 24, 2022 2:32 pm... I have tried to define a datum plane by selecting three vertices first but the option to do so does not seem to be in the list...
this should be perfectly possible.

Note that you first have to select geometry and - depending on what you selected - the options will change accordingly.
Cheers,
Markus
User avatar
Shalmeneser
Veteran
Posts: 9558
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: Correct workflow to avoid TNP issue.

Post by Shalmeneser »

To avoid TNP, you need to attach a sketch to something 'solid' :
* a plane (like XY) is always TNP-free.
* a line from an other sketch is TNP-free unless you modify THIS sketch. So the problem is on you and you can control the modifications. The higher the used sketch is in the construction tree, the safer it is. The more simple the used sketch is, the better (less risk of modification).
* an edge of the solid is TNP-free UNLESS you modify anything upstream in the construction tree. So it cannot be safe because it's not 'solid'. You cannot control the modifications.

The sketch attachment can do exactly the same as the DatumPlane. But A DatumPlane has more visibility.
A DatumPlane is useful when you use it multiple times (or you can copy the 1st sketch to keep the same attachment). If you modify the DatumPlane attachment, all sketches using this DatumPlane are moved accordingly.
freedman
Veteran
Posts: 3465
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: Correct workflow to avoid TNP issue.

Post by freedman »

Not that it's my thread but "How to align a new sketch that is completely off-axis needing external geometry"? This is where things get more complicated.
User avatar
adrianinsaval
Veteran
Posts: 5548
Joined: Thu Apr 05, 2018 5:15 pm

Re: Correct workflow to avoid TNP issue.

Post by adrianinsaval »

freedman wrote: Sun Jul 24, 2022 5:53 pm Not that it's my thread but "How to align a new sketch that is completely off-axis needing external geometry"? This is where things get more complicated.
IMO there is no generalized answer to that, depends on where it needs to be, why it needs to be there and what objects you have already. Trying to generalize: if you have something you know is stable (like a master sketch that will only change dimensions) use it for attachments then use expressions (consider using a spreadsheet to keep the overview) to get your sketch in the desired position, you might need to know some math and trigonometry to pull it off.
As you can see without a concrete example my answer is so vague it's almost useless.
Lonfor
Posts: 133
Joined: Wed Mar 23, 2022 2:32 am

Re: Correct workflow to avoid TNP issue.

Post by Lonfor »

drmacro wrote: Sun Jul 24, 2022 2:48 pm Datum planes to support a single sketch is redundant and superfluous.
Just offset the sketch...it even uses the same dialog as Datum plane.
You are correct, and yet, datum planes are very useful; specially when you have a ton of sketches in space and still more when they are not parallel to the default ones.
They also are handy to visualize the overall general extension of the design and proportional distances among sketches when in a skeleton.
Post Reply