From 9c735b51c3ec7091ef52965e3ed12ce4d0232261 Mon Sep 17 00:00:00 2001 From: J Iamsamang Date: Tue, 31 Mar 2026 13:08:38 +0200 Subject: [PATCH] fix #658 add the exclusion rules in `a2plib.filterShapeObs` to filter assembly objects. --- a2plib.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/a2plib.py b/a2plib.py index 0a78b85..c3934d6 100644 --- a/a2plib.py +++ b/a2plib.py @@ -377,6 +377,15 @@ def filterShapeObs(_list, allowSketches=False): if ob.Name.startswith("Sketch"): lst.append(ob) continue + # Exclude any objects from assembly workbench, as they are not real shapes and cause problems with the solver. + # This includes built-in Assembly objects and their children, including Body, Boolean + if ob.TypeId.startswith("Assembly::"): + #filter out the built-in Assembly objects + continue + if ob.Parents and any( p[0].TypeId.startswith("Assembly::") for p in ob.Parents): + #filter out objects which are children of built-in Assembly objects + continue + if ( #Following object now have App::GeoFeatureGroupExtension in FC0.19 #prevent them from being filtered out.