Commit Graph
234 Commits
Author SHA1 Message Date
Hakan Seven 4247b0c953 Keep FILLET active after each operation
Fixes #974
2026-09-02 21:06:55 +03:00
Hakan Seven 5c3aa1c25c fix(modify): preserve polyline extrusion frames 2026-09-02 08:56:46 +03:00
Atirna 9654986a0a fix(modify): keep polyline thickness through join/convert/explode
JOIN, PEDIT convert, and EXPLODE rebuild polyline-family entities from
scratch and copied only common entity data, so a thickness (DXF 39) set
in Properties reset to 0 after those edits. Carry the source thickness
onto the rebuilt Line/LwPolyline and every exploded piece, like trim and
break already do for arcs.

Fixes #916
2026-09-02 09:53:45 +05:30
Hakan Seven 6d6defa0ad fix(color): show color book identity 2026-09-01 08:44:28 +03:00
ramox81 470e22c80f Complete polygon mesh editing workflow 2026-08-31 10:13:27 +03:00
Hakan Seven 2a482089b8 test: fix regression assertions
Refs #941
2026-08-30 21:18:10 +03:00
Hakan Seven 7a523a0f44 fix(clipboard): share COPY across drawings 2026-08-29 23:12:26 +03:00
Hakan Seven e8cb752fab fix(mesh): complete polygon mesh support 2026-08-28 20:26:32 +03:00
ramox81 e345d89519 Extend PEDIT for polygon meshes 2026-08-28 15:50:49 +03:00
Hakan Seven 43d4403a47 fix(dimension): sync jogged radius geometry 2026-08-28 00:33:37 +03:00
Hakan Seven bc750c6d76 fix(dimension): harden jogged radius workflow 2026-08-27 08:09:02 +03:00
Hakan Seven 6ef2d75e84 fix(dimarc): complete merge integration
Preserve source-plane geometry and associative arc parameters while combining the latest properties and tolerance workflows.
2026-08-27 01:00:23 +03:00
Hakan Seven 81e7add1dd fix(tolerance): complete workflow integration
Sync current main and companion codec changes before preserving unsupported frame rows, rendering in the entity plane, and sharing final layout metrics with placement preview.
2026-08-27 00:14:08 +03:00
ramox81 5a9894fd3e Complete jogged radius dimension workflow 2026-08-26 17:17:55 +03:00
ramox81 8aca9a0aef Complete arc length dimension workflow 2026-08-26 15:32:37 +03:00
Hakan Seven 968ee3fda4 fix(dimension): complete ordinate workflow 2026-08-25 21:36:04 +03:00
Hakan Seven 9ded5eb04f feat(dimension): complete diameter workflow 2026-08-25 20:57:28 +03:00
ramox81 e34b67c709 fix(dimension): complete ordinate workflow 2026-08-25 17:10:55 +03:00
ramox81 75f042607e Align diameter properties and graphics 2026-08-25 15:39:48 +03:00
Hakan Seven 4209c35ba3 fix(polyline): render fill mode boundaries
Use kernel-produced band outlines when FILLMODE is off. Preserve centerline linetype stations through inserts, clipping, projection, and PDF export.
2026-08-24 22:18:44 +03:00
Hakan Seven 343b6cda7d feat(mline): align creation and editing 2026-08-23 00:30:41 +03:00
Hakan Seven 7293bec1b9 fix(point): preserve relative marker sizing
Keep rendering, picking, block transforms, and plotted output on the
same viewport-relative PDSIZE geometry without overloading wire width
fields.
2026-08-22 22:22:01 +03:00
ramox81 fc047b3b38 Add multiline editing workflows 2026-08-22 20:20:35 +03:00
Hakan Seven c22f6cde60 fix(trim): preserve source handle in fence pass
Temporary fence pieces used a sentinel handle, so the source spline was included as its own cutting boundary and kernel intersection recursed indefinitely.

Refs #830
2026-08-22 01:11:37 +03:00
Hakan Seven d9aead3fbc Merge pull request #856 from ramox81/codex/align-circle-behavior 2026-08-21 23:29:57 +03:00
Hakan Seven a87ca09fa4 Merge pull request #854 from ramox81/codex/align-arc-behavior 2026-08-21 21:41:24 +03:00
ramox81 fc9110de21 Use circle planes in offset and break 2026-08-21 16:49:56 +03:00
ramox81 5f9d8a9e0e Align arc creation and editing behavior 2026-08-21 14:03:58 +03:00
ramox81 ff09fc7800 Implement associative center mark workflow 2026-08-21 12:05:18 +03:00
Hakan Seven 44efb8fd53 feat(frame): complete frame controls
Preserve frame geometry for selection while separating viewport and plot visibility across supported reference entities.

