How to use datum geometry in 0.17

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
velociraptux
Posts: 15
Joined: Sun Jan 29, 2017 2:58 am

How to use datum geometry in 0.17

Post by velociraptux »

hi there
I'm trying to create a parametric design with the new part design of freecad 0.17. But I have never used the datum plane before and it is rather difficult to understand how it works. This is the object I want to create.
Capture d'écran de 2017-02-04 04-42-42.png
Capture d'écran de 2017-02-04 04-42-42.png (134.3 KiB) Viewed 10321 times
I tried several methods to link the different pad and sketch together with datum plane, without getting there. When I change the parameters in the spreadsheet, the object does not keep its shape. Unless I fully constraint the sketch or use external geometry, but my goal is understand how the new workflow works.
Can anyone recreate my object with datum plane or shape binder (I don't know the difference), please?
Or explain how to do this.
Thanks a lot



OS: Fedora 25
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.9944 (Git)
Build type: Unknown
Branch: master
Hash: 9b58d8bd6fe19b0b921ffa0b5712186a0b3be09d
Python version: 2.7.13
Qt version: 4.8.7
Coin version: 3.1.3
OCC version: 6.8.0.oce-0.17
Attachments
corners.fcstd
(28.46 KiB) Downloaded 118 times
User avatar
bejant
Veteran
Posts: 6075
Joined: Thu Jul 11, 2013 3:06 pm

Re: How to use datum geometry in 0.17

Post by bejant »

velociraptux wrote:hi there
I'm trying to create a parametric design with the new part design of freecad 0.17. But I have never used the datum plane before
Hi velociraptux, if you look at the Tools > Dependency Graph of your model you'll see that you've already used the X-Y Datum Plane (bottom row, center):
20170204a.png
20170204a.png (97.01 KiB) Viewed 10311 times
velociraptux wrote:When I change the parameters in the spreadsheet, the object does not keep its shape. Unless I fully constraint the sketch
You must Fully Constrain the Sketches so as to remove any ambiguity that may result from changing the cell value in the Spreadsheet. In your model all you have to do is apply a Fix Point Onto An Edge Constraint between the endpoints of a vertical and horizontal line segment to their corresponding axes.
velociraptux wrote:Can anyone recreate my object with datum plane or shape binder
I didn't recreate your model but instead just modified it, and after making the Sketches become Fully Constrained the model updates correctly when changing either of the values in the Spreadsheet cells.

I'm in the process of learning 0.17 myself too...
User avatar
NormandC
Veteran
Posts: 18584
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: How to use datum geometry in 0.17

Post by NormandC »

Hi!
velociraptux wrote:I have never used the datum plane before and it is rather difficult to understand how it works.
bejant wrote:you'll see that you've already used the X-Y Datum Plane
I think velociraptux was rather talking about the Image Create new datum plane tool.

I agree that it's confusing as hell. And creating a datum line (which I had never tried before now) is even more difficult! :?

ickby wrote a topic related to it in the UX/UI Design forum: Needs UI overhaul: Attachment editor
bejant wrote:You must Fully Constrain the Sketches so as to remove any ambiguity that may result from changing the cell value in the Spreadsheet.
Agreed, at least in reference to the sketch axes.
velociraptux wrote:Can anyone recreate my object with datum plane or shape binder (I don't know the difference)
<rant>"Datum" is a term that I dislike, maybe because there is no translation in my own language (French) so it is meaningless to me, or rather that it makes no sense to associate the French "Donnée" to another word like plane (un "plan donnée" is stupid :roll: ). It's also not very user-friendly IMO, and as far as I know, it's only used in high-end CAD suites (CATIA, Creo/Pro-Engineer). It would be so much easier to understand if it was simply called work plane. Because that's what it is: a work plane, to be used to attach a sketch to, or (possibly) to pad or pocket to. Or a reference plane maybe (I think I found my translation! Reference is the same word in French :D ). </rant>

The Shapebinder tool is a totally different animal. Think of it as an external geometry tool used outside the sketch. With it you can link geometry from a sketch (or the whole sketch), a face or edges from the part. The shapebinder tool can also be used across bodies, which makes it very useful.

To be honest, I don't see any advantage in creating datum planes in your model, because the 3 sketches can simply be attached to the standard planes. As for Shapebinder, it's not useful either: I thought I could simply create a Shapebinder from the first Sketch then rotate it to the right plane, unfortunately the Shapebinder object does not have a placement property so it's unmovable. It's unfortunate, because I would then have tried to pad the shapebinder and avoid 2 duplicate sketches.

Next I thought of using two PolarPatterns on the first Pad, using a new datum axis as the rotation axis. I had a hard time creating the datum axis then placing it at the correct position. Under the Super Placement properties, the X/Y/Z directions are all mixed up. :?

But I was ultimately defeated by the old transformation bug with faces of the occurrence being coplanar to faces on the parent feature (there are 4 coplanar faces here):
FC017_velociraptux_polarpattern_01.png
FC017_velociraptux_polarpattern_01.png (57.47 KiB) Viewed 10306 times
What's frustrating is that by moving the DatumLine slightly so the faces are not coplanar, the Polar Patern succeeds.
User avatar
NormandC
Veteran
Posts: 18584
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: How to use datum geometry in 0.17

Post by NormandC »

Here's a test case that works with Polar Pattern. It is not a complete model. But I had to use external geometry... Guess it could be avoided by using Expressions.
Attachments
corners_test_normandc1.fcstd
(22.32 KiB) Downloaded 127 times
velociraptux
Posts: 15
Joined: Sun Jan 29, 2017 2:58 am

Re: How to use datum geometry in 0.17

Post by velociraptux »

bejant wrote:You must Fully Constrain the Sketches so as to remove any ambiguity that may result from changing the cell value in the Spreadsheet. In your model all you have to do is apply a Fix Point Onto An Edge Constraint between the endpoints of a vertical and horizontal line segment to their corresponding axes.
NormandC wrote:To be honest, I don't see any advantage in creating datum planes in your model, because the 3 sketches can simply be attached to the standard planes.
NormandC wrote:Agreed, at least in reference to the sketch axes.
The first time I created my object with freecad 0.16, I had constrain my sketches completely and it worked. But this is only the beginning of the object and I wanted to understand how the new workflow work for the rest.
NormandC wrote:I think velociraptux was rather talking about the Image Create new datum plane tool.
Yes it is.
NormandC wrote:It would be so much easier to understand if it was simply called work plane.
I think it's a good idea.
NormandC wrote:I had a hard time creating the datum axis then placing it at the correct position.
I did not have this problem by selecting the top face of the object,create a datum line and using the 1st principal axis of the attachment mode. But is this the right solution?
But like you said:
NormandC wrote:I was ultimately defeated by the old transformation bug with faces of the occurrence being coplanar to faces on the parent feature
Same bug for me. I hope it will be resolved soon.
NormandC wrote:Here's a test case that works with Polar Pattern. It is not a complete model. But I had to use external geometry.
The external geometry is not good for a parametric design. That's why I'm looking for another solution.

So, here is where I should have started my post. :oops:
I read in several post that if we wanted to have a parametric design we had to stop placing the sketch on one face of the object and also do not use external geometry. To prevent the object from breaking when changing some parameters.
By placing a datum plane on a face of the object, we will arrive at the same problem that by placing a sketch on it?

Next step of my objet. I need to place holes on my object, like this.
Capture d'écran de 2017-02-04 20-30-16.png
Capture d'écran de 2017-02-04 20-30-16.png (139.46 KiB) Viewed 10234 times
Should I place the datum plane on the faces of my object?
How to connect the holes to my object, without using external geometry, so that they remain parametrable. (In the center for one and has a certain distance for the other two)?
Edit: i need this three holes on each side of the object
Attachments
corners.fcstd
(31.53 KiB) Downloaded 106 times
User avatar
NormandC
Veteran
Posts: 18584
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: How to use datum geometry in 0.17

Post by NormandC »

velociraptux wrote:I did not have this problem by selecting the top face of the object,create a datum line and using the 1st principal axis of the attachment mode. But is this the right solution?
By selecting the face of the object, you are making the datum line dependent on geometry subject to change. You're trying to avoid the pitfalls of the topological naming issue, but at the same time you're willingly throwing yourself into the pit. ;) So no, it is not the right solution.

What I did was base my datum line on the Y_Axis but I had a hard time understanding how to do so.

It would be much simpler to make the first sketch & pad so that the standard BodyOrigin axes can be used directly.
velociraptux wrote:The first time I created my object with freecad 0.16, I had constrain my sketches completely and it worked. But this is only the beginning of the object and I wanted to understand how the new workflow work for the rest.
Fully constraining sketches is an essential cornerstone of parametric modelling. The new PDN work flow does not change that. There is no way you can build a robust model out of not fully constrained sketches.
velociraptux wrote:Same bug for me. I hope it will be resolved soon.
Don't hold your breath. :( That bug has been there since the introduction of the transformation features back in 2012. Back then there was a whole team working assiduously on the PartDesign workbench. Now there is only one single developer (ickby) and his available time appears limited.
velociraptux wrote:I read in several post that if we wanted to have a parametric design we had to stop placing the sketch on one face of the object and also do not use external geometry.
There's an important clarification to be made here. Mapping sketches to faces will still produce a parametric design. It's just that because of the topological naming issue, a model built that way is inherently less robust, and more prone to breakage. But it is still parametric, and it can be repaired.

In my daily work, having to repair broken features is not uncommon, it's practically unavoidable with parametric design; although the problem is not as acute as in FreeCAD.
velociraptux wrote:By placing a datum plane on a face of the object, we will arrive at the same problem that by placing a sketch on it?
The pit. You in it. So, yeah. ;)

