Datum Plane orientation request

About the development of the Part Design module/workbench. PLEASE DO NOT POST HELP REQUESTS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
chrisb
Veteran
Posts: 53785
Joined: Tue Mar 17, 2015 9:14 am

Re: Datum Plane orientation request

Post by chrisb »

saso wrote: Fri Aug 30, 2019 8:42 am but it still does not really make sense to use the LCS presentation for this, datum plane has no origin
Did you ever really use a DatumPlane to map a sketch? They very well have an origin!
also, map mode pitch and roll of both the datum plane and the sketch (or other objects attached to the plane) do already give the user the needed tools to have control over this.
It's not a question of control, it's a question of visualisation to know how the plane is oriented before it is used.

Here are images of three different(!!) DatumPlanes as to be seen while editing. What would you do to tell the difference?
Snip macro screenshot-5f23ce.png
Snip macro screenshot-5f23ce.png (3.17 KiB) Viewed 4014 times
Snip macro screenshot-e181e8.png
Snip macro screenshot-e181e8.png (3.17 KiB) Viewed 4014 times
Snip macro screenshot-b5d285.png
Snip macro screenshot-b5d285.png (3.17 KiB) Viewed 4014 times
I attach the file too, so you can verify the images.

I cannot see what will be confusing or wrong to show where (0,0) is on the plane or in which direction x, y, z go. It seems to me that you want something you know from some other system, which cannot be mapped directly to the situation in FreeCAD.
Attachments
DatumPlanesDifference.FCStd
(6.16 KiB) Downloaded 126 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Datum Plane orientation request

Post by saso »

chrisb wrote: Fri Aug 30, 2019 9:41 am
saso wrote: Fri Aug 30, 2019 8:42 am but it still does not really make sense to use the LCS presentation for this, datum plane has no origin
Did you ever really use a DatumPlane to map a sketch? They very well have an origin!
it is the sketch that has its origin not the datum plane. the visual objects that represent (defines) the plane does have a placement, the origin of the plane is however the origin of the coordinate system it "lives in" (it is referenced to). the plane itself does not have its own origin.
chrisb wrote: Fri Aug 30, 2019 9:41 am It seems to me that you want something you know from some other system, which cannot be mapped directly to the situation in FreeCAD.
systems that work because they follow some basic mathematics concepts
chrisb
Veteran
Posts: 53785
Joined: Tue Mar 17, 2015 9:14 am

Re: Datum Plane orientation request

Post by chrisb »

So to be mathematical sound, let's agree for this topic on the following

Definition: The origin of a DatumPlane is the point defined by its placement.

It would be great if we can for the sake of better understandibility agree on some informal notions. I am quite able to give formal definitions of the things we are talking about, starting from natural numbers to geometry in 3D space, but I'm afraid it would obscure more than it would clarify. This discussion is not a mathematical battle, it's about how to visualize the orientation of a DatumPlane, or to translate to saso-language: The orientation and the origin of a sketch attached to such a DatumPlane.

So I'm still waiting for an answer of my previous post how you distinguish the three different DatumPlanes.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Jee-Bee
Veteran
Posts: 2566
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Datum Plane orientation request

Post by Jee-Bee »

I agree on this topic with saso. A plane have an orientation and NO origin. During sketching i agree (Partly) with chris to show a (the) transposed (Part/ Body) Origin on the sketchplane (whatcould be a datum plane) but don't show anything regarding of orientation outside the sketch.

I Don't remember exactly all of this topic. But if you have 3 planes they have 3 orientations otherwise there is no need to create a new one...
So i don't understand why the current bounding box isn't enough!

I agree if the creating of datum planes need some love... but that could be another topic...
User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Datum Plane orientation request

Post by saso »

chrisb wrote: Fri Aug 30, 2019 11:08 am It would be great if we can for the sake of better understandibility agree on some informal notions...
look, i don't really want to argue with you or if it seems that i am sort of attacking you, i am sorry, it is not my intention to do so. but we are clearly looking at this from different perspectives, i understand what you are trying to do "for the user" as a better user experience... my position and my argument on it is however that you cannot (or better to say should not) just change the formal mathematical definition of a plane just because it is not so convenient for the user in this case. by doing so you try to make it more convenient for the user, but in reality you are just obfuscating how things really work in the background (all the algorithms that are used to created the different geometries fall back to some mathematical principles) and by doing so you are making both the program and the user dumber and for an engineering tool as in my view FreeCAD should be this is IMO the wrong direction.

