Assembly3: Best way to express multiple configurations?

Discussion about the development of the Assembly workbench.
mcdanlj
Posts: 19
Joined: Sun Dec 01, 2019 12:10 am

Assembly3: Best way to express multiple configurations?

Postby mcdanlj » Sat Nov 14, 2020 11:23 pm

I'm new and expect I've done lots of stuff wrong. I'm using realthunder's branch for assembly3 and individual files in Git, which is great. I'm modeling a bit of flat-pack knock-down furniture to make on the CNC router.

I created the parts, then added links (for as many copies as I needed) to an assembly and constrained them to fit together in the final assembled form.

Now I'd like to make a second assembly that has them laid out to cut, and to make that layout parametric as well (e.g. to adjust to tool size/clearance with minimal waste.

If I were doing this in SolidWorks, I would create two configurations; an "assembled" configuration and a "flat" configuration, and use that to drive the two arrangements. (And, in fact, I did the first work on this project in SolidWorks, then re-implemented in FreeCAD, to compare the process between the two. Direct access to parameters in bodies made this easier in FreeCAD; in SolidWorks, I had to drive parameters down to parts by making top-level driving sketches that carried the parameters to the parts that were built from those sketches. So overall it was easier in FreeCAD.)

I don't know the best way to do this in FreeCAD.

Is there a way to group constraints so that I can apply one or the other of a set of different constraints in a single assembly, one to show it assembled and to toolpath for cutting? Or should I create a new assembly and create all new links for the cutting?

I'm quite inexperienced but trying to learn here. So many thanks for any help you can give me to learn good pratices! ☺

All the files are in this Git repository: https://gitlab.com/mcdanlj/applianceshelf

OS: Fedora 32 (Thirty Two) (GNOME/gnome-xorg)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 2020.10.22.22739 +2688 (Git) AppImage
Build type: Release
Branch: LinkStage3
Hash: d4401f23c304ec2de60e96f3fd77eccbe79b2139
Python version: 3.8.6
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)
User avatar
jpg87
Posts: 446
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: Assembly3: Best way to express multiple configurations?

Postby jpg87 » Tue Nov 17, 2020 10:30 am

Hi,
Sorry, I couldn't find your FreeCAD file to download to your GitLab.
I was thinking of using the step format instead but I can't seem to open the file.
My website : http://help-freecad-jpg87.fr updated 2020/12/05
mcdanlj
Posts: 19
Joined: Sun Dec 01, 2019 12:10 am

Re: Assembly3: Best way to express multiple configurations?

Postby mcdanlj » Tue Nov 17, 2020 1:37 pm

Sorry, I used the realthunder branch which writes individual files in a directory, which is great for version control but not for sharing with people not using his branch... ☺

Here's a link that should download the current model as an FCStd file:

https://gitlab.com/mcdanlj/applianceshe ... helf.FCStd

However, I don't know whether that opens up in in 0.19 with Assembly3 or requires the realthunder branch to work. I've been working lately pretty much exclusively in the realthunder branch lately.

(The STEP and x_b files are exports from SolidWorks as I was exploring the idea, before I then re-implemented it in FreeCAD. And no static model file would show anything meaningful about the design tree even if they were exports from FreeCAD.)
User avatar
dulouie
Posts: 95
Joined: Tue Oct 03, 2017 4:14 pm

Re: Assembly3: Best way to express multiple configurations?

Postby dulouie » Tue Nov 17, 2020 5:42 pm

You can try the new configuration tables from realthunders branch. This should allow you to put together two different assemblies in different configurations.
https://forum.freecadweb.org/viewtopic.php?f=17&t=42183
Or you just make a new assembly with different links?

Another question: How do you store in a directory for version control? I cannot find this function in realthunders branch.
mcdanlj
Posts: 19
Joined: Sun Dec 01, 2019 12:10 am

Re: Assembly3: Best way to express multiple configurations?

Postby mcdanlj » Wed Nov 18, 2020 2:15 pm

Oh, thank you. That's going to take a while to dig into. There's so much I don't know yet!

Making two assemblies might be more practical in this particular case, because the parts for toolpathing need to be oriented differently than in the as-assembled assembly. The only tedious part there is making 16 more linked copies of my tenon part; lots of mouse clicking. :D I have read https://wiki.freecadweb.org/Copying_Objects but exactly what happens when copying/pasting linked objects is not 100% clear to me. I think my mental model for what happens isn't quite right so I keep being surprised. Since I have this in version control, I can try things and start over if I break it though!

I don't know if there are other ways to save that way, but I know that if I create a directory first, and then choose the directory as the file to save to, it saves individual files in that directory instead of to a .FCStd file. It makes it so much easier to be able to use git status and git diff to remember what I changed since my last checkin and give meaningful commit messages! ☺
User avatar
jpg87
Posts: 446
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: Assembly3: Best way to express multiple configurations?

