mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-19 23:20:45 +00:00
95817e647a
* claim: #19337 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DtL5LzWFYXTcbQ43JHhvpP * Sketch: a control-point spline can be closed into a loop (#19337) A control-point spline with "periodic": true is the closed uniform B-spline over its control polygon: the wrap takes the first degree points again after the last. It is refused on open before this change ("damaged design: invalid periodic spline or revolve convention"), so a smooth closed outline given by its control vertices could not be drawn. The closed spline becomes one cubic (or higher-degree, up to the kernel limit) Bezier piece per control point, joined C(degree-1) around the closing point. The pieces come from the existing knot insertion (bezier_spans), now run over the domain ends too, so the open knot vector gives Bezier pieces. The seam point is set exactly. The kernel and profile finder see the same exact pieces as a periodic fit spline. - sketch: closed_control_beziers, closed evaluation in curves, validate_closed_control (degree 3 to 9, at least degree + 1 points), solver and point editing guards. - loader: a closed control spline is accepted by its own rule; pending format change closed-control-splines.rs (the last release refuses such a design). - command: sketch.spline.control_point and control_point_5 take periodic. - UI: the closing click works for control splines (degree + 1 distinct points). Test change: format.rs asserted control:true on a periodic spline is malformed; it is now the valid closed control spline, so the malformed case is control:"yes" and a closed control spline is asserted to load. sketch_modify_tests refusal of a periodic control spline on four points becomes three points (still too few). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DtL5LzWFYXTcbQ43JHhvpP * claim: #19524 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DtL5LzWFYXTcbQ43JHhvpP * Sketch: a control point spline can be given its knots and weights A control point spline could only be drawn with uniform knots, so a B-spline with a non-uniform clamped knot vector had to be refitted. The model already stored a spline's own knots and weights (projected free-form edges and DXF splines), but no command created one. - sketch.spline.control_knots: degree (1 to 9), knots and optional weights over the points. The curve is exactly that B-spline, drawn and extruded as given (Bezier spans by knot insertion, conics for a rational quadratic). - A weighted spline must have degree 2: a higher degree with unequal weights has no exact profile form, so it is refused rather than drawn as a polyline. - Knots that do not fit the points are refused as bad parameters, naming the rule (count, clamping, repeated knots, weights). - A control point of such a spline cannot be removed; dragging one keeps its knots. The saved form is the existing spline-knots form, so no format change. Test change: none. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DtL5LzWFYXTcbQ43JHhvpP * Sketch: translate the knot spline command into the complete catalogs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DtL5LzWFYXTcbQ43JHhvpP * Kernel cases: the knot spline command is tested in its area's file Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DtL5LzWFYXTcbQ43JHhvpP --------- Co-authored-by: jyviko <2501648+jyviko@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>