Assembly3 - [solved] Build Shape - position issue

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
nemesis
Posts: 372
Joined: Tue Mar 25, 2014 11:24 pm
Location: France, Lyon

Assembly3 - [solved] Build Shape - position issue

Post by nemesis »

Hi there,
realthunder wrote:ping
I was playing with the build shape property of assembly, and it looks like there is a bug when using "Multiply" function, If the original position of the body used to create the sub link is not in 0,0,0 the sub link follow the original placement.
with compound they stay where they are.
The compound assembly<br />sub parts are in the right place
The compound assembly
sub parts are in the right place
compoundAssy.png (82.22 KiB) Viewed 1783 times
The compound assembly<br />sub parts move to original place
The compound assembly
sub parts move to original place
FuseAssy.png (82.81 KiB) Viewed 1783 times
test ASM3_bool.fcstd
file test
(36.79 KiB) Downloaded 45 times
Last edited by nemesis on Thu Oct 11, 2018 6:04 am, edited 2 times in total.
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 - Build Shape - position issue

Post by realthunder »

The bug is fixed. Thanks for reporting. I'll release a bug fix version soon.
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
nemesis
Posts: 372
Joined: Tue Mar 25, 2014 11:24 pm
Location: France, Lyon

Re: Assembly3 - Build Shape - position issue

Post by nemesis »

realthunder wrote: Thu Sep 13, 2018 4:25 am The bug is fixed. Thanks for reporting. I'll release a bug fix version soon.
Cool! :)
Another question.
I understood that multiply should multiply links/constrains to all feature (circle) of the same radius as in the wiki example.
I did some test with circle within sketch to use it to locate sub part.
the idea is to re-use a standard "feature" or lets say a standard body in various file.
Open "A_Part_Build" to have an overview of the idea (more or less the same as the things possible with lattice2 workbench)
in this case, sub links are only multiply to one sketch and not the second one. Of course I assume my use case is maybe not the one intended at the beginning.
but maybe it can be an improvement. :D
A_Part_build.fcstd
(178.56 KiB) Downloaded 43 times
Attachments
Slotspace.fcstd
(20.46 KiB) Downloaded 50 times
Plaque.fcstd
(38.17 KiB) Downloaded 42 times
finguer.fcstd
(16.16 KiB) Downloaded 41 times
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 - Build Shape - position issue

Post by realthunder »

nemesis wrote: Thu Sep 13, 2018 8:48 pm in this case, sub links are only multiply to one sketch and not the second one
I am afraid you have to be more specific. Which 'second sketch' are you referring to? For multiplied constraint, you can add more elements to it by drag and drop. If you drag in a circle from a 'second sketch', then it will be auto expanded to include all circles of the same radius from that sketch.

BTW, I don't know if you already know or not. Since you are using 'BuildShape' property, you may want to know that you can reveal the parts by toggle the 'ShowParts' property of the assembly's view object. Set it to True to reveal the individual parts instead of the built shape. This 'ShowParts' does not affect the built shape, so no trigger to potentially expensive recomputation.
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
nemesis
Posts: 372
Joined: Tue Mar 25, 2014 11:24 pm
Location: France, Lyon

Re: Assembly3 - Build Shape - position issue

Post by nemesis »

realthunder wrote: Fri Sep 14, 2018 2:47 am I am afraid you have to be more specific. Which 'second sketch' are you referring to? For multiplied constraint, you can add more elements to it by drag and drop. If you drag in a circle from a 'second sketch', then it will be auto expanded to include all circles of the same radius from that sketch.
Sorry, I was talking about Sketch006 from Part "plaque A"
I want to expand the "tenon" to those circles.
sketch006.png
sketch006.png (79.13 KiB) Viewed 1609 times
realthunder wrote: Fri Sep 14, 2018 2:47 am BTW, I don't know if you already know or not. Since you are using 'BuildShape' property, you may want to know that you can reveal the parts by toggle the 'ShowParts' property of the assembly's view object. Set it to True to reveal the individual parts instead of the built shape. This 'ShowParts' does not affect the built shape, so no trigger to potentially expensive recomputation.
Unless I'm badly using it it doesn't looks like it is working. I drag and drop the sketch in the constraint. is this the supposed possibility?
I have new instance of the part, "tenon" but it stays at the origin (even with recomputation of course)
with the following message

