Assemly 4, multiple of the same part extruded to different lengths?

Discussion about the development of the Assembly workbench.
dcgrigsby
Posts: 4
Joined: Sun Apr 05, 2020 1:58 am

Assemly 4, multiple of the same part extruded to different lengths?

Postby dcgrigsby » Wed Jun 03, 2020 2:34 am

I have a (simplified) sketch of an aluminum extrusion in the Parts group of an Assembly 4 assembly as shown here:
Annotation 2020-06-02 212521.png
Annotation 2020-06-02 212521.png (77.19 KiB) Viewed 313 times
I'd like to extrude this sketch in various lengths in another document and assemble them together into a frame. Alternately, I'd extrude it to different lengths in the original document and insert each as a part in the other document as an assembly.

I tried adding the sketch to the Assembly 4 Model in the first document, but can't extrude it when inserted into the second document, producing an error.

I also tried extruding it in the first document, then changing the extrusion length in the second document changes the length in the first. I can see the logic to this - it's not a copy, it's a link.

Is there a way to accomplish what I'm after?

(Sorry if this is posted in the wrong place. Adding it to the 50 some page thread on Assembly 4 didn't seem correct.)

With gratitude,

Dan


OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21329 (Git)
Build type: Release
Branch: master
Hash: 2330eef823b32ac412d839031cc174353a76b013
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)
adrianinsaval
Posts: 343
Joined: Thu Apr 05, 2018 5:15 pm

Re: Assemly 4, multiple of the same part extruded to different lengths?

Postby adrianinsaval » Wed Jun 03, 2020 2:52 pm

You can use a subshapebinder to link the sketch and extrude that in different parts or you can link the part many times and scale it in just one direction, see this thread for the problems with the second method: https://forum.freecadweb.org/viewtopic.php?f=20&t=45302
dcgrigsby
Posts: 4
Joined: Sun Apr 05, 2020 1:58 am

Re: Assemly 4, multiple of the same part extruded to different lengths?

Postby dcgrigsby » Wed Jun 03, 2020 4:43 pm

@adrianinsaval - Thank you *so much*. I didn't know you could right click a property, so I hadn't even considered scaling in one dimension. Just tried that and it works great. I'll read about subshapebinder next and pick one. I am truly grateful.
vocx
Posts: 4319
Joined: Thu Oct 18, 2018 9:18 pm

Re: Assemly 4, multiple of the same part extruded to different lengths?

Postby vocx » Wed Jun 03, 2020 8:52 pm

dcgrigsby wrote:
Wed Jun 03, 2020 2:34 am
...
I'd like to extrude this sketch in various lengths in another document and assemble them together into a frame. Alternately, I'd extrude it to different lengths in the original document and insert each as a part in the other document as an assembly.
...
Yes, this has been requested in the past. The concept is that of a "variant link". Taking the original object, but modifying certain parameters of it.

Code review of merged Link3 branch
variant App::Link

Eventually realthunder added this to his own branch. He submitted the pull request, but it is still not merged to the master code.

PR#2862: Configuration Table using Spreadsheet

Basically, you create a base object, and then change some properties of it, for example, the extrusion length, using a parameter.
Always add the important information to your posts if you need help.
To support the documentation effort, and code development, your donation is appreciated: paypal.
dcgrigsby
Posts: 4
Joined: Sun Apr 05, 2020 1:58 am

Re: Assemly 4, multiple of the same part extruded to different lengths?

Postby dcgrigsby » Wed Jun 03, 2020 9:19 pm

Thank you, as well, @vocx.

After exploring the options, it looks like the subshapebinder is going to work for me. I'd hoped the scale approach would work but, per the linked thread, the LCS not scaling with the visual representation made it a challenge - after reading the thread, I can't reasonably claim any kind of authority to argue one way for how it should behave, so I accept it as-is while the others work it out and I'll use the alternative.
User avatar
Zolko
Posts: 933
Joined: Mon Dec 17, 2018 10:02 am

Re: Assemly 4, multiple of the same part extruded to different lengths?

Postby Zolko » Wed Jun 03, 2020 10:04 pm

dcgrigsby wrote:
Wed Jun 03, 2020 2:34 am
I have a (simplified) sketch of an aluminum extrusion in the Parts group of an Assembly 4 assembly as shown here:
...
I'd like to extrude this sketch in various lengths in another document and assemble them together into a frame. Alternately, I'd extrude it to different lengths in the original document and insert each as a part in the other document as an assembly.
I tried a very brute-force method (not as elegant as the variant link, which would be the real solution) and it seems to work: in a document, create your sketch, and in the same document create as many bodies as you'll need parts. Then, Draft_Clone that sketch for each body, and move the clone into each respective body. Then, extrude each clone to the desired length. When you change the original sketch, all the sections of all the bodies follow. Would that solve your problem ?

(I don't know whether ShapeBinder or SubShapeBinder or Binder or WhatElseBinder do the same. Actually, I don't understand why there are so many similar cloning options, and what they all do)

CloneSketch.png
CloneSketch.png (283.44 KiB) Viewed 220 times

Now, if you use that in Asm4, and put all your bodies in the Parts group, and you use a master sketch to draw the frame, you might even be able to retrieve the length of each extrusion from the master sketch, then link the bodies into the assembly at their correct place, and build like that a parametric frame. If you have beams with identical length (4 legs for example) you'll need to extrude it only once, saving memory.
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — tutorials here and here
drmacro
Posts: 968
Joined: Sun Mar 02, 2014 4:35 pm

Re: Assemly 4, multiple of the same part extruded to different lengths?

Postby drmacro » Thu Jun 04, 2020 12:15 pm

Zolko wrote:
Wed Jun 03, 2020 10:04 pm
dcgrigsby wrote:
Wed Jun 03, 2020 2:34 am
(I don't know whether ShapeBinder or SubShapeBinder or Binder or WhatElseBinder do the same. Actually, I don't understand why there are so many similar cloning options, and what they all do)
I tried using a sub-shape binder and it did indeed work the same.


Except the part where padding the binder works in the opposite direction than padding the sketch... :?
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."

My beginners, written treatise: Learning FreeCAD