-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Assembly Context Features #14116
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks like icons are removed from this file, but they are just moved down
Thanks, please also add a demo as mentioned in the issue. TIA |
I added this to the pr description: https://github.com/drwho495/FreeCAD-Context-Fork/blob/LinkStable/context-assembly-example2.gif |
Sorry I can't understand very clearly what this is about just with the gif and description. If possible a video of a simple case presenting the issue, how this tool works and how it solves would be helpful. |
Ok I think I understand the idea now. It's to design a part that reference other parts in the assembly. Yet a video presenting the workflow would still be good. |
alright, i will start on one |
this affects the Context system, if a new object that was not present on the last update it will be added
And if you can add a real-world model to go along for testing it would be great! |
https://www.youtube.com/watch?v=7rAA28M6hs0 |
Ok, so the reason you cannot just edit the part from within the assembly or create links, is because it creates a cyclic error. This tool is impossible for cyclic errors to be generated unless the user trys to. I also plan on optimizing the speed and multi threading it |
Switched to draft while work continues - please mark as ready for review when it's settled down. |
Indeed it appears that it is giving cyclic dependencies errors when attempting to use a link to the assembly. Or also when trying to edit the external object while in the assembly. I think the ideal solution here would be to be able to modify the object directly from the assembly file and be able to reference to other objects of the assembly. Is that right? (As a note, I think that this is already possible if you are putting the body directly inside the assembly instead of using a Link to an external body.) If so then the correct solution would be to make it work and find a way around these cyclic dependency problem. It would be a much more user friendly solution than having a tool creating copies of solids and another tool to update them. |
I think it would be great if you have a assembly reference in the single parts as reference. Especially in large assemblies and also when you collaborate with different people they cannot work in the same file. Usually each part is in its own file and location. |
This tool does work around the cyclic error, this is exactly why I created it. |
This is also what my tool does. It creates Part::Feature objects that copy the shapes of assembly objects. |
I made a comment on the youtube video, and I’m leaving a comment here too, because I think this kind of tool — one that can “modify the object directly from the assembly file and be able to reference to other objects of the assembly” — is very very helpful. It would be good to have on FreeCAD if we dont have that yet… I’m new to FreeCAD, still starting to learn, so keep in mind that I’m not that used to the naming yet… What I could get from the video is that the Subshape Binder was used, and that creates a copy — like a “ghost” — of the features of the particular part (that is to be referenced) into the “active” part (which is being edited). And this “ghost” is kept within the “active” part, as a feature. I have experience with Creo, so I’ll try to explain how it works there… Suppose I have an assembly ASM1 made of 3 parts, and need to edit PART3, referencing a hole pattern from PART1 and edges of PART2. First thing, I would “activate” PART3 to be able to edit it from inside the ASM1. After activating it, I would create an “Extrude” from a surface, and with that, go into “sketch” mode. Inside sketch mode, I would select “REFERENCES” tool, and would be able to select the features from parts PART1 and PART2 that I need referencing. Here’s the nice thing… After finishing sketching, I would extrude it and finish the editing inside PART3, and “activate” ASM1 to go back to assembly mode. I’ll leave a question and a suggestion: . Can I do similar thing in FreeCAD today? Or do I need this tool being developed to do that? It seems that instead of creating references inside the sketch, the tool is creating “ghost” features into the part itself. Maybe referencing from inside the sketch would reduce the amount of things to load. Thanks. |
This addresses issue #14105. This adds two tools and three Python files. The first tool is an Assembly Context Creator, and the second is an Assembly Context Updater. The python files are "CommandUpdateAssemblyContext.py", "ContextCreatorLibrary.py", "CommandCreateAssemblyContext.py". The files with the name of "CommandUpdateAssemblyContext.py" and "CommandCreateAssemblyContext.py" manage each command and the task dialogs that surround them. "ContextCreatorLibrary.py" is the library that manages the groups, creating the contexts, updating the contexts, and etc. This file can be used (if modified) in other Assembly workbenches like Assembly3 and Assembly4.
This solution can be held back by TNP issues, as the sub-shape binder tool you would use to reference the Assembly Context geometry often breaks, making this approach frustrating. I have found a workaround: when using the sub-shape binder tool, ensure you select the entire object and not just a single face. If the geometry of the assembly context object changes, the binder won't break, but you may still need to redefine the references in your sketches. I find that by using this method I don't have to redefine everything nearly as much.