Code: Select all

Traceback (most recent call last):
  File "/tmp/.mount_FreeCAcGtpKA/usr/lib/freecad-daily/Ext/freecad/asm3/assembly.py", line 356, in execute
    self.getElementSubname())
  File "/tmp/.mount_FreeCAcGtpKA/usr/lib/freecad-daily/Ext/freecad/asm3/assembly.py", line 909, in getElementInfo
    (part[1],subname),transform=False)
  File "/tmp/.mount_FreeCAcGtpKA/usr/lib/freecad-daily/Ext/freecad/asm3/utils.py", line 90, in getElementShape
    transform=transform,noElementMap=noElementMap)
<type 'exceptions.TypeError'>: argument 1 must be App.DocumentObject, not None
Traceback (most recent call last):
  File "/tmp/.mount_FreeCAcGtpKA/usr/lib/freecad-daily/Ext/freecad/asm3/assembly.py", line 356, in execute
    self.getElementSubname())
  File "/tmp/.mount_FreeCAcGtpKA/usr/lib/freecad-daily/Ext/freecad/asm3/assembly.py", line 909, in getElementInfo
    (part[1],subname),transform=False)
  File "/tmp/.mount_FreeCAcGtpKA/usr/lib/freecad-daily/Ext/freecad/asm3/utils.py", line 90, in getElementShape
    transform=transform,noElementMap=noElementMap)
<type 'exceptions.TypeError'>: argument 1 must be App.DocumentObject, not None
Traceback (most recent call last):
  File "/tmp/.mount_FreeCAcGtpKA/usr/lib/freecad-daily/Ext/freecad/asm3/assembly.py", line 356, in execute
    self.getElementSubname())
  File "/tmp/.mount_FreeCAcGtpKA/usr/lib/freecad-daily/Ext/freecad/asm3/assembly.py", line 909, in getElementInfo
    (part[1],subname),transform=False)
  File "/tmp/.mount_FreeCAcGtpKA/usr/lib/freecad-daily/Ext/freecad/asm3/utils.py", line 90, in getElementShape
    transform=transform,noElementMap=noElementMap)
<type 'exceptions.TypeError'>: argument 1 must be App.DocumentObject, not None
Traceback (most recent call last):
  File "/tmp/.mount_FreeCAcGtpKA/usr/lib/freecad-daily/Ext/freecad/asm3/assembly.py", line 356, in execute
    self.getElementSubname())
  File "/tmp/.mount_FreeCAcGtpKA/usr/lib/freecad-daily/Ext/freecad/asm3/assembly.py", line 909, in getElementInfo
    (part[1],subname),transform=False)
  File "/tmp/.mount_FreeCAcGtpKA/usr/lib/freecad-daily/Ext/freecad/asm3/utils.py", line 90, in getElementShape
    transform=transform,noElementMap=noElementMap)
<type 'exceptions.TypeError'>: argument 1 must be App.DocumentObject, not None
Screenshot_20180915_141530.png
Screenshot_20180915_141530.png (116.77 KiB) Viewed 1609 times
I did manually increase the number of element count property.
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 - Build Shape - position issue

Post by realthunder »

nemesis wrote: Sat Sep 15, 2018 12:17 pm [Sorry, I was talking about Sketch006 from Part "plaque A"
I want to expand the "tenon" to those circles.
I tried, and it does seems a bit difficult. This is because the solver has trouble finding the solution if the part's initial position is too far away, and happens to have exact 90 degree off the intended rotation. One workaround is to create normal plane coincidence constraint for each 90 degree side. You many need to manually rotate the part a bit to make solver work. Once the part is snapped, then multiplication shall work fine.
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
nemesis
Posts: 372
Joined: Tue Mar 25, 2014 11:24 pm
Location: France, Lyon

Re: Assembly3 -[Solve] Build Shape - position issue

Post by nemesis »

Soved

see here
Post Reply