10C Inc 1: core modeling

Binds the modeling core the app builds every feature out of — 93 of its 138
symbols now resolve, up from 34. New modules: GeomAbs, Geom2d, Geom,
TCollection, TColgp, TColStd, GProp, BRepGProp, Bnd, BRepBndLib, Adaptor3d,
BRepAdaptor, GeomLProp, GeomAPI, BRepBuilderAPI, BOPAlgo, BRepAlgoAPI,
BRepPrimAPI, GC, BRepMesh; gp and BRep_Tool completed.

Three structural decisions:

- BRepBuilderAPI_MakeShape carries Build/Shape/Generated/Modified/IsDeleted for
  every maker in the binding, so the booleans, the primitives and (later) the
  fillet builders all answer the app's duck-typed provenance layer through
  ordinary virtual dispatch. History lists come back copied, so they outlive
  the builder.
- The executing two-argument BRepAlgoAPI constructors stay unbound; operands go
  in through SetArguments/SetTools. Section keeps Init1/Init2, which are plain
  setters. BOPAlgo moved up from Inc 2 — SetGlue needs its enum.
- Adaptor3d is registered although the app never imports it: every method it
  calls on BRepAdaptor_Curve/Surface is a virtual declared there, so binding
  them once on the bases leaves mod_BRepAdaptor.cpp with just constructors.

Gate: tests/test_inc1_modeling.py against reference values gen_fixtures.py now
records from the stock wheel — measurements, per-face area/centroid in map
order, mesh counts, and the boolean history map compared exactly, since that is
the substrate the app's topological naming is built on.

tools/sigdiff.py compares our bound surface against stock's, because a wrong
nb::init<> is silent: MakePrism's five-argument form bound OCCT's semi-infinite
gp_Dir overload (gp_Dir converts from gp_Vec), producing a valid solid of the
wrong shape with the flags shifted along. The fixture digest caught it; sigdiff
finds the class of bug directly, and now reports only one deliberate deviation.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DfriM8XUkn7uYf5Dwe2xo6
This commit is contained in:
2026-08-10 19:52:52 +02:00
parent 091a2ad0cf
commit 2c2c4e4712
32 changed files with 2732 additions and 18 deletions

View File

