[SOLVED] - Sketch origin won't match part origin

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!
Bance
Veteran
Posts: 4186
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: Sketch origin won't match part origin

Post by Bance »

Lonfor wrote: Fri May 27, 2022 7:00 am Yup. But it looks like there is a faulty logic at where it is placed. It should be by default at 0,0.
Because you put it there. ;)

If you want the sketch at the part origin why use a datum plane?

Attach the datum plane to the XY plane for the correct positioning.
Lonfor
Posts: 133
Joined: Wed Mar 23, 2022 2:32 am

Re: Sketch origin won't match part origin

Post by Lonfor »

Bance wrote: Fri May 27, 2022 7:11 am If you want the sketch at the part origin why use a datum plane?
Look at the pic for a graphic explanation.
Datum Planes are a must for many CAD operations.
Attachments
234.png
234.png (64.4 KiB) Viewed 772 times
User avatar
bambuko
Veteran
Posts: 2165
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: Sketch origin won't match part origin

Post by bambuko »

I am confused...
about your Edge4 (it is different to the one you are pointing at on your picture...)
and when I try to edit Sketch001 I get the message:

Code: Select all

09:14:13  Recompute failed! Please check report view.
234.png
234.png (71.44 KiB) Viewed 749 times

Code: Select all

OS: Ubuntu Core 20 (Pantheon/pantheon)
Word size of FreeCAD: 64-bit
Version: 0.20.28929 (Git)
Build type: Release
Branch: master
Hash: 9251480ddba402c69bf593fd70efcfdadabd737e
Python 3.8.10, Qt 5.15.3, Coin 4.0.0, OCC 7.6.2
Locale: English/United Kingdom (en_GB)
I am using Link branch and Assembly3
you can also download ... and try it here
excellent Assembly3 tutorials here
Bance
Veteran
Posts: 4186
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: Sketch origin won't match part origin

Post by Bance »

Lonfor wrote: Fri May 27, 2022 7:38 am Datum Planes are a must for many CAD operations.
I am aware of that, but one must attach them correctly for the required result. Choosing plane by three points leaves the origin undefined.
Attachments
metaldesplBance.FCStd
(8.4 KiB) Downloaded 21 times
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: Sketch origin won't match part origin

Post by chrisb »

Lonfor wrote: Fri May 27, 2022 7:38 am Datum Planes are a must for many CAD operations.
You are of course right in this general form, but FreeCAD can do very much with the attachment of sketches directly, where other systems may need a support plane. There are two important application areas for DatumPlanes:
1) They are convenient when multiple sketches lie in the same plane
2) When you want to inverse the sequence of rotation and translation.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Bance
Veteran
Posts: 4186
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: Sketch origin won't match part origin

Post by Bance »

An alternative might be to choose two vertices and select OYN.
FCuser2019
Posts: 125
Joined: Fri Sep 13, 2019 12:15 pm

Re: Sketch origin won't match part origin

Post by FCuser2019 »

Hello, the behaviour described here is related to what I said in this post:
https://forum.freecadweb.org/viewtopic. ... ac#p370982

in fact, in this case being:
img1.png
img1.png (33.75 KiB) Viewed 678 times
you have:
[x1, y1, z1]=[0, 0, 0] and [x2, y2, z2]=[1 ,0, 0] (on the X axis)
[x3, y3, z3]=[0, 23.8147, 2.97683] (Sketch.Vertex2)

Placement.Base point of the DatumPlane is:
[(0+1+0)/3 , (0+0+23.8147)/3 , (0+0+2.97683)/3]= [0.3333, 7.93823, 0.99228]

as visible in:
img2.png
img2.png (30.34 KiB) Viewed 678 times
drmacro
Veteran
Posts: 8868
Joined: Sun Mar 02, 2014 4:35 pm

Re: Sketch origin won't match part origin

Post by drmacro »

Datum planes are not a must.

I have used CAD for decades and rarely find use for them. IMO they are a learned crutch. (And, note, that is my opinion...and you know what they say about opinions 8-) )

The sketch in FreeCAD has ALL the same positioning functions that datum planes have. Using datum planes to position a single sketch is not only superfluous, it is redundant (since it adds an additional placement/attachment object).
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Bance
Veteran
Posts: 4186
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: Sketch origin won't match part origin

Post by Bance »

FCuser2019 wrote: Fri May 27, 2022 9:42 am Hello, the behaviour described here is related to what I said in this post:
As I said above, if plane by 3 points is chosen the origin is arbitrary, a function of the three chosen points. If you need the origin at a specific point you must use a mode that defines it.
Lonfor
Posts: 133
Joined: Wed Mar 23, 2022 2:32 am

Re: Sketch origin won't match part origin

Post by Lonfor »

bambuko wrote: Fri May 27, 2022 8:17 am I am confused...
about your Edge4
Me too, FC won't highlight the selection and I'm not sure which line I originally selected. :oops:
Bance wrote: Fri May 27, 2022 11:35 am As I said above, if plane by 3 points is chosen the origin is arbitrary, a function of the three chosen points. If you need the origin at a specific point you must use a mode that defines it.
Thank you so much, I could reproduce the origin at 0,0,0. Your example file made the difference. File attached. :)
At first when you mentioned a "function", it didn't make any sense to me, but after the "FCuser2019" post with the link to the pertinent math everything was clear.
FCuser2019 wrote: Fri May 27, 2022 9:42 am Hello, the behaviour described here is related to what I said in this post:
https://forum.freecadweb.org/viewtopic. ... ac#p370982

in fact, in this case being:

you have:
[x1, y1, z1]=[0, 0, 0] and [x2, y2, z2]=[1 ,0, 0] (on the X axis)
[x3, y3, z3]=[0, 23.8147, 2.97683] (Sketch.Vertex2)

Placement.Base point of the DatumPlane is:
[(0+1+0)/3 , (0+0+23.8147)/3 , (0+0+2.97683)/3]= [0.3333, 7.93823, 0.99228]
Thank you so much. It is eye opener. :o
Attachments
Screenshot_20220529_023829.png
Screenshot_20220529_023829.png (76.68 KiB) Viewed 559 times
metaldespl - edit.FCStd
(18.21 KiB) Downloaded 14 times
Post Reply