Commit Graph
925 Commits
Author SHA1 Message Date
Hakan SevenandClaude Opus 5.5 838e397a6c Merge pull request #1793 from ramox81/codex/block-definition-command-line
Block Definition: command-line forms, block record data and dialog defaults

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 00:14:21 +03:00
Hakan Seven b5fb42e9f8 Merge pull request #1785 from ramox81/codex/selection-found-messages
Selection: report what each pick found while a command gathers objects

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	src/locale_catalog.rs
2026-10-14 23:57:20 +03:00
Hakan SevenandClaude Opus 5.5 98f0c15e3f Merge pull request #1782 from ramox81/codex/refedit-nested-messages
REFEDIT: nested pick messages, window pick and session note

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 23:57:08 +03:00
ramox81 99e30f1548 Merge remote-tracking branch 'origin/main' into codex/block-definition-command-line
# Conflicts:
#	src/app/commands/inquiry.rs
#	src/modules/draw/modify/block_edit.rs
2026-10-14 17:51:56 +03:00
ramox81andClaude Opus 5.5 d583d9d421 Block Definition command-line forms, block record data and dialog defaults
-BLOCK, -WBLOCK, -BEDIT, ATTSYNC, BASE and INSBASE follow the reference
prompts and messages; empty blocks; WBLOCK keeps object coordinates and
stores INSBASE; annotative and hyperlink data on the block record; block
preview images; remembered dialog choices; block aliases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 17:30:21 +03:00
Karim Jerbi abad1b9045 feat(bedit): add Edit Block Definition dialog and new block authoring
Open the Edit Block Definition dialog when BEDIT is invoked without an active selection, listing candidate block definitions alphabetically while filtering layout records, anonymous blocks, and external references. Allow typing a new valid block name to start an empty block editor session that only commits to the drawing block table upon explicit save.
2026-10-14 14:46:48 +01:00
Karim Jerbi 9632979d09 feat(block-editor): add Test Block preview
Preview the current unsaved block in a disposable drawing with independent history. Keep normal Draw tools available, append Close Test Block, and return to the original editor without saving. Guard persistence paths and handle refresh and parent-close lifecycle by stable document identity.
2026-10-14 14:44:58 +01:00
ramox81andClaude Opus 5.5 1e93b16911 Selection: report what each pick found while a command gathers objects
Every pick during object selection prints the reference's count line:
"N found" for the first pick or a pick that adds nothing, "N found,
M total" after it, "N found, N removed, M total" when objects leave the
set. It is printed before a command's own filtering, so "N were filtered
out" follows it. COUNT reports through it and the ad hoc
"object(s) found." / "object(s) added to selection." lines are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 13:27:44 +03:00
ramox81andClaude Opus 5.5 df7f81a07d REFEDIT: nested pick messages and the session note
Picking nested objects reports what each pick added ("1 entity added",
"0 entities added" for an object already in the set), a pick on empty
space starts a window ("Specify opposite corner:"; a window dragged to
the right takes the objects inside it, to the left those it touches),
and a typed point picks the object it lies on. From the Reference Edit
dialog the item count is printed when the session opens, followed by
"Use REFCLOSE or the Refedit toolbar to end reference editing session."

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 12:57:42 +03:00
Hakan SevenandClaude Opus 5.5 7b4c13c6ca JOIN: separate chains join one by one (#1765)
A selection of several unconnected chains, or one holding a closed
polyline, failed as a whole; each chain now joins on its own and the
rest stays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 12:37:20 +03:00
Hakan Seven 21f33e933e Merge pull request #1777 from ramox81/codex/refedit-dialog
REFEDIT: Reference Edit dialog and unique names for xref objects

# Conflicts:
#	locales/ar-SA/opencadstudio.ftl
#	locales/bg-BG/opencadstudio.ftl
#	locales/cs-CZ/opencadstudio.ftl
#	locales/de-DE/opencadstudio.ftl
#	locales/el-GR/opencadstudio.ftl
#	locales/en-US/opencadstudio.ftl
#	locales/es-ES/opencadstudio.ftl
#	locales/fi-FI/opencadstudio.ftl
#	locales/fr-FR/opencadstudio.ftl
#	locales/hi-IN/opencadstudio.ftl
#	locales/hu-HU/opencadstudio.ftl
#	locales/it-IT/opencadstudio.ftl
#	locales/ja-JP/opencadstudio.ftl
#	locales/ko-KR/opencadstudio.ftl
#	locales/lo-LA/opencadstudio.ftl
#	locales/nl-NL/opencadstudio.ftl
#	locales/pl-PL/opencadstudio.ftl
#	locales/pt-BR/opencadstudio.ftl
#	locales/ru-RU/opencadstudio.ftl
#	locales/tr-TR/opencadstudio.ftl
#	locales/zh-CN/opencadstudio.ftl
#	locales/zh-TW/opencadstudio.ftl
#	src/app/control/actions.rs
#	src/app/mod.rs
#	src/app/view/modal.rs
2026-10-14 12:10:40 +03:00
Hakan Seven dec3ba2743 Merge pull request #1778 from ramox81/codex/refedit-toolbar
REFEDIT session toolbar: definition name, working set count and REFSET buttons
2026-10-14 12:05:19 +03:00
Hakan Seven ff5833c35e Merge pull request #1776 from ramox81/codex/imageadjust-dialog
IMAGEADJUST: Image Adjust dialog for raster images
2026-10-14 12:01:13 +03:00
Karim Jerbi 78bdfa3c74 feat(block-editor): add Save Block As
Create a new named definition from current session edits, restore the source checkpoint, and continue editing the copy with fresh local history. Add the name dialog and Save dropdown, clone supported owned metadata onto independent handles, and refuse unsupported relationships atomically.
2026-10-14 09:11:55 +01:00
ramox81andClaude Opus 5.5 74d65c26be REFEDIT session toolbar: definition name, working set count, REFSET
The right-edge toolbar of a REFEDIT session now shows the definition
being edited (REFEDITNAME) as an accent pill with the number of objects
in the working set, Add to / Remove from Working Set buttons with their
own icons (REFSET Add / Remove, straight to object selection), and
Save / Discard in a separate group below a rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 10:51:22 +03:00
ramox81andClaude Opus 5.5 92a3a8ee4d REFEDIT: Edit Reference dialog and unique names for xref objects
REFEDIT opens a dialog after the pick: the nesting chain as chips with a
preview of the chosen definition, all objects or picking them in the
drawing, attribute definitions (offered only when the definition has
them), locking objects outside the working set and unique names for an
external reference's named objects. The settings are remembered.

With unique names an xref's dependent layers, linetypes, text styles and
blocks are checked out as $N$NAME records of their own; without, under
the plain name, sharing a host record of that name. Save writes them back
under the reference's names, and the records made for the session are
removed when it closes. -REFEDIT uses the remembered settings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 10:39:28 +03:00
ramox81andClaude Opus 5.5 2f55c73457 IMAGEADJUST: Image Adjust dialog for raster images
IMAGEADJUST (alias IAD) takes the selected raster images or asks
"Select image(s):", then opens a dialog with a before/after preview of
the first image and brightness, contrast and fade rows (bar plus
stepper, whole numbers 0-100). Apply writes the values to every chosen
image as one undo step; restore defaults sets 50/50/0. Adds the
image_adjust automation action and the image-adjust locale group.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 10:11:36 +03:00
Hakan SevenandClaude Opus 5.5 da8e976a60 feat(bedit): author visibility states of dynamic blocks
In the Block Editor, BVSTATE makes a new visibility state, makes one
current, renames or deletes one; BVHIDE and BVSHOW hide or show the
picked objects in the current state (BVSHOW shows every object of the
block while they are picked). The first use makes the block dynamic.

The states are stored as the format keeps them: a
BLOCKVISIBILITYPARAMETER in the block's ACAD_ENHANCEDBLOCK evaluation
graph with its visibility grip and the grip's two location expressions,
the round-trip purge preventer, AcDbDynamicBlockTrueName /
AcDbDynamicBlockGUID / AcDbBlockRepETag on the definition and element
tags on each of its objects. The definition shows its first state; a
reference given another state gets its own evaluated *U copy, tagged
AcDbBlockRepBTag and linked back through AcDbBlockRepresentation /
AcDbRepData, so it shows that state and the other references do not
change. Saving the block drops erased objects from the states.

Checked: a block authored this way reads back with its states and
reference link from DWG and DXF, and the ODA converter accepts the DWG.

Closes #1566

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 10:02:34 +03:00
Hakan Seven 86df079182 Merge pull request #1744 from ramox81/codex/layout-first-open-followups
Layouts: first opening follows the page setup; viewports picked by their frame
2026-10-14 08:54:19 +03:00
Hakan Seven 7e763080cb Merge pull request #1752 from ramox81/codex/refedit-parity
REFEDIT: reference prompts, -REFEDIT, REFSET, nested references and xref write-back
2026-10-14 08:46:42 +03:00
Hakan Seven f6fc244430 Merge pull request #1751 from ramox81/codex/adjust-parity
ADJUST: images and underlays, -IMAGEADJUST and PDF/DWF/DGNADJUST
2026-10-14 08:42:35 +03:00
Hakan Seven f8908e151f Merge pull request #1754 from ramox81/codex/attach-command-line
ATTACH: FILEDIA, -ATTACH command line and reference file types

# Conflicts:
#	src/app/settings.rs
#	src/app/update/file.rs
2026-10-14 08:39:34 +03:00
Hakan Seven 7d306eec5e Merge pull request #1753 from ramox81/codex/insert-reference-ribbon
Insert ribbon: Reference panel order and Snap to Underlays state
2026-10-14 08:35:47 +03:00
Hakan Seven 3196febb40 Merge pull request #1757 from ramox81/codex/ulayers-empty-drawing
ULAYERS opens without underlays; the ribbon button runs ULAYERS
2026-10-14 08:35:34 +03:00
Hakan Seven 77825c1b15 Merge pull request #1758 from ramox81/codex/clip-enter-silent
CLIP: Enter at the object prompt ends silently

# Conflicts:
#	src/command.rs
2026-10-14 08:35:03 +03:00
Hakan SevenandClaude Opus 5.5 881d237629 feat(array): ARRAYEDIT Source edits what an associative array repeats
ARRAYEDIT picks an associative array (or takes the preselected one) and
its Source option opens the objects every item repeats in the Block
Editor; saving there updates all items at once. Counts and spacings stay
in Properties.

Refs #1109

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 22:29:56 +03:00
Hakan SevenandClaude Opus 5.5 58b2f22c09 feat(compare): COMPARE overlays what differs from another drawing
COMPARE picks a drawing (or takes its path) and matches its objects with
this drawing's by what they draw: type, layer and tessellated geometry,
so an unchanged copy matches whatever its handle. Objects only here are
outlined in green, objects only in the other drawing in red, over the
current drawing, and Next / Previous zoom from one difference to the
next with a count in the prompt. A moved or edited object shows as one
of each. eXit (or Esc) clears the overlay.

Refs #970

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 21:31:46 +03:00
Hakan SevenandClaude Opus 5.5 f0ac89629b feat(array): ARRAYRECT and ARRAYPOLAR create associative arrays
With the new Associative option on (the default), ARRAYRECT and
ARRAYPOLAR build the array the way the drawing format stores one: the
selected objects move into an anonymous source block, an anonymous
array block holds one ByBlock reference to it per item, an INSERT of
the array block takes their place, and an AcDbAssocAction with an
AcDbAssocArrayActionBody, its three dependencies, the BaseNormal /
Origin / basePoint parameters and the value parameters tie them
together in the model-space network. The array is then edited from
Properties like an array read from a file.

The option flips with AS and is remembered for the session; on a
rotated working plane the commands keep making plain copies. Saving
drops the action of an array whose reference was erased or exploded.

Checked: created arrays reopen as associative with their parameters
and items, and the ODA converter reads the saved DWG without errors.

Refs #1109

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 21:23:48 +03:00
Karim Jerbi f39fb31137 feat(block-editor): isolate session history and add save checkpoints 2026-10-13 15:35:24 +01:00
Hakan SevenandClaude Opus 5.5 5e6290ce30 feat(model): SLICE cuts meshes
SLICE now takes MESH, polygon mesh and polyface mesh objects. A mesh
that closes a volume is sliced as a solid, so each side is capped and
becomes a 3D solid. An open mesh, such as a pipe run imported without
end caps, is clipped face by face and each side stays a mesh, open
along the cut. Keeping one side or both works as for solids, in one
undo step.

Refs #1398

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 16:24:00 +03:00
Hakan SevenandClaude Opus 5.5 9724447dd0 feat(ribbon): contextual Block Editor tab while editing a block
Opening the block editor brings up a Block Editor ribbon tab with
Edit / Save / Discard, Attribute Definition, and the geometric,
dimensional and parameter tools that drive parametric blocks. The tab
is only listed while a block editor session is open, and leaving the
session returns to the tab that was active before.

Refs #509

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 15:53:55 +03:00
ramox81andClaude Opus 5.5 a0a83ad681 ADJUST: images and underlays, -IMAGEADJUST and PDF/DWF/DGNADJUST
ADJUST gathers raster images or PDF/DWF/DGN underlays (other objects are
dropped silently, pickfirst is used, a mixed set is refused), then asks the
image option (Brightness default) or the underlay option (last used), with
value prompts that offer the image's own value or the session's last
underlay fade/contrast, and Monochrome Yes/No. Invalid values re-prompt.
One undo step. -IMAGEADJUST, PDFADJUST, DWFADJUST and DGNADJUST take one
kind each. Raster image Brightness/Contrast/Fade move to an Image Adjust
section as whole numbers with 0-100 validation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 15:53:20 +03:00
ramox81andClaude Opus 5.5 042223a09c Insert ribbon: Reference panel after Block Definition; Snap to Underlays list follows UOSNAP
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 15:52:27 +03:00
ramox81andClaude Opus 5.5 6784f89993 REFEDIT: reference prompts, -REFEDIT, REFSET, nested references, xref write-back
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 15:52:26 +03:00
Hakan SevenandClaude Opus 5.5 2ddf2a31da feat(hatch): HPASSOC sets whether new hatches are associative
HPASSOC (0 or 1, default 1) is the starting state of the hatch
command's associative option. It is an application setting: typed
directly or through SETVAR, it persists across sessions and does not
mark the drawing modified.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 15:32:55 +03:00
ramox81andClaude Opus 5.5 d217248ac3 CLIP: Enter at the object prompt ends silently
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 15:28:36 +03:00
ramox81andClaude Opus 5.5 15c70b16d1 ULAYERS opens in a drawing without underlays; the ribbon runs ULAYERS
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 15:28:06 +03:00
Hakan SevenandClaude Opus 5.5 dd45ac4039 feat(modify): TXTEXP turns text into its character outlines
TXTEXP replaces each selected TEXT and MTEXT with one polyline per
glyph contour, on the text's layer and with its properties: a
lightweight polyline for flat text, a 3D polyline for tilted text.
The outlines come from the same glyph tessellation the text renders
with, so stroke fonts give their strokes and outline fonts their
closed contours.

Refs D#1665

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 15:27:28 +03:00
ramox81andClaude Opus 5.5 0678c579c0 ATTACH: FILEDIA, -ATTACH command line and reference file types
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 15:22:44 +03:00
Hakan SevenandClaude Opus 5.5 57eb7fe4db feat(layout): MVSETUP sets a drawing up for plotting
In model space MVSETUP draws the sheet border at the drawing scale
(scale factor, paper width and height) and zooms to it, or switches to
a layout. On a layout it creates viewports in a bounding area (a single
one, a 2x2 engineering set of top/front/right/isometric views, or an
array with spacing), deletes picked objects, and scales picked
viewports to a paper/model unit ratio.

A viewport's fit to the model now measures the model along the
viewport's own view direction, so side and isometric views frame it
too.

Refs #1501

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 15:21:26 +03:00
Hakan SevenandClaude Opus 5.5 b1d4c9bd9b feat(clipboard): PASTESPEC pastes in a chosen format
PASTESPEC offers the formats on the clipboard: Objects and Block for
objects copied in the application (the PASTECLIP and PASTEBLOCK paths),
and Text for the system clipboard's text, placed as multi-line text in
the current text style with its lines as paragraphs.

Refs #645

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 15:06:58 +03:00
Hakan SevenandClaude Opus 5.5 4ffae00199 feat(view): DVIEW twists the view about its line of sight
DVIEW (alias DV) offers TWist and Undo. TWist rolls the active view
or viewport camera to the typed angle; Undo steps back through the
twists made in the session. The new alias reaches existing profiles
through the alias migration table.

Refs #638

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 14:47:34 +03:00
Karim Jerbi 8d287decd8 fix(explode): use codec block explosion for attributes and arrays
Delegate INSERT and MINSERT explosion to the document-aware codec implementation, removing duplicate attribute and base-point handling. Update workspace, kernel and graph pins together and cover rotated arrays with a nonzero base.
2026-10-13 11:10:11 +01:00
Karim Jerbi 59bb6faabd fix(blocks): enforce constant attributes in ATTEDIT and restore ATTDEFs on explode
Enforce constant attribute flag in ATTEDIT dialog by presenting constant attributes as disabled and ignoring modifications. When exploding an insert, restore block-definition attribute definitions as transformed ATTDEF entities while dropping instance attribute values.
2026-10-13 11:10:11 +01:00
ramox81andClaude Opus 5.5 c55dbb886e Layouts: first opening follows the page setup; viewports picked by their frame
- A layout opens for the first time when its page setup was never
  initialized (no paper size, no media name) or it was created in this
  session; its page setup is initialized then, and with
  LAYOUTCREATEVIEWPORT it gets its first viewport. A layout never opened
  is saved with an uninitialized page setup and no viewports, so it gets
  its viewport when the file is opened again, here or in the reference.
- Select Viewport for view: a viewport is selected when the pick box
  (PICKBOX pixels at the sheet's zoom) touches its frame; a pick well
  inside or outside selects nothing and the prompt repeats.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 12:02:26 +03:00
Hakan SevenandClaude Opus 5.5 fa00c27e31 fix(dist): count the XY angle from ANGBASE in ANGDIR's sense
DIST printed the raw world angle (-180..180) while the Properties panel
and typed directions follow the drawing's base angle and direction.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 11:22:53 +03:00
Hakan SevenandClaude Opus 5.5 2f08719026 fix(fillet): join a filleted line or arc into the polyline
Filleting a polyline segment with a line or arc moved the segment's
vertex and left the polyline closed and the other object separate, so a
closed shape bent into an unexpected outline. The polyline is now
opened if closed, cut at the fillet point keeping the picked side, and
the fillet arc and the trimmed line or arc are joined onto it as one
polyline, as the reference does.

Refs #1422

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 08:44:16 +03:00
Hakan SevenandClaude Opus 5.5 3840630ab4 fix(extend): use preselected objects as boundary edges
TRIM already takes objects selected before the command as cutting
edges; EXTEND ignored them and extended to the nearest object in the
path. It now takes them as boundary edges the same way.

Fixes #1732

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 08:04:13 +03:00
Hakan SevenandClaude Opus 5.5 925c91ccfa fix(pasteblock): place the block at the picked point
The pasted block is defined around the clipboard base, so its origin
is already that point, but the insertion still subtracted the base and
landed the block offset from the pick. The base now only positions the
world-space preview, and it stays f64.

Fixes #1731

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 08:04:13 +03:00
Hakan Seven 03445a540d Merge pull request #1722 from ramox81/codex/view-background
# Conflicts:
#	locales/ar-SA/opencadstudio.ftl
#	locales/bg-BG/opencadstudio.ftl
#	locales/cs-CZ/opencadstudio.ftl
#	locales/de-DE/opencadstudio.ftl
#	locales/el-GR/opencadstudio.ftl
#	locales/en-US/opencadstudio.ftl
#	locales/es-ES/opencadstudio.ftl
#	locales/fi-FI/opencadstudio.ftl
#	locales/fr-FR/opencadstudio.ftl
#	locales/hi-IN/opencadstudio.ftl
#	locales/hu-HU/opencadstudio.ftl
#	locales/it-IT/opencadstudio.ftl
#	locales/ja-JP/opencadstudio.ftl
#	locales/ko-KR/opencadstudio.ftl
#	locales/lo-LA/opencadstudio.ftl
#	locales/nl-NL/opencadstudio.ftl
#	locales/pl-PL/opencadstudio.ftl
#	locales/pt-BR/opencadstudio.ftl
#	locales/ru-RU/opencadstudio.ftl
#	locales/tr-TR/opencadstudio.ftl
#	locales/zh-CN/opencadstudio.ftl
#	locales/zh-TW/opencadstudio.ftl
2026-10-13 07:44:01 +03:00