Refs #642
2026-08-20 23:37:02 +03:00
Hakan Seven dcedf945ea feat(spline): correct property semantics
Merge PR #824 while keeping periodic and coplanarity geometry in cadkernel.
2026-08-20 12:13:35 +03:00
Hakan Seven 1c408e3a73 feat(spline): improve fit and CV editing
Keep planar conversions kernel-backed and leave unsupported 3D, CV-to-fit, and closed rebuilds unavailable instead of changing curve data.\n\nRefs #815
2026-08-20 00:18:45 +03:00
ramox81 1a6b61fb3a Correct spline property value semantics 2026-08-19 16:50:49 +03:00
ramox81 5595837a69 Align spline properties and editing 2026-08-19 12:00:02 +03:00
ramox81 0d37d3ff78 Improve spline fit and control vertex grips 2026-08-19 11:02:32 +03:00
Hakan Seven 7c818d15e9 fix(geometry): honor polyline OCS in commands
Route editing and derived geometry through kernel world-space curves.\n\nRefs #797\nRefs #798\nRefs #799
2026-08-18 22:09:48 +03:00
Hakan Seven f9c3546551 fix(trim): keep retained geometry continuous
Use kernel trim spans so unrelated boundary crossings do not split survivors.
2026-08-18 20:12:30 +03:00
Hakan Seven 1dded7f881 fix: restore workspace verification 2026-08-15 23:11:26 +03:00
gianlucafiore 7810d2c154 fix: allow multiple stretch selection windows 2026-08-15 15:01:05 -03:00
Hakan Seven 4fd9b98da4 perf(render): instance block geometry
Share source buffers across block placements and render nested content with GPU instance transforms.\n\nChunk silhouettes and compact mesh material data so large drawings stay under device buffer limits and remain responsive.
2026-08-12 02:33:10 +03:00
Hakan Seven ac8183ec91 refactor(cad): use direct stack dependencies 2026-08-10 15:03:31 +03:00
Hakan SevenandClaude Opus 5 8c7ebdc9f1 refactor: drop truck, and evaluate every curve through the kernel
The last four truck crates are gone from the manifest. What they were doing
falls into three parts, and each now has one answer instead of two.

NURBS evaluation. truck was carrying B-spline curves and surfaces for the
SPLINE entity, hatch boundaries, BLEND's endpoint frames, the spline preview
and ACIS spline-surface faces. The kernel now has both, over one de Boor
written across however many coordinates a control point holds — so a plane
curve and a space curve cannot drift apart, and a surface is the same
algorithm applied twice. The rational and the polynomial cases stop being
separate types: weights absent means polynomial.

The entity conversion. Every LINE, ARC, ELLIPSE, SPLINE and polyline was
built into truck topology purely so it could be sampled back into points.
They are sampled through `entities::curve` now, which is where each one's
geometry is already defined once and what EXTRUDE and REVOLVE read — so a
circle drawn on screen and a circle handed to the Model tab come from the
same definition. That retires four of TruckObject's variants and the module
is renamed for what it does.

SWEEP and LOFT. Both only ever produced a mesh, so both are built from point
lists: a band of quads per span, and a lid where a profile closes. Lofting
profiles of different densities resamples them by distance rather than by
index, so a circle lofted to a square no longer twists.

Two things worth noting for anyone reading the old comments. The tolerance
globals that lived in the tessellation module were never about truck at all —
they are the per-frame chord height, and they move to `curve_tol`. And the
rule that a profile handed over as `Lines` silently broke EXTRUDE and REVOLVE
no longer holds: those read the curve directly and never look at this channel.

The two `automation` test failures are unchanged from before this and are not
caused by it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-10 01:08:50 +03:00
Hakan Seven 2f60dd0f59 refactor(i18n): group Fluent attributes 2026-08-09 11:12:47 +03:00
Hakan SevenandClaude Opus 5 f3c2e061e0 refactor(trim): find an extension's boundary with the kernel
EXTEND asked where a line reaches by matching over every Geo variant and
running its own line-line, line-circle and line-ellipse test — twice
over, once for a LINE and once for a polyline's terminal segment, about
two hundred and sixty lines between them. A boundary spline was walked
as sixty-four chords there rather than intersected, so an extend landed
on the chord nearest the spline instead of on the spline.

Both are one call now: shoot the segment's own infinite line and take
the nearest crossing on the side being extended. That is `cut_params`,
which every other cut in the file already goes through.

With those two gone, the sampled copy carried beside each boundary
spline had no remaining reader, so a spline boundary is now only ever
the exact NURBS. The line-ellipse adapter lost its last caller with it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-09 10:02:23 +03:00
Hakan SevenandClaude Opus 5 f1bc5f2cae fix(spline): reverse a spline without reshaping it
SPLINEDIT's REVERSE reversed the control points and then regenerated a
clamped *uniform* knot vector. That is only harmless for a spline whose
knots were evenly spaced to begin with; for any other — which is most of
them once a modeller has been near one — the curve came back a different
shape, bulging where it had been taut. It now mirrors the knots within
the domain, which is exact, and swaps the end tangents to match.

