AttachmentOffset question, why not 3 rotation angles?

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: AttachmentOffet question, why not 3 rotation angles?

Post by adrianinsaval »

freedman wrote: Sun Dec 04, 2022 5:28 am I needed to replicate the AttachmentOffset concept so I made a rotation like this (pic). If there is ever a redesign of the properties panel something like this would make more since IMO. I would imagine the properties panel was designed this way as a proof of rotation during develoment so maybe if we had a switch to make the panels a bit more friendly.
Thanks
no I think the property panel is supposed to show the object properties as they are, the placement property stores the rotation like this. For a gui with euler angles are available the placement and attachment dialogs.
freedman
Veteran
Posts: 3441
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: AttachmentOffet question, why not 3 rotation angles?

Post by freedman »

For a gui with euler angles are available the placement and attachment dialogs.
Maybe you guys see something I don't see, those tools are fine if you have a standard plane (only) design. Once things are placed in Part containers and rotated about, well I just don't see any way to make them useful. For instance: the raw Euler numbers rotate around what, use center of mass and the object flies off, apply incremental changes rotates around what, click Reset and the object flies off.

When designing I need to be able to reference an object and rotate 17.348 degrees from a know plane without too much effort. And then next week come back and make another rotation change and know where I am and where I was. I don't see much of that in those tools.

This is why I started a PD Assembler. I guess time will tell what I can do.
Thanks
drmacro
Veteran
Posts: 8867
Joined: Sun Mar 02, 2014 4:35 pm

Re: AttachmentOffet question, why not 3 rotation angles?

Post by drmacro »

freedman wrote: Sun Dec 04, 2022 10:25 pm Here are the controls from my PDA (PartDesign Assy). The pin has been attached to the top of the hex by assembly (sketch highlighted) so there is no need for X or Y controls, but the Z and Rotation are useful. I really like the scroll capabilities of the input fields using the double spin box, you hover and use the scroll wheel to see changes in real time. By using the Select as Body option I can click on any object and get the body selection. I think it's too easy to modify the assembly, I will need to add a lock of some kind. :)

I use a copy of the targeted sketch AttachmentOffset to make all the changes, then apply this to the Body Placement. I store the entered data in added properties.
With some mods this could be a second generation Transform tool.
You pretty much duplicated the Placement dialog yaw, pitch, and Roll. Nice!
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: AttachmentOffet question, why not 3 rotation angles?

Post by adrianinsaval »

freedman wrote: Mon Dec 05, 2022 4:30 am For instance: the raw Euler numbers rotate around what, use center of mass and the object flies off, apply incremental changes rotates around what, click Reset and the object flies off.
It rotates around the object's internal "origin" by default, around what does your macro rotate?
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: AttachmentOffet question, why not 3 rotation angles?

Post by chrisb »

freedman wrote: Mon Dec 05, 2022 4:30 am Maybe you guys see something I don't see,
Perhaps. In my models I use proper attachments and don't have such problems. In the Placement dialog you can set the center for a rotation.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
freedman
Veteran
Posts: 3441
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: AttachmentOffet question, why not 3 rotation angles?

Post by freedman »

what does your macro rotate around?
This is something (new to many) the user needs to think about as they sketch, often a new sketch is created and folks sketch where ever they want. My macro uses the sketch origin as a target point so we need to think about placing the origin of a sketch. The sketch origin can be moved by using the AttachmentOffset.
So if we want a hole in a block, create a sketch and move the sketch origin to the hole center, then draw the hole. It's easy to do, we just haven't had to do this so it is a bit different. Moving the origin allows for easy sketching with symmetry and symmetrical constraints and a rotation point.
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: AttachmentOffet question, why not 3 rotation angles?

Post by chrisb »

freedman wrote: Mon Dec 05, 2022 5:26 pm This is something (new to many) the user needs to think about as they sketch, often a new sketch is created and folks sketch where ever they want. My macro uses the sketch origin as a target point so we need to think about placing the origin of a sketch. The sketch origin can be moved by using the AttachmentOffset.
Do I undertsand this right: You just move the sketch, but you don't attach it?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
freedman
Veteran
Posts: 3441
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: AttachmentOffset question, why not 3 rotation angles?

Post by freedman »

Do I undertsand this right: You just move the sketch, but you don't attach it?
The sketch is attached, yes. It needs to be attached for AttachmentOffset to work, pretty sure....

I try not to be too specific about how the sketch got where it is because of the different approaches to combat TNP.
I would normally say select a face and create a sketch on it, then use AttachmentOffset to position the origin.

As an example: Pic left is a tapered pad with a new sketch created on the end sloped face. Notice the sketch origin, it is by default created by FreeCAD so the sketch origin "Z" travels thru the Body origin and then placed on the face selected.
This is where attachment offset "Y" is used to move the origin down to the place we want a hole (pic right). This sketch origin point is where my macro will bind the body that is selected i.e. some selected body will bind to the sketch origin. The macro will keep the the two objects connected.

I have a macro tool that allows you to create a point anywhere on a sketch, then click on it and the origin will move to the point. This can make quick work of changes.
Attachments
slope_moved.png
slope_moved.png (162.39 KiB) Viewed 404 times
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: AttachmentOffset question, why not 3 rotation angles?

Post by chrisb »

Thanks for the clarification!
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply