Skip to content
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

[Problem] Assembly: Parts created in context can’t be saved in a separate file #12708

Open
2 tasks done
pierreporte opened this issue Mar 2, 2024 · 5 comments
Open
2 tasks done
Labels
Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD Feature FR for improvements or new features

Comments

@pierreporte
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Problem description

When parts are created with Std_Part directly in an existing Assembly container, they are stored in the document containing the assembly (the document can be on the disk or in memory before being saved). It is not possible to tell FreeCAD that it needs to be in a separate document. To store parts in independent documents, they need to be created separately and not in context.

This limits the ability to work with several files. While it is understandable to allow for the whole project to be in a single file, this is not the most common in the industry. Even then, it may be desired to extract one part of a project to reuse it elsewhere more easily.

When the part is detached, it must be transformed into a link in the assembly and all other links to existing geometry must be replaced as well so the process is as seamless as possible.

There should be a program option to automatically detach parts (and later sub-assemblies) from their parent, for those who prefer to work with one component per file.

Full version info

OS: Ubuntu 23.10 (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.36166 (Git) AppImage
Build type: Release
Branch: main
Hash: a5ea8023a29b6d7bbf1ebd57b5ed31dd27c5947b
Python 3.10.13, Qt 5.15.8, Coin 4.0.2, Vtk 9.2.6, OCC 7.6.3
Locale: French/France (fr_FR)
Installed mods: 
  * CosmeticThread3D
  * TabBar (Disabled)
  * Curves 0.6.23
  * CurvedShapes 1.0.5
  * sheetmetal 0.4.0
  * OpenDark 2023.12.1
  * OpenLight 2023.12.17

Subproject(s) affected?

Assembly

Anything else?

See discussion #11742

Code of Conduct

  • I agree to follow this project's Code of Conduct
@luisDias89
Copy link

Stated clearly and concisely, that's exactly what FreeCAD lacks. Congratulations!

@luzpaz luzpaz added the WB Assembly Related to the Integrated Assembly Workbench label Mar 3, 2024
@maxwxyz maxwxyz added WB FEM Related to the FEM Workbench Feature FR for improvements or new features and removed WB FEM Related to the FEM Workbench labels Mar 3, 2024
@PaddleStroke
Copy link
Contributor

So this issue is also rather a App::Part issue. It's all revolving around the idea of single file per document it seems.

@pierreporte
Copy link
Author

@PaddleStroke Yes it will enable single component per file. I understand that the project isn’t currently willing to go this way by default (even single root per file) but that workflow must be possible with FreeCAD.

@maxwxyz Could you add the core label? It’s still an assembly issue because assemblies container are going to require this as well when the follow-up PR is merged.

@maxwxyz maxwxyz added Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD and removed WB Assembly Related to the Integrated Assembly Workbench labels Mar 13, 2024
@PaddleStroke
Copy link
Contributor

If we use Std_Part, then we are modifying the behavior for all parts.
If we make another tool in assembly, then we have a duplicate tool on the UI. Which is going to be very confusing.

Maybe the Std_Part should prompt the user 'Create part in a new document?' yes no always yes always no.

@pierreporte
Copy link
Author

Modifying Std::Part could be a good thing because assemblies inherit from it so it would allow for sub-assemblies to be saved in a separate file as well, which is needed. A separate tool may be interesting, considering that Std::Part is actually Std::Component from which parts proper and assemblies are derived. The Std::Part (renamed or not) would disappear from the toolbars.

I like your dialog but I would transform the always buttons by a single checkbox “never ask again”. The label could say that it can be changed in the settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Issue or PR touches core sections (App, Gui, Base) of FreeCAD Feature FR for improvements or new features
Projects
None yet
Development

No branches or pull requests

5 participants