PEDIT's Spline option evaluated a uniform cubic B-spline from four
blending polynomials written out by hand, clamped the open case by
repeating end control points, and then pinned the two endpoints
afterwards to undo the drift that leaves. A clamped knot vector says all
of that directly, and the closed case gets a genuinely periodic curve
rather than one whose seam is a special case.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-09 01:52:12 +03:00
Hakan SevenandClaude Opus 5 0677dd146c refactor(blend): evaluate the Bézier with de Casteljau from the kernel
BLEND summed Bernstein terms using a binomial-coefficient table with
entries for degrees three and five — the two it builds — and a fallback
of one for everything else. Correct today, and quietly wrong the moment
a third continuity mode is added. De Casteljau needs no coefficients at
all, works at any degree, and is steadier: the Bernstein terms are large
coefficients times small powers and they cancel, while repeated
interpolation only ever averages neighbours.

Curvature through three points moves with it, since both are the 3D
arithmetic a blend needs and neither has a planar counterpart to
delegate to.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-09 01:47:04 +03:00
Hakan SevenandClaude Opus 5 9babf355b1 refactor(fillet): find the tangent arc in the kernel
FILLET enumerated its own candidates twice, once for a line against an
arc and once for two arcs, each with its own quadratic, its own four
sign combinations and its own conventions about which root meant what.
Both are the same construction: a circle of the given radius tangent to
a curve has its centre on one of that curve's offsets, so the fillet
centre is where an offset of one crosses an offset of the other.

That now comes from the kernel, which does it for any pair of straight
and circular curves and agrees with the corner formula where both apply.
What stays here is the part that genuinely belongs to the command —
which candidate the two picks meant, whether the touch lands on the
drawn part of an arc rather than elsewhere on its circle, and which side
of each entity to keep.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-09 01:37:11 +03:00
Hakan SevenandClaude Opus 5 d32f39221c fix(measure): space points along a curve by distance, not by parameter
DIVIDE and MEASURE did nothing at all on an ELLIPSE or a SPLINE. Their
length function answered `0.0` for both — the `_ => 0.0` arm — and the
command reported the entity type as unsupported. On a polyline they
measured the chords and ignored the bulges, so points landed short of
where they belonged; on an arc or a circle they read the centre as world
coordinates when the entity stores it in its OCS.

All three now walk the entity's own curve, which the kernel measures
properly: closed forms where they exist, and the integral of the speed
where they do not.

A path ARRAY had the same confusion in a different place. It sampled the
path at even *parameters*, which is the same as even distances on a line
and a circle and nothing like it on an ellipse or a spline — copies
bunched up wherever the parameter ran slow. It also now closes properly:
on a closed path the last copy no longer lands on the first.

LENGTHEN measured an ellipse with a hundred and twenty-eight chords and
then bisected on that, and a spline with forty rounds of thirty-two
chords apiece. A chord sum reads short, so "current length" was already
below the true one before any delta was applied. Both now ask the kernel,
which also makes the spline case one evaluation instead of about
thirteen hundred.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-09 01:24:29 +03:00
Hakan SevenandClaude Opus 5 ece440bcab refactor(curve): draw a fit spline and an offset preview from the curve
Two places were left describing geometry for themselves.

A fit-point SPLINE was drawn from a C² cubic solved in spline.rs while
TRIM and snap cut a separate interpolation from the kernel. Near enough
to look right, far enough apart that a trim landed beside the line it
was aimed at. It now draws the curve those commands work on, and falls
back to the local solve only where the kernel declines — a fit spline
through points in space is not a planar curve, so there is nothing for
it to say.

Closed fit splines were worse than that: the kernel's interpolation is a
clamped solve with no wrap in it, so the curve TRIM used never returned
to its start and the seam cut nothing. Repeating the first fit point
closes it. The seam is C¹ where the rest of the curve is C², which is
the honest limit of a clamped solve — the alternative was a curve with a
gap in it.

OFFSET's preview sampling had drifted the same way TRIM's had: an arc
and a circle read `center.x/.y` as world coordinates when the entity
stores them in its OCS, so an extruded one previewed on the wrong side;
every curved kind was cut at a fixed twenty segments per radian whatever
its size; and an ellipse rebuilt its axis frame from the major axis' X
and Y alone, dropping the Z the entity stores. A hundred lines of that
become one tessellation. A RAY now previews as far as an XLINE does
rather than as a stub the length of its direction vector.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-09 01:08:45 +03:00
Hakan SevenandClaude Opus 5 c2cc6fd7c4 refactor(trim): read boundaries and samples through the entity curve
Three per-type matches went; what is left is only the shape of the
boundary record, which the edit options need to mutate — imply_edge_geos
turns a segment into an infinite line and opens an arc into a full
circle, neither of which a bare curve says.

Two things change with it. A boundary spline is carried as a NURBS
rather than as 64 chords, so a trim cuts where the spline actually runs;
the sampled copy stays only for the two hand-rolled ray walks in the
polyline-extend paths. And an extruded arc or circle is read in its own
OCS instead of having its stored coordinates taken for world ones, so it
acts as a boundary where it is drawn.

sample_entity_xy is now one tessellation at the density the renderer
uses, so a fence pass and a preview cut follow the drawn geometry rather
than a coarser approximation of it. It declines to guess a length for a
ray or an infinite line; fence_sample_xy, which has an answer, still
supplies one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-09 00:43:53 +03:00