The need for a default assembly workbench

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
onekk
Veteran
Posts: 6146
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: The need for a default assembly workbench

Post by onekk »

I could not guess why a solver is needed?

When TNP will be mitigated and using a face will be not so dangerous, you could define as example centerofface as "Tip" and an offset to specify a correct point.

Same for the mating component.

But probably I'm not an expert so no problem on this side.

Good Idea of @Zolko about a common format for assembly but even an Assembly WB that could be extended by add-ons, is not a bad idea.

I think that will be ease even WB maker as basic assembly capabilities are a real need.

Extendind a well taylored framework could be a way to have some flexibility as it will supply a tools that will suffice for most users.

More specialized users could use a more "complete" WB that maybe will better fit his habits or tastes.

However as assemblies are usually made assembling different FCStd file a sort of container ie a compressed directory format that could be send maybe with email as a .FCASM file (not very original :lol: ) will be a good move, as it could maybe incorporated even some Documentation, or other things, not too much things, probably a skeleton with some subdirectory tree, and Some RichText format Documents that could be visualised by FreeCAD using standard python libraries as example ReSTructured text or MarkDown to not increase too much FreeCAD size and use some already made things used by others widespread OpenSource projects.

It is all about to think, discuss and "put in place" something that will be not too complicated following the KISS principle.

Python has many things already in the "standard python library" even a SQLite library, (that could even support binary blobs to contain images and other things) :lol:

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
chrisb
Veteran
Posts: 53930
Joined: Tue Mar 17, 2015 9:14 am

Re: The need for a default assembly workbench

Post by chrisb »

I fully agree with Zolko: if we have a sound assembly data structure developers can build on top of this whatever assembly workbench they want - including a default one. However, this is of course driven by the possible use cases which finally can occur, so asking for these doesn't seem wrong.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Lonfor
Posts: 133
Joined: Wed Mar 23, 2022 2:32 am

Re: The need for a default assembly workbench

Post by Lonfor »

user1234 wrote: Tue Mar 14, 2023 6:07 pm
Lonfor wrote: Tue Mar 14, 2023 5:48 pm No assembly solver needed and the KISS principle is kept.
Then how you want to assemble and move a linking system? There you need a solver. Also implement a solver afterwards will be a major pita. All other things what do you describe can done right now without any addon, just just the part container and links.
Of course I want all bells and whistles but my scope was to get an official default FreeCAD assembly to take off without delay. Refinements and feature requests surely will come later and in great numbers. I should have expressed myself better.
Zolko wrote: Tue Mar 14, 2023 8:59 pm What I propose is to extend that definition by: an assembly container is a Std_Part where the Type has been set to "Assembly" (this will give it an assembly icon in the tree).
+1

On a side note there is an assembly feature that Zolko told me months ago that it needs changes at the FreeCAD core level to be implemented, and it is to search for files to load plus linked geometry and expressions, recursively on a given path, so if files are moved and scrambled around in many directories, FreeCAD will be able to load everything automatically and without a fuzz. See pic.
Attachments
z1.png
z1.png (41.45 KiB) Viewed 1519 times
user1234
Veteran
Posts: 3343
Joined: Mon Jul 11, 2016 5:08 pm

Re: The need for a default assembly workbench

Post by user1234 »

onekk wrote: Tue Mar 14, 2023 10:38 pm I could not guess why a solver is needed?
You need a solver when you need real assembly functions. If you just build assemblies, translate and rotate things, you do not need an assembly WB, you can do it already yet. But you need an solver for every simple linking function, when you do not want everything with big case to case math function for every case. Also it will get pretty fast ugly (and slow to maintain) when you need tangential constraints or 3D, or worse both in the same time.

mwe: this here is just fast possible, because of the solver of the sketcher (link position and angle, driven by rotation of the ring). Without solver or math, impossible, because you can not just "coincident" from both sides and it works, you need a solver for that.

2023-03-15_02-39.png
2023-03-15_02-39.png (360.39 KiB) Viewed 1499 times


Lonfor wrote: Wed Mar 15, 2023 1:43 am Of course I want all bells and whistles but my scope was to get an official default FreeCAD assembly to take off without delay.
Sorry but that way of thinking is just flub. Also what you want (without solver) you can do already right now.

Generally a (not addon) assembly wb without solver is like a sketcher without solver, not really useful.


And also about just use addons, where do you need often an assemby wb? In firms. Where you often have not access or not allowed just to install things, in firms!

Just sidestep to addons is no a really good solution. Also imaging: Person A send an assembly to person B to inspect the clearance of an assembly (what is a normal usecase) or to modify something. But then person B says, "sorry, i can not work on this file, because i have not the addon for because

- i have not the dependencies for the addon
--- because it is not in the OS
--- i am not allowed to install the dependencies
--- i have no access to pip
- i am not allowed to install the addon
- ....."


I know right now many companies, where this case is in fact true. By hook or by crook, you maybe can install FreeCAD, but addons, no way. It makes just little sense, especially where assemblies mostly are used.


Greetings
user1234
Lonfor
Posts: 133
Joined: Wed Mar 23, 2022 2:32 am

Re: The need for a default assembly workbench

Post by Lonfor »

