feat: .kc file format — Layer 1 (format registration)

Cherry-picked from feat/kc-file-format-layer1 (723a8c98d5).
- Document.cpp: checkFileName() accepts .kc extension
- FreeCADInit.py: register .kc import type
- Dialog filters: Save As, Save Copy, Merge, Project Utility
- kc_format.py: DocumentObserver preserves silo/ entries across saves
- InitGui.py: register kc_format observer on startup
This commit is contained in:
forbes
2026-02-13 14:10:36 -06:00
parent 54031edede
commit 9809ff852c
7 changed files with 76 additions and 6 deletions

View File

@@ -1728,7 +1728,7 @@ static std::string checkFileName(const char* file)
.GetParameterGroupByPath("User parameter:BaseApp/Preferences/Document")
->GetBool("CheckExtension", true)) {
const char* ext = strrchr(file, '.');
if ((ext == nullptr) || !boost::iequals(ext + 1, "fcstd")) {
if ((ext == nullptr) || (!boost::iequals(ext + 1, "fcstd") && !boost::iequals(ext + 1, "kc"))) {
if (ext && ext[1] == 0) {
fn += "FCStd";
}