assembly without solver

Discussion about the development of the Assembly workbench.
Jee-Bee
Posts: 1957
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: assembly without solver

Postby Jee-Bee » Sat Jan 05, 2019 6:46 pm

Please a bit more easy guys!!!
FC don't have a $100.000 budget. FC don't have any employees too. Everybody does everything in spare time. So don't complain to much in the way of stupid etc(I hope that won't exact words, i didn't want to quote anybody ... you know what i mean).
If you don't understand what another means ask if he or she can explain. Specially when it up to work flows. FC hat ton's of them. Arch, draft or FEM require totally different work flow as Part or PartDesign.
Rome isn't build in a single day FC isn't build in a single day... Don't forget that all workbenches have to deal with other workbenches. that means Assembly too. This make the whole proces quite complicated.

Ps. Nice to some involvement in the asm3.
User avatar
Zolko
Posts: 393
Joined: Mon Dec 17, 2018 10:02 am

Re: assembly without solver

Postby Zolko » Sat Jan 05, 2019 11:07 pm

Jee-Bee wrote:
Sat Jan 05, 2019 6:46 pm
If you don't understand what another means ask if he or she can explain. Specially when it up to work flows. FC hat ton's of them.
You mean that someone who hasn't participated in a discussion for 10 pages comes here out of the blue and tells us what to say and not to say in a message full of trivial mistakes should roule our world ? I don't think that you have completely understood what Internet and forums are about. Plesase get lost.
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — simple tutorial here
chrisb
Posts: 18821
Joined: Tue Mar 17, 2015 9:14 am

Re: assembly without solver

Postby chrisb » Sun Jan 06, 2019 12:39 am

Zolko wrote:
Sat Jan 05, 2019 11:07 pm
You mean that someone who hasn't participated in a discussion for 10 pages comes here out of the blue and tells us what to say and not to say in a message full of trivial mistakes should roule our world ? I don't think that you have completely understood what Internet and forums are about. Plesase get lost.
You mean that someone who has participated in only four or five discussions here knows how the whole FreeCAD forum is about, so he can tell others to get lost :roll: ?
Jee-bee was just asking for something which others take as self-evident.
User avatar
fosselius
Posts: 344
Joined: Sat Apr 23, 2016 10:03 am

Re: assembly without solver

Postby fosselius » Sun Jan 06, 2019 6:38 pm

Zolko wrote:
Sat Jan 05, 2019 11:07 pm
I don't think that you have completely understood what Internet and forums are about. Plesase get lost.
I value your contribution to the discussions here. But,
I would like to highlight that you can edit forum posts. Once you get worked up and write something, it would be nice if you later edit it to keep a civil/mature language on the forum. I know that you know that this kind of comments will only trigger an equally productive, if not worse response..
User avatar
Kunda1
Posts: 5764
Joined: Thu Jan 05, 2017 9:03 pm

Re: assembly without solver

Postby Kunda1 » Sun Jan 06, 2019 9:08 pm

fosselius wrote:
Sun Jan 06, 2019 6:38 pm
I value your contribution to the discussions here. But,
I would like to highlight that you can edit forum posts. Once you get worked up and write something, it would be nice if you later edit it to keep a civil/mature language on the forum. I know that you know that this kind of comments will only trigger an equally productive, if not worse response..
:point_up:
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
Zolko
Posts: 393
Joined: Mon Dec 17, 2018 10:02 am

Re: assembly without solver

Postby Zolko » Tue Jan 08, 2019 11:13 pm

Big update: I kinda succeeded in making a full assembly without solver, only using standard App::Part things, with the App::Link stuff.