for example what does "flipping a plane" even mean to a user, what is the expected result when you have some geometry attached to it and then you flip a plane? if you think a bit about it and play with it you will quickly see that it is not such a simple answer as it might seem at first. some might expect a result similar to what you would get with an mirror command, but if you consider the original sketch (or other objects) position and orientation and relate that to the new orientation of the "flipped plane" you will get results that you get with set the pitch or roll of the plane to 180° and this are different results... if you feel that the datum plane is not giving you enough options, then use the LCS, or place another point or LCS on the plane,...

as for distinguishing the planes from your example... what exactly do you mean? you can select them and check in the properties which one is attached to what; you can inspect them in the graph view; you can give them meaningful names in the tree; you can color them differently;...
RatonLaveur
Posts: 991
Joined: Wed Mar 27, 2019 10:45 am

Re: Datum Plane orientation request

Post by RatonLaveur »

EDIT: I had a long diatriabe but will keep it short and sweet:

Challenge or approve the following statements:

1. We agree that at least visualizing the plane's normal positive orientation would help facilitate further sketch mapping, specifically would remove the need for double checking plane after creation and maybe having to rework it. Proposition: move forward with visualization of plane normal positive axis during plane creation and attachment.

2. I agree with Saso that "flipping" the plane is unclear as to what reference it flips against. This would be maybe even a further topic of datum plane implementation in FreeCAD. Proposition: if deemed reasonable create another topic for flipping.

3. I agree that maybe creating LCSs all over the place defeats the purpose of limiting the operation to creating one infinite plane. Proposition: forget I said anything about always creating an LCS with the plane. I'm not picky.

4. However I disagree about the arguments on Math, School-Kids and changing the underlying mechanism of freecad: unless you can prove it to me, it seems clear as day that a datum plane is created and located with and LCS including 3 axes and an origin point. Otherwise, where does my first sketch on that plane pick-up its origin? Proposition: make the underlying LCS revealable as an option (yes this proposition contradicts the previous one)

Hopefully this contributes to the discussion.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Datum Plane orientation request

Post by DeepSOIC »

Sorry, I haven't read the whole thread, it is faar tooo looong.. just a quick comment.

in mathematics, a plane doesn't have any origin and any directions to it. It has 3 degrees of freedom, i.e. can be fully defined by just 3 numbers. However, in practice, it is often defined by 4 numbers, to avoid problems similar to gimbal lock. Examples: (distance to origin)+(direction of normal); A*x+B*y+C*z+D = 0

In FreeCAD, Datum plane is defined by its Placement. Consequently, it has 6 degrees of freedom. Not only that - datum lines and datum points are defined by their placement too, so they all are LCS objects, under the hood. So they have an origin and three axes to them.

Sketch inherits the full placement of the datum plane it is attached to. It is a little bit accidental.

While a plane having a full CS under the hood is confusing (as the axes and origin are not displayed), they offer quite a few advantages. One, their attachment code overlaps heavily. Two, we can use roll, pitch and yaw as additional ways to tune the plane. Three, with some attachment modes (e.g. perpendicular to sweep spine), having sketch origin where the spine is helps make the sketch more stable with respect to spine changes.

Having some sort of indicator for origin and axes directions is a good idea, IMO. Who's ready to implement it? ;) shouldn't be too difficult...
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Datum Plane orientation request

Post by DeepSOIC »

An alternative way of tackling the problem is to get rid of every case where plane origin is used. That is, change the default attachment mode of PartDesign Sketches to a new mode, that always projects the body origin to become sketch origin, and always reconstructs h/v axes directions, instead of inheriting those from the plane. I think that's a rather good way to go, too.
RatonLaveur
Posts: 991
Joined: Wed Mar 27, 2019 10:45 am

Re: Datum Plane orientation request

Post by RatonLaveur »

Thank you DeepSOIC, your posts seem reasonable to me.

I would add that changing sketch behavior might be a bit heavy as a modifaction. In fact, I generally create a plane based on a Master Skeleton, so if the sketch attaches by default to the plane's origin, then its actually a benefit. But that's just me and experience shows that there are as MANY ways to create in FreeCAD as there are users/developers.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Datum Plane orientation request

Post by DeepSOIC »

RatonLaveur wrote: Fri Aug 30, 2019 1:40 pm would add that changing sketch behavior might be a bit heavy as a modifaction.
Not really. a) a sketch on a datum plane is just another attachment, it can be edited. So, it will be possible to switch between "use origin of plane" and "ignore origin of plane" by picking the right attachment mode of a sketch. b) we can make an option in preferences, which behavior is the default. Or even make a tickbox in task/popup "use plane's internal CS" when creating a sketch.
Post Reply