Problem in creating a DatumPlane

Report observations made with the new Toponaming branch.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
jpg87
Posts: 809
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: Problem in creating a DatumPlane

Post by jpg87 »

@adrianinsaval and @Roy_043

Sorry, on my last try I forgot to press ctrl+shift+p.
Now here is the new result:

Code: Select all

Python 3.10.6 | packaged by conda-forge | (main, Aug 22 2022, 20:30:19) [MSC v.1929 64 bit (AMD64)] on win32
Type 'help', 'copyright', 'credits' or 'license' for more information.
>>> # Gui.Selection.clearSelection()
>>> # Gui.Selection.addSelection('PbDatumPlaneFC_0_21','Sketch')
>>> ### Begin command Std_SendToPythonConsole
>>> try:
>>>     del(doc,lnk,obj,shp,sub,subs)
>>> except Exception:
>>>     pass
>>> 
>>> doc = App.getDocument("PbDatumPlaneFC_0_21")
>>> obj = doc.getObject("Sketch")
>>> shp = obj.Shape
>>> ### End command Std_SendToPythonConsole
>>> [v.Point for v in shp.Vertexes]
[Vector (-25.0, 0.0, 0.0), 
Vector (68.96926207859083, 7.594372760115067e-15, 34.20201433256686), 
Vector (58.70865777882078, 1.3853983062116296e-14, 62.39279295614411)]
>>> 
which matches what Roy_043 posted.
On the other hand, even after recalculating the DatumPlane and the sketch linked to it, I still have the offset of 0.333...mm in Y.
My website : http://help-freecad-jpg87.fr updated 2023/11/06
edwilliams16
Veteran
Posts: 3106
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Re: Problem in creating a DatumPlane

Post by edwilliams16 »

When you attach the datum plane to three points (or a point and the endpoints of a line), you have not specified where the origin of the plane should be. The documentation https://wiki.freecadweb.org/Part_EditAt ... y_3_points doesn't say what is supposed to happen, either. So whatever happens, happens.
chrisb
Veteran
Posts: 53920
Joined: Tue Mar 17, 2015 9:14 am

Re: Problem in creating a DatumPlane

Post by chrisb »

Attaching a plane to three points with mode "Plane by 3 points" places the center on the center of gravity of the triangle built by the three points. You can place the center of the plane in the first of the attachment points by using e.g. the mode "O-X-Y".
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
wsteffe
Posts: 461
Joined: Thu Aug 21, 2014 8:17 pm

Re: Problem in creating a DatumPlane

Post by wsteffe »

chrisb wrote: Sun Sep 18, 2022 9:47 pm Attaching a plane to three points with mode "Plane by 3 points" places the center on the center of gravity of the triangle
IMO datum plane definition/alignment was badly written and very poorly documented.

What is the reason to put the Origin in the "center of gravity" (or better the centroid) of the triangle ?
And how are aligned the axes ? Nothing said about that.

chrisb wrote: Sun Sep 18, 2022 9:47 pm You can place the center of the plane in the first of the attachment points by using e.g. the mode "O-X-Y".
This option makes more sense but it is as well badly documented:
Align O-X-Y

Matches object's origin with first referenced vertex and aligns its horizontal and vertical plane axes toward vertex/along line.

Reference combinations

Vertex, Vertex, Vertex
Vertex, Vertex, Edge
Vertex, Edge, Vertex
Vertex, Edge, Edge
Vertex, Vertex
Vertex, Edge
Which is the line in the sentence "aligns its horizontal and vertical plane axes toward vertex/along line" ?
One line should be specified for horizontal axis and anoother one for the vertical axis.
And this specification should be given for each reference combination.
chrisb
Veteran
Posts: 53920
Joined: Tue Mar 17, 2015 9:14 am

Re: Problem in creating a DatumPlane

Post by chrisb »

Bance's famous Basic Attachment Tutorial can be seen as part of the documentation. And improvements of the wiki are always welcome. Go ahead!
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
wsteffe
Posts: 461
Joined: Thu Aug 21, 2014 8:17 pm

Re: Problem in creating a DatumPlane

Post by wsteffe »

chrisb wrote: Mon Sep 19, 2022 9:07 am And improvements of the wiki are always welcome.
But how may I write on the wiki page ?
chrisb
Veteran
Posts: 53920
Joined: Tue Mar 17, 2015 9:14 am

Re: Problem in creating a DatumPlane

Post by chrisb »

A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
wsteffe
Posts: 461
Joined: Thu Aug 21, 2014 8:17 pm

Re: Problem in creating a DatumPlane

Post by wsteffe »

Ok thanks chrisb,

I will see if it is tha case to ask for an editing account. The only change I would like to have (for the moment) is to convert the list of reference combinations into a table with 3 new entries for each raw (Origin, X axis, Y axis)

If I have understood well the axes orientation of the reference combination (Vertex, Vertex, Vertex) associated with the "O-X-Y" attachment mode,
the first line of the table associated with this mode would be:

Code: Select all

 Reference Combination      Origin        X axis          Y axis 
(Vertex, Vertex, Vertex)      P1          P2-P1           In P1-P2-P3 plane and normal to X 
I think there are people more experienced than me who could fill these tables in a very short time.
chrisb
Veteran
Posts: 53920
Joined: Tue Mar 17, 2015 9:14 am

Re: Problem in creating a DatumPlane

Post by chrisb »

wsteffe wrote: Mon Sep 19, 2022 11:15 am the first line of the table associated with this mode would be:

Code: Select all

 Reference Combination      Origin        X axis          Y axis 
(Vertex, Vertex, Vertex)      P1          P2-P1           In P1-P2-P3 plane and normal to X 
I think there are people more experienced than me who could fill these tables in a very short time.
It seems easy to improve, because some things are currently rather obscure, but to make it easily understandable is a challenge.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
wsteffe
Posts: 461
Joined: Thu Aug 21, 2014 8:17 pm

Re: Problem in creating a DatumPlane

Post by wsteffe »

chrisb wrote: Mon Sep 19, 2022 1:29 pm It seems easy to improve, because some things are currently rather obscure, but to make it easily understandable is a challenge.
Generally speaking I agree that it is difficult to write an easily understandable docomentation covering all FC usage cases. But for this specific case (Datum Plane Attachement Modes) I think that it shouldn't be that difficult to tell how the local reference system associated with a datum plane is aligned for each choice of the reference elements.
Post Reply