Next Gen STEP AP242 Native-ish BREP Geometric Modeling Kernel
Wave 2.1: add canonical Firmament examples and semantic placement docs
Yuechen Li6b86e929bdfb
diff --git a/Aetheris.Kernel.Firmament.Tests/FirmamentBuildAndExportTests.cs b/Aetheris.Kernel.Firmament.Tests/FirmamentBuildAndExportTests.csindex e8763f8e..42ba41ec 100644--- a/Aetheris.Kernel.Firmament.Tests/FirmamentBuildAndExportTests.cs+++ b/Aetheris.Kernel.Firmament.Tests/FirmamentBuildAndExportTests.cs@@ -306,6 +306,30 @@ public sealed class FirmamentBuildAndExportTests"subtract");}++ [Fact]+ public void Run_W2CylinderRootBlindBoreSemanticExample_Writes_Default_Export_Artifact()+ {+ AssertExampleBuildAndExport(+ "testdata/firmament/examples/w2_cylinder_root_blind_bore_semantic.firmament",+ "w2_cylinder_root_blind_bore_semantic.step",+ "blind_bore",+ 1,+ "boolean",+ "subtract");+ }++ [Fact]+ public void Run_W2BoxSphereExteriorOpeningPocketSemanticExample_Writes_Default_Export_Artifact()+ {+ AssertExampleBuildAndExport(+ "testdata/firmament/examples/w2_box_sphere_exterior_opening_pocket_semantic.firmament",+ "w2_box_sphere_exterior_opening_pocket_semantic.step",+ "pocket",+ 1,+ "boolean",+ "subtract");+ }[Fact]public void Run_RibbedSupportF1Example_Writes_Default_Export_Artifact(){diff --git a/Aetheris.Kernel.Firmament/Execution/FirmamentPrimitiveExecutor.cs b/Aetheris.Kernel.Firmament/Execution/FirmamentPrimitiveExecutor.csindex 46783bf6..5079d6f8 100644--- a/Aetheris.Kernel.Firmament/Execution/FirmamentPrimitiveExecutor.cs+++ b/Aetheris.Kernel.Firmament/Execution/FirmamentPrimitiveExecutor.cs@@ -521,11 +521,18 @@ internal static class FirmamentPrimitiveExecutorvar isCylinderTool = string.Equals(boolean.Tool.OpName, "cylinder", StringComparison.Ordinal);var isConeTool = string.Equals(boolean.Tool.OpName, "cone", StringComparison.Ordinal);- if (!isCylinderTool && !isConeTool)+ var isSphereTool = string.Equals(boolean.Tool.OpName, "sphere", StringComparison.Ordinal);+ if (!isCylinderTool && !isConeTool && !isSphereTool){return false;}+ if (isSphereTool)+ {+ return !string.IsNullOrWhiteSpace(boolean.Placement.OnFace)+ && BrepBooleanBoxRecognition.TryRecognizeAxisAlignedBox(baseBody, ToleranceContext.Default, out _, out _);+ }+if (isConeTool){// Cone tools require real placed-body validation/execution for bounded blind-entry families@@ -538,6 +545,12 @@ internal static class FirmamentPrimitiveExecutorreturn true;}+ if (!string.IsNullOrWhiteSpace(boolean.Placement.OnFace)+ && BrepBooleanCylinderRecognition.TryRecognizeCylinder(baseBody, ToleranceContext.Default, out _, out _))+ {+ return true;+ }+if (string.IsNullOrWhiteSpace(boolean.Placement.OnFace)){return false;diff --git a/docs/firmament-overview.md b/docs/firmament-overview.mdindex 9796542b..67312921 100644--- a/docs/firmament-overview.md+++ b/docs/firmament-overview.md@@ -83,4 +83,4 @@ The current implementation does **not** claim support for:- arbitrary orientation systems or generalized transforms- a broad manufacturing-intelligence or full DFM engine-For concrete examples, see `testdata/firmament/examples/`. For the practical golden path, see `docs/firmament-build-workflow.md`.+For concrete examples, see `testdata/firmament/examples/`. For selector/semantic naming contracts, see `docs/firmament-selectors.md`. For executable placement rules, see `docs/firmament-placement-semantics.md`. For the practical golden path, see `docs/firmament-build-workflow.md`.diff --git a/docs/firmament-placement-semantics.md b/docs/firmament-placement-semantics.mdnew file mode 100644index 00000000..ad3c8586--- /dev/null+++ b/docs/firmament-placement-semantics.md@@ -0,0 +1,125 @@+# Firmament Placement Semantics (current executable rules)++This is the bounded, executable placement model in current Firmament.++## 1) Default placement (no `place` block)++If an op has no placement block, no placement translation is applied.++For primitives, note there is still primitive-specific default publish framing in execution (for example, box/cylinder/cone local bodies are shifted into the published frame before placement translation is considered).++---++## 2) Placement keys and mode split++Supported keys:++- `on`+- `offset[3]`+- `on_face`+- `centered_on`+- `around_axis`+- `radial_offset`+- `angle_degrees`++Mode behavior:++- legacy mode (no semantic keys): `on` + `offset[3]` required,+- semantic mode (any semantic key present): `on` optional, `offset[3]` defaults to zero if omitted/malformed,+- `radial_offset` requires `around_axis`.++---++## 3) Anchor resolution order++Base anchor point is resolved in this strict precedence:++1. `on_face`+2. `centered_on`+3. `on`+4. if none above and `around_axis` exists: axis origin+5. otherwise world origin `(0,0,0)`++---++## 4) What `offset[3]` means++`offset[3]` is a world-space translation `(dx,dy,dz)`.++It is **not** a local face UV offset and **not** an axis-local vector.++---++## 5) Around-axis semantics++When `around_axis` is present:++1. resolve axis from selector (`side_face` on cylinder/cone),+2. project the current base anchor to that axis,+3. build radial basis from world references,+4. apply `radial_offset` (default `0`) and `angle_degrees` (default `0`),+5. then apply world `offset[3]`.++---++## 6) Primitive placement formula++Primitive translation is:++`(anchorPoint - origin) + offset + primitiveLocalCorrection`++Current correction terms:++- sphere: `(0, 0, radius)`+- torus: `(0, 0, minor_radius)`+- others: `(0, 0, 0)`++---++## 7) Boolean placement formula and timing++Boolean placement translation value is:++`(anchorPoint - origin) + offset`++But execution timing is important:++- semantic tool-placement path: tool is placed first, then boolean executes,+- general path: boolean executes first, then result is translated.++These are not equivalent in general.++Wave 2.1 subtract examples intentionally use semantic placement so placement directly controls tool location before subtraction.++---++## 8) Subtract-tool authoring for Wave 2.1++### Cylinder-root blind bore++Canonical pattern:++- root cylinder,+- one subtract cylinder tool,+- `place.on_face: <root>.top_face` with negative Z `offset` equal to blind depth.++Reference: `testdata/firmament/examples/w2_cylinder_root_blind_bore_semantic.firmament`.++### Exterior-opening sphere pocket (box root)++Canonical pattern:++- subtract sphere from box,+- place sphere center near `top_face` using `place.on_face` + negative Z offset,+- ensure strict non-tangent intersection (avoid exactly tangent placement).++Reference: `testdata/firmament/examples/w2_box_sphere_exterior_opening_pocket_semantic.firmament`.++---++## 9) Common failure modes++- Using contained sphere placement when you intended an exterior-opening pocket.+- Tangent/grazing placement (zero-thickness boundary conditions) instead of strict overlap.+- Assuming `offset` is face-local; it is world XYZ.+- Assuming `on_face` and `centered_on` are distinct mating semantics; currently they share anchor extraction behavior.diff --git a/docs/firmament-selectors.md b/docs/firmament-selectors.mdindex 9777dd81..2fb2c762 100644--- a/docs/firmament-selectors.md+++ b/docs/firmament-selectors.md@@ -1,6 +1,13 @@-# Firmament Selector Contracts+# Firmament Selector Contracts + Primitive Semantic Naming (current v1 reality)-This document describes the selector surface that is implemented today.+This document is the source-of-truth summary for the selector/semantic naming surface that is implemented **today**.++It answers two practical questions:++1. which primitive/feature semantic names are legal (`feature.port`), and+2. what those names currently mean in executable placement/selection behavior.++---## Selector shapes@@ -11,11 +18,13 @@ Firmament currently accepts these target/anchor shapes:There is no implemented selector chaining or multi-hop traversal.-## Contract-level selector ports+----### Primitive features+## Primitive semantic names (ports)-#### `box`+The table below documents the current contract ports for primitives involved in common authoring flows (including Wave 2.1 examples).++### `box`- `top_face` → result kind `Face`, cardinality `One`- `bottom_face` → result kind `Face`, cardinality `One`@@ -23,7 +32,9 @@ There is no implemented selector chaining or multi-hop traversal.- `edges` → result kind `EdgeSet`, cardinality `Many`- `vertices` → result kind `VertexSet`, cardinality `Many`-#### `cylinder`+Authoring note: box face naming is world-Z semantic (`top_face` means positive-Z planar face, `bottom_face` negative-Z planar face), not arbitrary CAD-face ordering.++### `cylinder`- `top_face` → `Face`, `One`- `bottom_face` → `Face`, `One`@@ -32,7 +43,7 @@ There is no implemented selector chaining or multi-hop traversal.- `edges` → `EdgeSet`, `Many`- `vertices` → `VertexSet`, `Many`-Current verified primitive-body topology for `cylinder` is:+Current verified primitive-body topology for canonical cylinder bodies:- `top_face` = 1 planar cap face- `bottom_face` = 1 planar cap face@@ -41,9 +52,19 @@ Current verified primitive-body topology for `cylinder` is:- `edges` = 3 total edges (2 circular + 1 seam)- `vertices` = 4 total vertices-#### `cone`+### `sphere`++- `surface` → `Face`, `One`++Current verified primitive-body topology for canonical sphere bodies:++- `surface` = 1 spherical face+- `edges` = 0+- `vertices` = 0++`top_face`/`bottom_face` are **not** legal sphere ports.-Implemented selector surface for the v1 `cone` primitive remains:+### `cone` (included for placement parity with cylinder)- `top_face` → `Face`, `One`- `bottom_face` → `Face`, `One`@@ -52,45 +73,13 @@ Implemented selector surface for the v1 `cone` primitive remains:- `edges` → `EdgeSet`, `Many`- `vertices` → `VertexSet`, `Many`-Current verified primitive-body topology for `cone` is conditional on the radii:--- frustum cone (`bottom_radius > 0`, `top_radius > 0`, unequal)- - `top_face` = 1 planar cap face- - `bottom_face` = 1 planar cap face- - `side_face` = 1 conical face- - `circular_edges` = 2 circular cap edges- - `edges` = 3 total edges (2 circular + 1 seam)- - `vertices` = 4 total vertices-- pointed cone with `top_radius = 0`- - `top_face` = 0- - `bottom_face` = 1 planar cap face- - `side_face` = 1 conical face- - `circular_edges` = 1 circular base edge- - `edges` = 2 total edges (1 circular + 1 seam)- - `vertices` = 3 total vertices-- pointed cone with `bottom_radius = 0`- - `top_face` = 1 planar cap face- - `bottom_face` = 0- - `side_face` = 1 conical face- - `circular_edges` = 1 circular base edge- - `edges` = 2 total edges (1 circular + 1 seam)- - `vertices` = 3 total vertices--Selectors on the missing cap remain legal source ports for `cone`, but truthfully resolve to zero runtime topology elements in the pointed case.--#### `sphere`+Pointed-cone cap selectors remain contract-legal but can resolve to zero runtime topology when that cap is absent.-- `surface` → `Face`, `One`--Current verified primitive-body topology for `sphere` is:--- `surface` = 1 spherical face-- `edges` = 0 (not part of the truthful selector contract)-- `vertices` = 0 (not part of the truthful selector contract)+----### Boolean features+## Boolean-feature semantic names-Current boolean roots (`add`, `subtract`, `intersect`) share this contract surface:+Current boolean outputs (`add`, `subtract`, `intersect`, plus bounded draft/chamfer/fillet outputs in selector contracts) share:- `top_face` → `Face`, `One`- `bottom_face` → `Face`, `One`@@ -98,35 +87,48 @@ Current boolean roots (`add`, `subtract`, `intersect`) share this contract surfa- `edges` → `EdgeSet`, `Many`- `vertices` → `VertexSet`, `Many`-## Result kinds and cardinality+---++## Placement-relevant meaning of names++For placement anchors (`place.on`, `place.on_face`, `place.centered_on`) the resolver currently uses representative geometry points and centroids:++- face/face-set ports → representative face points then centroid,+- edge-set ports → edge endpoint points then centroid,+- vertex-set ports → vertex points then centroid.++Important implication: names such as `on_face` vs `centered_on` are currently ergonomic aliases over the same anchor extraction behavior, not different mating solvers.++---++## Around-axis selector rule (P1)++`place.around_axis` expects a selector that resolves a cylindrical/conical axis through `side_face`.-The current selector contract metadata distinguishes:+Canonical examples:-- result kinds: `Face`, `FaceSet`, `EdgeSet`, `VertexSet`-- cardinality: `One`, `Many`+- `flange.side_face` where `flange` is a cylinder+- `cone_1.side_face` where `cone_1` is a cone-These are attached at compile time for legal selector-shaped targets.+Using non-axis ports (for example `top_face`, `edges`, `vertices`) for `around_axis` is rejected.-## What is topology-backed today+----Selectors are still intentionally narrow.+## What is still not guaranteed-Today they are backed by current runtime/body topology checks such as:+Even with semantic names, this is still a bounded selector system.-- face count-- edge count-- vertex count-- placement-anchor extraction from representative face/edge/vertex points+Not supported yet:-This is enough for current validation and placement flows, but it is not a generalized semantic selector system.+- selector chaining (`a.top_face.edges`)+- topology-stable persistent naming across arbitrary modeling edits+- generalized semantic traversal detached from current executed bodies-## Not supported yet+----The current implementation does **not** support:+## Wave 2.1 canonical references-- selector chaining such as `a.top_face.edges`-- multi-hop traversal across derived topology-- richer topology naming guarantees beyond current feature contracts and runtime checks-- arbitrary semantic resolution detached from current executed bodies+For concrete authoring of semantic placement with subtract tools:-Selectors must start from a source feature id, which remains the language-stable identity.+- `testdata/firmament/examples/w2_cylinder_root_blind_bore_semantic.firmament`+- `testdata/firmament/examples/w2_box_sphere_exterior_opening_pocket_semantic.firmament`diff --git a/testdata/firmament/examples/README.md b/testdata/firmament/examples/README.mdindex 218b3b1d..1bdb3dba 100644--- a/testdata/firmament/examples/README.md+++ b/testdata/firmament/examples/README.md@@ -30,6 +30,8 @@ Other combinations may fail and are intentionally not supported yet.- `p1_blind_hole_on_face_semantic.firmament` — minimal semantic placement subset example using `place.on_face` for a blind-hole tool placement.- `p1_flange_radial_hole_semantic.firmament` — minimal semantic placement subset example using `place.around_axis` + `place.radial_offset` for flange radial hole placement.- `p1_bracket_rib_on_face_semantic.firmament` — minimal semantic placement subset example using `place.on_face` for bracket rib authoring ergonomics.+- `w2_cylinder_root_blind_bore_semantic.firmament` — Wave 2.1 canonical cylinder-root blind-bore example (`subtract(cylinder_root, cylinder)` with top-entry coaxial blind bore) authored with semantic `place.on_face`; helper export path: `testdata/firmament/exports/w2_cylinder_root_blind_bore_semantic.step`.+- `w2_box_sphere_exterior_opening_pocket_semantic.firmament` — Wave 2.1 canonical exterior-opening spherical pocket example (`subtract(box, sphere)` with one-sided opening at `top_face`) authored with semantic `place.on_face`; helper export path: `testdata/firmament/exports/w2_box_sphere_exterior_opening_pocket_semantic.step`.- `p2_linear_hole_row.firmament` — minimal built-in `pattern_linear` example for repeated hole rows.- `p2_flange_bolt_circle_pattern.firmament` — minimal built-in `pattern_circular` bolt-circle example for flange holes.- `p2_mirror_hole_pair.firmament` — bounded `pattern_mirror` example for principal-plane mirrored hole placement.diff --git a/testdata/firmament/examples/w2_box_sphere_exterior_opening_pocket_semantic.firmament b/testdata/firmament/examples/w2_box_sphere_exterior_opening_pocket_semantic.firmamentnew file mode 100644index 00000000..789646a3--- /dev/null+++ b/testdata/firmament/examples/w2_box_sphere_exterior_opening_pocket_semantic.firmament@@ -0,0 +1,30 @@+firmament:+ version: 1++model:+ name: w2_box_sphere_exterior_opening_pocket_semantic+ units: mm++ops[2]:+ -+ op: box+ id: base+ size[3]:+ 40+ 30+ 12++ -+ op: subtract+ id: pocket+ from: base+ with:+ op: sphere+ radius: 5+ place:+ on: origin+ on_face: base.top_face+ offset[3]:+ 0+ 0+ -2diff --git a/testdata/firmament/examples/w2_cylinder_root_blind_bore_semantic.firmament b/testdata/firmament/examples/w2_cylinder_root_blind_bore_semantic.firmamentnew file mode 100644index 00000000..e15057fc--- /dev/null+++ b/testdata/firmament/examples/w2_cylinder_root_blind_bore_semantic.firmament@@ -0,0 +1,29 @@+firmament:+ version: 1++model:+ name: w2_cylinder_root_blind_bore_semantic+ units: mm++ops[2]:+ -+ op: cylinder+ id: flange+ radius: 40+ height: 12++ -+ op: subtract+ id: blind_bore+ from: flange+ with:+ op: cylinder+ radius: 12+ height: 8+ place:+ on: origin+ on_face: flange.top_face+ offset[3]:+ 0+ 0+ -8diff --git a/testdata/firmament/exports/w2_box_sphere_exterior_opening_pocket_semantic.step b/testdata/firmament/exports/w2_box_sphere_exterior_opening_pocket_semantic.stepnew file mode 100644index 00000000..3ea9c52e--- /dev/null+++ b/testdata/firmament/exports/w2_box_sphere_exterior_opening_pocket_semantic.step@@ -0,0 +1,192 @@+ISO-10303-21;+HEADER;+FILE_DESCRIPTION(('Aetheris AP242 subset export'),'2;1');+FILE_NAME('aetheris_export.step','1970-01-01T00:00:00',('Aetheris'),('Aetheris'),'Aetheris.Kernel','Aetheris.Kernel','');+FILE_SCHEMA(('AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF'));+ENDSEC;+DATA;+#1=CARTESIAN_POINT($,(0,0,-6));+#2=DIRECTION($,(0,0,-1));+#3=DIRECTION($,(1,0,0));+#4=AXIS2_PLACEMENT_3D($,#1,#2,#3);+#5=PLANE($,#4);+#6=CARTESIAN_POINT($,(-20,-15,-6));+#7=VERTEX_POINT($,#6);+#8=CARTESIAN_POINT($,(20,-15,-6));+#9=VERTEX_POINT($,#8);+#10=CARTESIAN_POINT($,(-20,-15,-6));+#11=DIRECTION($,(1,0,0));+#12=VECTOR($,#11,1);+#13=LINE($,#10,#12);+#14=EDGE_CURVE($,#7,#9,#13,.T.);+#15=ORIENTED_EDGE($,$,$,#14,.T.);+#16=CARTESIAN_POINT($,(20,15,-6));+#17=VERTEX_POINT($,#16);+#18=CARTESIAN_POINT($,(20,-15,-6));+#19=DIRECTION($,(0,1,0));+#20=VECTOR($,#19,1);+#21=LINE($,#18,#20);+#22=EDGE_CURVE($,#9,#17,#21,.T.);+#23=ORIENTED_EDGE($,$,$,#22,.T.);+#24=CARTESIAN_POINT($,(-20,15,-6));+#25=VERTEX_POINT($,#24);+#26=CARTESIAN_POINT($,(20,15,-6));+#27=DIRECTION($,(-1,0,0));+#28=VECTOR($,#27,1);+#29=LINE($,#26,#28);+#30=EDGE_CURVE($,#17,#25,#29,.T.);+#31=ORIENTED_EDGE($,$,$,#30,.T.);+#32=CARTESIAN_POINT($,(-20,15,-6));+#33=DIRECTION($,(0,-1,0));+#34=VECTOR($,#33,1);+#35=LINE($,#32,#34);+#36=EDGE_CURVE($,#25,#7,#35,.T.);+#37=ORIENTED_EDGE($,$,$,#36,.T.);+#38=EDGE_LOOP($,(#15,#23,#31,#37));+#39=FACE_OUTER_BOUND('',#38,.T.);+#40=ADVANCED_FACE('',(#39),#5,.T.);+#41=CARTESIAN_POINT($,(0,0,6));+#42=DIRECTION($,(0,0,1));+#43=DIRECTION($,(1,0,0));+#44=AXIS2_PLACEMENT_3D($,#41,#42,#43);+#45=PLANE($,#44);+#46=CARTESIAN_POINT($,(-20,-15,6));+#47=VERTEX_POINT($,#46);+#48=CARTESIAN_POINT($,(20,-15,6));+#49=VERTEX_POINT($,#48);+#50=CARTESIAN_POINT($,(-20,-15,6));+#51=DIRECTION($,(1,0,0));+#52=VECTOR($,#51,1);+#53=LINE($,#50,#52);+#54=EDGE_CURVE($,#47,#49,#53,.T.);+#55=ORIENTED_EDGE($,$,$,#54,.T.);+#56=CARTESIAN_POINT($,(20,15,6));+#57=VERTEX_POINT($,#56);+#58=CARTESIAN_POINT($,(20,-15,6));+#59=DIRECTION($,(0,1,0));+#60=VECTOR($,#59,1);+#61=LINE($,#58,#60);+#62=EDGE_CURVE($,#49,#57,#61,.T.);+#63=ORIENTED_EDGE($,$,$,#62,.T.);+#64=CARTESIAN_POINT($,(-20,15,6));+#65=VERTEX_POINT($,#64);+#66=CARTESIAN_POINT($,(20,15,6));+#67=DIRECTION($,(-1,0,0));+#68=VECTOR($,#67,1);+#69=LINE($,#66,#68);+#70=EDGE_CURVE($,#57,#65,#69,.T.);+#71=ORIENTED_EDGE($,$,$,#70,.T.);+#72=CARTESIAN_POINT($,(-20,15,6));+#73=DIRECTION($,(0,-1,0));+#74=VECTOR($,#73,1);+#75=LINE($,#72,#74);+#76=EDGE_CURVE($,#65,#47,#75,.T.);+#77=ORIENTED_EDGE($,$,$,#76,.T.);+#78=EDGE_LOOP($,(#55,#63,#71,#77));+#79=FACE_OUTER_BOUND('',#78,.T.);+#80=CARTESIAN_POINT($,(3,0,6));+#81=VERTEX_POINT($,#80);+#82=CARTESIAN_POINT($,(0,0,6));+#83=DIRECTION($,(0,0,1));+#84=DIRECTION($,(1,0,0));+#85=AXIS2_PLACEMENT_3D($,#82,#83,#84);+#86=CIRCLE($,#85,3);+#87=EDGE_CURVE($,#81,#81,#86,.T.);+#88=ORIENTED_EDGE($,$,$,#87,.T.);+#89=EDGE_LOOP($,(#88));+#90=FACE_BOUND('',#89,.T.);+#91=ADVANCED_FACE('',(#79,#90),#45,.T.);+#92=CARTESIAN_POINT($,(0,-15,0));+#93=DIRECTION($,(0,-1,0));+#94=DIRECTION($,(1,0,0));+#95=AXIS2_PLACEMENT_3D($,#92,#93,#94);+#96=PLANE($,#95);+#97=ORIENTED_EDGE($,$,$,#14,.T.);+#98=CARTESIAN_POINT($,(20,-15,-6));+#99=DIRECTION($,(0,0,1));+#100=VECTOR($,#99,1);+#101=LINE($,#98,#100);+#102=EDGE_CURVE($,#9,#49,#101,.T.);+#103=ORIENTED_EDGE($,$,$,#102,.T.);+#104=ORIENTED_EDGE($,$,$,#54,.F.);+#105=CARTESIAN_POINT($,(-20,-15,-6));+#106=DIRECTION($,(0,0,1));+#107=VECTOR($,#106,1);+#108=LINE($,#105,#107);+#109=EDGE_CURVE($,#7,#47,#108,.T.);+#110=ORIENTED_EDGE($,$,$,#109,.F.);+#111=EDGE_LOOP($,(#97,#103,#104,#110));+#112=FACE_OUTER_BOUND('',#111,.T.);+#113=ADVANCED_FACE('',(#112),#96,.T.);+#114=CARTESIAN_POINT($,(20,0,0));+#115=DIRECTION($,(1,0,0));+#116=DIRECTION($,(0,1,0));+#117=AXIS2_PLACEMENT_3D($,#114,#115,#116);+#118=PLANE($,#117);+#119=ORIENTED_EDGE($,$,$,#22,.T.);+#120=CARTESIAN_POINT($,(20,15,-6));+#121=DIRECTION($,(0,0,1));+#122=VECTOR($,#121,1);+#123=LINE($,#120,#122);+#124=EDGE_CURVE($,#17,#57,#123,.T.);+#125=ORIENTED_EDGE($,$,$,#124,.T.);+#126=ORIENTED_EDGE($,$,$,#62,.F.);+#127=ORIENTED_EDGE($,$,$,#102,.F.);+#128=EDGE_LOOP($,(#119,#125,#126,#127));+#129=FACE_OUTER_BOUND('',#128,.T.);+#130=ADVANCED_FACE('',(#129),#118,.T.);+#131=CARTESIAN_POINT($,(0,15,0));+#132=DIRECTION($,(0,1,0));+#133=DIRECTION($,(-1,0,0));+#134=AXIS2_PLACEMENT_3D($,#131,#132,#133);+#135=PLANE($,#134);+#136=ORIENTED_EDGE($,$,$,#30,.T.);+#137=CARTESIAN_POINT($,(-20,15,-6));+#138=DIRECTION($,(0,0,1));+#139=VECTOR($,#138,1);+#140=LINE($,#137,#139);+#141=EDGE_CURVE($,#25,#65,#140,.T.);+#142=ORIENTED_EDGE($,$,$,#141,.T.);+#143=ORIENTED_EDGE($,$,$,#70,.F.);+#144=ORIENTED_EDGE($,$,$,#124,.F.);+#145=EDGE_LOOP($,(#136,#142,#143,#144));+#146=FACE_OUTER_BOUND('',#145,.T.);+#147=ADVANCED_FACE('',(#146),#135,.T.);+#148=CARTESIAN_POINT($,(-20,0,0));+#149=DIRECTION($,(-1,0,0));+#150=DIRECTION($,(0,1,0));+#151=AXIS2_PLACEMENT_3D($,#148,#149,#150);+#152=PLANE($,#151);+#153=ORIENTED_EDGE($,$,$,#36,.T.);+#154=ORIENTED_EDGE($,$,$,#109,.T.);+#155=ORIENTED_EDGE($,$,$,#76,.F.);+#156=ORIENTED_EDGE($,$,$,#141,.F.);+#157=EDGE_LOOP($,(#153,#154,#155,#156));+#158=FACE_OUTER_BOUND('',#157,.T.);+#159=ADVANCED_FACE('',(#158),#152,.T.);+#160=CARTESIAN_POINT($,(0,0,10));+#161=DIRECTION($,(0,0,1));+#162=DIRECTION($,(1,0,0));+#163=AXIS2_PLACEMENT_3D($,#160,#161,#162);+#164=SPHERICAL_SURFACE($,#163,5);+#165=ORIENTED_EDGE($,$,$,#87,.T.);+#166=EDGE_LOOP($,(#165));+#167=FACE_OUTER_BOUND('',#166,.T.);+#168=ADVANCED_FACE('',(#167),#164,.T.);+#169=CLOSED_SHELL($,(#40,#91,#113,#130,#147,#159,#168));+#170=MANIFOLD_SOLID_BREP('AetherisBody',#169);+#171=APPLICATION_CONTEXT('mechanical design');+#172=PRODUCT_CONTEXT('',#171,'mechanical');+#173=PRODUCT('AETHERIS','AetherisBody','',(#172));+#174=PRODUCT_DEFINITION_FORMATION('','',#173);+#175=PRODUCT_DEFINITION_CONTEXT('design',#171,'design');+#176=PRODUCT_DEFINITION('','',#174,#175);+#177=PRODUCT_DEFINITION_SHAPE('','',#176);+#178=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));+#179=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));+#180=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());+#181=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNIT_ASSIGNED_CONTEXT((#178,#179,#180))REPRESENTATION_CONTEXT('3','3D'));+#182=SHAPE_REPRESENTATION('AetherisBody',(#170),#181);+#183=SHAPE_DEFINITION_REPRESENTATION(#177,#182);+ENDSEC;+END-ISO-10303-21;diff --git a/testdata/firmament/exports/w2_cylinder_root_blind_bore_semantic.step b/testdata/firmament/exports/w2_cylinder_root_blind_bore_semantic.stepnew file mode 100644index 00000000..6587ca3f--- /dev/null+++ b/testdata/firmament/exports/w2_cylinder_root_blind_bore_semantic.step@@ -0,0 +1,128 @@+ISO-10303-21;+HEADER;+FILE_DESCRIPTION(('Aetheris AP242 subset export'),'2;1');+FILE_NAME('aetheris_export.step','1970-01-01T00:00:00',('Aetheris'),('Aetheris'),'Aetheris.Kernel','Aetheris.Kernel','');+FILE_SCHEMA(('AP242_MANAGED_MODEL_BASED_3D_ENGINEERING_MIM_LF'));+ENDSEC;+DATA;+#1=CARTESIAN_POINT($,(0,0,-6));+#2=DIRECTION($,(0,0,1));+#3=DIRECTION($,(1,0,0));+#4=AXIS2_PLACEMENT_3D($,#1,#2,#3);+#5=CYLINDRICAL_SURFACE($,#4,40);+#6=CARTESIAN_POINT($,(40,0,-6));+#7=VERTEX_POINT($,#6);+#8=CARTESIAN_POINT($,(40,0,6));+#9=VERTEX_POINT($,#8);+#10=CARTESIAN_POINT($,(40,0,-6));+#11=DIRECTION($,(0,0,1));+#12=VECTOR($,#11,1);+#13=LINE($,#10,#12);+#14=EDGE_CURVE($,#7,#9,#13,.T.);+#15=ORIENTED_EDGE($,$,$,#14,.T.);+#16=CARTESIAN_POINT($,(40,0,6));+#17=VERTEX_POINT($,#16);+#18=CARTESIAN_POINT($,(0,0,6));+#19=DIRECTION($,(0,0,1));+#20=DIRECTION($,(1,0,0));+#21=AXIS2_PLACEMENT_3D($,#18,#19,#20);+#22=CIRCLE($,#21,40);+#23=EDGE_CURVE($,#17,#17,#22,.T.);+#24=ORIENTED_EDGE($,$,$,#23,.T.);+#25=ORIENTED_EDGE($,$,$,#14,.F.);+#26=CARTESIAN_POINT($,(40,0,-6));+#27=VERTEX_POINT($,#26);+#28=CARTESIAN_POINT($,(0,0,-6));+#29=DIRECTION($,(0,0,1));+#30=DIRECTION($,(1,0,0));+#31=AXIS2_PLACEMENT_3D($,#28,#29,#30);+#32=CIRCLE($,#31,40);+#33=EDGE_CURVE($,#27,#27,#32,.T.);+#34=ORIENTED_EDGE($,$,$,#33,.F.);+#35=EDGE_LOOP($,(#15,#24,#25,#34));+#36=FACE_OUTER_BOUND('',#35,.T.);+#37=ADVANCED_FACE('',(#36),#5,.T.);+#38=CARTESIAN_POINT($,(0,0,6));+#39=DIRECTION($,(0,0,1));+#40=DIRECTION($,(1,0,0));+#41=AXIS2_PLACEMENT_3D($,#38,#39,#40);+#42=PLANE($,#41);+#43=ORIENTED_EDGE($,$,$,#23,.F.);+#44=EDGE_LOOP($,(#43));+#45=FACE_OUTER_BOUND('',#44,.T.);+#46=CARTESIAN_POINT($,(12,0,6));+#47=VERTEX_POINT($,#46);+#48=CARTESIAN_POINT($,(0,0,6));+#49=DIRECTION($,(0,0,1));+#50=DIRECTION($,(1,0,0));+#51=AXIS2_PLACEMENT_3D($,#48,#49,#50);+#52=CIRCLE($,#51,12);+#53=EDGE_CURVE($,#47,#47,#52,.T.);+#54=ORIENTED_EDGE($,$,$,#53,.T.);+#55=EDGE_LOOP($,(#54));+#56=FACE_BOUND('',#55,.T.);+#57=ADVANCED_FACE('',(#45,#56),#42,.T.);+#58=CARTESIAN_POINT($,(0,0,-6));+#59=DIRECTION($,(0,0,-1));+#60=DIRECTION($,(0,1,0));+#61=AXIS2_PLACEMENT_3D($,#58,#59,#60);+#62=PLANE($,#61);+#63=ORIENTED_EDGE($,$,$,#33,.T.);+#64=EDGE_LOOP($,(#63));+#65=FACE_OUTER_BOUND('',#64,.T.);+#66=ADVANCED_FACE('',(#65),#62,.T.);+#67=CARTESIAN_POINT($,(0,0,4));+#68=DIRECTION($,(0,0,1));+#69=DIRECTION($,(1,0,0));+#70=AXIS2_PLACEMENT_3D($,#67,#68,#69);+#71=CYLINDRICAL_SURFACE($,#70,12);+#72=CARTESIAN_POINT($,(12,0,4));+#73=VERTEX_POINT($,#72);+#74=CARTESIAN_POINT($,(12,0,6));+#75=VERTEX_POINT($,#74);+#76=CARTESIAN_POINT($,(12,0,4));+#77=DIRECTION($,(0,0,1));+#78=VECTOR($,#77,1);+#79=LINE($,#76,#78);+#80=EDGE_CURVE($,#73,#75,#79,.T.);+#81=ORIENTED_EDGE($,$,$,#80,.T.);+#82=ORIENTED_EDGE($,$,$,#53,.F.);+#83=ORIENTED_EDGE($,$,$,#80,.F.);+#84=CARTESIAN_POINT($,(12,0,4));+#85=VERTEX_POINT($,#84);+#86=CARTESIAN_POINT($,(0,0,4));+#87=DIRECTION($,(0,0,1));+#88=DIRECTION($,(1,0,0));+#89=AXIS2_PLACEMENT_3D($,#86,#87,#88);+#90=CIRCLE($,#89,12);+#91=EDGE_CURVE($,#85,#85,#90,.T.);+#92=ORIENTED_EDGE($,$,$,#91,.T.);+#93=EDGE_LOOP($,(#81,#82,#83,#92));+#94=FACE_OUTER_BOUND('',#93,.T.);+#95=ADVANCED_FACE('',(#94),#71,.T.);+#96=CARTESIAN_POINT($,(0,0,4));+#97=DIRECTION($,(0,0,1));+#98=DIRECTION($,(1,0,0));+#99=AXIS2_PLACEMENT_3D($,#96,#97,#98);+#100=PLANE($,#99);+#101=ORIENTED_EDGE($,$,$,#91,.T.);+#102=EDGE_LOOP($,(#101));+#103=FACE_OUTER_BOUND('',#102,.T.);+#104=ADVANCED_FACE('',(#103),#100,.T.);+#105=CLOSED_SHELL($,(#37,#57,#66,#95,#104));+#106=MANIFOLD_SOLID_BREP('AetherisBody',#105);+#107=APPLICATION_CONTEXT('mechanical design');+#108=PRODUCT_CONTEXT('',#107,'mechanical');+#109=PRODUCT('AETHERIS','AetherisBody','',(#108));+#110=PRODUCT_DEFINITION_FORMATION('','',#109);+#111=PRODUCT_DEFINITION_CONTEXT('design',#107,'design');+#112=PRODUCT_DEFINITION('','',#110,#111);+#113=PRODUCT_DEFINITION_SHAPE('','',#112);+#114=(LENGTH_UNIT()NAMED_UNIT(*)SI_UNIT(.MILLI.,.METRE.));+#115=(NAMED_UNIT(*)PLANE_ANGLE_UNIT()SI_UNIT($,.RADIAN.));+#116=(NAMED_UNIT(*)SI_UNIT($,.STERADIAN.)SOLID_ANGLE_UNIT());+#117=(GEOMETRIC_REPRESENTATION_CONTEXT(3)GLOBAL_UNIT_ASSIGNED_CONTEXT((#114,#115,#116))REPRESENTATION_CONTEXT('3','3D'));+#118=SHAPE_REPRESENTATION('AetherisBody',(#106),#117);+#119=SHAPE_DEFINITION_REPRESENTATION(#113,#118);+ENDSEC;+END-ISO-10303-21;