user1234 wrote: Wed Mar 15, 2023 2:11 am
Lonfor wrote: Wed Mar 15, 2023 1:43 am Of course I want all bells and whistles but my scope was to get an official default FreeCAD assembly to take off without delay.
Sorry but that way of thinking is just flub. Also what you want (without solver) you can do already right now.
Not quite. I need the file name in the tree, not bodies. And have access from the tree to the files' individual coordinate system. A2P allows the first, A4 allows me the later but using a hybrid way, not a native one.
user1234
Veteran
Posts: 3343
Joined: Mon Jul 11, 2016 5:08 pm

Re: The need for a default assembly workbench

Post by user1234 »

Lonfor wrote: Wed Mar 15, 2023 2:22 am I need the file name in the tree, not bodies. And have access from the tree to the files' individual coordinate system.
Part_container, link function.

Greetings
user1234
Lonfor
Posts: 133
Joined: Wed Mar 23, 2022 2:32 am

Re: The need for a default assembly workbench

Post by Lonfor »

user1234 wrote: Wed Mar 15, 2023 2:24 am Part_container, link function.
The container fulfill my wish, but it is redundant and not a global coordinate system, but a local one susceptible to be moved by error or tampering. A visible full global coordinate system (3 axes + 3 planes), like the one offered by the container is due.
User avatar
FBXL5
Posts: 979
Joined: Sat Aug 03, 2019 8:45 pm

Re: The need for a default assembly workbench

Post by FBXL5 »

sliptonic wrote: Tue Mar 14, 2023 8:49 pm Can we start by agreeing that a default assembly workbench is in the best interest of our users and should be a strategic goal for the project?
I agree.

I think an assemly wb should be able to handle fix assemblies and kinematic assemmblies as well.
I like the concept of Fusion having the same assembly constraints for both tasks. ASM3 seems to go into ta similar direction, but it could be a bit more userfriendly. The handling of angles is tricky, at least; some constraints work from 0 to 180° other from0 to 360° and some can handle several full turns.
And I like the workflow associated with ASM3; I tried A2+ but don't like it much. I haven't tried ASM4 yet since the documentation on the wiki is a bit sparse.
User avatar
ppemawm
Veteran
Posts: 1240
Joined: Fri May 17, 2013 3:54 pm
Location: New York NY USA

Re: The need for a default assembly workbench

Post by ppemawm »

FBXL5 wrote: Wed Mar 15, 2023 9:48 am Can we start by agreeing that a default assembly workbench is in the best interest of our users and should be a strategic goal for the project?
FBXL5 wrote: Wed Mar 15, 2023 9:48 am I think an assemly wb should be able to handle fix assemblies and kinematic assemmblies as well.
user1234 wrote: Wed Mar 15, 2023 2:11 am Generally a (not addon) assembly wb without solver is like a sketcher without solver, not really useful.
+1
We can certainly agree to that goal but it absolutely must have a solver otherwise it is not useful for typical engineering design work. As Einstein would say, "Make it simple, but not too simple."

I am partial to Assembly4 since it is about as simple as it gets IMO, and it is tightly integrated with PartDesign. The sketcher solver can be routinely used for kinematics of the more complex assemblies especially if you are using master sketches to set design constraints. You must be able to solve the assembly as the design progresses to be able to check for clearances, collisions, proper operation, etc. over a range of motion. Assembling bodies and designing assemblies are two different things.
"It is a poor workman who blames his tools..." ;)
User avatar
onekk
Veteran
Posts: 6146
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: The need for a default assembly workbench

Post by onekk »

Lonfor wrote: Wed Mar 15, 2023 1:43 am ...
On a side note there is an assembly feature that Zolko told me months ago that it needs changes at the FreeCAD core level to be implemented, and it is to search for files to load plus linked geometry and expressions, recursively on a given path, so if files are moved and scrambled around in many directories, FreeCAD will be able to load everything automatically and without a fuzz. See pic.
A little problem could be that FreeCAD has to work on three different OS at least, so some "automagicks" could be a problem if the underlying filesystem, python library or maybe the presence of networked drives and similar things could impact on the feasability of the things.

From what I know Python could cope in a good transparent way storing path in a POSIX way and having library to cope with the real filesystem, but actually some paths are not stored this way, from what some users reports.

We should enforce the use of Python 3’s pathlib library:

https://docs.python.org/3.10/library/pathlib.html

for every access to external files, as probably it is the best way to cope with this sort of things, but if you store a path as a string and use as example the windows "C:\kkkk\kkk\kk\" it is not translatable in a POSIX path "../fcstd/file1.FCStd" as example.

So the idea to have a common container for assemblies that state a directory tree that is used to place files and use the position of the "assembly file" as a root directory (../)

Assembly.FCStd
-- subasm (where other FCStd file will reside
-- step (or stp) where maybe STEP file will reside as you could use an imported STP solid as a "component" of the assembly
-- stl (maybe some could be useful)
-- img (who cares, maybe some images could be illustrate better something)
-- docs (here you place documentation)
-- others?

so every path will be (../subasm/file1.FCStd) and so on.

pathlilb could see what os you are using and translate the paths accordingly (note the use of lowercase directory name, to avoid problems with case sensitive OS)

But this should be made as a preliminary decision.

maybe an options would be to compress the directory tree in a file maybe named .FCAsm or .fcasm to remain consistent with lowercase naming that could be send by email and shared from coworkers.

when FreeCAD pen such file it already know that it has to deal with an Assembly structure and could act acordingly.

But it is rough idea and some debate is necessary.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
Post Reply