Assembly3 preview

Discussion about the development of the Assembly workbench.
User avatar
OakLD
Posts: 97
Joined: Fri Jan 12, 2018 7:38 pm
Location: Brno

Re: Assembly3 preview

Postby OakLD » Sun Jul 15, 2018 6:07 pm

Hello Realthunder and the comunity!

I have a following simple exercise, where I had a lot of trouble to apply constraints (mostly with stability after adding constraints). Let's have four (N) blocks, which we want to attach to a grid. I created a sketch of four lines. I inserted PartDesignWB.DatumPoint into the top faces of the cubes. Then I connected the new DatumPoint with the sketch line end-point using ASM3 PointCoincidence constraint. Then I created a new DatumPlane using two lines from the sketch and tried PlaneAlignemnt between a top face of the block and the DatumPlane, but every attemt failed. Finally, I found another way and constrained all four blocks top faces to each other, which gives only one solution - that is to align them with a correct plane. The last bit was to align the four blocks using PlaneAlignment on all outside faces. The result is OK, but I wonder, if it is the best solution or whether is there better a approach?
ASM3 - Cubes on grid.PNG
ASM3 - Cubes on grid.PNG (86.97 KiB) Viewed 472 times
In particular:

1) What is the best way to create a resource for blocks position? I first tried a sketch with points, but they are not accessible outside the sketch. So I had to add lines, they worked. I also tested "grid" from Arch WB, that didn't work either.

2) What about constraints used for blocks? Is it OK, or is there a better set of constraints?

3) Did I used Links correctly?

FreeCAD files attached.

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14058 (Git)
Build type: Release
Branch: (HEAD detached at FETCH_HEAD)
Hash: 7e5b332370b07f7fa41190033f9295eb3a6faa10
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: Czech/CzechRepublic (cs_CZ)
Attachments
CubeTest.7z
(42.28 KiB) Downloaded 12 times
Regards,

Oak
project4
Posts: 153
Joined: Fri Jul 12, 2013 12:53 pm

Re: Assembly3 preview

Postby project4 » Sun Jul 15, 2018 8:03 pm

OakLD wrote: ping
Can you please explain how did you add the cubes to the assembly?
You have the Cube file, but the "Test Cube" in the assembly parts is not a link... Did you redraw the cubes in the assembly file as well?

I have a need for similar scenario as well, but can't find a "normal" way to do it.
I thought to point all the cubes in the same direction (that works) and set distances between the faces pointing to each other, but that doesn't really work out, it's impossible to align the cubes to the needed places.

I guess the "SameOrientation" constraint might replace the datumplane that you used to align the cubes, but setting their location is still a problem.

EDIT:
I got several "RuntimeError: Failed to solve "Assembly": inconsistent constraints" errors while playing with that...
project4
Posts: 153
Joined: Fri Jul 12, 2013 12:53 pm

Re: Assembly3 preview

Postby project4 » Sun Jul 15, 2018 8:19 pm

realthunder wrote: At the moment, there is LinkArray, and LinkPathArray in Draft workbench that can do these things. These two features are added early before I started working on asm3, as a demonstration of how to use Link in Python. they still create shapes in the background for compatibility with Draft array, so they are not fully optimized like built-in link array. I'll change that in the future. But at least it does what you want. You can use various properties in the array to arrange your object in some pattern, and then toggle ShowElement to True to reveal all the individual array elements as objects, and enables you (or the assembly solver) to freely move those elements.
I just tried to use the array list feature to have 4 legs/cubes as from the @OakLD example with a set distance between them.
The array looked ok and I was able to add it to a newly created assembly, but I was not able to move it anywhere in the assembly.
The move part toolbar stays disabled regardless what I'm selecting...
Attachments
CubeTest.zip
(29.38 KiB) Downloaded 10 times
realthunder
Posts: 1164
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Mon Jul 16, 2018 12:46 am

OakLD wrote:
Sun Jul 15, 2018 6:07 pm
1) What is the best way to create a resource for blocks position? I first tried a sketch with points, but they are not accessible outside the sketch. So I had to add lines, they worked. I also tested "grid" from Arch WB, that didn't work either.
Using sketch lines is the easiest way, or you can try SketchExport, which allows you to export sketch points and construction lines. You probably should also create a circle for easy locking of the sketch.
2) What about constraints used for blocks? Is it OK, or is there a better set of constraints?
Plane alignment can accept more than two plane elements. You can simply select all four top planes and use just one plane alignment constraint as shown below. If those objects are to be fixed with the same orientation, you don't need the side plane alignment either. Simply toggle the LockAngle property of the top plane alignment constraint.
Screenshot from 2018-07-16 07-01-05.png
Screenshot from 2018-07-16 07-01-05.png (72.67 KiB) Viewed 419 times
3) Did I used Links correctly?
Looks fine to me.
Try Assembly3 (latest version 0.10.2) 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
realthunder
Posts: 1164
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Mon Jul 16, 2018 12:54 am

project4 wrote:
Sun Jul 15, 2018 8:19 pm
I just tried to use the array list feature to have 4 legs/cubes as from the @OakLD example with a set distance between them.
The array looked ok and I was able to add it to a newly created assembly, but I was not able to move it anywhere in the assembly.
The move part toolbar stays disabled regardless what I'm selecting...
You are using the draft link array. This is different than the normal link array, For draft link array, when you set 'ShowElement' to False, the placement of the individual element follows the pattern you defined in the array object. Only when you set 'ShowElement' to true, can you actually move the array element.

