mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-27 02:41:17 +00:00
Fix the solver abort on circle-line tangency; the CAD suite now runs complete
snaporca-tkz, the last quarantined test. Root cause read out of the vendored
source rather than guessed: slvs/constrainteq.cpp, Type::ARC_LINE_TANGENT does
ExprVector ap = SK.GetEntity(arc->point[other ? 2 : 1])->PointGetExprs();
so it dereferences the ARC'S ENDPOINTS. A full circle entity carries only
point[0], its centre. point[1] and point[2] are zero handles, FindById throws
"Cannot find handle", and the process ABORTS rather than failing the solve —
taking every later test in the binary with it. That is also the wrong equation
for a circle regardless: it only makes the line perpendicular to the radius at
an endpoint that does not exist.
CT::Tangent no longer hands a full circle to that constraint. For a circle it
emits PT_LINE_DISTANCE(centre, line) = radius, which is precisely what tangency
to a circle means. Arcs keep the ARC_LINE_TANGENT path they are built for.
One limitation, stated rather than buried: the slvs C API takes a constant
distance and offers no way to reference the circle's radius parameter, so the
radius is captured when the constraint is emitted. That is exact whenever the
radius is fixed or is simply not driven by another constraint in the same
solve, and re-solving restores tangency if something else moves it. Tying them
would need an auxiliary point constrained onto both the circle and the line.
With this and eeca6794e7, both quarantined tests are gone and the exclusion in
kernel-test.sh goes with them. A green run now means the whole CAD suite
passed, not "everything except the two we gave up on":
149 cases / 2043 assertions, no filters.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
f599ff0ff7
commit
5026dd11a6
@@ -608,18 +608,12 @@ TEST_CASE("entity constraints: point-on-line positions a centre onto an axis", "
|
||||
}
|
||||
}
|
||||
|
||||
// [known-broken]: the "tangent line to circle" SECTION below aborts inside the vendored
|
||||
// solver (slvs/dsc.h FindById, "Cannot find handle"). SIGABRT is fatal to the whole Catch2
|
||||
// process, so this one case takes the entire suite down with it and no later test runs.
|
||||
// [known-broken] lets the delegated dev loop (scripts/kernel-test.sh) exclude it and still
|
||||
// reach a green baseline. [NotWorking] is the ctest label the mainline-based fork's CI already
|
||||
// excludes (run_unit_tests.sh passes -LE NotWorking, and catch_discover_tests registers Catch2
|
||||
// tags as ctest labels via ADD_TAGS_AS_LABELS) — so its Unit Tests job stops being red on every
|
||||
// single commit, which was training everyone to ignore it and would have hidden the next real
|
||||
// regression. The tag is inert on the Snapmaker fork, which has neither that runner nor
|
||||
// catch_discover_tests; the two files are kept identical because they are ported wholesale
|
||||
// between the forks. The bug stays visible in the tracker instead — see snaporca-tkz.
|
||||
TEST_CASE("entity constraints: tangent/midpoint/symmetric/angle", "[CadDocument][known-broken][NotWorking]")
|
||||
// The "tangent line to circle" SECTION used to abort the whole Catch2 process inside the
|
||||
// vendored solver (slvs/dsc.h FindById, "Cannot find handle"), taking every later test with
|
||||
// it, and was quarantined for it. Fixed in SketchSolver: a full circle can no longer be handed
|
||||
// to SLVS_C_ARC_LINE_TANGENT, which dereferences arc endpoints a circle does not have. See
|
||||
// snaporca-tkz.
|
||||
TEST_CASE("entity constraints: tangent/midpoint/symmetric/angle", "[CadDocument][sketch]")
|
||||
{
|
||||
using R = SketchPointRole;
|
||||
using T = SketchConstraintType;
|
||||
|
||||
Reference in New Issue
Block a user