Assembly3 preview

Discussion about the development of the Assembly workbench.
User avatar
bambuko
Veteran
Posts: 1549
Joined: Thu Oct 24, 2019 12:53 pm
Location: UK, England, North Devon

Re: Assembly3 preview

Post by bambuko »

Kuzma30 wrote: Thu Mar 24, 2022 1:10 pm Fine, but not correct... I updated a few files on github....
I know, these are original files - my interest was in why I could open them OK and jpg87 couldn't?
adrianinsaval
Veteran
Posts: 3131
Joined: Thu Apr 05, 2018 5:15 pm

Re: Assembly3 preview

Post by adrianinsaval »

bambuko wrote: Thu Mar 24, 2022 1:37 pm yes, I thought about it as well, but if it was the case I would have similar problem :?:
don't be too sure, it could be that there's some error in the full path too.
ToniTen
Posts: 164
Joined: Fri Sep 04, 2020 10:11 am

Re: Assembly3 preview

Post by ToniTen »

I ask here instead of straight starting a feature request on GitHub because I don't want to create extra noise on the github is I can avoid it, but for interoperability with people that don't have Assembly3 installed, is there any kind of "Assembly3 Downgrade"/"Assembly3 Explode" tool to turn an Assembly3 Assembly in just a regular FreeCAD collection of Parts, Bodies and shapes? Ideally it should work recursively, to go into sub-assemblies and downgrade/explode those too.

I obviously don't expect them to remain constrained by the constraints, just left in place. Assemblies (freecad.asm3.assembly.Assembly objects) could be replaced with App::PART containers, to keep the hierarchy and Placement properties intact.
adrianinsaval
Veteran
Posts: 3131
Joined: Thu Apr 05, 2018 5:15 pm

Re: Assembly3 preview

Post by adrianinsaval »

There's probably a way of doing that with a macro
User avatar
jpg87
Posts: 666
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: Assembly3 preview

Post by jpg87 »

bambuko wrote: Thu Mar 24, 2022 1:39 pm my interest was in why I could open them OK and jpg87 couldn't?
Kuzma30 wrote: Thu Mar 24, 2022 1:10 pm...
After unsuccessful efforts, I deleted the "...Roaming/FreeCAD" folder and restarted FreeCAD

Code: Select all

OS : Windows 10 Version 2009
Word size of FreeCAD : 64-bit
Version : 2022.118.30769 (Git)
Build type : Release
Branch : LinkDaily
Hash : 3b620b713e24c9637db8ea6ad1f1ee88ef13367a
Python version : 3.8.6+
Qt version : 5.15 .2
Version Coin : 4.0.1
Version OCC : 7.6.0
Locale : Français/France (fr_FR) 
Now I have this message on startup (??)

Code: Select all

18:30:54 'charmap' codec can't encode characters in position 324-336: character maps to <undefined>
I finally manage to open the assembly file, but unlike @bambuko , I don't have Elements or Constraints :
01AssFile.png
01AssFile.png (146.62 KiB) Viewed 2893 times

The settings file was grayed out in the list, and after activating it I saw the different settings pages appear :
02Param.png
02Param.png (28.09 KiB) Viewed 2893 times

After changing the number of bars to 7 and recalculating the assembly file, the 7 bars appear fine :
03Resultat.png
03Resultat.png (140.99 KiB) Viewed 2893 times

Looking at the contents of other files, I discovered this problem. After opening and closing the distressed sketch, it self-corrected, so I wanted to do the same for the pad. No internal error, but after validation, here is the message :
04PbPad.png
04PbPad.png (47.84 KiB) Viewed 2893 times

So I still don't have a complete set ...
Did you already install constraints that I should have found when opening the assembly, or were you stuck with the multiplication of profiled bars?
My website : http://help-freecad-jpg87.fr updated 2022/08/01
User avatar
Zolko
Veteran
Posts: 1794
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly3 preview

Post by Zolko »

Kuzma30 wrote: Wed Mar 23, 2022 10:43 am Ukraine will win.
I very much doubt this
try the Assembly4 workbench for FreCAD v0.19
install with Tools > Addon Manager > Assembly4 — tutorials here and here
User avatar
Kuzma30
Posts: 139
Joined: Wed Oct 24, 2018 11:50 am
Location: Ukraine

