Assembly3 preview

Discussion about the development of the Assembly workbench.
catman
Posts: 168
Joined: Fri Jan 11, 2019 10:42 pm

Re: Assembly3 preview

Postby catman » Sat Feb 15, 2020 9:16 pm

vocx wrote:
Sat Feb 15, 2020 5:05 pm
catman wrote:
Sat Feb 15, 2020 2:44 pm
Acutally, I checked out "FreeCAD_0.19-19443-Linux-...
Your version is pretty old. We are already in 0.19.19603.
The lastest I found on the Github page https://github.com/FreeCAD/FreeCAD/rele ... g/0.19_pre under 'Assets' was 0.19.19566 for Linux. Also here I did not find Assembly3. I have been looking at Tools/Customize../Workbenches. There it is not in the list. Where should I look?
OficineRobotica
Posts: 140
Joined: Thu Feb 21, 2019 8:17 am

Re: Assembly3 preview

Postby OficineRobotica » Sun Feb 16, 2020 6:29 am

https://github.com/FreeCAD/FreeCAD/rele ... 4.AppImage

I just tried this and asm3 is present. I see it at the bottom of the popup of the workbench selector. Depending on sitem you might need to scroll to see it , on kde neon that menu is presented full.
asm3.jpeg
asm3.jpeg (226.11 KiB) Viewed 452 times
User avatar
looo
Posts: 3295
Joined: Mon Nov 11, 2013 5:29 pm

Re: Assembly3 preview

Postby looo » Sun Feb 16, 2020 6:41 am

catman wrote:
Sat Feb 15, 2020 9:16 pm
vocx wrote:
Sat Feb 15, 2020 5:05 pm
catman wrote:
Sat Feb 15, 2020 2:44 pm
Acutally, I checked out "FreeCAD_0.19-19443-Linux-...
Your version is pretty old. We are already in 0.19.19603.
The lastest I found on the Github page https://github.com/FreeCAD/FreeCAD/rele ... g/0.19_pre under 'Assets' was 0.19.19566 for Linux. Also here I did not find Assembly3. I have been looking at Tools/Customize../Workbenches. There it is not in the list. Where should I look?
Which 3rd party workbenches are installed in your system? Also please report the output of:

Code: Select all

import freecad
freecad.__file__
HoWil
Posts: 1000
Joined: Sun Jun 14, 2015 7:31 pm
Location: Austria

Re: Assembly3 preview

Postby HoWil » Sun Feb 16, 2020 10:07 am

vocx wrote:
Sat Feb 15, 2020 6:09 pm
Thanks.
catman
Posts: 168
Joined: Fri Jan 11, 2019 10:42 pm

Re: Assembly3 preview

Postby catman » Mon Feb 17, 2020 10:47 am

looo wrote:
Sun Feb 16, 2020 6:41 am
catman wrote:
Sat Feb 15, 2020 9:16 pm
The lastest I found on the Github page https://github.com/FreeCAD/FreeCAD/rele ... g/0.19_pre under 'Assets' was 0.19.19566 for Linux. Also here I did not find Assembly3. I have been looking at Tools/Customize../Workbenches. There it is not in the list. Where should I look?
Which 3rd party workbenches are installed in your system? Also please report the output of:

Code: Select all

import freecad
freecad.__file__
Its definetly not in the list of workbenches.

Here is the output of the command. This looks very weird to me - I have not used the Gears WB for a long time..

Code: Select all

>>> freecad.__file__
'/home/$USER/.FreeCAD/Mod/Gears/freecad/__init__.py'
>>> 
Here is the list of workbenches installed

Code: Select all

3D_Printing_Tools
A2plus
Animation
ArchTextures
Assembly4
BIM
Defeaturing
dodo
ExplodedAssembly
fasteners
flamingo
Gears
Glass
IconThemes
InventorLoader
kicadStepUpMod
LCInterlocking
Manipulator
pcb
PieMenu
PreferencesPresets
Render
Reporting
SelectorToolbar
sheetmetal
workfeature
I should note that I also had Assembly3 (from Git) included in the Mod folder. I forgot about it, because it never got loaded. I removed that and restarted FreeCAD again. There was no difference, still no Assembly3 in the workbench list.