@@ -32,5 +32,472 @@
"size": 171,
"faces": 0
}
},
"inc1": {
"measure": {
"box": {
"volume": 6000.0,
"area": 2200.0,
"bbox": [
-1e-07,
-1e-07,
-1e-07,
10.0000001,
20.0000001,
30.0000001
],
"n_faces": 6,
"n_edges": 12,
"n_solids": 1
},
"box_meshed": {
"volume": 6000.0,
"area": 2200.0,
"bbox": [
-1e-07,
-1e-07,
-1e-07,
10.0000001,
20.0000001,
30.0000001
],
"n_faces": 6,
"n_edges": 12,
"n_solids": 1
},
"fused": {
"volume": 12500.0,
"area": 3650.0,
"bbox": [
-1.5e-07,
-1.5e-07,
-1.5e-07,
25.00000015,
25.00000015,
30.00000015
],
"n_faces": 12,
"n_edges": 30,
"n_solids": 1
},
"cut_cylinder": {
"volume": 5151.769983530756,
"area": 2708.9380098815463,
"bbox": [
-1e-07,
-1e-07,
-1e-07,
10.0000001,
20.0000001,
30.0000001
],
"n_faces": 7,
"n_edges": 15,
"n_solids": 1
},
"located_compound": {
"volume": 12000.0,
"area": 4400.0,
"bbox": [
-1e-07,
-1e-07,
-1e-07,
60.0000001,
20.0000001,
30.0000001
],
"n_faces": 12,
"n_edges": 24,
"n_solids": 2
},
"empty_compound": {
"volume": 0.0,
"area": 0.0,
"bbox": null,
"n_faces": 0,
"n_edges": 0,
"n_solids": 0
}
},
"face_props": {
"box": [
[
600.0,
0.0,
10.0,
15.0
],
[
600.0,
10.0,
10.0,
15.0
],
[
300.0,
5.0,
0.0,
15.0
],
[
300.0,
5.0,
20.0,
15.0
],
[
199.99999999999997,
5.0,
10.0,
0.0
],
[
199.99999999999997,
5.0,
10.0,
30.0
]
],
"box_meshed": [
[
600.0,
0.0,
10.0,
15.0
],
[
600.0,
10.0,
10.0,
15.0
],
[
300.0,
5.0,
0.0,
15.0
],
[
300.0,
5.0,
20.0,
15.0
],
[
199.99999999999997,
5.0,
10.0,
0.0
],
[
199.99999999999997,
5.0,
10.0,
30.0
]
],
"fused": [
[
600.0,
0.0,
10.0,
15.0
],
[
300.0,
5.0,
0.0,
15.0
],
[
199.99999999999997,
5.0,
10.0,
30.0
],
[
200.0,
3.7500000000000004,
20.0,
15.0
],
[
199.99999999999997,
5.0,
10.0,
0.0
],
[
300.0,
10.0,
7.5,
14.999999999999996
],
[
324.99999999999994,
16.73076923076923,
15.57692307692308,
5.0
],
[
99.99999999999999,
5.0,
22.5,
15.0
],
[
324.99999999999994,
16.73076923076923,
15.57692307692308,
25.0
],
[
299.99999999999994,
17.5,
5.0,
15.0
],
[
399.99999999999994,
15.0,
25.0,
15.0
],
[
399.99999999999994,
25.0,
15.0,
15.0
]
],
"cut_cylinder": [
[
600.0,
0.0,
10.0,
15.0
],
[
300.0,
5.0,
0.0,
15.0
],
[
171.72566611769184,
5.0,
10.0,
30.000000000000004
],
[
300.0,
5.0,
20.0,
15.0
],
[
171.72566611769184,
5.0,
10.0,
0.0
],
[
600.0,
10.0,
10.0,
15.0
],
[
565.4866776461628,
5.0,
10.0,
15.000000000000002
]
],
"located_compound": [
[
600.0,
0.0,
10.0,
15.0
],
[
600.0,
10.0,
10.0,
15.0
],
[
300.0,
5.0,
0.0,
15.0
],
[
300.0,
5.0,
20.0,
15.0
],
[
199.99999999999997,
5.0,
10.0,
0.0
],
[
199.99999999999997,
5.0,
10.0,
30.0
],
[
600.0,
50.0,
10.0,
15.0
],
[
600.0,
60.0,
10.0,
15.0
],
[
300.0,
55.0,
0.0,
15.0
],
[
300.0,
55.0,
20.0,
15.0
],
[
199.99999999999997,
55.0,
10.0,
0.0
],
[
199.99999999999997,
55.0,
10.0,
30.0
]
]
},
"cut_cylinder_history": [
{
"pre": 0,
"deleted": false,
"modified": [],
"generated": []
},
{
"pre": 1,
"deleted": false,
"modified": [],
"generated": []
},
{
"pre": 2,
"deleted": false,
"modified": [],
"generated": []
},
{
"pre": 3,
"deleted": false,
"modified": [],
"generated": []
},
{
"pre": 4,
"deleted": false,
"modified": [
33
],
"generated": []
},
{
"pre": 5,
"deleted": false,
"modified": [
20
],
"generated": []
}
],
"box_meshed_counts": [
[
0,
4,
2
],
[
1,
4,
2
],
[
2,
4,
2
],
[
3,
4,
2
],
[
4,
4,
2
],
[
5,
4,
2
]
],
"constructions": {
"arc_edge": {
"sha256": "2b6eadbe678c8e13d04cfa1fdf6d6d475776d168639dbb38b90452c9f1481535",
"length": 15.707963267948966
},
"spline_edge": {
"sha256": "71a9b3c8aee46b338728fc03b98931d4087c5df5962e9745d70fcfd3cc1a3133",
"length": 12.236066959998437
},
"prism": {
"sha256": "0730ad0a74dda44760b4a43b4b7f22ed58c672d8aeb8f3fd483969b92cbf3d2f",
"volume": 239.99999999999997,
"area": 247.99999999999994,
"bbox": [
-1.0000000000000002e-07,
-1.0000000000000002e-07,
-1.0000000000000002e-07,
10.0000001,
6.0000001,
4.0000001
],
"n_faces": 6,
"n_edges": 12,
"n_solids": 1,
"history": [
{
"pre": 0,
"deleted": false,
"modified": [],
"generated": [
0
]
}
]
}
}
}
}