forked from 1b-agent/opencadstudio-upstream
feat(dimension): the standard arrowheads in every arrowhead picker
The dimension style, multileader style and Properties pickers listed every block of the drawing as an arrowhead, and nothing else. They now list the 19 standard arrowheads (Closed filled, Open, Dot, Architectural tick, Oblique, Right angle, Datum triangle, …), followed by any user arrow block the dimension or style already uses. Picking one creates its block (`_Open`, `_ArchTick`, …) with the geometry the reference program writes, so other programs draw the same arrow; ODA reads the saved file cleanly. `_Small` now draws as the reference's "Dot small blank", a hollow circle half the arrow size, instead of a small filled triangle. Also drops a duplicated "DGN Import" catalog entry left by #1810/#1812. (#1820, #1821) Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
4143a01ff4
commit
bec9e63679
14 files changed
+288
-107
No files matched your search
+7
-17
@@ -554,14 +554,8 @@ impl OpenCADStudio {
|
||||
// Arrowheads are blocks; the closed-filled default has no
|
||||
// block, so seed the list with it and add the arrowhead
|
||||
// blocks (leading underscore) present in the drawing.
|
||||
let arrow_names: Vec<String> = std::iter::once("Closed filled".to_string())
|
||||
.chain(
|
||||
doc.block_records
|
||||
.iter()
|
||||
.filter(|b| b.name.starts_with('_'))
|
||||
.map(|b| b.name.clone()),
|
||||
)
|
||||
.collect();
|
||||
// Filled in below from the current arrowhead. (#1820)
|
||||
let arrow_names: Vec<String>;
|
||||
let block_names: Vec<String> = doc
|
||||
.block_records
|
||||
.iter()
|
||||
@@ -590,15 +584,11 @@ impl OpenCADStudio {
|
||||
.map(|s| s.name.clone())
|
||||
})
|
||||
.unwrap_or_else(|| "Standard".to_string());
|
||||
let cur_arrow = ml
|
||||
.arrowhead_handle
|
||||
.and_then(|h| {
|
||||
doc.block_records
|
||||
.iter()
|
||||
.find(|b| b.handle == h)
|
||||
.map(|b| b.name.clone())
|
||||
})
|
||||
.unwrap_or_else(|| "Closed filled".to_string());
|
||||
let cur_arrow = crate::entities::arrowheads::label(
|
||||
doc,
|
||||
ml.arrowhead_handle.unwrap_or(codec::Handle::NULL),
|
||||
);
|
||||
arrow_names = crate::entities::arrowheads::options([cur_arrow.as_str()]);
|
||||
let cur_ltype = ml
|
||||
.line_type_handle
|
||||
.and_then(|h| {
|
||||
|
||||
Reference in new issue
Block a user