Assembly3 preview

Discussion about the development of the Assembly workbench.
realthunder
Posts: 1810
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Sat Aug 18, 2018 4:59 am

New buf fix version released.

Note, I have changed geometry element orientation calculation to fix angle locking behavior. This change may affect the polarity of the offset constraint parameter. If you see existing assembly having wrong offset after recompute, please manually change the offset polarity.

OakLD wrote:
Thu Aug 16, 2018 1:19 pm
I have another interesting issue, I tried to create 66 links, but the element count set itself to 131 and since then it cannot be set to another value. You can enter a different value, but as soon as you focus elsewhere or hit enter, the element count returns to 131. Of course, I tried to restart FC. I've just installed 0.8.2 and the problem persists. I can choose any number as long as it is 131 :-) :-). The assembly file is "Pole_Ucka.FCstd".
Could you reproduce the issue? Perhaps, I accidentally set something incorrectly to inflict such a behaviour?
I have greatly improved performance of Constraint Multiplication. Instead of feeding the solver with multiplied constraints, it now only use one constraint per plane of circles. So with you test file, 131 (although by mistake) parts can be assembled in a blink of an eye.
Try Assembly3 (latest version 0.11) 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
easyw-fc
Posts: 2915
Joined: Thu Jul 09, 2015 9:34 am

Re: Assembly3 preview

Postby easyw-fc » Sat Aug 18, 2018 5:30 pm

realthunder wrote:
Sat Aug 18, 2018 4:59 am
New buf fix version released.
Hi @realthunder,
I would have a feature request for your A3 branch.
I'm improving my StepUp to allow users to change a 3D model placement in FC and push it to the kicad_pcb board file. This will improve the ECAD/MCAD collaboration between FreeCAD & KiCad.
To allow this I'm adding 2 python properties to the 3D models, when loading the STEP file.
I'm adding a' Reference' and a 'TimeStamp' string propertiy fields.
These fields are necessary to identify uniquely the footprint inside the kicad_pcb file.
Everything is fine in FC main branch, but in A3 I would also like to add Links, in case I have more than a single object with the same STEP assigned (i.e. 100 resistors RC0603.step).
If I make a link to the first object, I can change the placement to the new link, so my link will be placed where it is in the board file.
Then I will have i.e. R1 with placement=P1 and R2 with a shape linked to R1, and placement=P2.
Everything is fine without the new two properties "Reference" and "TimeStamp". If I add those to R1, R2 will have the same properties of R1 for "Reference" and "TimeStamp", creating an issue for the footprint match, when I will need to identify it for pushing its placement to kicad_pcb file.

What I would need is the ability to change the added properties for R2 as it is possible now for the placement.
Would it possible to add this feature to A3 branch?
Here a file with R1 and R2 with these new properties.
A3-reference-timestamp-example.FCStd
(8.42 KiB) Downloaded 21 times
Thanks a lot for considering this ...
Maurice
realthunder
Posts: 1810
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Sat Aug 18, 2018 10:45 pm

easyw-fc wrote:
Sat Aug 18, 2018 5:30 pm
What I would need is the ability to change the added properties for R2 as it is possible now for the placement.
Would it possible to add this feature to A3 branch?
Here a file with R1 and R2 with these new properties.
There is 'App::LinkPython' for this purpose. It's just like Part::Feature vs. Part::FeaturePython. You can easily add your own properties. But I have never tried it myself yet. Let know how it works for you. And you just reminded me that LinkPython array mode does not produce children for python binding. I'll fix that in the next release.
Try Assembly3 (latest version 0.11) 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
easyw-fc
Posts: 2915
Joined: Thu Jul 09, 2015 9:34 am

Re: Assembly3 preview

Postby easyw-fc » Sun Aug 19, 2018 6:09 am

realthunder wrote:
Sat Aug 18, 2018 10:45 pm
There is 'App::LinkPython' for this purpose. It's just like Part::Feature vs. Part::FeaturePython. You can easily add your own properties. But I have never tried it myself yet. Let know how it works for you. And you just reminded me that LinkPython array mode does not produce children for python binding. I'll fix that in the next release.
I've tried... it seems to partially work... I can add the new object, but it still remains not visible.
Here the file and the code I used to generate the App::LinkPython object.

Code: Select all

o = FreeCAD.ActiveDocument.getObjectsByLabel("R1_res_0603")[0]
FreeCAD.ActiveDocument.addObject('App::LinkPython',o.Label).setLink(o)
FreeCAD.ActiveDocument.ActiveObject.addProperty("App::PropertyString","TimeStamp")
FreeCAD.ActiveDocument.ActiveObject.addProperty("App::PropertyString","Reference")
ao = FreeCAD.ActiveDocument.ActiveObject
ao.Reference="R3"
ao.TimeStamp="5134EEAF"
ao.Placement=FreeCAD.Placement(App.Vector(11.176,26.733,0), App.Rotation(0,0,0), App.Vector(0,0,0))
and the file:
A3-LinkPython-reference-timestamp-example.FCStd
(8.9 KiB) Downloaded 16 times
BTW is the following behavior of the mover the supposed one?
links-placement.gif
links-placement.gif (450.04 KiB) Viewed 615 times
Thanks again
M
realthunder
Posts: 1810
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Sun Aug 19, 2018 8:44 am

