How to rotate a sketch, using its side as axis?

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!
User avatar
ifohancroft
Posts: 45
Joined: Fri May 31, 2019 11:25 pm
Location: Sofia, Bulgaria
Contact:

How to rotate a sketch, using its side as axis?

Post by ifohancroft » Thu Jan 16, 2020 3:04 pm

Hi,

I have a FreeCAD document, that has two sketches, each of them looking like this:
one.png
one.png (9 KiB) Viewed 249 times
Together, from the top, they look like this:
two.png
two.png (9.08 KiB) Viewed 249 times
From the right side, they look like this:
three.png
three.png (8.2 KiB) Viewed 249 times
I want to rotate the second sketch so from the side, they will look like this:
four.png
four.png (8.63 KiB) Viewed 249 times
However, instead, when I rotate the second sketch on the X axis by 5 degrees, I get this:
five.png
five.png (8.85 KiB) Viewed 249 times
I presume this happens because the second sketch gets rotated around the middle as opposed to by the side.

How do I rotate it to achieve the result I want?

I will upload the FreeCAD file as an attachment in the next comment.
Last edited by ifohancroft on Thu Jan 16, 2020 3:23 pm, edited 1 time in total.
I like to make, break & modify stuff via a soldering iron, code or both. https://www.ifohancroft.com
User avatar
ifohancroft
Posts: 45
Joined: Fri May 31, 2019 11:25 pm
Location: Sofia, Bulgaria
Contact:

Re: How to rotate a sketch, using its side as axis?

Post by ifohancroft » Thu Jan 16, 2020 3:05 pm

Here is the FreeCAD file:
Curve-Test.FCStd
(15.08 KiB) Downloaded 8 times
I like to make, break & modify stuff via a soldering iron, code or both. https://www.ifohancroft.com
User avatar
bejant
Posts: 6061
Joined: Thu Jul 11, 2013 3:06 pm

Re: How to rotate a sketch, using its side as axis?

Post by bejant » Thu Jan 16, 2020 3:26 pm

In the Placement widget (not the Placement Properties in the Data tab) first tick "Apply Incremental Changes" to True, then change the Center, and finally do the Rotation.

Image


https://www.freecadweb.org/wiki/Tasks_Placement
User avatar
papyblaise
Posts: 1351
Joined: Thu Jun 13, 2019 4:28 pm
Location: France

Re: How to rotate a sketch, using its side as axis?

Post by papyblaise » Thu Jan 16, 2020 3:28 pm

hi it's that you went :?: : you have to type the position of the hinge
Attachments
hinge.PNG
hinge.PNG (29.64 KiB) Viewed 232 times
User avatar
ifohancroft
Posts: 45
Joined: Fri May 31, 2019 11:25 pm
Location: Sofia, Bulgaria
Contact:

Re: How to rotate a sketch, using its side as axis?

Post by ifohancroft » Thu Jan 16, 2020 5:40 pm

@papyblaise Thank you! That worked. Not sure why I couldn't get it to work earlier. Btw the right position is 9.525, not 9.75.

@bejant Thank you! Maybe I'm an idiot but I cannot get your method to do anything. I may have a problem understanding how the placement dialog works or something:

1. After I check Apply Incremental Changes, do I hit Apply or Ok?
2. After I have enabled Apply Incremental Changes (without hitting Apply or OK) I change the Y of the center to -9.525.
3. Then I change the rotation angle but nothing seems to move?! I thought maybe there is no live preview and I need to hit OK, however even after I do, there is still nothing changed?! I thought maybe I then need to rotate via the Attachment Angle in the Data Tab but it rotates as if I haven't do anything in the Placement Widget.

What am I failing to understand or do?
I like to make, break & modify stuff via a soldering iron, code or both. https://www.ifohancroft.com
User avatar
GlouGlou
Posts: 2009
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: How to rotate a sketch, using its side as axis?

Post by GlouGlou » Thu Jan 16, 2020 6:48 pm

A easy way is to use a datumplane.
choose an edge and make a datumline, make a datumplane with it.
rotate it on the right axle as needed.
Then map a sketch on the datumplane and draw the next sketch.
Attachments
Curve-Test2.FCStd
(22 KiB) Downloaded 3 times
Capture.JPG
Capture.JPG (77.35 KiB) Viewed 188 times
User avatar
papyblaise
Posts: 1351
Joined: Thu Jun 13, 2019 4:28 pm
Location: France

Re: How to rotate a sketch, using its side as axis?

Post by papyblaise » Thu Jan 16, 2020 8:45 pm

A easy way is to use a datumplane.
yes but the question is not to draw a sketch as an angle , but I have two sketch on the same plan : how to rotate one around a line of the second
User avatar
GlouGlou
Posts: 2009
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: How to rotate a sketch, using its side as axis?

Post by GlouGlou » Thu Jan 16, 2020 9:09 pm

La fin justifie les moyens. :D
User avatar
ifohancroft
Posts: 45
Joined: Fri May 31, 2019 11:25 pm
Location: Sofia, Bulgaria
Contact:

Re: How to rotate a sketch, using its side as axis?

Post by ifohancroft » Thu Jan 16, 2020 9:30 pm

@GlouGlou Thank you! That's a good idea too. I keep forgetting about datum planes.

@papyblaise What GlouGlou said also works for me. I should have probably posted what I want to do that I need this step for.

I have found an easier way that works for me. Sketching the side profile, then padding towards the back and then creating the holes.

Now I need to figure out an easy way to also create such "strips" to the sides, with also 5 degree angle between the "strips". I have figured out how to do it but after I finish it, I need to check if there is a better way.
I like to make, break & modify stuff via a soldering iron, code or both. https://www.ifohancroft.com
User avatar
bejant
Posts: 6061
Joined: Thu Jul 11, 2013 3:06 pm

Re: How to rotate a sketch, using its side as axis?

Post by bejant » Thu Jan 16, 2020 11:04 pm

ifohancroft wrote:
Thu Jan 16, 2020 5:40 pm
1. After I check Apply Incremental Changes, do I hit Apply or Ok?
No, just tick the Apply Incremental Changes..." tick box to True (do this first).

ifohancroft wrote:
Thu Jan 16, 2020 5:40 pm
2. After I have enabled Apply Incremental Changes (without hitting Apply or OK) I change the Y of the center to -9.525.
I think you want to make Y = 9.525 (no negative sign).

ifohancroft wrote:
Thu Jan 16, 2020 5:40 pm
3. Then I change the rotation angle but nothing seems to move?! I thought maybe there is no live preview and I need to hit OK,
You should be changing the Attachment Offset using the Placement widget, don;t think I was clear before. In the Placement widget, above the "Apply Incremental Changes..." tickbox, change the Axis to Y and then change the Angle field to whatever angle you need. There is a live preview so you should see the Sketch rotate as you change the Y angle value.

I trued to use your file but got a message: "Cannot compute Inventor representation for the shape of ((the file name)" so I just tried using my own new file.

OS: Ubuntu 18.04.3 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.19. (dated 2020-01-05)
Build type: Release
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests