Commit Graph
480 Commits
Author SHA1 Message Date
ramox81 6505b27818 fix(annotate): align annotation ribbon workflows 2026-09-14 11:55:08 +03:00
Hakan Seven 7b4cef41f7 Complete parametric ribbon and constraint tools 2026-09-14 01:05:39 +03:00
Hakan Seven 64e64c80a1 Merge pull request #1235 with kernel-based dimension leaders 2026-09-13 21:14:47 +03:00
ysdirector e76751604f fix(dimension): extend the DIMTMOVE=1 leader under the text for linear dims
DIMTMOVE=1 ("moves the text and adds a leader") draws the leader from the midpoint
of the dimension line to the text, so a text dragged outside the dimension line gets
a diagonal that starts in the middle of the line and crosses the extension lines.

Mechanical-drawing practice (GB/T 4458.4, and what AutoCAD itself draws) extends the
dimension line along its own axis so that it runs underneath the text. Linear and
aligned dimensions now do that whenever the text is outside the dimension-line extent;
when the text is still inside it (only moved up/down) the previous connect-to-text
leader is kept. Every other dimension type is unchanged, and only dimensions with
DIMTMOVE=1 are affected at all (the shipped default is 0).

Adds four unit tests covering the placements (outside right, outside left, inside,
radius draws none) plus an integration render smoke test driven through the real
Scene::entity_wires() -> export_pdf() pipeline, gated by OCS_DIM_LEADER_PDF so CI
stays side-effect free.
2026-09-13 18:10:02 +08:00
Hakan Seven 9f71927d6f fix(mtext): honor explicit dynamic column breaks 2026-09-12 21:53:32 +03:00
Hakan Seven 7c5a388f19 Merge PR #1215: add rectangle grip dimensions 2026-09-12 14:53:37 +03:00
Karim Jerbi e3d01e92e2 fix(mleader): render shaped cursive glyphs for arabic and complex scripts
- Emit shaped fill triangles and outline strokes instead of unshaped SDF quads
- Update bounding box to include fill triangles
- Add unit test for multileader arabic text tessellation
2026-09-12 11:06:11 +01:00
Karim Jerbi f1d5284fb9 fix(mtext): support arabic cursive shaping and bidirectional rtl text layout
- Enable fallback font metrics for HarfBuzz shaping in TTF glyph resolver

- Implement Unicode Bidirectional Algorithm (UBA) paragraph base direction detection

- Anchor right-to-left paragraphs to right container boundaries by default

- Reorder line atoms with base direction level to preserve neutral punctuation attachment

