Assembly3 preview

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: Assembly3 preview

Post by easyw-fc »

antoniovazquezblanco wrote: Tue Oct 23, 2018 12:50 pm @realthunder I was using your latest appimage to play a little bit with the step up WB. I cannot open any footprint with it. Particularly I was trying to open `Button_Switch_SMD.pretty/SW_SPST_KMR2.kicad_mod` with no luck.

The only thing I got was the following console error:

Code: Select all

FC Version 018
VBO status False
FootPrint Loader /home/anton/Projects/KiCad/kicad-footprints/Button_Switch_SMD.pretty/SW_SPST_KMR2.kicad_mod
<unknown exception traceback><type 'exceptions.TypeError'>: expect shape in sequence
same issue of this topic:
https://forum.freecadweb.org/viewtopic. ... 58#p264058
You have an up-to-date AppImage release, but you forgot to update the kicad StepUp WB :)
antoniovazquezblanco
Posts: 48
Joined: Sun Apr 06, 2014 12:42 pm

Re: Assembly3 preview

Post by antoniovazquezblanco »

easyw-fc wrote: Tue Oct 23, 2018 2:01 pm same issue of this topic
Got it. Thanks!
Mark Szlazak
Posts: 439
Joined: Tue Apr 04, 2017 6:06 pm
Location: SF Bay Area, California

Re: Assembly3 preview

Post by Mark Szlazak »

realthunder wrote:
Hi Realthunder. Wondering if you have stopped working on ASM3? I did not see an update for a while.

Thank you.
User avatar
ceremcem
Posts: 226
Joined: Sun Jan 07, 2018 11:10 am

Re: Assembly3 preview

Post by ceremcem »

Mark Szlazak wrote: Sun Oct 28, 2018 4:05 pm
realthunder wrote:
Hi Realthunder. Wondering if you have stopped working on ASM3? I did not see an update for a while.

Thank you.
He is making some deep changes, AFAIK. See https://github.com/realthunder/FreeCAD/tree/LinkDev
Last edited by ceremcem on Sun Oct 28, 2018 11:22 pm, edited 1 time in total.
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Post by realthunder »

Mark Szlazak wrote: Sun Oct 28, 2018 4:05 pm Hi Realthunder. Wondering if you have stopped working on ASM3? I did not see an update for a while.
Yes, I am doing some big changes on Expression related stuff. I haven't got time to write a document for that yet. Here is a brief summary.

I have refactored PropertyExpressionEngine and PropertySheet, to make them behave more like a link type property. So you can include sub-object reference or geometry reference inside your expressions, and they will be auto updated when your model changes, just like PropertyLinkSub in my branch.

I have also practically rewritten the Expression and its parser. Now, the expression becomes a functional language, which is modeled as a subset of Python. It does not support class and stuff, but has all the others, like if/else/while/for, including the handy list/set/dict comprehension. You can return any Python object from an expression, or call a method of an object. You can paste in multiple lines of Python code into a single spreadsheet cell, and then turn that cell into a function that accept parameters, and later call this function from other objects with expression binding. The property editor now has the option to show you all hidden properties and lets you bind expression on them, including the Shape property. You can copy a piece of Python code that generates a parametric shape, and binds it to various part feature with different parameters

FC has Macro since the beginning, but there is no easy way to pass in parameters. And my extended expression will fill that gap. However, with great ability comes great responsibility. The expression extension makes it possible to embed malicious code inside a file. Countermeasure is required to protect the end user. First of all, the expression code is not parsed and evaluated by Python interpreter. So we can filter out dangerous functions like eval() and open() etc. Second, the user can control which modules are allowed to be imported using FC parameter editor. More measure will be added later, such as showing user all the expression code before evaluation if the file has not been saved by the user before.
Try Assembly3 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
ceremcem
Posts: 226
Joined: Sun Jan 07, 2018 11:10 am

Re: Assembly3 preview

Post by ceremcem »

realthunder wrote: Sun Oct 28, 2018 11:11 pm I have also practically rewritten the Expression and its parser. Now, the expression becomes a functional language, ... You can copy a piece of Python code that generates a parametric shape, and binds it to various part feature with different parameters
Hooray! This will make it a trivial task to create basic libraries which have thousands/infinite number of variants (like bolts, nuts, sockets, gears, etc.) with Asm3.
...The expression extension makes it possible to embed malicious code inside a file. Countermeasure is required to protect the end user.
I think this is totally manageable. So, Hooray again!

As an additional idea, arbitrary codes can be signed by GPG and users might manage their trusted Public Keys. In this way, untrusted users might hand over any model securely where no MITM can take place (like https). Moreover, untrusted users might build their code by using trusted libraries (tools), so the code size to be reviewed will eventually get smaller by the trusted code libraries (tools) grow.
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Post by realthunder »

ceremcem wrote: Sun Oct 28, 2018 11:59 pm As an additional idea, arbitrary codes can be signed by GPG and users might manage their trusted Public Keys. In this way, untrusted users might hand over any model securely where no MITM can take place (like https). Moreover, untrusted users might build their code by using trusted libraries (tools), so the code size to be reviewed will eventually get smaller by the trusted code libraries (tools) grow.
That's a greate idea!
Try Assembly3 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
jpg87
Posts: 809
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: Assembly3 preview

Post by jpg87 »

realthunder wrote: Sun Oct 28, 2018 11:11 pm I have refactored PropertyExpressionEngine and PropertySheet, to make them behave more like a link type property. So you can include sub-object reference or geometry reference inside your expressions, and they will be auto updated when your model changes, just like PropertyLinkSub in my branch.
Great. I can not wait to test!
My website : http://help-freecad-jpg87.fr updated 2023/11/06
Mark Szlazak
Posts: 439
Joined: Tue Apr 04, 2017 6:06 pm
Location: SF Bay Area, California

Re: Assembly3 preview

Post by Mark Szlazak »

realthunder wrote: Sun Oct 28, 2018 11:11 pm
Wow and thanks!
Rene
Posts: 35
Joined: Sun Mar 08, 2015 6:32 pm

Re: Assembly3 preview

Post by Rene »

Haven't used any FreeCAD for a while, but can't seem to find the ASM3 workbench in my two ASM3 versions.

menu_issue.jpg
menu_issue.jpg (161.16 KiB) Viewed 1698 times

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14369 (Git)
Build type: Release
Branch: (HEAD detached at FETCH_HEAD)
Hash: 45b39e8ff6861d15f4277f9759d012b41aae071f
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: Estonian/Estonia (et_EE)
stuff
Post Reply