Here is the system Info:

Code: Select all

OS: Ubuntu 18.04.3 LTS (XFCE/xubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.19566 (Git) AppImage
Build type: Release
Branch: master
Hash: 9960b673997a926c101b8b61a65e8d3796664c01
Python version: 3.8.1
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)
User avatar
looo
Posts: 3295
Joined: Mon Nov 11, 2013 5:29 pm

Re: Assembly3 preview

Postby looo » Mon Feb 17, 2020 11:24 am

catman wrote:
Mon Feb 17, 2020 10:47 am
Here is the output of the command. This looks very weird to me - I have not used the Gears WB for a long time..

Code: Select all

>>> freecad.__file__
'/home/$USER/.FreeCAD/Mod/Gears/freecad/__init__.py'
>>>
Please update FCGear via addon-manager?
catman
Posts: 168
Joined: Fri Jan 11, 2019 10:42 pm

Re: Assembly3 preview

Postby catman » Mon Feb 17, 2020 11:50 am

looo wrote:
Mon Feb 17, 2020 11:24 am
catman wrote:
Mon Feb 17, 2020 10:47 am
>>> freecad.__file__
'/home/$USER/.FreeCAD/Mod/Gears/freecad/__init__.py'
>>>
Please update FCGear via addon-manager?
Updating "FCGear" via AddonManager did not help, but with your help I found the problem: obviously "Gears" had been changed to "FCGear" some time ago. In my "Mod" folder (~/.FeeCAD/Mod) there was still the folder "Gears" with the old version of the Gears WB. After removing that folder and restarting FreeCAD the Assembly3 WB appeared!
I guess that also was the reason that the downloaded Asm3 workbench from Github did not load when I tried end of 2019. Good to know.

Also when re-doing your code bit, this seem to be the correct output:

Code: Select all

>>> import freecad
>>> freecad.__file__
'/tmp/.mount_FreeCAaTFat6/usr/lib/python3.8/site-packages/freecad/__init__.py'
>>> 
Thanks a lot for your help!
catman
Posts: 168
Joined: Fri Jan 11, 2019 10:42 pm

Re: Assembly3 preview

Postby catman » Mon Feb 17, 2020 10:51 pm

realthunder wrote:
Mon Feb 10, 2020 10:41 pm
cos4 wrote:
Fri Feb 07, 2020 7:02 pm
Is there something similar to the "Direction" dialog of a2plus? I find the option to "flip direction" very useful.
You can change the 'Offset' property in either the element object under the constraint, or under the element group. It is a placement in the element local coordinate. If you change it under element group, it will affect all constraint that uses this element.

