Commit Graph

4 Commits

Author SHA1 Message Date
Brett Lawson b5f1647a38 fix: compare api_brep shell order and keep the region list's link order
boolean.api_brep now records, per region in GetRegions order, IsVoid,
IsInfiniteRegion and the shell count, and per shell its faceuse count and
the region behind its first faceuse's mate, so region and shell order are
compared against SMLib.

That exposed three merges of inverted spheres (gen0001, gen0033, gen0118)
whose region list differed from SMLib's. The B-rep region list was modelled
as the region arena rotated to its head, which is only SMLib's circular list
while the head is the oldest region. Once the head moves to a later region
(the inverted sphere's infinite region), SmOwningTopology::PostInsert
appends before the head, but the arena model put new regions after the
newest one. The Brep now records the link order whenever the head moves or a
region is pre/post-inserted or removed; regions appended since follow in
arena order, as PostInsert.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011gJAwcLRBPQXYLmvXd3pWf
2026-10-26 10:48:58 +01:00
Brett Lawson c91845a161 fixes: WR-214, WR-254 and WR-265 become opt-in UpstreamFixes fields
Follows #1077: a result-changing fix of an upstream defect is an opt-in
`Kernel::fixes` field and the default is pinned SMLib behaviour.

- WR-214 (#480): the Boolean's topology intersector sets
  `split_self_loops_on_vertices` from `proto_edge_self_loop_on_vertex_degenerate`
  instead of forcing it off.
- WR-254 (#528): the slice side rule for coincident faces needs
  `slice_coincident_faces_sheet_side`; by default the slice takes upstream's
  difference rule.
- WR-265 (#388): `put_outer_shells_first` (shell order and the nested-solid
  void-flag rewrite) needs `boolean_outer_shell_first`.

The boolean.api_brep runner can now build sheets (SmApiCreatePlane) and operands
that are an SmApiBoolean result, and it gains the C++-confirmed WR-254 and WR-265
repros as fixture cases that pass at the default. Each fix has an issue test with
the field on and a test that pins the default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011gJAwcLRBPQXYLmvXd3pWf
2026-10-26 08:49:00 +01:00
jijinbei 875291c4d9 shim: share identical C++ helpers through sc_sm.h, sc_nlib.h, sc_gw.h
125 shims carried private copies of the same small helpers (put_vec, st,
nl_status, Rd, dump_crv, read_nurb, ...). Move the most common, byte-identical
form of each into three headers grouped by the upstream API they need, and have
those shims pull them in with `using sc::<name>;`. Shims with a different
variant keep their own copy; files touched by open PRs are left alone.
`the_context()` stays per shim (its function-local SmContext must not be shared).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FBLgPenT24P1dunqnZR1Dj
2026-10-17 06:43:03 +09:00
bherbruck d7a0a3be62 port: boolean.api_brep (partial)
SmApiBrep.cpp boolean entry points: SmApiBoolean, SmApiBooleanUnion/
Difference/Intersection/Merge, SmApiMergeBreps, SmApiBooleanWithOptions,
SmApiBooleanLists, SmApiBooleanTrees and their static validators. Input
validation is compared against the C++; everything past it reaches SmMerge
and is deferred (boolean.merge_p2, boolean.merge_p3). Co-ports
SmMergeOptions into boolean::merge::p1.

difftest: cases=284 passed=142 failed=0 deferred=142

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 19:56:43 -04:00