asm_Bitoniau.png
asm_Bitoniau.png (248.86 KiB) Viewed 383 times

  • I first took my previous part, but this time wrapped up in an App::Part (it was only a Body before). Called it Bitoniau
  • Then, in a new file, I created a Part, inside the Part a Body, and inside the Body an LCS (you can notice that there is an icon in the screenshots for this now ! If you don't have it you need to do it by hand). I made a sketch, and fixed 2 LCS on 2 points from the sketch. I inserted 2 Links to the previous part. Called this one asm_level1.
  • And again: new file → Part → Body → LCS, Sketch → LCS. Linked 2 times the previous asm_level1 and once the part Bitoniau (up-side down, for the fun). Called this one asm_level2
  • And again: new file → Part → Body → Sketch → LCS. Linked 3 times asm_level2 and once asm_level1. And made a sketch and an extrusion, just to show that it's possible. Called it asm_level3

To place the parts in the assembly, I used realthunders magic:
realthunder wrote:
Sat Jan 05, 2019 10:32 am
No, attach engine does not support App::Part and App::Link directly. What you did is exactly the missing piece. If you'd like to explore more about my branch, you can try the enhanced expression engine. Select Part_1 in the assembly, right click in the property view, and select "Show all". Then, right click in Placement field, and select "Expression...". Finally, enter the following expression,

Code: Select all

LCS_1.Placement.multiply(.<<LCS_1.>>.Placement.inverse())
except that <<LCS_1.>> needs to be replaced by <<Body.LCS.>> because we have wrapped the Body in a Part, remember ? And of course, you have to choose the correct LCS names. The placement of the LCS to the desired position and orientation is sometimes a bit tricky though, but you can get it right after some attempts.

So what we have here is a way to assemble many layers of App::Part into assemblies and sub-assemblies, with full control over the placements of the parts, fully parametric and dynamic, every-things does what you think it should do. And no special workbench or container, only standard FreeCAD + LinkStage3 things. The sizes of the assembly files are ridiculously small, therefore I don't know what's the maximum size of an assembly we could achieve with this (unfortunately I don't have the time to try to assemble an entire Airbus). You can test the assembly with the FreeCAD-Assembly3.AppImage, see attached files.
Attachments
Bitoniau.FCStd
(33 KiB) Downloaded 13 times
asm_level1.FCStd
(11.11 KiB) Downloaded 10 times
asm_level2.FCStd
(11.63 KiB) Downloaded 11 times
asm_level3.FCStd
(25.95 KiB) Downloaded 10 times
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — simple tutorial here
User avatar
Zolko
Posts: 393
Joined: Mon Dec 17, 2018 10:02 am

Re: assembly without solver

Postby Zolko » Wed Jan 09, 2019 12:28 am

So what are the next steps ?

LCS in App::Part:
  • it's not possible to insert LCS (any Datum) into an App::Part, you need App::PartDesign, therefore a Body.
  • it's not possible to insert a link into a body, although it's possible to link a Body
  • THEREFORE: the Datum objects should be moved from App::PartDesign to App::Part, it would make things much easier and natural.

App::Link to App::Part:
  • when you insert a Link to a Part, and want to select the corresponding Part, you get a selection dialog showing all possible objects, not only the Part
  • it's very easy, could say tempting, to link to the wrong object
  • THEREFORE: when selecting the object to be linked, it would be nice if the dialog would only show Parts by default. You could have a check-box "show all" if you want to link other stuff, but I think that App::Parts are the objects that should be used for linking, therefore only they should be shown by default. This check-box exists but does nothing.
link_Bitoniau.png
link_Bitoniau.png (349.08 KiB) Viewed 363 times

Selection of LCS:
  • realthunder's magic should be selectable by a GUI
  • when inserting a linked Part, after having chosen it, it would be nice if a GUI allowed to:
    • select the attachment LCS in the Part
    • select the target LCS in the Assembly
    • allow to set an additional Placement of the attachment LCS w.r.t. the target LCS
  • this I think is the biggest challenge

Workflow:
  • when you create a Link in a Part, the link is actually placed outside the Part, even if it's active.
  • you have to drag'n-drop it into the Part, but it's only possible after it has been linked
  • THEREFORE: ideally, I'd like to be able to right-click on the Part-name in the tree, and have a command "insert Part" that would create the App::Link inside the Part, and raise the Part selection dialog, showing only the Parts.

With this, there would be no difference between Part and Assembly, exactly like in NX, which I think is the best today (apart may-be T-Flex, but they're very similar). The workflow for inserting a Part in another Part would be:

  • create a Part
  • create Planes, lines, sketches, LCS... without need for a Body
    • Body only used if there is actually a Solid
    • or solid could be created in the Part directly ? unimportant for now
  • right-click on the Part-name in the tree where you want to insert a Part
  • in the pop-up menu there is a "insert Part" button (no mention of Link, apart from 6 people here nobody would understand what a Link means)
  • it creates an App::Link in the Part container ...
  • ... and opens a dialog allowing to select a Part in one of the files that are open (i.e. lists only Parts)
  • some dialog (that same one ?) allows to choose the attachment LCS in the Part...
  • ... and the target LCS in the Assembly (which is also a Part, remember) ...
  • ... and allows to set an additional, optional, App::Placement, with rotation(s) and translation(s) along some of the target LCS axis
  • done
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — simple tutorial here
User avatar
Zolko
Posts: 393
Joined: Mon Dec 17, 2018 10:02 am

Re: assembly without solver

Postby Zolko » Wed Jan 09, 2019 9:55 am

realthunder wrote:
Sat Jan 05, 2019 10:32 am
you can try the enhanced expression engine. Select Part_1 in the assembly, right click in the property view, and select "Show all". Then, right click in Placement field, and select "Expression...". Finally, enter the following expression,

Code: Select all

LCS_1.Placement.multiply(.<<LCS_1.>>.Placement.inverse())

The first "LCS_1" refers to the LCS_1 object in the assembly document. The second LCS_1 in that special syntax is refer the sub object of this current object (i.e. Part_1). Now you can move LCS_1 in the assembly, and the part will automatically follow it. You can find more details here.
OK, so this works perfectly when you attach a Part to an LCS in the Assembly (which is technically also a Part). But what if one wants to attach the Part to an LCS from another Part already in the Assembly ? For example:

realthunder wrote:
Fri Jan 04, 2019 1:26 am
But what if there are more constraints? What if two parts has an angle requirement between each other? How do you imagine to code the attach engine?
I tried to toy around with the LCS_1.Placement.multiply(.<<LCS_1.>>.Placement.inverse()) , read some documentation, but to no success. Would it be possible to use the ExpressionEngine to use as target LCS not an LCS defined in the Assembly Part, but in a sub-Part included in the Assembly ? Imagine the following tree:

Code: Select all

Assembly (App::Part)
  │
  ├─ Body
  │    ├─ aLCS_1
  │    ├─ aLCS_2
  │    ┊
  │
  ├─ Part_1 (App::Part)
  │    │
  │    ├─ Body
  │    │    ├─ pLCS_1 → aLCS_1 @Assembly
  │    │    ├─ pLCS_2
  │    ┊    ┊
  │
  ├─ Part_2 (App::Part)
  │    │
  │    ├─ Body
  │    │    ├─ pLCS_1 → pLCS_2 @Part_1
  │    ┊    ┊

Imagine you want to attach Part_2 by it's pLCS_1 not to an LCS in the Assembly (aLCS_2) but to an LCS in Part_1 (pLCS_2) ? Would it be possible to use the (enhanced) ExpressionEngine ? What would the syntax be ?
Last edited by Zolko on Wed Jan 09, 2019 12:26 pm, edited 1 time in total.
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — simple tutorial here
realthunder
Posts: 1192
Joined: Tue Jan 03, 2017 10:55 am

Re: assembly without solver

Postby realthunder » Wed Jan 09, 2019 10:17 am

Zolko wrote:
Wed Jan 09, 2019 9:55 am
Imagine you want to attach Part_2 by it's pLCS_1 not to an LCS in the Assembly (aLCS_2) but to an LCS in Part_1 (pLCS_2) ? Would it be possible to use the (enhanced) ExpressionEngine ? What would the syntax be ?
You are reading the wrong document. These syntaxes are only available in my branch, which is documented here.

Code: Select all

Part_1.<<Body.pLCS_2.>>._pla.multiply(.<<Body.pLCS_1.>>._pla.inverse())
Try Assembly3 (latest version 0.10.2) along with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
User avatar
Zolko
Posts: 393
Joined: Mon Dec 17, 2018 10:02 am

Re: assembly without solver

Postby Zolko » Wed Jan 09, 2019 11:49 am

realthunder wrote:
Wed Jan 09, 2019 10:17 am
You are reading the wrong document. These syntaxes are only available in my branch, which is documented here.

Code: Select all

Part_1.<<Body.pLCS_2.>>._pla.multiply(.<<Body.pLCS_1.>>._pla.inverse())
Close. Actually, one must also add the Placement of the Part_1 itself in the Assembly. So what worked was:

Code: Select all

Part_1.Placement.multiply(  Part_1.<<Body.pLCS_2.>>.Placement.multiply( .<<Body.pLCS_1.>>.Placement.inverse() ) )

I could then add a Bitoniau into asm_level1, attached to a Bitoniau already there. Of course, after that, I wanted to see if it's possible to traverse more than 1 level of Assembly ! So in asm_level3 I tried to attach a Bitoniau to a Bitoniau already in asm_level1 ... but I couldn't get the syntax right. I'm sure it's possible. (BTW: what's the difference between .Placement and ._pla ? Both seemed to do the same)

This means that we can build large complex nested assemblies out of App::Parts with App::Links, and all these Parts attached by LCS to other LCS anywhere in the assembly, without any need for new containers and workbenches ... if "we" manage to:

Zolko wrote:
Wed Jan 09, 2019 12:28 am
So what are the next steps ?

Selection of LCS:
  • realthunder's magic should be selectable by a GUI
  • when inserting a linked Part, after having chosen it, it would be nice if a GUI allowed to:
    • select the attachment LCS in the Part
    • select the target LCS in the Assembly
    • allow to set an additional Placement of the attachment LCS w.r.t. the target LCS
  • this I think is the biggest challenge
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — simple tutorial here