Plus you are just adding a redundant step. If the datum plane is attached to the face of the object, then the sketch is mapped to the datum plane, it's just like the sketch being attached to the object.

The idea is to base your object on datum planes, not the other way around. Of course, along the course of the design, it may become unavoidable to use object geometry to create datum features. It depends on the planning you do before building your part.

One methodology that you could explore is creating skeleton geometry. Have a look at the PartDesign_Bearingholder_Tutorial_I but keep in mind it was written 3 ½ years ago for the first implementation of PartDesignNext. The workbench has seen fundamental changes since and does not work as in the tutorial anymore.

Whenever possible, base your custom datum features (planes, lines) on the the standard ones found under BodyOrigin because they are unaffected by geometry changes.

For example: to create an angled datum plane like the first one in your latest corners.fcstd file, you can create one based on the YZ_Plane, select "Plane face" as attachment mode, and below the Extra placement section, enter a Pitch of 45 degrees. This will create an angled datum plane centred on the BodyOrigin.

Next you create a datum plane parallel to your angled plane: you base it on the angled datum plane, then in the Extra placement section, you input an offset in Z. Why Z? Because it's the axis direction of the datum plane, not of the BodyOrigin. As for the value to enter, you can define it in your spreadsheet by a simple formula based on your Sketch constraints, or you can use a formula directly using the f(x) Expressions button and calling up your Sketch constraints (but they need to be labelled).

