Assembly3 preview

Discussion about the development of the Assembly workbench.
realthunder
Posts: 1810
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Mon Oct 19, 2020 1:13 am

catman wrote:
Sun Oct 18, 2020 3:13 pm
Is there a way to avoid that frozen assemblies loose their colors?

When I freeze the assembly all those parts become grey.
(using 0.19 22611 in Linux)
Are you using upstream FreeCAD? Upstream does not support coloring when freezing. If it is my branch, then it would be a bug. Can you please post some files?
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
realthunder
Posts: 1810
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Mon Oct 19, 2020 1:36 am

cos4 wrote:
Sun Oct 18, 2020 8:29 pm
I'm currently experiencing some issues with inconsistent constraints. I managed to create a small example illustrating this behavior.
My goal is to:
- position the extrusion in the center of the coordinate system aligned with x,y,z and lock it in this position
- position the metal sheet on top of the extrusion, and center it in x and y relative to the extrusion.
Not entirely sure what you want to achieve. But it seems that your constraints requirement is quite restrictive. If you want completely lock two parts, the first option is to try the 'Attachment' constraint. Just change the existing constraint's property 'Constraint Type' will do. No need to delete and recreate. You can always adjust the element offset to align at some displacement.
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
realthunder
Posts: 1810
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Mon Oct 19, 2020 1:46 am

kwahoo wrote:
Wed Oct 14, 2020 6:07 pm
Maybe we should consider adding option to use similar behavior: after constraining a new part automatically lock it and disable it's constraints?
I think it would be difficult to determine when a part is in the desired location. So automation will be a problem. To manually do that, you can simply add a Lock constraint on the part.
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: 277
Joined: Fri Jan 11, 2019 10:42 pm

Re: Assembly3 preview

Postby catman » Mon Oct 19, 2020 11:35 am

realthunder wrote:
Mon Oct 19, 2020 1:13 am
catman wrote:
Sun Oct 18, 2020 3:13 pm
Is there a way to avoid that frozen assemblies loose their colors?
(using 0.19 22611 in Linux)
Are you using upstream FreeCAD? Upstream does not support coloring when freezing.
I am using the upstream version of 019pre with your Assembly3 already included (the AppImage). It very helpful to know it works in your branch, thanks. Next time you collect stuff for the next merge, I think you should consider to include this, because imho its a good thing to get into the main version, maybe as check item in the preferences. For larger models it is always a difficult choice between 'lookig ugly' or 'fragile to use' :D


BTW,
I noted that the constraint Attach got some fixes a few weeks ago. However, using upstream 22611, I keep noting cases of multiply constraint where I need to use "Place Conicident" where "Attach" would be the better choice. Are you aware of that or is it worth to nail down a minimal test case?

Also recently I had 4 link-parts (element count=4) constrained in an assembly, where I wanted to remove 2 of them (set element count=2). I could not get the count to lower, it would just ignore the lower cout and also the delete commands for marked parts. I tried deleting the constraints and elements concerning those parts, but with no avail. In the end I deleted the link (loosing all 4) and re-assembled the 2 I needed. Again, knwon or worth to nail down a test case?
catman
Posts: 277
Joined: Fri Jan 11, 2019 10:42 pm

Re: Assembly3 preview

Postby catman » Mon Oct 19, 2020 11:42 am

EskiBrew wrote:
Sun Oct 18, 2020 9:31 pm
Ah yes, I spotted that but it does not seem to be clear what it means - I suspect it means the total DOF of all the parts which have constraints, which is of limited use.
I guess your are right. Maybe its worth to try out realthunders own branch version. Its more complete and advanced that the stuff currently merged back into the main release. I would expect you find more debug and dev support functions there.
Do you happen to know which constraint to use to lock the rotation of two items? - Imagine a shaft with a pulley on it, how do I lock the two parts together such that when the shaft rotates, the pulley also rotates?
I would use the attachment constraint. Its just locks the two Elements local coordinate systems (LCS) together. You will need to adjust the offets from there go get the pulley to its position on the axis (Its the computationally cheapest constraint in the arsenal, so you should try to use it where you can).
EskiBrew
Posts: 67
Joined: Fri Apr 24, 2015 10:21 am

Re: Assembly3 preview

Postby EskiBrew » Mon Oct 19, 2020 11:59 am

catman wrote:
Mon Oct 19, 2020 11:42 am
I guess your are right. Maybe its worth to try out realthunders own branch version. Its more complete and advanced that the stuff currently merged back into the main release. I would expect you find more debug and dev support functions there.
Yes, that's probably a good idea.
catman wrote:
Mon Oct 19, 2020 11:42 am
I would use the attachment constraint. Its just locks the two Elements local coordinate systems (LCS) together. You will need to adjust the offets from there go get the pulley to its position on the axis (Its the computationally cheapest constraint in the arsenal, so you should try to use it where you can).
Ah thanks - I have not tried that constraint as I was not sure of the purpose but it makes sense now - I will try it. 8-)
cos4
Posts: 10
Joined: Wed Feb 05, 2020 8:37 pm

Re: Assembly3 preview

Postby cos4 » Mon Oct 19, 2020 8:44 pm

