Assembly3 preview

Discussion about the development of the Assembly workbench.
vocx
Posts: 2718
Joined: Thu Oct 18, 2018 9:18 pm

Re: Assembly3 preview

Post by vocx » Fri Jan 17, 2020 2:14 am

realthunder wrote:
Thu Jan 16, 2020 9:47 pm
...Yes, it should be installable by now. And solvespace solver (py_slvs) is also installable through PyPi. Not sure if it is possible to auto install required PyPi package through the manager.
Please add this information to your top level README.md file in the Assembly3 repository.

The Addon Manager will not install dependencies for you, but you can guide the user on the requisites to run your workbench. The Addon Manager will display that README.md, so provide helpful information, including where to get help and links to tutorials.

Something like this

Code: Select all

Assembly3 requires FreeCAD version 0.19 to work. It does not work with 0.18 or below.
You need to install the Solvespace solver as well. Using pip, `pip3 --user install py_slvs`
See the page for Assembly4 for inspiration. https://github.com/Zolko-123/FreeCAD_Assembly4

Kunda will add your Assembly3 repository as a submodule of the FreeCAD-addons repository, and then it will become available immediately.
To support the documentation effort, and code development, your donation is appreciated: paypal.
realthunder
Posts: 1335
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Post by realthunder » Fri Jan 17, 2020 4:43 am

vocx wrote:
Fri Jan 17, 2020 2:14 am
See the page for Assembly4 for inspiration. https://github.com/Zolko-123/FreeCAD_Assembly4

Kunda will add your Assembly3 repository as a submodule of the FreeCAD-addons repository, and then it will become available immediately.
Thanks for the tip. Will do that soon.
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
looo
Posts: 3096
Joined: Mon Nov 11, 2013 5:29 pm

Re: Assembly3 preview

Post by looo » Fri Jan 17, 2020 7:23 am

For appimage and dmg the solvespace package is already included. Better to not use pip for these builds as compatibility is not guaranteed.
please help with my conda-packaging efforts: https://liberapay.com/looooo/
minimalistic blog: https://looooo.github.io/mini-blog/
User avatar
Kunda1
Posts: 6356
Joined: Thu Jan 05, 2017 9:03 pm

Re: Assembly3 preview

Post by Kunda1 » Fri Jan 17, 2020 7:36 am

realthunder wrote:
Fri Jan 17, 2020 4:43 am
vocx wrote:
Fri Jan 17, 2020 2:14 am
See the page for Assembly4 for inspiration. https://github.com/Zolko-123/FreeCAD_Assembly4

Kunda will add your Assembly3 repository as a submodule of the FreeCAD-addons repository, and then it will become available immediately.
Thanks for the tip. Will do that soon.
Thanks @vocx I misunderstood. ;)
@realthunder, ping me when you're ready and I'll add Assembly3 to the Addon Manager ;)
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
realthunder
Posts: 1335
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Post by realthunder » Fri Jan 17, 2020 8:26 am

looo wrote:
Fri Jan 17, 2020 7:23 am
For appimage and dmg the solvespace package is already included. Better to not use pip for these builds as compatibility is not guaranteed.
Yes, I'll mention that in Readme.
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
BassMati
Posts: 81
Joined: Sat Oct 06, 2018 11:39 am

Re: Assembly3 preview

Post by BassMati » Wed Jan 22, 2020 10:21 pm

Referencing a Property of a Linked External Object

I am working on a Assembly 3 tutorial about working with component alternatives. The idea is that dimensions change automatically when a (ball bearing) component is exchanged for another.

There are two ball bearing component files (ball-bearing-a and ball-bearing-b) with slightly different dimensions but identical structures and names, and a project-file. The project-file has 3 objects, two links to the external ball bearing components, and the bearing plate body (see fig-001 in the attachments). The holes sizes in the plate are linked to the bearing component sketches via sub-object shape binders. When I switch the LinkedObject properties from the external ball-bearing-a to ball-bearing-b or vice versa, the hole diameters in the plate change as expected to accommodate the different diameters. This works fine.

Now I want the plate thickness be determined by the Ball Bearing 2 width (Pad.Length), and the plate thickness should change according to the linked external component. For this purpose, I tried to set a formula into Bearing Plate > Pad.Length, something like Link001.Pad.Length, but the expression engine doesn't accept this.

The problem seems to be a sort of ambiguity in the object names in the model tree - there are 3 objects with the internal name "Pad", so I cannot simply distinguish them in the formula.