easyw-fc wrote:
Sun Aug 19, 2018 6:09 am
I've tried... it seems to partially work... I can add the new object, but it still remains not visible.
Here the file and the code I used to generate the App::LinkPython object.
Like other XXXPython object, LinkPython is meant for python binding, its ViewProviderPython only finishes initialization when you set something to its Proxy. So to reveal the object,

Code: Select all

FreeCAD.ActiveDocument.ActiveObject.ViewObject.Proxy = 1
BTW is the following behavior of the mover the supposed one?
The dual dragger shape is a bug. I'll fix it soon. But the double clicking forwarding behavior is by design, i.e. when you double click, the call is forwarded to the linked object. This allow the user, for example, to edit a sketch at the link placement. If you want to transform the link, right click and select 'Transform' menu item.

Edit: on second thought, for double click transformation, I can add more checking in the core object to move the link instead. I'll make another release tomorrow.
Try Assembly3 (latest version 0.11) 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
wsteffe
Posts: 178
Joined: Thu Aug 21, 2014 8:17 pm

Re: Assembly3 preview

Postby wsteffe » Sun Aug 19, 2018 10:41 am

Hello realthunder,

I would like to try FreeCAD with ASM3 so I hav just built it on my ubuntu 18.04 platform. Then I tried to make a sketch:
-New document
-Started scketcher
-New Sketch ... selected XY plane.
-Activated Rectangle
-Trying to place a rectangle (defined by two points) near to origin ....
No way to do it. I was expecting that clicking the left button would place the first point (as usual in most CADs) but nothing happens.
I have also tried other mouse buttons but it doesn't work.
Keeping LB pressed and moving the mouse the scene is being rotated.
But it is not possible to place anything (also a simple line or a point are not working).

What'is wrong ?
realthunder
Posts: 1810
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Sun Aug 19, 2018 11:07 am

wsteffe wrote:
Sun Aug 19, 2018 10:41 am
Hello realthunder,

I would like to try FreeCAD with ASM3 so I hav just built it on my ubuntu 18.04 platform. Then I tried to make a sketch:
Sounds like your build of FC has some problem with the navigation module. What navigation mode are you using? You can try with different navigation mode. See document here. Also, you can try the pre-built AppImage. Just download it, chmod +x, and run it.
Try Assembly3 (latest version 0.11) 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
wsteffe
Posts: 178
Joined: Thu Aug 21, 2014 8:17 pm

Re: Assembly3 preview

Postby wsteffe » Sun Aug 19, 2018 11:37 am

Thanks realthunder,
the sketcher is working well after having changed the navigator mode from openInventor to CAD.

I do not know why it defaulted to openInventor after the new build. May be there was an old config file in my home directory from a FC
installation done some years ago.
wsteffe
Posts: 178
Joined: Thu Aug 21, 2014 8:17 pm

Re: Assembly3 preview

Postby wsteffe » Sun Aug 19, 2018 12:03 pm

Hello realthunder, now I have an other problem: starting Assembly FC produces the following error:

libTKMath.so.8: cannot open shared object file: No such file or directory
Traceback (most recent call last):
File "<string>", line 418, in Initialize

Indeed I have libTKMath.so.7 (from my personal build of OpenCscade 7.3) but I do not have libTKMath.so.8 and
I have no Idea where I could find it considering that OpenCscade 7.3 is the last public release.
User avatar
easyw-fc
Posts: 2915
Joined: Thu Jul 09, 2015 9:34 am

Re: Assembly3 preview

Postby easyw-fc » Sun Aug 19, 2018 12:13 pm

realthunder wrote:
Sun Aug 19, 2018 8:44 am
Like other XXXPython object, LinkPython is meant for python binding, its ViewProviderPython only finishes initialization when you set something to its Proxy. So to reveal the object,

Code: Select all

FreeCAD.ActiveDocument.ActiveObject.ViewObject.Proxy = 1
Thaks it is working now! :D
realthunder wrote:
Sun Aug 19, 2018 8:44 am
Edit: on second thought, for double click transformation, I can add more checking in the core object to move the link instead. I'll make another release tomorrow.
thanks again, I found much more friendly the Axial move instead of the old transformation tool... it is much easier to control how to move a part ..

I have an other question ...
When I export to STEP an object and its link with a different placement and label, the STEP re-imported will keep the correct placement but will lose the label assigned, using the same of the referenced object... is it a limitation by OCC exporting?
https://dev.opencascade.org/doc/overvie ... __xde.html

Thx again,
M
A3-reference-timestamp-example-v2.FCStd
(8.46 KiB) Downloaded 18 times
A3-reference-timestamp-example-v2.step
(43.3 KiB) Downloaded 21 times
Last edited by easyw-fc on Sun Aug 19, 2018 9:58 pm, edited 1 time in total.