Commit Graph
75 Commits
Author SHA1 Message Date
Karim Jerbi 5dfa41c032 fix(blocks): one base point convention for creation, redefine, insert, explode, XCLIP and REFEDIT
world = insert_point + Rot * Scale * (P - base_point). Attribute placement, EXPLODE, XCLIP storage, REFEDIT's working copy, the UCS reframe of attributes and the dynamic-block visibility grip ignored the base point and were offset by Rot*Scale*base. They now share insert_transform_with_base. Creation stores a ZERO base and redefine resets it; a no-op redefine moves nothing; the Block Definition dialog prefills the base from the definition. XCLIP filters stored by older builds keep their old displacement.
2026-10-12 04:35:19 +01:00
Karim Jerbi a456367b26 fix(save): baked dimension blocks and block clones must not share extension dictionaries
bake_dimension_blocks copied the dimension's whole EntityCommon, including its extension dictionary handle, into every baked child, so many entities claimed one dictionary and file validation reported an error per entity. Baked children now get no extension dictionary. The same defect is fixed in define_transformed_block and the cross-document paste clone. Each has a test.
2026-10-12 04:35:19 +01:00
Hakan Seven 5bb0efd93e Merge pull request #1679 from ramox81/codex/surface-associativity-sources
Associative extruded, revolved and lofted surfaces; spline and ellipse sources

# Conflicts:
#	src/app/command_driver/solid3d.rs
#	src/scene/dwg_native_constraints.rs
#	src/scene/model/mod.rs
#	src/scene/model/sweep_command_model.rs
#	src/scene/model/sweep_model.rs
#	src/scene/modify.rs
2026-10-12 00:14:34 +03:00
Hakan SevenandClaude Opus 5.5 c5b1269cae fix(dimension): keep picture placement consistent with world-space edits
#1681 places a dimension's picture block by its insertion point, rotation
and scale. Edits (move/rotate/scale/mirror, copy, paste) transform the
picture's sub-entities in world space, and the codec's dimension transform
moves the insertion point too, so a rotated or copied dimension would get
the placement applied twice. Fold the placement into the subs before the
edit and leave the dimension at the identity placement afterwards.