One thing to note though, because the way SolveSpace works, plane coincident constraint does not care about plane orientation. Meaning that it will snap either way. You'll have to use other constraint to fix it. Or, maybe you can consider other type of constraint, like the 'Placement' constraint, which coincide two elements exactly, without going through the solver.
When using the excellent introduction from @jpg87 (excellent job!) one step is to assembly an axis with two wheels (http://help-freecad-jpg87.fr/0251_ass_e ... ssieux.php) I am stuck with that issue.
After attaching the first wheel fine, the other always attached the wrong way. The two wheels need to attach mirrored. I tried many different constaints but I always end up with the alignment in the orientation as in the image above.
How can I solve this purely by constraints (I now that manually pre-aligning the wheel works)?

I think something like "PlaneCoincident" plus another acting like "Normals Align" or "Normal Perpendicular" would work. But I can't get it to work.

Asm3_setOrientation.png
Asm3_setOrientation.png (142.18 KiB) Viewed 233 times
What is the best way to get this wheel to attach the other way around (without manually aligning it)?


Two more questions came up:
* What is the proper way to delete constraints?
When I had the axis together I deleted the constraints and wanted to do it again. But the parts could not be moved, the constraints still seemed to be in place. I did the file again, this time I disabled the constraint and then deleted it. That seemd to work. Is that the proper procedure?

* Is there a workaround to re-do(=re-assign) a constraint by selecting different faces/edges/vertices?
I saw realthunders video where he changed the one part of an assembly by recreating matching Elements, but thats a different use case.
realthunder
Posts: 1536
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Mon Feb 17, 2020 11:36 pm

catman wrote:
Mon Feb 17, 2020 10:51 pm
How can I solve this purely by constraints (I now that manually pre-aligning the wheel works)?
If the Axis object is fixed by a Lock constraint, then you can use the 'Attachment' constraint to fix the wheel. This constraint works by aligning the placement of the elements exactly. So if the orientation is flipped, change the 'Offset' property of one of the constraining element. BTW, changing 'Offset' property works for PlaneCoincidence too, but only if you change it gradually with 'Auto Solve' enabled, like using your mouse wheel.

The disadvantage of using 'Attachment' is that it completely fixed the part, while PlaneCoincidence let you rotate the wheel.

* What is the proper way to delete constraints?
Just select the constraint and delete. Not sure about the problem you described. Can you reproduce it? To bypass constraining while moving a part, you can either manually disable 'Auto Solve' using the toolbar button, or hold 'CTRL' key while using the mover.

* Is there a workaround to re-do(=re-assign) a constraint by selecting different faces/edges/vertices?
Expand the constraint object to expose its element objects. Select the new geometry element in the 3D view. If 'Sync Selection' is on (it is by default on), the corresponding tree item will be selected in the tree view. Drag and drop that item onto the constraint element object to reset 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
catman
Posts: 168
Joined: Fri Jan 11, 2019 10:42 pm

Re: Assembly3 preview

Postby catman » Tue Feb 18, 2020 12:44 pm

realthunder wrote:
Mon Feb 17, 2020 11:36 pm
How can I solve this purely by constraints (I now that manually pre-aligning the wheel works)?
changing 'Offset' property works for PlaneCoincidence too, but only if you change it gradually with 'Auto Solve' enabled, like using your mouse wheel.
First I was confused because the constraint itself has an "offset" value as well, but you mean the "offset" property of the elements under the constraint. It worked with "PlaneConicidence".

Here is a short procedure of what I did (see Image below).
  • Step 1. Open the constraint
  • Step 2. Identify which element belongs to the wrongly attached part, here the wheel. It helps using the Space key to toggle the visibility of the elements. Select that element.
  • Step 3. Set the right axis In the element properties "offset". Here we change the axis to "y". Also make sure the 'Auto-Compute' function is selected in the toolbar (the yellow icon with the yellow frame).
  • Step 4. Now use the mouse to increment the angle. Every 10-20deg click into another field, so the Auto-Compute starts working. You will notice the wheel is rotating to the new angle. In the image we are at 150deg. If it does not rotate, the steps were too large. Continue unil the wheel is in the right orientation, here 180deg.
To change the angle to 180° directly does not work for me. The solver just keet the part at the same position as 0°deg, thus the smaller step sizes.
I would have thought the solver would "snap" to the other solution about half way (e.g. just above 90°), but it did not in my example.

Asm3_FlippingParts_marks.png
Asm3_FlippingParts_marks.png (177.62 KiB) Viewed 173 times
When a part attached the wrong way you have two options: a) delete the constraint, reorient the part and do it again. b) Change the angle of the 'Offset' property of the objects feature (i.e. the 'element') until it flips to the correct orientation. This image shows a wheel that has been attached being rotated according method b).


realthunder wrote:
Mon Feb 17, 2020 11:36 pm
Just select the constraint and delete. Not sure about the problem you described. Can you reproduce it?
I could not reproduce it now and I had deleted the other file. If I see it again, I will try to make it reproducible.
Last edited by catman on Tue Feb 18, 2020 1:11 pm, edited 1 time in total.