Postby jpg87 » Wed Nov 18, 2020 3:06 pm

mcdanlj wrote:
Wed Nov 18, 2020 2:15 pm
...
Hi,
I could not read your file in the Realthunder branch of 11/16/2020 (too many error messages were blocking everything).
I managed to open it with the version
https://github.com/FreeCAD/FreeCAD/rele ... -x86_64.7z
(also with error messages) but after deleting a number of "anonymous" items I was able to save it.

I then processed it in the Realthunder branch of 11/16/2020.
I first encapsulated each object in an asm3 container to be able to list and define the supports for future constraints.
Then sub-assemblies group together the elements of each shelf.
A first global assembly groups the sub-assemblies in their real position.
A second, unfinished, succinctly begins "a" organization for the division.

Voici le fichier :
ApplianceShelf_jpg87.FCStd
(649.72 KiB) Downloaded 13 times

There is a suitable tool in Arch WB for optimizing clipping (https://wiki.freecadweb.org/Arch_Nest) but I have never used it.
My website : http://help-freecad-jpg87.fr updated 2020/12/05
mcdanlj
Posts: 19
Joined: Sun Dec 01, 2019 12:10 am

Re: Assembly3: Best way to express multiple configurations?

Postby mcdanlj » Fri Nov 20, 2020 10:31 pm

Wow, thank you! I have no idea what I did to have left the model in a state that it could not read without errors.

Looking through this model is instructive! And it's perfect to model what I want to do because it clarifies that what I really want is to have one global assembly "as assembled" and one cutting assembly per sheet that I cut. I had thought of positioning them in a single assembly, but really being able to independently control visibility of each sheet's assembly will let me focus on toolpathing each sheet separately.
mcdanlj
Posts: 19
Joined: Sun Dec 01, 2019 12:10 am

Re: Assembly3: Best way to express multiple configurations?

Postby mcdanlj » Tue Dec 15, 2020 2:58 am

A recent daily realthunder release 12.08 "Added open/save as directory menu action for open/save document as uncompressed directory" so you no longer have to create a directory and pretend it's a file for this version-control friendly mechanism.

I have a couple cutting layouts coming together.

However, I am having trouble with one subassembly that is complaining about inconsistent constraints and I haven't figured out why. SubAsm3TopShelf complains about "inconsistent constraints" and none of them look inconsistent to me. I haven't touched that component since jpg87's kind rearrangement to show me how to nest assemblies. ☺ I don't know whether this is a bug in Assembly3 or in my head though.

Here's my latest, saved out as a FCStd file, with only the assembly manifesting this complaint visible:
ApplianceShelf.FCStd
(792.39 KiB) Downloaded 6 times
User avatar
jpg87
Posts: 446
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: Assembly3: Best way to express multiple configurations?

Postby jpg87 » Tue Dec 15, 2020 10:10 am

mcdanlj wrote:
Tue Dec 15, 2020 2:58 am
Here's my latest, saved out as a FCStd file, with only the assembly manifesting this complaint visible:
Hello, I'm sorry: I downloaded your file and like the last time, here is the result:
pb.png
pb.png (49.83 KiB) Viewed 289 times
I do not understand ! I used the 2020-12-13 version.
My website : http://help-freecad-jpg87.fr updated 2020/12/05
mcdanlj
Posts: 19
Joined: Sun Dec 01, 2019 12:10 am

Re: Assembly3: Best way to express multiple configurations?

Postby mcdanlj » Wed Dec 16, 2020 12:47 am

Wow. I even started from your document! I saved it with FreeCAD-asm3-Daily-Conda-Py3-Qt5-20201214-glibc2.12-x86_64.AppImage this most recent time. But when I read the FCStd document, I see the same thing you do. It looks like saving from a directory to a file has a bug. Seems likely to be a reproducible bug in the realthunder branch, since it happened twice. I should report that. https://github.com/realthunder/FreeCAD_ ... issues/382 It is probably triggered by something weird I did as a relatively new user poking around, or more people would have seen it, I expect.

(Update: The new daily I used had introduced a data corruption issue. The 12.17 daily fixed it.)

I saw that you used link groups and tried to reproduce that in one version of the file, but constraints didn't function for me. I switched to dropping multiple sub-assemblies into parts, and only later realized that the real problem was that the assembly you had created had to hold the top shelf pieces had grown constraint failures for no obvious reason. So that led me astray a bit in understanding what you had done.

Overall I think that the main purpose of this thread is accomplished: Just add lots of links and group them hierarchically into assemblies and sub-assemblies, and hide the top-level assemblies that I'm not using at any one time. I really appreciate the help!