Re: Assembly3 preview

Post by Kuzma30 »

jpg87 wrote: Thu Mar 24, 2022 6:14 pm So I still don't have a complete set ...
Did you already install constraints that I should have found when opening the assembly, or were you stuck with the multiplication of profiled bars?
Please update files from github, I make some changes. In "MainAssembly" file there is 2 sub-assembly - PlateForFK12 and PlateForMotor. Both of it produce error such

Code: Select all

08:52:56  <App> solver.py(376)|PropertyLinks.cpp(399): NEMA23#Sketch007.Support auto change element reference NEMA23#Boolean ;#1481;:M#1e1e;FUS;:T3189:5:F.Face19 -> ;#2ec3;:M#2ec2;FUS;:Hc75:c,F.Face19
08:52:56  <App> solver.py(376)|PropertyLinks.cpp(399): NEMA23#Sketch.Support auto change element reference NEMA23#Pocket ;#1f53;:M;CUT;:T3187:5:F.Face9 -> ;#30e1;:M;CUT;:Hc73:7,F.Face9
08:52:56  <App> solver.py(376)|PropertyLinks.cpp(399): NEMA23#_Element001.LinkedObject auto change element reference NEMA23#Pocket Pocket.;#1f53;:M;CUT;:T3187:5:F.Face9 -> Pocket.;#30e1;:M;CUT;:Hc73:7,F.Face9
08:52:57  32.845285 <asm3.sys> sys_slvs.py(71): dof remaining: 2
08:52:57  0.149593 <asm3.sys> system.py(244): auto relax constraint (MainAssembly#AxialAlignment004) MainAssembly#Constraint008 between (MainAssembly#PlateY2) MainAssembly#Link002 and (MainAssembly#NEMA23) MainAssembly#Link003, 2
08:52:57  0.000988 <asm3.sys> system.py(244): skip redundant constraint (MainAssembly#AxialAlignment005) MainAssembly#Constraint009 between (MainAssembly#NEMA23) MainAssembly#Link003 and (MainAssembly#PlateY2) MainAssembly#Link002, 3
08:52:57  0.013979 <asm3.sys> solver.py(133): List of failed constraint:
(MainAssembly#AxialAlignment003) MainAssembly#Constraint006, handle: 1
(MainAssembly#AxialAlignment003) MainAssembly#Constraint006, handle: 2
(MainAssembly#PlaneAlignment001) MainAssembly#Constraint005, handle: 3
(MainAssembly#PlaneAlignment001) MainAssembly#Constraint005, handle: 4
(MainAssembly#AxialAlignment004) MainAssembly#Constraint008, handle: 5
(MainAssembly#AxialAlignment006) MainAssembly#Constraint010, handle: 6
(MainAssembly#AxialAlignment006) MainAssembly#Constraint010, handle: 7
(MainAssembly#AxialAlignment007) MainAssembly#Constraint011, handle: 8
(MainAssembly#AxialAlignment007) MainAssembly#Constraint011, handle: 9
(MainAssembly#AxialAlignment008) MainAssembly#Constraint012, handle: 10
(MainAssembly#AxialAlignment008) MainAssembly#Constraint012, handle: 11
(MainAssembly#AxialAlignment009) MainAssembly#Constraint013, handle: 12
(MainAssembly#AxialAlignment009) MainAssembly#Constraint013, handle: 13
(MainAssembly#PlaneAlignment002) MainAssembly#Constraint014, handle: 14
(MainAssembly#PlaneAlignment002) MainAssembly#Constraint014, handle: 15
(MainAssembly#PlaneAlignment003) MainAssembly#Constraint015, handle: 16
(MainAssembly#PlaneAlignment003) MainAssembly#Constraint015, handle: 17
(MainAssembly#PlaneAlignment004) MainAssembly#Constraint016, handle: 18
(MainAssembly#PlaneAlignment004) MainAssembly#Constraint016, handle: 19
08:52:57  33.014848 <asm3.gui> gui.py(459): command "asm3CmdSolve" exception
Traceback (most recent call last):
  File "C:\Users\kuzem\AppData\Roaming\FreeCAD\Mod\FreeCAD_assembly3\freecad\asm3\solver.py", line 110, in __init__
    self.system.solve(group=self.group,reportFailed=reportFailed)
  File "C:\Users\kuzem\AppData\Roaming\FreeCAD\Mod\FreeCAD_assembly3\freecad\asm3\sys_slvs.py", line 70, in solve
    raise RuntimeError(reason)
RuntimeError: inconsistent constraints

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 627, in report
  File "C:\Users\kuzem\AppData\Roaming\FreeCAD\Mod\FreeCAD_assembly3\freecad\asm3\solver.py", line 412, in solve
    return _solve(*args,**kargs)
  File "C:\Users\kuzem\AppData\Roaming\FreeCAD\Mod\FreeCAD_assembly3\freecad\asm3\solver.py", line 382, in _solve
    Solver(assembly,reportFailed,dragPart,recompute,rollback)
  File "C:\Users\kuzem\AppData\Roaming\FreeCAD\Mod\FreeCAD_assembly3\freecad\asm3\solver.py", line 113, in __init__
    raise RuntimeError(translate('asm3', 'Failed to solve {}: {}').format(
RuntimeError: Failed to solve (MainAssembly#PlateForMotor) MainAssembly#Assembly002: inconsistent constraints
RealThunder's A3 Wiki translation, join the project https://crowdin.com/project/freecad-asm3-wiki
User avatar
jpg87
Posts: 666
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: Assembly3 preview

Post by jpg87 »

Kuzma30 wrote: Fri Mar 25, 2022 6:54 am ... In "MainAssembly" file there is 2 sub-assembly - PlateForFK12 and PlateForMotor.

Obviously, you did it like this: as in the real world, you aligned solid cylinder and hollow cylinder (AxialAlignment), then brought plane to plane into contact (PlaneAlignment).
In virtual assembly, one must anticipate the expected result:
  • either you want to create a guidance in rotation (1 DOF kept in rotation around the common axis) and in this case you can directly use the PlaneCoincident constraint (whose name does not explicitly translate its capacities if we do not know them) by cleverly choosing the Elements to use,
  • either you want to position the two components without keeping any DOF: in this case, use the Attachment constraint instead and adapt the position of one of the Elements if necessary (NB: it may be necessary to use the function "Flip element" or "Flip part").
01PlateForFK12.png
01PlateForFK12.png (48.49 KiB) Viewed 2653 times
02PlateForMotor.png
02PlateForMotor.png (52.14 KiB) Viewed 2653 times
Big advantage of this last constraint: it does not use solver resources.

If you want me to send you my files, I will put them online in the evening.
My website : http://help-freecad-jpg87.fr updated 2022/08/01
User avatar
Kuzma30
Posts: 139
Joined: Wed Oct 24, 2018 11:50 am
Location: Ukraine

Re: Assembly3 preview

Post by Kuzma30 »

jpg87 wrote: Fri Mar 25, 2022 12:50 pm If you want me to send you my files, I will put them online in the evening.
It would be great.
RealThunder's A3 Wiki translation, join the project https://crowdin.com/project/freecad-asm3-wiki
User avatar
jpg87
Posts: 666
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: Assembly3 preview

Post by jpg87 »

Kuzma30 wrote: Fri Mar 25, 2022 4:15 pm...
I had time to integrate the bars in the "СтанинаСборка.FCStd" assembly.
After changing the number of bars in the "ТаблицаПараметров.FCStd" file (ТаблСтанина table), you must update the assembly (F5), then recalculate in Assembly 3 to update the constraints.

03Number bars.png
03Number bars.png (29.82 KiB) Viewed 2563 times
04Refresh.png
04Refresh.png (142.51 KiB) Viewed 2563 times
05Solve constraints.png
05Solve constraints.png (150.76 KiB) Viewed 2563 times
06result.png
06result.png (151.32 KiB) Viewed 2563 times

Files : https://www.dropbox.com/s/ccbrxymbfywnr48/06cnc.7z?dl=0
My website : http://help-freecad-jpg87.fr updated 2022/08/01
Post Reply