All this you do before building any geometry.
User avatar
NormandC
Veteran
Posts: 18584
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: How to use datum geometry in 0.17

Post by NormandC »

To continue on the subject.
velociraptux wrote:Should I place the datum plane on the faces of my object?
I believe the answer to that question should be clear by now. ;)

Looking at your latest corners.fcstd file (might I suggest you give different names to the files you attach to your posts? It would avoid confusion), DatumPlane001 which is attached to the bottom face of the solid is unnecessary, because the solid lies on the XY_Plane. You could attach Sketch004 directly to XY. Then you just need to set its Map Reversed property to true so that when you edit the sketch, the view rotates to the bottom view.
velociraptux wrote:How to connect the holes to my object, without using external geometry, so that they remain parametrable.
Now that is the real conundrum isn't it? But again with the misconception: use of external geometry does not prevent the holes from being parametric, they just in some circumstances make them more prone to breaking. As for myself I'm willing to deal with some moderate breakage in my models if it means not depriving myself of such a useful tool.

The bottom ones (Sketch004) are easy because your sketch lies on the XY plane and you don't need external geometry here: you could sketch the outline of the bottom face without using external geometry, and constrain it using Expressions linked to your first sketch or your spreadsheet. Then you turn the whole outline to construction geometry, and you constrain your circles to it.

