Expression syntax to link a part with one rotation axis modified?

Discussion about the development of the Assembly workbench.
Post Reply
Fruityth1ng
Posts: 6
Joined: Fri Sep 08, 2023 9:50 am
Contact:

Expression syntax to link a part with one rotation axis modified?

Post by Fruityth1ng »

I'm trying to make two pads connect by simple friction (Split both your hands at ring and middle finger, fit them together, that way ;).

I'm struggling a lot with getting one angle to express itself on my other object.

If I could "take out" one angle (say, the pitch) out of this code, I'd get the attachment placed and rotated the way I need it:

Code: Select all

Ass_h_Left.Placement * LCS_Top_Bracket.Placement * AttachmentOffset * LCS_Mid.Placement ^ -1
Screenshot 2023-09-16 at 16.42.02.png
Screenshot 2023-09-16 at 16.42.02.png (86.43 KiB) Viewed 386 times
Would anyone know how to modify this expression?

Here they are: I'm trying to cut out the blue thing halfway and the pink thing, too.
Screenshot 2023-09-16 at 16.44.35.png
Screenshot 2023-09-16 at 16.44.35.png (219.92 KiB) Viewed 386 times
Many thanks!
User avatar
onekk
Veteran
Posts: 5603
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Expression syntax to link a part with one rotation axis modified?

Post by onekk »

Fruityth1ng wrote: Sat Sep 16, 2023 2:51 pm ...
Hello.

See Maybe:

http://forum.freecadweb.org/viewtopic.php?f=3&t=2264

It is not clear what assembly Wb you are trying to use (and what version it is) and what version of FreeCAD you are targeting.

So it is difficult to give an appropriate answer, (LCS should lead to think you are using ASM4, but...)

Regards

Carlo D.
Last edited by onekk on Wed Sep 20, 2023 6:28 am, edited 1 time in total.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Fruityth1ng
Posts: 6
Joined: Fri Sep 08, 2023 9:50 am
Contact:

Re: Expression syntax to link a part with one rotation axis modified?

Post by Fruityth1ng »

Ah, my apologies, I'm using the latest version of freecad, and the Assembly 4 workbench, it sounded like it was the latest one so I went with that.

Does the expression syntax change per workbench?

The code I pasted/posted is what the ASM4 workbench auto generates, and I noticed it could be modified. I'm wondering if it's possible to knock one euler angle out ;) - and I thought perhaps here someone would know.

Thank you 🙏
forte
Posts: 17
Joined: Sat Jul 08, 2023 8:49 am

Re: Expression syntax to link a part with one rotation axis modified?

Post by forte »

Maybe so ?

https://youtu.be/a-rPb7UTmUk
phpBB [video]
Fruityth1ng
Posts: 6
Joined: Fri Sep 08, 2023 9:50 am
Contact:

Re: Expression syntax to link a part with one rotation axis modified?

Post by Fruityth1ng »

Thank you!
I'll see if I can reach the value of this measure with an expression, much obliged! :)
User avatar
onekk
Veteran
Posts: 5603
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Expression syntax to link a part with one rotation axis modified?

Post by onekk »

Fruityth1ng wrote: Mon Sep 18, 2023 11:42 pm Ah, my apologies, I'm using the latest version of freecad, and the Assembly 4 workbench, it sounded like it was the latest one so I went with that.
...
Latest is telling nothing, the link I've posted describe the correct procedure to post a useful FreeCAD info.

It is hard to detect a problem (if there is any) without these info.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Post Reply