Problem : creating a vertical plane with rotation

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!
JiPe38
Posts: 123
Joined: Wed Jan 01, 2020 12:41 pm

Problem : creating a vertical plane with rotation

Postby JiPe38 » Wed Jan 22, 2020 11:08 am

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.19311 (Git)
Build type: Release
Branch: master
Hash: 120b69c74f7dac8c4fa6dbc0a7e10674bde9216c
Python version: 3.7.3
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)

Dear PartDesign developers
I have a problem in a design. I have a symetry on axis z on my design (a cylindre). I want to create a vertical plane on the cylindre axis and rotate it of 45°.
So I ask to create a plane and choose XZ object plane as attachment. I thought that I could later change the placement of this plane to ask a rotation of 45° on the z axis. Impossible... there is already a rotation in the placement, which is computed by FC to rotate the xy plane and send it in the position of the xz plane !
Would it be possible to change this in such a way that a plane created on xz plane appears in the placement adjusting dialog has having 0° rotation angle, in order to let the user adjust it by a rotation on any x, y or z axis ?
openBrain
Posts: 3910
Joined: Fri Nov 09, 2018 5:38 pm

Re: Problem : creating a vertical plane with rotation

Postby openBrain » Wed Jan 22, 2020 12:47 pm

First as I already told to you, this kind of discussion shall go the the Help subforum.
Then there is no need for change.
In PartDesign, the attachment locks the Placement, and the AttachmentOffset property is created so you can further move/rotate the object.

In any case, you click on AttachmentOffset value (or Placement value if you're out of PartDesign) then click an the 3-dot button that appears at the right of the cell. There you can choose 'Apply incremental changes'. ;)
JiPe38
Posts: 123
Joined: Wed Jan 01, 2020 12:41 pm

Re: Problem : creating a vertical plane with rotation

Postby JiPe38 » Wed Jan 22, 2020 2:57 pm

I try reproduce the conditions of this problem. Here is a simplified design.
testXZ.FCStd
(11.88 KiB) Downloaded 2 times
I create a datumPlane, selecting to attach on XZ plane.

Image

I get this : the plane is visible on the XY plane instead of XZ.

Image

I said "oops there must be a bug, I can't attach on XZ plane". Oddly, it's marked attached XZ in the left panel.

So I attempt to place my vertical plane using a trick. I select an edge on the rectangular pad of my design.

Image

I choose to attach the datum plane on the inertial 2-3 axes of this edge and I get the right position (XZ) of this plane.

Image

I thought that it was ok, and that I could then rotate this vertical plane to get it in the wished 45° position. But I can't change the positions of the plane because they have been fixed by FC with a 120° angle and an odd axis, to I can't modify this rotation if I don't want to compute an inversion and a product on 3x3 matrices on a spreadsheet, which could take me hours !

So, perhaps the problem comes from a misunderstanding of FC and PD interfaces. It seemed to me so straightforward to choose to create a datumPlane on the XZ object plane and then rotate it according to my needs. I suppose that a trained user could tell me that neither of the two attempts explained here should be used and that the right way of doing things is... Well, perhaps there is a bug somewhere. I don't know.
Attachments
planXZ4.jpg
planXZ4.jpg (77.44 KiB) Viewed 179 times
planXZ3.jpg
planXZ3.jpg (50.3 KiB) Viewed 179 times
planXZ2.jpg
planXZ2.jpg (68.37 KiB) Viewed 179 times
planXZ1.jpg
planXZ1.jpg (75.97 KiB) Viewed 179 times
Last edited by JiPe38 on Wed Jan 22, 2020 3:13 pm, edited 1 time in total.
JiPe38
Posts: 123
Joined: Wed Jan 01, 2020 12:41 pm

Re: Problem : creating a vertical plane with rotation

Postby JiPe38 » Wed Jan 22, 2020 3:12 pm

Edit : What a mess : images come in reverse order of their insertion in the text, all placed after.
openBrain
Posts: 3910
Joined: Fri Nov 09, 2018 5:38 pm

Re: Problem : creating a vertical plane with rotation

Postby openBrain » Wed Jan 22, 2020 3:25 pm

Actually you selected an Attachment Mode (Object's XY) but no reference object, so it can't work.
See below 2 ways to get a Datum Plane on XZ Plane. ;)
Nota : I saw a bug on the 2nd method if Origin items aren't made visible before launching the task. I'll open a specific ticket.
Attachments
DP1.gif
DP1.gif (262.54 KiB) Viewed 165 times
DP2.gif
DP2.gif (371.38 KiB) Viewed 165 times
JiPe38
Posts: 123
Joined: Wed Jan 01, 2020 12:41 pm

Re: Problem : creating a vertical plane with rotation

Postby JiPe38 » Wed Jan 22, 2020 6:17 pm

OK thanks. First method is simple and OK. Not documented in the wiki and my "too fast" method not signaled as an error in the python console :(
Second method : I will see later. Glad if I could help, unwillingly, to show a real bug.
openBrain
Posts: 3910
Joined: Fri Nov 09, 2018 5:38 pm

Re: Problem : creating a vertical plane with rotation

Postby openBrain » Wed Jan 22, 2020 6:34 pm

JiPe38 wrote:
Wed Jan 22, 2020 3:12 pm
Edit : What a mess : images come in reverse order of their insertion in the text, all placed after.
Once picture is downloaded, you can insert it in the text with 'inline' button. ;)
JiPe38 wrote:
Wed Jan 22, 2020 6:17 pm
Glad if I could help, unwillingly, to show a real bug.
No real bug here. You select no reference -> your datum plane is not attached. This is even told to user by the small purple icon you see in the Tree View (in your pictures, overlaid with the datum plane icon).
JiPe38
Posts: 123
Joined: Wed Jan 01, 2020 12:41 pm

Re: Problem : creating a vertical plane with rotation

Postby JiPe38 » Wed Jan 22, 2020 6:47 pm

openBrain wrote:
Wed Jan 22, 2020 6:34 pm
No real bug here. You select no reference -> your datum plane is not attached. This is even told to user by the small purple icon you see in the Tree View (in your pictures, overlaid with the datum plane icon).
The one for which you want to open a ticket.
JiPe38
Posts: 123
Joined: Wed Jan 01, 2020 12:41 pm

Re: Problem : creating a vertical plane with rotation

Postby JiPe38 » Wed Jan 22, 2020 6:57 pm

Just for information, if somebody follows this path. After creating the plane attached to XZ, to rotate it on the Z axis of the body, in the "placement" dialog box, axis Y must be set as the rotation axis. I suppose the rotation is defined relatively to the plane's axes instead of those of the body.

planXZ5.jpg
planXZ5.jpg (79.24 KiB) Viewed 122 times

So, to insert an image inside a text, better not to click the "insert image" button...
openBrain
Posts: 3910
Joined: Fri Nov 09, 2018 5:38 pm

Re: Problem : creating a vertical plane with rotation

Postby openBrain » Wed Jan 22, 2020 7:36 pm

JiPe38 wrote:
Wed Jan 22, 2020 6:47 pm
The one for which you want to open a ticket.
?????