- Right-align RTL single-line TEXT and handle editor caret placement on RTL glyphs
2026-09-12 11:06:11 +01:00
Marcel 913705106e Support dynamic rectangle resizing via grip editing 2026-09-11 20:52:33 +02:00
Marcel f30b490831 Add rectangle width and height grip editing 2026-09-11 20:15:36 +02:00
Hakan Seven d07e8cf7d4 Fix wipeout rotation and block frame width 2026-09-11 20:38:00 +03:00
ramox81 21a232ef8d Fix XLine and wipeout properties 2026-09-11 17:11:52 +03:00
Hakan Seven 21e085db7e Merge updated pull request #1212 from Ramox81/codex/draw-menu 2026-09-11 16:19:44 +03:00
Hakan Seven d08896d59d Merge pull request #1212 from Ramox81/codex/draw-menu 2026-09-11 16:17:36 +03:00
ramox81 45c9cfd2ab Show stored spline tangent values 2026-09-11 16:16:11 +03:00
Hakan Seven c4506bf0d9 Merge pull request #1206 from Ramox81/codex/fix-region-measurement-persistence-20260911 2026-09-11 16:08:10 +03:00
ramox81 14b98231f5 Align spline fit properties and menu arrows 2026-09-11 15:53:51 +03:00
Hakan Seven 8640634e64 Merge pull request #1202 from Ramox81/codex/fix-fit-spline-bounds-20260911 2026-09-11 15:51:23 +03:00
Hakan Seven 8caac216f4 Handle spatial division curve edge cases 2026-09-11 15:38:47 +03:00
ramox81 f076db6d53 Merge current main with division marker support 2026-09-11 15:23:05 +03:00
Hakan Seven 753fa17b68 Merge pull request #1184 from Ramox81/codex/hatchedit-command-parity 2026-09-11 15:14:43 +03:00
ramox81 17efc86cc1 Merge remote-tracking branch 'origin/main' into codex/region-measurement-persistence
# Conflicts:
#	src/app/doc_api.rs
2026-09-11 15:10:37 +03:00
ramox81 b42ae9d4a8 Restore region bounds and exact profile measurements after reload 2026-09-11 15:09:41 +03:00
ramox81 d24c5479c1 Keep the original interpolation hull for conservative bounds 2026-09-11 15:00:46 +03:00
ramox81 c64d8a359f Bound fit-only splines through their interpolated control hull 2026-09-11 14:59:32 +03:00
ramox81 6272722baa Carry hatch origin through creation and pattern editing 2026-09-11 13:40:40 +03:00
Hakan Seven 08b184e314 Merge pull request #1186 from ramox81/codex/complete-reverse-command
# Conflicts:
#	src/entities/helix.rs
2026-09-11 12:51:29 +03:00
Hakan Seven debc9c36ac Merge PR #1182: Handle helix radius height and turn boundaries 2026-09-11 12:20:48 +03:00
ramox81 818ab87e9c Apply zero helix properties and signed height direction 2026-09-11 12:10:31 +03:00
ramox81 8979fa46c2 Place curve markers along spatial splines and polylines 2026-09-11 11:29:48 +03:00
ramox81 25ac594d85 Reverse complete helix geometry and preserve top radius semantics 2026-09-11 11:03:58 +03:00
Hakan Seven 9b58ca8a93 Harden parametric sketch constraints 2026-09-11 09:45:57 +03:00
Felix Riestra ad718def3f Merge remote-tracking branch 'origin/main' into merge-test/main-into-constraints
# Conflicts:
#	src/app/command_driver.rs
#	src/command.rs
#	src/ui/ribbon/mod.rs
#	src/ui/window/options.rs
2026-09-10 23:34:50 +02:00
Hakan Seven c50eb52320 refactor(arcs): use kernel geometry for grip values 2026-09-10 18:37:55 +03:00
MarcelP102 d47e3234d8 Add dynamic input for grip-based geometry editing (#1138) 2026-09-10 18:23:28 +03:00
Hakan Seven 4201b0a031 Merge pull request #1131 from ramox81/codex/thicken-surface-grips 2026-09-10 17:05:43 +03:00
Hakan Seven 035d31e201 fix(section): preserve selected slice depth 2026-09-10 17:00:16 +03:00
ramox81 11057cc5e9 Fix extrusion surface properties and snapping 2026-09-10 16:07:05 +03:00
Karim Jerbi 6ca16738f0 fix(properties): sync polyline segment widths with global width and display varies when differing 2026-09-10 12:30:33 +01:00
ramox81 056a0c527d fix(section): place normal grip above plane 2026-09-10 11:38:28 +03:00
ramox81 0426df79ca fix(section): add state grip menu 2026-09-10 11:25:33 +03:00
ramox81 78bbd1065a fix(section): align live section wireframe and grips 2026-09-10 10:42:19 +03:00
Felix RiestraandClaude Sonnet 5 d675244fb8 Merge branch 'main' into feature/parametric-constraint-system
Brings in 54 commits from origin/main: a selection-performance overhaul,
surface thickening, GPU-native wide/tapered stroke rendering, continued
ocs_doc_api evolution, and assorted fixes/polish (block double-click
editing, DWG hatch/database repair, clipboard, collapsible Properties
sections).

Six real conflicts, all where this branch had independently re-applied
a fix upstream later revised or already carried natively:

- src/app/automation.rs, src/app/command_driver.rs: combined both
  sides — kept this branch's sketch-constraint/named-parameter loading
  on "new"/"open", adopted main's Scene::clear()/material_base_dir and
  its newer rebuild_derived_caches() over the older bump_geometry().
  Scene::clear() (src/scene/entity.rs) now also resets
  sketch_constraints/named_parameters, so every caller gets this for
  free instead of each call site repeating it.
- src/io/mod.rs, src/scene/render_graph.rs: adopted main's design
  outright (commit 973af87d, authored by Hakan directly) — a large
  MINSERT is no longer purged as "corrupt" at load, only its rendering
  is bounded, preserving the source data. This branch's own earlier
  design (reject at load) predates that revision.
- src/scene/pipeline/mesh_gpu.rs: adopted main's valid_rgba_size()
  guard (a real robustness improvement over this branch's version).
- src/snap.rs: replaced wholesale with main's version — this branch's
  copy was an explicit verbatim snapshot from an earlier upstream PR
  (commit 4c264b8c) with zero constraint-system-specific content, and
  main has since evolved it considerably further.

Also removed two now-dead duplicates the merge surfaced without a
conflict marker (both branches had independently fixed the same
things): the OPTIONS/OP command dispatch/autocomplete entries, and
automation.rs's open_finalizes_and_purges_like_the_ui_open_path test
(kept main's version, which covers strictly more: solid_models/
material_base_dir reset on "new").

Full workspace suite passes (812 lib tests + this branch's own 24
constraint/persistence integration tests) except the one pre-existing,
unrelated font-test failure already present on main. Zero clippy
findings in the hand-written merge resolution itself; the ~1,171
warnings clippy reports are pre-existing in the 54 absorbed commits,
not introduced here.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-09 20:44:38 +02:00
Hakan Seven f69f0b32be fix(sectionplane): persist and clip section modes correctly 2026-09-09 20:53:05 +03:00
ramox81 c9c768cd9f feat(model): add section plane workflow 2026-09-09 18:29:35 +03:00
Felix Riestra e2d39b049d Merge branch 'main' into feature/parametric-constraint-system
# Conflicts:
#	src/app/automation.rs
#	src/app/mod.rs
#	src/ui/ribbon/widgets.rs
2026-09-09 13:35:07 +02:00
Felix RiestraandClaude Sonnet 5 4c264b8c69 Port the PlanarEllipse tangent-geom variant and full OSNAP ellipse fix
Completes the OSNAP intersection port from 44deee2a: that commit
explicitly deferred ellipse support because this branch's TangentGeom
predates the PlanarEllipse variant added upstream (this branch was cut
from an older main snapshot, ~99 commits behind on unrelated work).
Ports just the variant and its minimal direct dependents, not the
other unrelated evolution in those 99 commits (a separate analytical
GPU fast-path for circle/arc/ellipse rendering, tessellation changes,
etc. — out of scope here).

- wire_model.rs: copied verbatim from main. Restores the
  PlanarEllipse variant plus TangentGeom's translated/rotated/scaled/
  mirrored methods (this branch was missing all four transform methods
  entirely, not just ellipse support in them — a live-drag preview
  wire's tangent_geoms weren't being updated at all during a
  translate/rotate/scale/mirror preview).
- entities/ellipse.rs: restored building the PlanarEllipse tangent_geom
  for a committed ellipse/elliptical-arc entity's RenderEntity — this
  is what makes ellipses queryable by OSNAP at all (the resident wire
  set is what Intersection/Tangent snap search).
- entities/dimension.rs, scene/cache/block_cache.rs: added back the
  three PlanarEllipse match arms needed for exhaustiveness (OCS-to-WCS
  remapping, prototype-wire translation, and instance-transform
  application) — each a self-contained arm restoring exactly the
  ellipse case, not touching the surrounding logic.
- snap.rs: replaced with the exact fix from the upstream PR (HakanSeven12/OpenCADStudio#1104)
  branch, whose snap.rs was already verified to differ from main by
  nothing but that fix. Upgrades the earlier circle/arc-only port to
  the full exact_curve_intersections path: line-vs-circle/arc/ellipse
  and ellipse-vs-circle/arc/ellipse, via cadkernel::geom2d::intersect
  over a shared embedding plane, including the anti-parallel-normal
  reflection fix for both Arc and PlanarEllipse.

7 additional tests now build and pass (line/ellipse intersection
cases, both anti-parallel-normal regressions) plus the wire-transform
test wire_model.rs already carried. Full workspace suite passes except
the one pre-existing, unrelated font-test failure also present on
main.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-09 13:07:52 +02:00
Felix RiestraandClaude Sonnet 5 63a74b19a9 Add persistent sketch-constraint system (ocs_gcs port) and named-parameters handoff docs
Ports FreeCAD's planegcs 2D geometric constraint solver to Rust as a new
crates/ocs_gcs workspace member, and wires it into the document/scene model
as a persistent SketchConstraintSet: Coincident, Horizontal/Vertical,
Parallel/Perpendicular, Equal, Tangent, Distance, Angle and Radius
constraints that re-solve live (including mid-drag, not just on release),
render glyphs and a DOF badge, flag conflicts with a one-click resolver
pill, and round-trip through save/load via an XRecord blob.

Also includes docs/command_reference.md (a statically generated reference
of every registered command and its prompt sequence) and
docs/named_parameters_design.md + docs/backlog.md, which hand off the next
queued feature (a named-parameter/expression table) and consolidate every
deliberate scope-down and open gap found along the way, so a fresh session
has a complete starting point.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-08 22:19:23 +02:00
Hakan Seven 5b663bfe38 Fix issues found while integrating contributor PRs 2026-09-08 12:14:28 +03:00
JonathanandCopilot 6616111fbf Fix Architectural and Engineering inch unit formatting
Suppress leading 0 feet notation when feet = 0 in architectural (LUNITS 4)
and engineering (LUNITS 3) formats. Values less than one foot should display
as inches only (e.g. 9 1/4 inches instead of 0 feet 9 1/4 inches).

- For Architectural: 9.25 inches now displays as 9 1/4 inch mark instead of 0 feet 9 1/4 inch mark
- For Engineering: 11.94 now displays as 11.9 inch mark instead of 0 feet 11.9 inch mark
- Proper feet notation is preserved for values >= 1 foot
- Updated tests to reflect correct expected values

Fixes issue 1066

Co-authored-by: Copilot <[email protected]>
2026-09-08 10:18:53 +02:00