The picture insert no longer takes the dimension's extrusion: OCS bakes
picture sub-entities in world coordinates, so only the stored insertion
point goes through the OCS. A zero insertion-scale component counts as 1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-11 23:15:18 +03:00
Karim Jerbi 9cf9ff2c5c style: apply cargo fmt across workspace 2026-10-11 03:14:29 +01:00
ramox81andClaude Opus 5.5 27bf35fc96 Associative extruded, revolved and lofted surfaces; spline and ellipse sources
SURFACEASSOCIATIVITY now keeps EXTRUDE, REVOLVE and LOFT surfaces linked to
their sources: the profile (and axis object) or cross sections are kept, the
surface is made again when they change, and the drawing's associative
network carries an action with the extruded, revolved or lofted surface
action body, its path parameters and value parameters as the reference
writes them. Swept, extruded, revolved and lofted surfaces can read
splines (NURBS edge curve, fit-point splines through their fit points)
and ellipses (elliptical edge curve). Associative surfaces of a file
opened here follow their sources too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-09 10:31:58 +03:00
Hakan SevenandClaude Opus 5.5 ff6e2a6613 review(#1660, #1663): associative sweep scan, arc angles, viewport off bit
- refresh_associative_sweeps runs on every edit and scanned the xdata of
  every entity; it now returns at once when no associative swept surface
  exists (its application is not registered) and looks at surfaces only.
- An arc's end angle was raised by TAU in a loop, which never ends on a
  huge angle from a damaged file; the sweep is taken with rem_euclid.
- The sweep DELOBJ test expected surface sweeps to delete their sources,
  which #1663 changed on purpose: an associative surface keeps them.
- codec c9ffcac (opencadcodec #103) adds an explicit viewport-off bit: the
  viewport on state is read with is_on() and set with turn_on()/turn_off()
  everywhere, so a viewport the file marks off shows off and can be turned
  back on from Properties.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-08 14:56:30 +03:00
ramox81andClaude Opus 5.5 48c3c433a5 feat(sweep): associative swept surfaces in the drawing's network
Swept surfaces made with SURFACEASSOCIATIVITY on keep their profile and
path and are written as a swept-surface action of the drawing's
associative network, reading the profile and path and their scale and
twist expressions. They follow edits of their sources.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-08 13:29:55 +03:00
Hakan SevenandClaude Opus 5.5 9adb6f59c8 fix(copy): a copy reacts only to what was copied with it
COPY and PASTE kept the source's reactors on each copy, so a copied
dimension still pointed at the source's dimension association (and
boundary or group members at the source hatch or group). Another
application reports such a drawing as damaged and, after recovery,
moves the dimensions. A copy's reactors now follow only targets copied
with it; group copies give their members the new group's reactor; and a
drawing opened with such stray dimension reactors has them dropped.

Fixes #1645
Fixes #1649

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-08 08:34:49 +03:00
Hakan SevenandClaude Opus 5.5 ac086def56 review(#1653): upstream pins, registered expression xdata, table apply refreshes sweeps
- Cargo: drop the fork patches; codec 8e93175, kernel 0665fc9, graph
  3b91e67 in every manifest and lock.
- A swept surface's expression link is written through set_entity_xdata,
  so OCS_SWEEP_EXPRESSION has its APPID record and the record its handle.
- Applying the whole named-parameter table also rebuilds the swept
  surfaces linked to expressions, not only a single-row edit.
- swept_surface_entity keeps its doc comment.
- The native-constraint tests find a scope's network through its own
  dictionary, where it is now stored.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-07 21:38:17 +03:00
ramox81andClaude Opus 5.5 07499968d8 Sweep spatial profiles as surfaces, keep swept surfaces linked to expressions
A closed 3D polyline profile that does not lie in one plane sweeps a
surface with the reference's refusals. Swept surfaces made with an
Expression scale or twist follow the named parameters, and reference
surfaces linked through their associative action are picked up on open.
Saving keeps the associative actions the constraint graph does not
rebuild and stores each scope network through its own dictionary.
Kernel 23138fc, codec 64fe2a6.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-07 16:47:30 +03:00
Hakan Seven 737981791b Merge pull request #1642 from ramox81/codex/sweep-corner-followups 2026-10-07 12:55:08 +03:00
Hakan SevenandClaude Opus 5.5 d3033caf24 feat(solid history): booleans keep the solids they joined editable
With SOLIDHIST on, UNION, SUBTRACT and INTERSECT no longer reduce the
result's history to a frozen body: each solid's history joins the
result's under a boolean step, in the order the result applied them.
The Properties palette lists a composite's solids under Operand; the one
chosen shows its own geometry rows and grips, placed where it sits in
the composite, and editing it replays the whole tree. A composite read
from a file keeps its saved body; the tree is replayed only on edits.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-07 11:14:13 +03:00
ramox81andClaude Opus 5.5 1a18fdd0cf SWEEP: reference messages, 3D polyline profiles and Scale Reference
- 3D polyline profiles are recorded as wire bodies, like 3D polyline paths.
- Refused sweeps print the modeling error code and "Unable to sweep N
  selected objects."; a scaled sweep rejects closed and cornered spatial
  paths with the reference messages and asks for the path again.
- Scale > Reference asks for start and end reference lengths (start / end).
- Bank stays on for later sweeps until a twist angle is entered.
- Refused twist/scale edits in Properties print the modeling error code.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-07 09:26:29 +03:00
Hakan SevenandClaude Opus 5.5 e854481f72 fix(mirror): a mirrored dimension keeps its text readable
The dimension's own block parts were mirrored with their text, so the
measurement read backwards. Text orientation is kept under reflection,
the same as TEXT and MTEXT with MIRRTEXT off.

Fixes #1639

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-07 08:50:06 +03:00
ramox81andClaude Opus 5.5 eb90b68129 fix(solids): keep history-less solids without history on edge fillet/chamfer; undo the evaluation graph
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-02 10:45:09 +03:00
Hakan SevenandClaude Opus 5.5 b66b5100bd fix(annotative): MOVE/ROTATE/SCALE carry every scale representation; copies get their own
Only the displayed annotation context followed a transform, so other
scales reappeared at the old place, and a copied annotative entity other
than a LEADER/MTEXT pair shared the source's context tree.

Fixes #700

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-28 19:27:31 +03:00
Hakan SevenandClaude Opus 5.5 d1a6187678 fix(copy): copied raster images, OLE frames and underlays draw their picture
COPY added the entity without its derived image model, so only the frame
appeared at the copy.

Fixes #829

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-28 19:13:45 +03:00
Hakan SevenandClaude Opus 5.5 05502aac63 fix(move): dimensions with a baked block redraw where they were moved
MOVE shifted the *D block contents but left the block cache on the old
epoch, so reopened drawings showed dimensions in place until REGEN.

Fixes #1342

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-28 18:45:34 +03:00
Hakan SevenandClaude Opus 5.5 1091168196 fix(copy): copied associative hatches follow the copied boundary
The copy kept the source boundary handles, so editing the source
regenerated the copy onto the source outline and it seemed to vanish.

Fixes #1370

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-28 18:34:52 +03:00
Hakan SevenandClaude Opus 5.5 f537aff75c feat: node graph overlay; move to opencadcodec/opencadkernel/opencadgraph
The codec and kernel repositories and crates are renamed opencadcodec and
opencadkernel. Inside OCS they are depended on under short keys, so code
reads `codec::`, `kernel::` and the new `graph::` (opencadgraph, the node
graph engine). File-format and protocol spellings stay as they were: the
ACIS product id `acadrust`, the ACADRUST_* switches and the plugin
version keys `acadrust_version` / `acadrust_source`.

A button left of MCP on the command line opens a translucent node graph
over the viewport, with a palette of object, input, math, logic, list,
text and geometry nodes added by click or drag. An object node owns
drawing entities and its rows are the Properties panel's own rows for
them: the single-object page is extracted from refresh_properties as
entity_property_sections, values use the control protocol's
property_json, and writes go through set_property_value with a property
target override, so the panel, MCP and the graph share one read/write
path. A list reaching an object row makes one entity per element. Each
graph action is one undo step; the canvas pans and zooms.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-25 07:34:23 +03:00
Hakan SevenandClaude Fable 5.1 fd2062bdec fix(insert): attribute grips follow ATTMODE 2 and annotative scale
Follow-up to the block-attribute grips picked from #1386.

- Movability no longer includes the invisible flag: an attribute ATTMODE 2
  displays is grippable, so the grip the display-aware list shows can be
  dragged. The document-less grips() still skips invisible attributes,
  since it cannot consult ATTMODE.
- The grip sits on the displayed attribute, which an annotative insert
  scales about its insertion point; Scene::apply_grip now unscales the
  dragged target the same way before the attribute stores it, so the grip
  no longer jumps to twice the drag at scale 2.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-09-20 21:31:54 +03:00
ramox81 cbf1e76c69 Fix perpendicular constraint behavior 2026-09-17 10:48:44 +03:00
codallos 1f71a70580 Fix diameter dimension grip and text alignment 2026-09-16 19:21:03 -06:00
Christopher Overbeck 4816652c1f Remove comments that repeat association operations 2026-09-15 16:03:17 -05:00
Christopher Overbeck 7f018ab0f1 Merge viewport creation fixes and current upstream into associations 2026-09-15 14:14:33 -05:00
Christopher OverbeckandClaude Fable 5.1 e8246031fd Remap dimension associations across a copy
COPY, MIRROR and ARRAY duplicated a dimension's baked block but left the
copy with no association at all. Now a copy keeps one, on one condition:
every handle in every chain — the viewport, each INSERT on the block
path, the source entity, and an intersection's second chain — must have
been copied too. Then the whole chain is remapped onto the copies, so
the copy measures the copied geometry.

The condition is all-or-nothing on purpose. A partially-remapped chain
would leave a copy quietly driven by the original's geometry, which is
worse than no association; and copying a dimension on its own still
produces an unassociated dimension, which is exactly what the model
space path did before. It is the same rule `copy_complete_groups` uses
for groups, applied to a longer chain.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-09-15 12:46:04 -05:00
Hakan Seven d738ebfcc6 Standardize parametric constraints and interoperability 2026-09-15 03:19:52 +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
ramox81 11057cc5e9 Fix extrusion surface properties and snapping 2026-09-10 16:07:05 +03:00
ramox81 a24d1e6108 Fix live extrusion surface grip editing 2026-09-10 14:53:48 +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 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
ramox81 7913f8e2da Merge remote-tracking branch 'origin/main' into codex/shell-parity
# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	crates/ocs_doc_api/Cargo.toml
#	src/modules/model/mod.rs
2026-09-08 19:49:35 +03:00
ramox81 be06a756da Implement solid shell workflow and properties 2026-09-08 19:37:35 +03:00
ramox81 261ab66afd Restore primitive properties after edge operations 2026-09-08 17:11:23 +03:00
ramox81 8822371e18 Complete CHAMFEREDGE workflow and history 2026-09-08 15:45:10 +03:00
ramox81 8bb6703c70 Complete FILLETEDGE workflow and history 2026-09-08 12:36:49 +03:00
gianlucafiore b7c2ce2e13 fix(hatch): refresh associative hatch during geometry edits 2026-09-07 18:18:36 -03:00
ramox81 eb83e551b8 Make Solid History choices editable 2026-09-07 15:05:45 +03:00
gianlucafiore 2ed09459c1 fix(images): refresh raster cache during grip edits 2026-09-05 16:09:40 -03:00
ramox81 9279384e9a Complete PRESSPULL selection, face editing and extrusion history 2026-09-04 15:31:30 +03:00
ramox81 479bf87988 Complete LOFT commands, surfaces, previews and editable history 2026-09-04 13:03:33 +03:00
ramox81 ea6eb58c53 Fix extruded solid grip preview and taper range 2026-09-03 10:35:02 +03:00
ramox81 4ba0ea8808 Fix cone silhouettes and history properties 2026-08-31 16:33:10 +03:00
ramox81 0f4825f06c Align CONE properties and editing 2026-08-31 11:58:29 +03:00
Hakan Seven 217f20d8bc fix(clipboard): preserve pasted content
Reset cross-document ownership, include non-wire and locked objects, and rebuild image caches for embedded OLE content.

Refs #934
2026-08-29 22:40:59 +03:00
Hakan Seven fc93efeed7 fix(box): preserve construction semantics 2026-08-28 20:44:14 +03:00
ramox81 27f648d2bb Align BOX properties and history controls 2026-08-28 16:36:46 +03:00