EDIT: I just realized that there is another thing that is confusing you. The Draft array you created in Cube file has a 'ShowElement' property, and this is the property you should change to 'True'. When you drag Draft array to another document, the 'test' document, it automatically creates a App::Link object, which also has a property named 'ShowElement', because App::Link also has an array mode. I should probably rename the Draft array 'ShowElement' to something else. In short, what you need to do is to select the Draft array in Cube file, and change 'ShowElement' to True.
Try Assembly3 (latest version 0.10.2) 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
jpg87
Posts: 278
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: Assembly3 preview

Postby jpg87 » Mon Jul 16, 2018 7:23 am

OakLD wrote:
Sun Jul 15, 2018 6:07 pm
Hello Realthunder and the comunity!
Hello,
I do not know if I answer your problem, but here is my interpretation :

anim_test_4pieds.gif
anim_test_4pieds.gif (338.2 KiB) Viewed 385 times
Attachments
test4cubesV2.fcstd
(18.34 KiB) Downloaded 7 times
My website : http://help-freecad-jpg87.fr updated 2018/10/17
User avatar
jpg87
Posts: 278
Joined: Thu Mar 16, 2017 7:16 am
Location: Limoges - France
Contact:

Re: Assembly3 preview

Postby jpg87 » Mon Jul 16, 2018 4:43 pm

Hello,
You will find at this address a transmission test of movements :

https://forum.freecadweb.org/viewtopic.php?f=36&t=29794
My website : http://help-freecad-jpg87.fr updated 2018/10/17
raphTec
Posts: 1
Joined: Mon Jul 16, 2018 5:35 pm

Re: Assembly3 preview

Postby raphTec » Mon Jul 16, 2018 5:47 pm

Hello,

I want to try the asm3 Preview build on github, but it does not work:
I'm getting a yellow line on startup

Code: Select all

<asm3.main> 0.165215 - init_gui.py(14): no solver backend found
Anytime I try to interact with assemblies the following line is printed:

Code: Select all

<asm3.sys> 16.466876 - solver.py(286): no assembly found
I use the AppImage builds from github, and the two most recent versions lead to this behavoir.
I looked over the code snippets where these messages come from, but could not figure out how to fix this. I also searched in this topic for the warnings and looked through the wiki on github, but unsucessful.
My guess is that I am running it somewhat wrong, although I believe that AppImage containers should contain everything to "make it work".

Also I noticed that when I download the files the file ends with .bin, and not .AppImage like it is displayed. On my mobile phone it downloads with the .AppImage extension. The md5sums of the files downloaded over phone and computer match, so the content is the same.

Any help is appreciated.
User avatar
OakLD
Posts: 97
Joined: Fri Jan 12, 2018 7:38 pm
Location: Brno

Re: Assembly3 preview

Postby OakLD » Mon Jul 16, 2018 8:14 pm

project4 wrote:
Sun Jul 15, 2018 8:03 pm
Can you please explain how did you add the cubes to the assembly?
You have the Cube file, but the "Test Cube" in the assembly parts is not a link... Did you redraw the cubes in the assembly file as well?
Yes, it is a link. I guess, that when you set number of link to a value grater then initial 0 (but logically, to 2 or more), it is displayed like this. So the "part" object (Test Cube) is a container for "links" (Link_i0, Link_i1,...).
TestCubeLink.PNG
TestCubeLink.PNG (49.07 KiB) Viewed 311 times
project4 wrote:
Sun Jul 15, 2018 8:03 pm
I have a need for similar scenario as well, but can't find a "normal" way to do it.
I thought to point all the cubes in the same direction (that works) and set distances between the faces pointing to each other, but that doesn't really work out, it's impossible to align the cubes to the needed places.
I did fight with the solver too. The aproach with distance between faces is OK for unique parts, an assembly of several parts. If you have a lot of parts in some plannar arrangement, it is not practical. You need a sketch (a "plan") of the arrangement, which is usually an information (a represented by a drawing) on it's own. In my real little task behind this exersice, I have a plan of 25 concrete bases for a little barn I am building. So I want to place the concrete bases to the given positions in the plan. Furthermore, it's partly irregular, so arrays are not usable either.
project4 wrote:
Sun Jul 15, 2018 8:03 pm
I got several "RuntimeError: Failed to solve "Assembly": inconsistent constraints" errors while playing with that...
Yes, I did get a lot of solver errors as well. That is a development version after all. I'm sure it's gonna be polished in time :-)
Regards,

Oak
User avatar
OakLD
Posts: 97
Joined: Fri Jan 12, 2018 7:38 pm
Location: Brno

Re: Assembly3 preview

Postby OakLD » Mon Jul 16, 2018 9:03 pm

jpg87 wrote:
Mon Jul 16, 2018 7:23 am
I do not know if I answer your problem, but here is my interpretation :
Hello jpg,

yes, it is a valid answer I suppose and reasonable in some cases. Though, in the given example, the placement of the cubes by their centre point against grid or sketch is quite an important point. As explained in another post, the sketch is an information resource on it's own.
Regards,

Oak