But that is rather tedious. I believe the skeleton geometry approach I mentioned in my previous reply can be used here.
velociraptux wrote:Edit: i need this three holes on each side of the object
I'm trying to figure out a working solution to repeat features like in the corners_normandc1.fcstd file I posted, but the transformation tools seem buggy as hell. Yesterday I could use a datum line as polar pattern axis, now I can't!!! The Mirrored feature won't accept a Datum plane as reference either.

You may have to face the fact that PartDesignNext is still too buggy to create "production" models with.
velociraptux
Posts: 15
Joined: Sun Jan 29, 2017 2:58 am

Re: How to use datum geometry in 0.17

Post by velociraptux »

Ok, i have based my datum planes on the BodyOrigin.
NormandC wrote: I believe the skeleton geometry approach I mentioned in my previous reply can be used here.
That's what I did.
NormandC wrote:Yesterday I could use a datum line as polar pattern axis, now I can't!!! The Mirrored feature won't accept a Datum plane as reference either.
Same for me, it worked only once, impossible to do it again. I chose to use the basic x-axis to make the polarpatern.
And I was surprised to see that the bug mentioned above ("the old transformation bug with faces of the occurrence being coplanar to faces on the parent feature") Has been resolved by magic :shock:

Now, the new object and these bugs (or my noob mistakes).
Capture d'écran de 2017-02-05 04-50-38.png
Capture d'écran de 2017-02-05 04-50-38.png (168.23 KiB) Viewed 10184 times
When I change the width of the screw in my spreadsheet, the width of the pad does not update in the 3d view. But it gets updated in the original sketch and the pad length selection window. (No problem up to 4.9 mm. Past 5mm the object breaks)
NormandC wrote:You may have to face the fact that PartDesignNext is still too buggy to create "production" models with.
I fell in love with this new version of freecad <3 . And maybe it will help the developer find a new bug to solve.

Quand tu essayes de faire une rotation du screenshot avec ta souris... tu sais que c'est l'heure d'aller au lit. :p
Attachments
parametric_object_test.fcstd
(56.18 KiB) Downloaded 135 times
User avatar
Willem
Veteran
Posts: 1826
Joined: Fri Aug 12, 2016 3:27 pm
Location: Lisse, The Netherlands

Re: How to use datum geometry in 0.17

Post by Willem »

Hi, your model and spreadsheet are perfect. With a hole diameter larger then 5 mm the model falls apart because you cut a hole with a radius of e.g. 6 mm, so a diameter of 12 mm in a beam with a width of 5+6=11 mm. The hole is bigger then the beam so the model is falling in pieces and that is not allowed.

Changing the diameter in a value smaller than 5 mm gives an immediate update in the 3D view on my system
OS: Ubuntu 16.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.9927 (Git)
Build type: None
Branch: master
Hash: 2780edd903e9819eb0d0940ca0e754f1124ac188
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
velociraptux
Posts: 15
Joined: Sun Jan 29, 2017 2:58 am

Re: How to use datum geometry in 0.17

Post by velociraptux »

I'm a noob :oops:
The first time I created my object (in 0.16) I had not made that mistake.
THANK A LOT @Willem
Willem wrote:your model and spreadsheet are perfect
Thank you again, but my object is not complete yet, it was just a test to learn the basics of parametric design in freecad 0.17. I will now be able to create the final object. I post it here when it's over.
I also want to create a little tutorial step by step, for those who like me would have trouble with this new workflow. But I think it would be better to wait for the final version of freecad 0.17. No?

And a big thank you to you @NormandC for the time spent helping me and for all your good suggestion. If you have things to say about my last posted object, you are welcome. <3
Post Reply