Sketch from surface, incorrect position

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
ChrisFC
Posts: 27
Joined: Mon Jul 26, 2021 8:30 am

Sketch from surface, incorrect position

Post by ChrisFC »

Hi all, 2 questions:

1. - bit of a head scratcher this one

I have a surface, and am creating a sketch from said surface, using Draft2Sketch. For some reason after selecting the surface and clicking this, a sketch is made, but in a slightly incorrect location as shown below
Screenshot from 2021-12-09 10-25-31.png
Screenshot from 2021-12-09 10-25-31.png (7.4 KiB) Viewed 1096 times
As you can see the outline of this surface created by the sketch has been moved. I have no idea why this is happening. Any thoughts on why this would be happening?

2. - Separate question. Let's say I have some vertex A somewhere in space, and a point B in a sketch, constrained to be on some line L. I would like to be able to automatically change the position of B along L such that when A changes, based on some rule, B changes. In this case, I would like it to be the case that the rule is that the R value of B follows the R value of A, where R is defined as sqrt(x*x + y*y). Is it possible to make a 'rule' of sorts that determines the position of B in the sketch based on some external geometry (in this case point A)?

Cheers,
Chris
drmacro
Veteran
Posts: 9010
Joined: Sun Mar 02, 2014 4:35 pm

Re: Sketch from surface, incorrect position

Post by drmacro »

A guess on #1 is that the draft2sketch projects the surface to the xy plane. so if the surface is skewed off the plane it appears as you describe.

For #2, the constraints can be calculated with expressions:
https://wiki.freecadweb.org/Expressions
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
ChrisFC
Posts: 27
Joined: Mon Jul 26, 2021 8:30 am

Re: Sketch from surface, incorrect position

Post by ChrisFC »

drmacro wrote: Thu Dec 09, 2021 11:05 am A guess on #1 is that the draft2sketch projects the surface to the xy plane. so if the surface is skewed off the plane it appears as you describe.

For #2, the constraints can be calculated with expressions:
https://wiki.freecadweb.org/Expressions
Hi drmacro and thanks for the response! Is there anyway to make the sketch in the plane of the surface that was used to produce said sketch?

Cheers,
Chris
domad
Veteran
Posts: 2096
Joined: Mon Jun 22, 2020 12:16 pm

Re: Sketch from surface, incorrect position

Post by domad »

ChrisFC wrote: Thu Dec 09, 2021 12:21 pm ...
Hi ChrisFC, hello to the Community!
Does the second request fall within the one concerning the toroid (https://forum.freecadweb.org/viewtopic.php?f=3&t=64312)?
ChrisFC
Posts: 27
Joined: Mon Jul 26, 2021 8:30 am

Re: Sketch from surface, incorrect position

Post by ChrisFC »

domad wrote: Thu Dec 09, 2021 1:01 pm
ChrisFC wrote: Thu Dec 09, 2021 12:21 pm ...
Hi ChrisFC, hello to the Community!
Does the second request fall within the one concerning the toroid (https://forum.freecadweb.org/viewtopic.php?f=3&t=64312)?
Hi domad! Yes it does. Thanks once again!

I realised after sleeping on the problem that I hadn't quite gotten things 100% correctly pictured in my mind (what was produced by you guys was 100% accurate to what I was describing!, I just realised later that I'd slightly missed something). Essentially I realised that points A and B are not exactly what they need to be. If one looks at the end face that is provided, it is essentially a surface of some thickness and 2 horizontally running, parallel edges (kind of like a rail). I realised that when one makes the central cross section thickness larger, one moves point B around, and that this results in point B moving inward/outward in R (where R is sqrt(xx+yy)). This is fine, however, I realised that if B moves to a new R value, A and C need to also move such that whilst remaining on the rail, they follow the same R value as B. The truth is that the 'end face' I provided is actually not the true end face of the component, rather, it's a helpful section of the actual end face of the component that helps me to orient the guiding rail correctly in space. I didn't realise at the time that using the end point of said rail is actually incorrect, as mentioned, due to said end point not following the same R value of B.

What I have been doing today is to make a ruled plane between the 'guiding rail' (done) and extending it outward (done). However, I've been struggling to convert it into a sketch, such that I can define a new point A' somewhere on said guiding rail (as opposed to A just being the end point of the rail). I've also had thoughts of skipping this step of making the end face into a sketch, and just making a draft(?) point, and somehow (without the need to make a sketch), fix the point to always lie on the rail, whilst following a rule on its value of R (hence setting its x and y and hence position along said edge).

This new point (let's call it A' and C') would then be the ones that I make the arc through (which by the way has been working absolutely as intended, thank you!).
Hope that was clear

Edit: Another way to look at this is to say that there is some cylinder centred on the Z axis with B on said cylinder, that intersects the guiding rail, at which point the new point A' would be defined.

Cheers,
Chris
chrisb
Veteran
Posts: 54311
Joined: Tue Mar 17, 2015 9:14 am

Re: Sketch from surface, incorrect position

Post by chrisb »

ChrisFC wrote: Thu Dec 09, 2021 12:21 pm Is there anyway to make the sketch in the plane of the surface that was used to produce said sketch?
You can attach the sketch to the wire, e.g. with mode "Plane by 3 points". But that is only the same plane, not necessarily the same position.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
ChrisFC
Posts: 27
Joined: Mon Jul 26, 2021 8:30 am

Re: Sketch from surface, incorrect position

Post by ChrisFC »

chrisb wrote: Thu Dec 09, 2021 5:42 pm
ChrisFC wrote: Thu Dec 09, 2021 12:21 pm Is there anyway to make the sketch in the plane of the surface that was used to produce said sketch?
You can attach the sketch to the wire, e.g. with mode "Plane by 3 points". But that is only the same plane, not necessarily the same position.
Yeah I tried this however the sketch changed position quite substantially :lol: If I make a draft point, is there a way to constrain it to be on an edge or a wire (in such a way that it could be moved along it but not off ot it?)
chrisb
Veteran
Posts: 54311
Joined: Tue Mar 17, 2015 9:14 am

Re: Sketch from surface, incorrect position

Post by chrisb »

Is there a certain reason why you insist on using Draft tools? Have a look at the Basic Attachment Tutorial for possibilities how to arrange things relative to each other.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
ChrisFC
Posts: 27
Joined: Mon Jul 26, 2021 8:30 am

Re: Sketch from surface, incorrect position

Post by ChrisFC »

chrisb wrote: Thu Dec 09, 2021 9:32 pm Is there a certain reason why you insist on using Draft tools? Have a look at the Basic Attachment Tutorial for possibilities how to arrange things relative to each other.
I think because I don't really understand FreeCAD too well. In my mind, a Draft object is like placing an object somewhere in space, and a sketch is when you define it on a 2D plane. Because I already have the unshaped prototype model I find it easy to just cut away at edges as I need to, and work with things in a 3D way, rather than by having to reproduce things in sketches that I already have.
Post Reply