kwahoo wrote:
Sun Oct 18, 2020 9:26 pm
Assembly3 uses Solvespace's solver and (from my understanding) it really does not like redundant constraints. It's homepage states
Using plane alignment you constrain 3DOF: 1 translation and 2 rotations. After using plane alignment second time there is a redundant rotation.

I do not have a viable solution for you, maybe others have.
I just try not to create redundant constraints, eg. in this case should be possible to use a single PointCoincident to constrain all translations, and then 3x MultiParallel to on pairs of axes/edges to constrain all rotations.
Thank you for the insights. Yes that should be a working solution mathematically. I'd need to define some points in the right locations which is a bit clumsy but possible.
realthunder wrote:
Mon Oct 19, 2020 1:36 am
cos4 wrote:
Sun Oct 18, 2020 8:29 pm
I'm currently experiencing some issues with inconsistent constraints. I managed to create a small example illustrating this behavior.
My goal is to:
- position the extrusion in the center of the coordinate system aligned with x,y,z and lock it in this position
- position the metal sheet on top of the extrusion, and center it in x and y relative to the extrusion.
Not entirely sure what you want to achieve. But it seems that your constraints requirement is quite restrictive. If you want completely lock two parts, the first option is to try the 'Attachment' constraint. Just change the existing constraint's property 'Constraint Type' will do. No need to delete and recreate. You can always adjust the element offset to align at some displacement.
I'm trying to center the metal sheet about the length and width of the extrusion and place it on top of it (as shown in the screenshot). Attachment sounds good but I can't find the options to define the offsets between the two COS(only "Cascade" and "Multiply" are available in the constraints properties) - is this available in the Appimage or only in your branch?

ps: I also noticed that the highlighting of Planes appears to be wrong. In the screenshot the PlaneAlignment correctly lists the YZ-Planes as its elements. In the 3D-Model however the XY-plane is highlighted. Is that a known issue?
Attachments
Screenshot from 2020-10-19 22-32-06.png
Screenshot from 2020-10-19 22-32-06.png (110.75 KiB) Viewed 512 times
catman
Posts: 277
Joined: Fri Jan 11, 2019 10:42 pm

Re: Assembly3 preview

Postby catman » Sun Oct 25, 2020 1:58 pm

I have a little constraint puzzle.

The task is to constraint 4 Part WB tubes to a frame with least amount of constraints. The frame should look like in the image below. The assembly in the image and in the file solves it partially - sort of. But it is a bad solution, because it requires that the end of the tubes are perpendicular. If they are e.g. cut in a 45° angle it will not work any more.

TubesConstraintIssue.png
TubesConstraintIssue.png (118.45 KiB) Viewed 339 times
Simple but bad assembly for a 4 tube frame (File attached)


In the file the following three constraints depend on the 90deg tube ends:
* Plane Alignment for the tube tops
* Plane Alignment for the tube right sides
* Perpendicular between one tube top and one tube side. This constraint should be able to work with lines, but it gave an error when I tried to used it with the tube axes.
Without those I failed to find a stable constraint solution.

So my questions are
* Is there a way to get the 4 tubes into one plane using only line features?
* Is there a way to get the "prependicular" constraint working with tube line features?
I am sure there is a smarter way to consistently constrain this simple set.
Attachments
TubesConstraint.FCStd
(20.58 KiB) Downloaded 7 times
realthunder
Posts: 1810
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Sun Oct 25, 2020 10:24 pm

cos4 wrote:
Mon Oct 19, 2020 8:44 pm
I'm trying to center the metal sheet about the length and width of the extrusion and place it on top of it (as shown in the screenshot). Attachment sounds good but I can't find the options to define the offsets between the two COS(only "Cascade" and "Multiply" are available in the constraints properties) - is this available in the Appimage or only in your branch?
The offset is set in the element instead of the constraint. Expand the constraint, the right click the element you want to offset, select 'Offset element' action.

ps: I also noticed that the highlighting of Planes appears to be wrong. In the screenshot the PlaneAlignment correctly lists the YZ-Planes as its elements. In the 3D-Model however the XY-plane is highlighted. Is that a known issue?
Yes, this is a bug. I've already fixed it in my branch. You can try my release. I'll submit a PR to upstream later.
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
realthunder
Posts: 1810
Joined: Tue Jan 03, 2017 10:55 am

Re: Assembly3 preview

Postby realthunder » Sun Oct 25, 2020 11:18 pm

catman wrote:
Sun Oct 25, 2020 1:58 pm
I have a little constraint puzzle.

The task is to constraint 4 Part WB tubes to a frame with least amount of constraints. The frame should look like in the image below. The assembly in the image and in the file solves it partially - sort of. But it is a bad solution, because it requires that the end of the tubes are perpendicular. If they are e.g. cut in a 45° angle it will not work any more.
It will be much easier if you model the tubes using PartDesign body, because you can then use sketch to create various auxiliary geometries used as constraining elements. If you use my branch, there even more tools to help with that. For example, you can use a single sketch to draw a rectangle and mark the mounting position using constructive circle. Create the tube using revolve. Export the marking for constraining purpose. And if you like it, extrude the marking directly to make the horizontal tubes, saving the use of an assembly altogether. You can have multiple solids in a body.
Screenshot from 2020-10-26 06-38-38.png
Screenshot from 2020-10-26 06-38-38.png (98.49 KiB) Viewed 261 times
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