Remove OpenSCAD from the web port
Web FreeCAD does not implement OpenSCAD. Drop the module end to end instead of keeping a blocked or placeholder shell: - delete the parity-matrix row and regenerate the module registry (31 modules, OpenSCAD absent) - remove the OpenSCAD-only frontend modules (worker, facades, slice, mesh backend, desktop/preferences tasks) and strip the OpenSCAD branches from the dispatchers, shells, storage and router - neutralise the two shared owners that outlived the module: openscad-desktop-view -> scene-viewport (SceneViewport) and openscad-desktop-adapter -> scene-document (SceneDocument), so Part, Mesh and the other consumers keep working - drop the FreeCADWebOpenSCADRuntimeProbe target and FREECAD_WEB_ENABLE_OPENSCAD option from the kernel CMake; BUILD_OPENSCAD stays in the forced-off list - delete web/openscad.html, its Vite input, the kernel artifacts and the 17 OpenSCAD tool entry points AGENTS.md records the removal rule. tsc --noEmit is clean and grep -ri openscad web/src is empty. Also carry the Boost pthread guard: under Emscripten a plain -lpthread implies -sUSE_PTHREADS=1 and therewith --shared-memory, which the non-atomics VTK archives cannot link against. Validation NOT_RUN / PARTIAL_FAILED, Acceptance NOT_CLAIMED. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
64
tools/generate_python_family_adapter_manifest.py
Normal file
64
tools/generate_python_family_adapter_manifest.py
Normal file
@@ -0,0 +1,64 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Generate an implementation-stage adapter map for one module+tier batch."""
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import hashlib
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
ADAPTERS = {
|
||||
"Assembly": ("assembly.worker.ts", "assembly.pythonFamily", "src/WebAssembly/FreeCADCoreProbe/AssemblyRuntimeProbe.cpp"),
|
||||
"BIM": ("bim.worker.ts", "bim.pythonFamilyBatch", "src/WebAssembly/FreeCADCoreProbe/BimRuntimeProbe.cpp"),
|
||||
"CAM": ("cam.worker.ts", "cam.pythonFamilyBatch", "src/WebAssembly/FreeCADCoreProbe/CAMRuntimeProbe.cpp"),
|
||||
"Draft": ("draft.worker.ts", "draft.pythonFamilyBatch", "src/WebAssembly/FreeCADCoreProbe/DraftRuntimeProbe.cpp"),
|
||||
"Fem": ("fem.worker.ts", "fem.pythonFamilyBatch", "src/WebAssembly/FreeCADCoreProbe/FemGenericFamilyProbe.cpp"),
|
||||
"Import": ("import.worker.ts", "import.pythonFamilyBatch", "src/WebAssembly/FreeCADCoreProbe/ImportRuntimeProbe.cpp"),
|
||||
"Material": ("material.worker.ts", "material.pythonFamilyBatch", "src/WebAssembly/FreeCADCoreProbe/MaterialKernelProbe.cpp"),
|
||||
"Measure": ("measure.worker.ts", "measure.pythonFamilyBatch", "src/WebAssembly/FreeCADCoreProbe/MeasureRuntimeProbe.cpp"),
|
||||
"Mesh": ("mesh.worker.ts", "mesh.pythonFamilyBatch", "src/WebAssembly/FreeCADCoreProbe/MeshRuntimeProbe.cpp"),
|
||||
"MeshPart": ("meshpart.worker.ts", "meshpart.pythonFamilyBatch", "src/WebAssembly/FreeCADCoreProbe/MeshPartRuntimeProbe.cpp"),
|
||||
"Part": ("part.worker.ts", "part.pythonFamilyBatch", "src/WebAssembly/FreeCADCoreProbe/PartBoxProbe.cpp"),
|
||||
"PartDesign": ("partdesign-python.worker.ts", "partdesign.pythonFamilyBatch", "src/WebAssembly/FreeCADCoreProbe/PartDesignRuntimeProbe.cpp"),
|
||||
"Plot": ("plot-python.worker.ts", "plot.pythonFamilyBatch", "src/WebAssembly/FreeCADCoreProbe/PlotRuntimeProbe.cpp"),
|
||||
"Points": ("points.worker.ts", "points.pythonFamilyBatch", "src/WebAssembly/FreeCADCoreProbe/PointsRuntimeProbe.cpp"),
|
||||
"ReverseEngineering": ("reverseengineering-python.worker.ts", "reverseengineering.pythonFamilyBatch", "src/Mod/ReverseEngineering/InitGui.py"),
|
||||
"Robot": ("robot-python.worker.ts", "robot.pythonFamilyBatch", "src/WebAssembly/FreeCADCoreProbe/RobotRuntimeProbeFixed.cpp"),
|
||||
"Sandbox": ("sandbox-python.worker.ts", "sandbox.pythonFamilyBatch", "src/WebAssembly/FreeCADCoreProbe/SandboxRuntimeProbe.cpp"),
|
||||
"Show": ("show-python.worker.ts", "show.pythonFamilyBatch", "src/WebAssembly/FreeCADCoreProbe/ShowRuntimeProbe.cpp"),
|
||||
"Sketcher": ("sketcher-python.worker.ts", "sketcher.pythonFamilyBatch", "src/WebAssembly/FreeCADCoreProbe/SketcherProbe.cpp"),
|
||||
"Spreadsheet": ("spreadsheet-python.worker.ts", "spreadsheet.pythonFamilyBatch", "src/WebAssembly/FreeCADCoreProbe/SpreadsheetRuntimeProbe.cpp"),
|
||||
"Surface": ("surface-python.worker.ts", "surface.pythonFamilyBatch", "src/WebAssembly/FreeCADCoreProbe/SurfaceFamilyProbe.cpp"),
|
||||
"TechDraw": ("techdraw-python.worker.ts", "techdraw.pythonFamilyBatch", "src/WebAssembly/FreeCADCoreProbe/TechDrawRuntimeProbe.cpp"),
|
||||
"TemplatePyMod": ("templatepymod-python.worker.ts", "templatepymod.pythonFamilyBatch", "src/WebAssembly/FreeCADCoreProbe/TemplatePyModRuntimeProbe.cpp"),
|
||||
}
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("module")
|
||||
parser.add_argument("tier")
|
||||
parser.add_argument("--output")
|
||||
args = parser.parse_args()
|
||||
if args.module not in ADAPTERS:
|
||||
raise SystemExit(f"no adapter mapping for {args.module}")
|
||||
manifest_path = ROOT / "docs/p6/python-api-manifest.json"
|
||||
rows = json.loads(manifest_path.read_text(encoding="utf-8"))["records"]
|
||||
selected = [row for row in rows if row["module"] == args.module and row["tier"] == args.tier]
|
||||
worker, command, native_source = ADAPTERS[args.module]
|
||||
records = [{"apiId": row["id"], "name": row["name"], "kind": row["kind"], "family": row["family"], "sourcePath": row.get("evidence", {}).get("path"), "route": command, "adapterStatus": "module_adapter_ready_pending_method", "disposition": row["disposition"]} for row in selected]
|
||||
output = {
|
||||
"schema": "freecad-web-python-family-adapter-manifest/v1",
|
||||
"taskId": f"FW-P6-FPA-IMPL-{args.module.upper()}-{args.tier.upper().replace('-', '_')}",
|
||||
"source": {"manifest": "docs/p6/python-api-manifest.json", "manifestSha256": hashlib.sha256(manifest_path.read_bytes()).hexdigest()},
|
||||
"module": args.module,
|
||||
"tier": args.tier,
|
||||
"count": len(records),
|
||||
"route": {"worker": worker, "command": command, "nativeSource": native_source},
|
||||
"records": records,
|
||||
"boundaries": ["module adapter readiness is not method-level parameter/return evidence", "original disposition is preserved until the matching coverage gate"],
|
||||
}
|
||||
short_tier = {"tier-1-readonly": "tier1", "tier-2-pure": "tier2", "tier-3-stateful": "tier3"}.get(args.tier, args.tier.replace("-", ""))
|
||||
out = ROOT / (args.output or f"docs/p6/{args.module.lower()}-{short_tier}-adapter-manifest.json")
|
||||
out.write_text(json.dumps(output, ensure_ascii=False, indent=2) + "\n", encoding="utf-8")
|
||||
print(json.dumps({"output": str(out.relative_to(ROOT)), "module": args.module, "tier": args.tier, "count": len(records), "sha256": hashlib.sha256(out.read_bytes()).hexdigest()}, ensure_ascii=False))
|
||||
Reference in New Issue
Block a user