I can reference the ball bearing pad in the external file with "ball-bearing-b#Pad.Length", but that whould defeat the purpose (because when a different bearing is used, the formula has to be edited, too.

So the question is: Is it possible?

Thanks in advance
Ulrich

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.17089 +1543 (Git)
Build type: Release
Branch: LinkStage3
Hash: 950c082111ae5ebeefb4dddc90a80dc9b54b2408
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)
Attachments
project-file.FCStd
(17.81 KiB) Downloaded 7 times
fig-001.png
fig-001.png (279.95 KiB) Viewed 380 times
ball-bearing-b.FCStd
(30.17 KiB) Downloaded 4 times
ball-bearing-a.FCStd
(31.58 KiB) Downloaded 4 times
BassMati
Posts: 81
Joined: Sat Oct 06, 2018 11:39 am

Re: Assembly3 preview

Post by BassMati » Thu Jan 23, 2020 10:04 am

Referencing a Property of a Linked External Object - Solution

I found the Solution with the help of the Python Console and some hours of sleep.
The formula is
Link001.LinkedObject.Document.Pad.Length

Link001 is the internal name of the "Ball Bearing 2" object, which points to the "ball-bearing-a" or "ball-bearing-b" file object, according to the value of its "LinkedObject" property. Its "Document" property returns an object which carries the ball bearing model objects. These can be accessed with their internal names, line "Pad" in the example.

Sorry for my impatience.
Ulrich
frabice
Posts: 23
Joined: Mon Jun 09, 2014 6:21 pm
Location: Clermont-Ferrand, France

Re: Assembly3 preview

Post by frabice » Sat Jan 25, 2020 3:06 pm

Hello everyone,

I am giving a try to assembly3 to redesign my 3D printer. I am starting with some king of dummy axis for practice. I would be interested if my use of the workbench is OK or if there are tricks that could have been nice to use for the small assembly attached.

I have also some questions:
  1. Is there a button to add a part to the assembly? Drag and drop is not very well supported on my machine
  2. Is there a feature to know what are the redudant constraints that make the message pop up in the report view?
  3. Is there a trick to make part move tool more fluid or is it just my old machine that is not fast enough anymore (2009 macbook pro)?
Thank you for your help and your work on freecad!

Code: Select all

OS: macOS 10.14
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.16830 +1504 (Git)
Build type: Release
Branch: LinkStage3
Hash: c80967b68820e135b93c6e69a5a538adf58da504
Python version: 3.7.3
Qt version: 5.9.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)
Attachments
assembly_axe_y.zip
(216.67 KiB) Downloaded 4 times
realthunder
Posts: 1335
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Post by realthunder » Sat Jan 25, 2020 11:41 pm

BassMati wrote:
Thu Jan 23, 2020 10:04 am
I found the Solution with the help of the Python Console and some hours of sleep.
The formula is
Link001.LinkedObject.Document.Pad.Length
This is not the best way to reference an external sub-object. There are a lot of housekeeping done by the expression engine behind the scene to auto change the reference name when you do things like copy or rename and stuff. But it only works if you reference the object using expression's identifier syntax. The way you are doing right now is reference through Python attributes. Here is the proper way,

Code: Select all

Link001.<<Pad.>>.Length

This is reference by object's internal name. If you are swapping files, you must make sure the other file also have an object with the same internal name 'Pad'. And this is not always possible, because internal names are not user changeable. In this case, you can use label reference. Just remember to not include any '.' in your object label. Once you have this expression somewhere in any open document, and you rename your Pad to some other name, the expression will be auto updated to follow you changes.

Code: Select all

Link001.<<$MyPadName.>>.Length
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
realthunder
Posts: 1335
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Post by realthunder » Sat Jan 25, 2020 11:55 pm

frabice wrote:
Sat Jan 25, 2020 3:06 pm
[*]Is there a button to add a part to the assembly? Drag and drop is not very well supported on my machine
It is not possible right now, but I can add that function. However, if drag and drop don't work then how do you add your existing parts?

[*]Is there a feature to know what are the redudant constraints that make the message pop up in the report view?
Turn on the 'Verbose' property of the assembly object. And make sure you click the 'Solve' button instead of using auto solve (auto done when you change assembly), or quick solve (another button, which is essentially what auto solving does). Reporting redundant constraint requires a full solve, and it may take much longer time.

[*]Is there a trick to make part move tool more fluid or is it just my old machine that is not fast enough anymore (2009 macbook pro)?
Turn off 'auto solve' (with the toolbar button), or hole 'CTRL' key (META key for mac?) while moving, which bypass auto solving. You may also find 'Axial mover' easier to use than the standard mover. You can also try 'quick mover' which does not trigger auto solving.
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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest