fix(pdf): follow-ups to the PDF underlay merge

- Pin cadcodec upstream at d290dbe (the merged underlay change) and
  cadkernel at 4134ae3, which follows it; drop the fork patch, move the
  plugin-API and web-worker crates and the Python plugin lock to the same
  codec so one copy is built.
- "Import as block" with raster images left IMAGE entities without an
  image definition: block definition now creates it like add_entity does,
  through one shared helper.
- The three preview outlines (attach frame, clip boundary, import area)
  stay f64 instead of casting world points to f32.
- Page size / total / PDF scale entries use the catalog's positional
  placeholder; the bare {name} form failed to format in 20 locales.
- The Underlay Layers bulb is the SVG layer icon, not a text glyph.
- PDF dialogs use the shared dialog buttons and radios.
- Options opened from a PDF dialog clears its saved state on return.
- Paper-space underlay background reuses the model block handle already
  resolved; dead `let _ = i` lines and a misplaced doc comment removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 5.5 committed 2026-09-24 23:24:51 +03:00
1 parent 2e60c4da1b
commit d5016c7044
34 files changed
+129 -156

No files matched your search

Generated
+3 -3
View File
@@ -88,7 +88,7 @@ checksum = "366ffbaa4442f4684d91e2cd7c5ea7c4ed8add41959a31447066e279e432b618"
[[package]] [[package]]
name = "acadrust" name = "acadrust"
version = "0.5.5" version = "0.5.5"
source = "git+https://github.com/ramox81/cadcodec.git?rev=d290dbe#d290dbe1712666d83dfd0fc63341ee3246f8de76" source = "git+https://github.com/HakanSeven12/cadcodec.git?rev=d290dbe#d290dbe1712666d83dfd0fc63341ee3246f8de76"
dependencies = [ dependencies = [
"ahash 0.8.12", "ahash 0.8.12",
"anyhow", "anyhow",
@@ -924,7 +924,7 @@ checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"
[[package]] [[package]]
name = "cadkernel" name = "cadkernel"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/HakanSeven12/cadkernel.git?rev=6eae7c9#6eae7c97fb29a21a818164af7c009f93e3ffe5b8" source = "git+https://github.com/HakanSeven12/cadkernel.git?rev=4134ae3#4134ae386153a76998c2fbf03e81a5c4a23928cc"
dependencies = [ dependencies = [
"acadrust", "acadrust",
"cavalier_contours", "cavalier_contours",
@@ -935,7 +935,7 @@ dependencies = [
[[package]] [[package]]
name = "cadkernel-constraints" name = "cadkernel-constraints"
version = "0.1.0" version = "0.1.0"
source = "git+https://github.com/HakanSeven12/cadkernel.git?rev=6eae7c9#6eae7c97fb29a21a818164af7c009f93e3ffe5b8" source = "git+https://github.com/HakanSeven12/cadkernel.git?rev=4134ae3#4134ae386153a76998c2fbf03e81a5c4a23928cc"
dependencies = [ dependencies = [
"nalgebra", "nalgebra",
] ]
+3 -6
View File
@@ -33,9 +33,9 @@ rfd = "0.17"
clap = { version = "4", features = ["derive", "string"] } clap = { version = "4", features = ["derive", "string"] }
env_logger = "0.11" env_logger = "0.11"
log = "0.4" log = "0.4"
acadrust = { git = "https://github.com/ramox81/cadcodec.git", rev = "d290dbe", features = ["serde"] } acadrust = { git = "https://github.com/HakanSeven12/cadcodec.git", rev = "d290dbe", features = ["serde"] }
cadkernel = { git = "https://github.com/HakanSeven12/cadkernel.git", rev = "6eae7c9", features = ["acis", "offset"] } cadkernel = { git = "https://github.com/HakanSeven12/cadkernel.git", rev = "4134ae3", features = ["acis", "offset"] }
cadkernel-constraints = { git = "https://github.com/HakanSeven12/cadkernel.git", rev = "6eae7c9" } cadkernel-constraints = { git = "https://github.com/HakanSeven12/cadkernel.git", rev = "4134ae3" }
dwg-thumbnailer = { path = "crates/dwg-thumbnailer" } dwg-thumbnailer = { path = "crates/dwg-thumbnailer" }
flate2 = "1" flate2 = "1"
image = { version = "0.25", default-features = false, features = ["png", "jpeg", "bmp", "tiff"] } image = { version = "0.25", default-features = false, features = ["png", "jpeg", "bmp", "tiff"] }
@@ -81,9 +81,6 @@ objc2-app-kit = { version = "0.2", features = ["NSApplication", "NSResponder", "
block2 = "0.5" block2 = "0.5"
objc2-foundation = { version = "0.2", features = ["NSArray", "NSURL", "NSString", "NSObject", "NSNotification", "NSThread", "NSEnumerator"] } objc2-foundation = { version = "0.2", features = ["NSArray", "NSURL", "NSString", "NSObject", "NSNotification", "NSThread", "NSEnumerator"] }
[patch."https://github.com/HakanSeven12/cadcodec.git"]
acadrust = { git = "https://github.com/ramox81/cadcodec.git", rev = "d290dbe" }
[patch.crates-io] [patch.crates-io]
iced_core = { git = "https://github.com/iced-rs/iced.git", rev = "23604ff22ab0aad9e00b9327cb7b8546ed84db39" } iced_core = { git = "https://github.com/iced-rs/iced.git", rev = "23604ff22ab0aad9e00b9327cb7b8546ed84db39" }
iced_widget = { git = "https://github.com/iced-rs/iced.git", rev = "23604ff22ab0aad9e00b9327cb7b8546ed84db39" } iced_widget = { git = "https://github.com/iced-rs/iced.git", rev = "23604ff22ab0aad9e00b9327cb7b8546ed84db39" }
+2 -2
View File
@@ -15,7 +15,7 @@ serde_json = { version = "1", optional = true }
# Pulled in only by the `host` feature, which adds the `acadrust`-typed # Pulled in only by the `host` feature, which adds the `acadrust`-typed
# `HostApi` runtime surface. The default crate stays dependency-free so engine # `HostApi` runtime surface. The default crate stays dependency-free so engine
# crates and external tooling can depend on the manifest/ribbon contract cheaply. # crates and external tooling can depend on the manifest/ribbon contract cheaply.
acadrust = { git = "https://github.com/HakanSeven12/cadcodec.git", rev = "dd1d7bf", optional = true, features = ["serde"] } acadrust = { git = "https://github.com/HakanSeven12/cadcodec.git", rev = "d290dbe", optional = true, features = ["serde"] }
# Runtime IPC and serialization (host feature only). # Runtime IPC and serialization (host feature only).
interprocess = { version = "2", optional = true } interprocess = { version = "2", optional = true }
@@ -39,7 +39,7 @@ serde_json = "1"
serde = { version = "1", features = ["derive"] } serde = { version = "1", features = ["derive"] }
cargo-lock = "11" cargo-lock = "11"
# acadrust is scanned at build time to generate the embedded type registry. # acadrust is scanned at build time to generate the embedded type registry.
acadrust = { git = "https://github.com/HakanSeven12/cadcodec.git", rev = "dd1d7bf", features = ["serde"] } acadrust = { git = "https://github.com/HakanSeven12/cadcodec.git", rev = "d290dbe", features = ["serde"] }
[dev-dependencies] [dev-dependencies]
serde_json = "1" serde_json = "1"
+1 -1
View File
@@ -8,7 +8,7 @@ publish = false
crate-type = ["cdylib"] crate-type = ["cdylib"]
[dependencies] [dependencies]
acadrust = { git = "https://github.com/HakanSeven12/cadcodec.git", rev = "dd1d7bf", features = ["serde"] } acadrust = { git = "https://github.com/HakanSeven12/cadcodec.git", rev = "d290dbe", features = ["serde"] }
bincode = "1.3" bincode = "1.3"
serde = { version = "1", features = ["derive"] } serde = { version = "1", features = ["derive"] }
console_error_panic_hook = "0.1" console_error_panic_hook = "0.1"
+2 -2
View File
@@ -7,8 +7,8 @@ reloading it, and comparing entity fields.
**Status (23 September 2026):** the fixes landed in cadcodec as **Status (23 September 2026):** the fixes landed in cadcodec as
[#48](https://github.com/HakanSeven12/cadcodec/pull/48) (issues 1-6) and [#48](https://github.com/HakanSeven12/cadcodec/pull/48) (issues 1-6) and
[#51](https://github.com/HakanSeven12/cadcodec/pull/51) (the first three style findings), and [#51](https://github.com/HakanSeven12/cadcodec/pull/51) (the first three style findings), and
the block description with commit `dd1d7bf` (cadcodec issue #49). OCS pins `dd1d7bf`, and the the block description with commit `dd1d7bf` (cadcodec issue #49). OCS pins `d290dbe`, which
canaries below were flipped against it. What is still open: includes it; the canaries below were flipped against `dd1d7bf`. What is still open:
- **ATTDEF `lock_position`** (issue 1): the reader is complete, but the DXF writer emits no - **ATTDEF `lock_position`** (issue 1): the reader is complete, but the DXF writer emits no
group 280 at all, neither the version byte nor the lock flag the reader expects after it. group 280 at all, neither the version byte nor the lock flag the reader expects after it.
+3 -3
View File
@@ -3520,7 +3520,7 @@ annotate =
.tolerance-specify-insertion-point = TOLERANCE حدد نقطة الإدراج: .tolerance-specify-insertion-point = TOLERANCE حدد نقطة الإدراج:
insert = insert =
.pdfui-pdf-scale = PDF scale: {scale}:1 .pdfui-pdf-scale = PDF scale: __ocs_fmt_0__:1
.pdfui-specify-insertion-point = Specify insertion point: .pdfui-specify-insertion-point = Specify insertion point:
.pdfui-no-pdf-underlays = No PDF underlays found. .pdfui-no-pdf-underlays = No PDF underlays found.
.pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects. .pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects.
@@ -3529,8 +3529,8 @@ insert =
.pdfui-rotation = Rotation: .pdfui-rotation = Rotation:
.pdfui-scale = Scale: .pdfui-scale = Scale:
.pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen .pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen
.pdfui-page-size-size = Page size: {size} .pdfui-page-size-size = Page size: __ocs_fmt_0__
.pdfui-total-count = Total: {count} .pdfui-total-count = Total: __ocs_fmt_0__
.pdfui-page = Page: .pdfui-page = Page:
.pdfui-page-to-import = Page to import .pdfui-page-to-import = Page to import
.pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes .pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes
+3 -3
View File
@@ -3507,7 +3507,7 @@ annotate =
.tolerance-specify-insertion-point = TOLERANCE Посочи точка на вмъкване: .tolerance-specify-insertion-point = TOLERANCE Посочи точка на вмъкване:
insert = insert =
.pdfui-pdf-scale = PDF scale: {scale}:1 .pdfui-pdf-scale = PDF scale: __ocs_fmt_0__:1
.pdfui-specify-insertion-point = Specify insertion point: .pdfui-specify-insertion-point = Specify insertion point:
.pdfui-no-pdf-underlays = No PDF underlays found. .pdfui-no-pdf-underlays = No PDF underlays found.
.pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects. .pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects.
@@ -3516,8 +3516,8 @@ insert =
.pdfui-rotation = Rotation: .pdfui-rotation = Rotation:
.pdfui-scale = Scale: .pdfui-scale = Scale:
.pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen .pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen
.pdfui-page-size-size = Page size: {size} .pdfui-page-size-size = Page size: __ocs_fmt_0__
.pdfui-total-count = Total: {count} .pdfui-total-count = Total: __ocs_fmt_0__
.pdfui-page = Page: .pdfui-page = Page:
.pdfui-page-to-import = Page to import .pdfui-page-to-import = Page to import
.pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes .pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes
+3 -3
View File
@@ -3505,7 +3505,7 @@ annotate =
.tolerance-specify-insertion-point = TOLERANCE Zadejte bod vložení: .tolerance-specify-insertion-point = TOLERANCE Zadejte bod vložení:
insert = insert =
.pdfui-pdf-scale = PDF scale: {scale}:1 .pdfui-pdf-scale = PDF scale: __ocs_fmt_0__:1
.pdfui-specify-insertion-point = Specify insertion point: .pdfui-specify-insertion-point = Specify insertion point:
.pdfui-no-pdf-underlays = No PDF underlays found. .pdfui-no-pdf-underlays = No PDF underlays found.
.pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects. .pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects.
@@ -3514,8 +3514,8 @@ insert =
.pdfui-rotation = Rotation: .pdfui-rotation = Rotation:
.pdfui-scale = Scale: .pdfui-scale = Scale:
.pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen .pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen
.pdfui-page-size-size = Page size: {size} .pdfui-page-size-size = Page size: __ocs_fmt_0__
.pdfui-total-count = Total: {count} .pdfui-total-count = Total: __ocs_fmt_0__
.pdfui-page = Page: .pdfui-page = Page:
.pdfui-page-to-import = Page to import .pdfui-page-to-import = Page to import
.pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes .pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes
+3 -3
View File
@@ -3508,7 +3508,7 @@ annotate =
.tolerance-specify-insertion-point = TOLERANCE Einführstelle angeben: .tolerance-specify-insertion-point = TOLERANCE Einführstelle angeben:
insert = insert =
.pdfui-pdf-scale = PDF scale: {scale}:1 .pdfui-pdf-scale = PDF scale: __ocs_fmt_0__:1
.pdfui-specify-insertion-point = Specify insertion point: .pdfui-specify-insertion-point = Specify insertion point:
.pdfui-no-pdf-underlays = No PDF underlays found. .pdfui-no-pdf-underlays = No PDF underlays found.
.pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects. .pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects.
@@ -3517,8 +3517,8 @@ insert =
.pdfui-rotation = Rotation: .pdfui-rotation = Rotation:
.pdfui-scale = Scale: .pdfui-scale = Scale:
.pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen .pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen
.pdfui-page-size-size = Page size: {size} .pdfui-page-size-size = Page size: __ocs_fmt_0__
.pdfui-total-count = Total: {count} .pdfui-total-count = Total: __ocs_fmt_0__
.pdfui-page = Page: .pdfui-page = Page:
.pdfui-page-to-import = Page to import .pdfui-page-to-import = Page to import
.pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes .pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes
+3 -3
View File
@@ -3508,7 +3508,7 @@ annotate =
.tolerance-specify-insertion-point = TOLERANCE Ορίστε σημείο εισαγωγής: .tolerance-specify-insertion-point = TOLERANCE Ορίστε σημείο εισαγωγής:
insert = insert =
.pdfui-pdf-scale = PDF scale: {scale}:1 .pdfui-pdf-scale = PDF scale: __ocs_fmt_0__:1
.pdfui-specify-insertion-point = Specify insertion point: .pdfui-specify-insertion-point = Specify insertion point:
.pdfui-no-pdf-underlays = No PDF underlays found. .pdfui-no-pdf-underlays = No PDF underlays found.
.pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects. .pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects.
@@ -3517,8 +3517,8 @@ insert =
.pdfui-rotation = Rotation: .pdfui-rotation = Rotation:
.pdfui-scale = Scale: .pdfui-scale = Scale:
.pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen .pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen
.pdfui-page-size-size = Page size: {size} .pdfui-page-size-size = Page size: __ocs_fmt_0__
.pdfui-total-count = Total: {count} .pdfui-total-count = Total: __ocs_fmt_0__
.pdfui-page = Page: .pdfui-page = Page:
.pdfui-page-to-import = Page to import .pdfui-page-to-import = Page to import
.pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes .pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes
+3 -3
View File
@@ -3509,7 +3509,7 @@ annotate =
.tolerance-specify-insertion-point = TOLERANCE Specify insertion point: .tolerance-specify-insertion-point = TOLERANCE Specify insertion point:
insert = insert =
.pdfui-pdf-scale = PDF scale: {scale}:1 .pdfui-pdf-scale = PDF scale: __ocs_fmt_0__:1
.pdfui-specify-insertion-point = Specify insertion point: .pdfui-specify-insertion-point = Specify insertion point:
.pdfui-no-pdf-underlays = No PDF underlays found. .pdfui-no-pdf-underlays = No PDF underlays found.
.pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects. .pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects.
@@ -3518,8 +3518,8 @@ insert =
.pdfui-rotation = Rotation: .pdfui-rotation = Rotation:
.pdfui-scale = Scale: .pdfui-scale = Scale:
.pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen .pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen
.pdfui-page-size-size = Page size: {size} .pdfui-page-size-size = Page size: __ocs_fmt_0__
.pdfui-total-count = Total: {count} .pdfui-total-count = Total: __ocs_fmt_0__
.pdfui-page = Page: .pdfui-page = Page:
.pdfui-page-to-import = Page to import .pdfui-page-to-import = Page to import
.pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes .pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes
+3 -3
View File
@@ -3508,7 +3508,7 @@ annotate =
.tolerance-specify-insertion-point = TOLERANCE Especifique el punto de inserción: .tolerance-specify-insertion-point = TOLERANCE Especifique el punto de inserción:
insert = insert =
.pdfui-pdf-scale = PDF scale: {scale}:1 .pdfui-pdf-scale = PDF scale: __ocs_fmt_0__:1
.pdfui-specify-insertion-point = Specify insertion point: .pdfui-specify-insertion-point = Specify insertion point:
.pdfui-no-pdf-underlays = No PDF underlays found. .pdfui-no-pdf-underlays = No PDF underlays found.
.pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects. .pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects.
@@ -3517,8 +3517,8 @@ insert =
.pdfui-rotation = Rotation: .pdfui-rotation = Rotation:
.pdfui-scale = Scale: .pdfui-scale = Scale:
.pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen .pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen
.pdfui-page-size-size = Page size: {size} .pdfui-page-size-size = Page size: __ocs_fmt_0__
.pdfui-total-count = Total: {count} .pdfui-total-count = Total: __ocs_fmt_0__
.pdfui-page = Page: .pdfui-page = Page:
.pdfui-page-to-import = Page to import .pdfui-page-to-import = Page to import
.pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes .pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes
+3 -3
View File
@@ -3507,7 +3507,7 @@ annotate =
.tolerance-specify-insertion-point = TOLERANCE Määritä lisäyskohta: .tolerance-specify-insertion-point = TOLERANCE Määritä lisäyskohta:
insert = insert =
.pdfui-pdf-scale = PDF scale: {scale}:1 .pdfui-pdf-scale = PDF scale: __ocs_fmt_0__:1
.pdfui-specify-insertion-point = Specify insertion point: .pdfui-specify-insertion-point = Specify insertion point:
.pdfui-no-pdf-underlays = No PDF underlays found. .pdfui-no-pdf-underlays = No PDF underlays found.
.pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects. .pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects.
@@ -3516,8 +3516,8 @@ insert =
.pdfui-rotation = Rotation: .pdfui-rotation = Rotation:
.pdfui-scale = Scale: .pdfui-scale = Scale:
.pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen .pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen
.pdfui-page-size-size = Page size: {size} .pdfui-page-size-size = Page size: __ocs_fmt_0__
.pdfui-total-count = Total: {count} .pdfui-total-count = Total: __ocs_fmt_0__
.pdfui-page = Page: .pdfui-page = Page:
.pdfui-page-to-import = Page to import .pdfui-page-to-import = Page to import
.pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes .pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes
+3 -3
View File
@@ -3508,7 +3508,7 @@ annotate =
.tolerance-specify-insertion-point = TOLERANCE Spécifier le point d'insertion: .tolerance-specify-insertion-point = TOLERANCE Spécifier le point d'insertion:
insert = insert =
.pdfui-pdf-scale = PDF scale: {scale}:1 .pdfui-pdf-scale = PDF scale: __ocs_fmt_0__:1
.pdfui-specify-insertion-point = Specify insertion point: .pdfui-specify-insertion-point = Specify insertion point:
.pdfui-no-pdf-underlays = No PDF underlays found. .pdfui-no-pdf-underlays = No PDF underlays found.
.pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects. .pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects.
@@ -3517,8 +3517,8 @@ insert =
.pdfui-rotation = Rotation: .pdfui-rotation = Rotation:
.pdfui-scale = Scale: .pdfui-scale = Scale:
.pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen .pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen
.pdfui-page-size-size = Page size: {size} .pdfui-page-size-size = Page size: __ocs_fmt_0__
.pdfui-total-count = Total: {count} .pdfui-total-count = Total: __ocs_fmt_0__
.pdfui-page = Page: .pdfui-page = Page:
.pdfui-page-to-import = Page to import .pdfui-page-to-import = Page to import
.pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes .pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes
+3 -3
View File
@@ -3496,7 +3496,7 @@ annotate =
.tolerance-specify-insertion-point = TOLERANCE निर्दिष्ट सम्मिलन बिंदु: .tolerance-specify-insertion-point = TOLERANCE निर्दिष्ट सम्मिलन बिंदु:
insert = insert =
.pdfui-pdf-scale = PDF scale: {scale}:1 .pdfui-pdf-scale = PDF scale: __ocs_fmt_0__:1
.pdfui-specify-insertion-point = Specify insertion point: .pdfui-specify-insertion-point = Specify insertion point:
.pdfui-no-pdf-underlays = No PDF underlays found. .pdfui-no-pdf-underlays = No PDF underlays found.
.pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects. .pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects.
@@ -3505,8 +3505,8 @@ insert =
.pdfui-rotation = Rotation: .pdfui-rotation = Rotation:
.pdfui-scale = Scale: .pdfui-scale = Scale:
.pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen .pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen
.pdfui-page-size-size = Page size: {size} .pdfui-page-size-size = Page size: __ocs_fmt_0__
.pdfui-total-count = Total: {count} .pdfui-total-count = Total: __ocs_fmt_0__
.pdfui-page = Page: .pdfui-page = Page:
.pdfui-page-to-import = Page to import .pdfui-page-to-import = Page to import
.pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes .pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes
+3 -3
View File
@@ -3507,7 +3507,7 @@ annotate =
.tolerance-specify-insertion-point = TOLERANCE Beszúrási pont megadása: .tolerance-specify-insertion-point = TOLERANCE Beszúrási pont megadása:
insert = insert =
.pdfui-pdf-scale = PDF scale: {scale}:1 .pdfui-pdf-scale = PDF scale: __ocs_fmt_0__:1
.pdfui-specify-insertion-point = Specify insertion point: .pdfui-specify-insertion-point = Specify insertion point:
.pdfui-no-pdf-underlays = No PDF underlays found. .pdfui-no-pdf-underlays = No PDF underlays found.
.pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects. .pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects.
@@ -3516,8 +3516,8 @@ insert =
.pdfui-rotation = Rotation: .pdfui-rotation = Rotation:
.pdfui-scale = Scale: .pdfui-scale = Scale:
.pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen .pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen
.pdfui-page-size-size = Page size: {size} .pdfui-page-size-size = Page size: __ocs_fmt_0__
.pdfui-total-count = Total: {count} .pdfui-total-count = Total: __ocs_fmt_0__
.pdfui-page = Page: .pdfui-page = Page:
.pdfui-page-to-import = Page to import .pdfui-page-to-import = Page to import
.pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes .pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes
+3 -3
View File
@@ -3507,7 +3507,7 @@ annotate =
.tolerance-specify-insertion-point = TOLERANCE Specificare il punto di inserimento: .tolerance-specify-insertion-point = TOLERANCE Specificare il punto di inserimento:
insert = insert =
.pdfui-pdf-scale = PDF scale: {scale}:1 .pdfui-pdf-scale = PDF scale: __ocs_fmt_0__:1
.pdfui-specify-insertion-point = Specify insertion point: .pdfui-specify-insertion-point = Specify insertion point:
.pdfui-no-pdf-underlays = No PDF underlays found. .pdfui-no-pdf-underlays = No PDF underlays found.
.pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects. .pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects.
@@ -3516,8 +3516,8 @@ insert =
.pdfui-rotation = Rotation: .pdfui-rotation = Rotation:
.pdfui-scale = Scale: .pdfui-scale = Scale:
.pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen .pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen
.pdfui-page-size-size = Page size: {size} .pdfui-page-size-size = Page size: __ocs_fmt_0__
.pdfui-total-count = Total: {count} .pdfui-total-count = Total: __ocs_fmt_0__
.pdfui-page = Page: .pdfui-page = Page:
.pdfui-page-to-import = Page to import .pdfui-page-to-import = Page to import
.pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes .pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes
+3 -3
View File
@@ -3498,7 +3498,7 @@ annotate =
.tolerance-specify-insertion-point = TOLERANCE 挿入点を指定: .tolerance-specify-insertion-point = TOLERANCE 挿入点を指定:
insert = insert =
.pdfui-pdf-scale = PDF scale: {scale}:1 .pdfui-pdf-scale = PDF scale: __ocs_fmt_0__:1
.pdfui-specify-insertion-point = Specify insertion point: .pdfui-specify-insertion-point = Specify insertion point:
.pdfui-no-pdf-underlays = No PDF underlays found. .pdfui-no-pdf-underlays = No PDF underlays found.
.pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects. .pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects.
@@ -3507,8 +3507,8 @@ insert =
.pdfui-rotation = Rotation: .pdfui-rotation = Rotation:
.pdfui-scale = Scale: .pdfui-scale = Scale:
.pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen .pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen
.pdfui-page-size-size = Page size: {size} .pdfui-page-size-size = Page size: __ocs_fmt_0__
.pdfui-total-count = Total: {count} .pdfui-total-count = Total: __ocs_fmt_0__
.pdfui-page = Page: .pdfui-page = Page:
.pdfui-page-to-import = Page to import .pdfui-page-to-import = Page to import
.pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes .pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes
+3 -3
View File
@@ -3507,7 +3507,7 @@ annotate =
.tolerance-specify-insertion-point = TOLERANCE 삽입점 지정: .tolerance-specify-insertion-point = TOLERANCE 삽입점 지정:
insert = insert =
.pdfui-pdf-scale = PDF scale: {scale}:1 .pdfui-pdf-scale = PDF scale: __ocs_fmt_0__:1
.pdfui-specify-insertion-point = Specify insertion point: .pdfui-specify-insertion-point = Specify insertion point:
.pdfui-no-pdf-underlays = No PDF underlays found. .pdfui-no-pdf-underlays = No PDF underlays found.
.pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects. .pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects.
@@ -3516,8 +3516,8 @@ insert =
.pdfui-rotation = Rotation: .pdfui-rotation = Rotation:
.pdfui-scale = Scale: .pdfui-scale = Scale:
.pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen .pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen
.pdfui-page-size-size = Page size: {size} .pdfui-page-size-size = Page size: __ocs_fmt_0__
.pdfui-total-count = Total: {count} .pdfui-total-count = Total: __ocs_fmt_0__
.pdfui-page = Page: .pdfui-page = Page:
.pdfui-page-to-import = Page to import .pdfui-page-to-import = Page to import
.pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes .pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes
+3 -3
View File
@@ -3506,7 +3506,7 @@ annotate =
.dimradius-select-arc-circle-or-polyline-arc = DIMRADIUS Selecteer een boog, cirkel of polylijnboog: .dimradius-select-arc-circle-or-polyline-arc = DIMRADIUS Selecteer een boog, cirkel of polylijnboog:
insert = insert =
.pdfui-pdf-scale = PDF scale: {scale}:1 .pdfui-pdf-scale = PDF scale: __ocs_fmt_0__:1
.pdfui-specify-insertion-point = Specify insertion point: .pdfui-specify-insertion-point = Specify insertion point:
.pdfui-no-pdf-underlays = No PDF underlays found. .pdfui-no-pdf-underlays = No PDF underlays found.
.pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects. .pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects.
@@ -3515,8 +3515,8 @@ insert =
.pdfui-rotation = Rotation: .pdfui-rotation = Rotation:
.pdfui-scale = Scale: .pdfui-scale = Scale:
.pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen .pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen
.pdfui-page-size-size = Page size: {size} .pdfui-page-size-size = Page size: __ocs_fmt_0__
.pdfui-total-count = Total: {count} .pdfui-total-count = Total: __ocs_fmt_0__
.pdfui-page = Page: .pdfui-page = Page:
.pdfui-page-to-import = Page to import .pdfui-page-to-import = Page to import
.pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes .pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes
+3 -3
View File
@@ -3507,7 +3507,7 @@ annotate =
.tolerance-specify-insertion-point = TOLERANCE Określ punkt wstawienia: .tolerance-specify-insertion-point = TOLERANCE Określ punkt wstawienia:
insert = insert =
.pdfui-pdf-scale = PDF scale: {scale}:1 .pdfui-pdf-scale = PDF scale: __ocs_fmt_0__:1
.pdfui-specify-insertion-point = Specify insertion point: .pdfui-specify-insertion-point = Specify insertion point:
.pdfui-no-pdf-underlays = No PDF underlays found. .pdfui-no-pdf-underlays = No PDF underlays found.
.pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects. .pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects.
@@ -3516,8 +3516,8 @@ insert =
.pdfui-rotation = Rotation: .pdfui-rotation = Rotation:
.pdfui-scale = Scale: .pdfui-scale = Scale:
.pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen .pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen
.pdfui-page-size-size = Page size: {size} .pdfui-page-size-size = Page size: __ocs_fmt_0__
.pdfui-total-count = Total: {count} .pdfui-total-count = Total: __ocs_fmt_0__
.pdfui-page = Page: .pdfui-page = Page:
.pdfui-page-to-import = Page to import .pdfui-page-to-import = Page to import
.pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes .pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes
+3 -3
View File
@@ -3508,7 +3508,7 @@ annotate =
.tolerance-specify-insertion-point = TOLERANCE Especifique o ponto de inserção: .tolerance-specify-insertion-point = TOLERANCE Especifique o ponto de inserção:
insert = insert =
.pdfui-pdf-scale = PDF scale: {scale}:1 .pdfui-pdf-scale = PDF scale: __ocs_fmt_0__:1
.pdfui-specify-insertion-point = Specify insertion point: .pdfui-specify-insertion-point = Specify insertion point:
.pdfui-no-pdf-underlays = No PDF underlays found. .pdfui-no-pdf-underlays = No PDF underlays found.
.pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects. .pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects.
@@ -3517,8 +3517,8 @@ insert =
.pdfui-rotation = Rotation: .pdfui-rotation = Rotation:
.pdfui-scale = Scale: .pdfui-scale = Scale:
.pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen .pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen
.pdfui-page-size-size = Page size: {size} .pdfui-page-size-size = Page size: __ocs_fmt_0__
.pdfui-total-count = Total: {count} .pdfui-total-count = Total: __ocs_fmt_0__
.pdfui-page = Page: .pdfui-page = Page:
.pdfui-page-to-import = Page to import .pdfui-page-to-import = Page to import
.pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes .pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes
+3 -3
View File
@@ -3509,7 +3509,7 @@ annotate =
.tolerance-specify-insertion-point = TOLERANCE Укажите точку вставки: .tolerance-specify-insertion-point = TOLERANCE Укажите точку вставки:
insert = insert =
.pdfui-pdf-scale = PDF scale: {scale}:1 .pdfui-pdf-scale = PDF scale: __ocs_fmt_0__:1
.pdfui-specify-insertion-point = Specify insertion point: .pdfui-specify-insertion-point = Specify insertion point:
.pdfui-no-pdf-underlays = No PDF underlays found. .pdfui-no-pdf-underlays = No PDF underlays found.
.pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects. .pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects.
@@ -3518,8 +3518,8 @@ insert =
.pdfui-rotation = Rotation: .pdfui-rotation = Rotation:
.pdfui-scale = Scale: .pdfui-scale = Scale:
.pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen .pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen
.pdfui-page-size-size = Page size: {size} .pdfui-page-size-size = Page size: __ocs_fmt_0__
.pdfui-total-count = Total: {count} .pdfui-total-count = Total: __ocs_fmt_0__
.pdfui-page = Page: .pdfui-page = Page:
.pdfui-page-to-import = Page to import .pdfui-page-to-import = Page to import
.pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes .pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes
+3 -3
View File
@@ -3495,7 +3495,7 @@ annotate =
.tolerance-specify-insertion-point = TOLERANCE 指定插入点: .tolerance-specify-insertion-point = TOLERANCE 指定插入点:
insert = insert =
.pdfui-pdf-scale = PDF scale: {scale}:1 .pdfui-pdf-scale = PDF scale: __ocs_fmt_0__:1
.pdfui-specify-insertion-point = Specify insertion point: .pdfui-specify-insertion-point = Specify insertion point:
.pdfui-no-pdf-underlays = No PDF underlays found. .pdfui-no-pdf-underlays = No PDF underlays found.
.pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects. .pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects.
@@ -3504,8 +3504,8 @@ insert =
.pdfui-rotation = Rotation: .pdfui-rotation = Rotation:
.pdfui-scale = Scale: .pdfui-scale = Scale:
.pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen .pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen
.pdfui-page-size-size = Page size: {size} .pdfui-page-size-size = Page size: __ocs_fmt_0__
.pdfui-total-count = Total: {count} .pdfui-total-count = Total: __ocs_fmt_0__
.pdfui-page = Page: .pdfui-page = Page:
.pdfui-page-to-import = Page to import .pdfui-page-to-import = Page to import
.pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes .pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes
+3 -3
View File
@@ -3507,7 +3507,7 @@ annotate =
.tolerance-specify-insertion-point = TOLERANCE 指定插入點: .tolerance-specify-insertion-point = TOLERANCE 指定插入點:
insert = insert =
.pdfui-pdf-scale = PDF scale: {scale}:1 .pdfui-pdf-scale = PDF scale: __ocs_fmt_0__:1
.pdfui-specify-insertion-point = Specify insertion point: .pdfui-specify-insertion-point = Specify insertion point:
.pdfui-no-pdf-underlays = No PDF underlays found. .pdfui-no-pdf-underlays = No PDF underlays found.
.pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects. .pdfui-imports-the-geometry-fills-raster-images-and-text-of-a-pdf-f = Imports the geometry, fills, raster images and text of a PDF file as drawing objects.
@@ -3516,8 +3516,8 @@ insert =
.pdfui-rotation = Rotation: .pdfui-rotation = Rotation:
.pdfui-scale = Scale: .pdfui-scale = Scale:
.pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen .pdfui-specify-insertion-point-on-screen = Specify insertion point on-screen
.pdfui-page-size-size = Page size: {size} .pdfui-page-size-size = Page size: __ocs_fmt_0__
.pdfui-total-count = Total: {count} .pdfui-total-count = Total: __ocs_fmt_0__
.pdfui-page = Page: .pdfui-page = Page:
.pdfui-page-to-import = Page to import .pdfui-page-to-import = Page to import
.pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes .pdfui-infer-linetypes-from-collinear-dashes = Infer linetypes from collinear dashes
+1 -1
View File
@@ -5,7 +5,7 @@ version = 4
[[package]] [[package]]
name = "acadrust" name = "acadrust"
version = "0.5.5" version = "0.5.5"
source = "git+https://github.com/HakanSeven12/cadcodec.git?rev=dd1d7bf#dd1d7bfe03f4e733d351c0396e2cf82ae9df957d" source = "git+https://github.com/HakanSeven12/cadcodec.git?rev=d290dbe#d290dbe1712666d83dfd0fc63341ee3246f8de76"
dependencies = [ dependencies = [
"ahash 0.8.12", "ahash 0.8.12",
"anyhow", "anyhow",
+2 -4
View File
@@ -137,6 +137,8 @@ impl OpenCADStudio {
// Options opened from a PDF dialog returns to it. // Options opened from a PDF dialog returns to it.
if self.active_modal == Some(Options) { if self.active_modal == Some(Options) {
if let Some(parent) = self.options_parent.take() { if let Some(parent) = self.options_parent.take() {
self.options_saved = None;
self.options_close_confirm = false;
self.active_modal = Some(parent); self.active_modal = Some(parent);
return; return;
} }
@@ -1326,9 +1328,7 @@ impl OpenCADStudio {
), ),
Message::PdfAttachPickResult(Ok((path, bytes))) => { Message::PdfAttachPickResult(Ok((path, bytes))) => {
let i = self.active_tab;
let path_str = path.to_string_lossy().into_owned(); let path_str = path.to_string_lossy().into_owned();
let _ = i;
crate::scene::model::pdf_raster::register_source(&path_str, bytes); crate::scene::model::pdf_raster::register_source(&path_str, bytes);
// Pages, placement and path type are chosen in the Attach // Pages, placement and path type are chosen in the Attach
// dialog; the definition is created with the underlay. // dialog; the definition is created with the underlay.
@@ -1355,9 +1355,7 @@ impl OpenCADStudio {
Message::PdfImportPickResult, Message::PdfImportPickResult,
), ),
Message::PdfImportPickResult(Ok((path, bytes))) => { Message::PdfImportPickResult(Ok((path, bytes))) => {
let i = self.active_tab;
let path_str = path.to_string_lossy().into_owned(); let path_str = path.to_string_lossy().into_owned();
let _ = i;
crate::scene::model::pdf_raster::register_source(&path_str, bytes); crate::scene::model::pdf_raster::register_source(&path_str, bytes);
self.open_pdf_import_file(&path_str); self.open_pdf_import_file(&path_str);
Task::none() Task::none()
+3 -3
View File
@@ -1556,13 +1556,13 @@ pub enum CmdResult {
BatchCopy(Vec<Handle>, Vec<EntityTransform>), BatchCopy(Vec<Handle>, Vec<EntityTransform>),
/// Erase `handle` and replace with new entities; command stays active. /// Erase `handle` and replace with new entities; command stays active.
ReplaceEntity(Handle, Vec<EntityType>), ReplaceEntity(Handle, Vec<EntityType>),
/// Attach PDF pages: each page's underlay with its file (as stored) and
/// page; the host creates or reuses the definitions and commits them all
/// in one undo step, then ends the command.
/// Open the PDF Import Settings dialog; the command keeps its prompt. /// Open the PDF Import Settings dialog; the command keeps its prompt.
OpenPdfImportSettings, OpenPdfImportSettings,
/// Import a page of a file (PDFIMPORT File); ends the command. /// Import a page of a file (PDFIMPORT File); ends the command.
PdfImportFile(crate::modules::insert::pdf_import::PdfFileImport), PdfImportFile(crate::modules::insert::pdf_import::PdfFileImport),
/// Attach PDF pages: each page's underlay with its file (as stored) and
/// page; the host creates or reuses the definitions and commits them all
/// in one undo step, then ends the command.
AttachPdfPages { AttachPdfPages {
path: String, path: String,
pages: Vec<(String, EntityType)>, pages: Vec<(String, EntityType)>,
+3 -6
View File
@@ -329,15 +329,12 @@ impl PdfAttachCommand {
} }
} }
fn frame_at(&self, pt: DVec3) -> Vec<[f32; 3]> { fn frame_at(&self, pt: DVec3) -> Vec<[f64; 3]> {
let (w, h) = (self.page_size.0 * self.scale, self.page_size.1 * self.scale); let (w, h) = (self.page_size.0 * self.scale, self.page_size.1 * self.scale);
let x = self.plane.vector_to_world(DVec3::new(w, 0.0, 0.0)); let x = self.plane.vector_to_world(DVec3::new(w, 0.0, 0.0));
let y = self.plane.vector_to_world(DVec3::new(0.0, h, 0.0)); let y = self.plane.vector_to_world(DVec3::new(0.0, h, 0.0));
let corners = [pt, pt + x, pt + x + y, pt + y, pt]; let corners = [pt, pt + x, pt + x + y, pt + y, pt];
corners corners.iter().map(|p| p.to_array()).collect()
.iter()
.map(|p| [p.x as f32, p.y as f32, p.z as f32])
.collect()
} }
} }
@@ -434,7 +431,7 @@ impl CadCommand for PdfAttachCommand {
if self.step != Step::Insertion || self.page_size.0 <= 0.0 { if self.step != Step::Insertion || self.page_size.0 <= 0.0 {
return None; return None;
} }
Some(WireModel::solid( Some(WireModel::solid_f64(
"pdf_attach_frame".into(), "pdf_attach_frame".into(),
self.frame_at(pt), self.frame_at(pt),
WireModel::CYAN, WireModel::CYAN,
+2 -2
View File
@@ -336,9 +336,9 @@ impl CadCommand for PdfClipCommand {
} }
_ => return None, _ => return None,
}; };
let mut points: Vec<[f32; 3]> = ring.iter().map(|p| [p.x as f32, p.y as f32, p.z as f32]).collect(); let mut points: Vec<[f64; 3]> = ring.iter().map(|p| p.to_array()).collect();
points.push(points[0]); points.push(points[0]);
Some(WireModel::solid("pdf_clip_boundary".into(), points, WireModel::CYAN, false)) Some(WireModel::solid_f64("pdf_clip_boundary".into(), points, WireModel::CYAN, false))
} }
} }
+2 -3
View File
@@ -414,10 +414,9 @@ impl CadCommand for PdfImportCommand {
} }
_ => return None, _ => return None,
}; };
let mut points: Vec<[f32; 3]> = let mut points: Vec<[f64; 3]> = ring.iter().map(|p| p.to_array()).collect();
ring.iter().map(|p| [p.x as f32, p.y as f32, p.z as f32]).collect();
points.push(points[0]); points.push(points[0]);
Some(WireModel::solid("pdf_import_area".into(), points, WireModel::CYAN, false)) Some(WireModel::solid_f64("pdf_import_area".into(), points, WireModel::CYAN, false))
} }
} }
+26 -22
View File
@@ -343,28 +343,7 @@ impl Scene {
None None
}; };
// Auto-create an ImageDefinition object for new RasterImage entities self.ensure_image_definition(&mut entity);
// that don't already reference one.
if let EntityType::RasterImage(ref mut img) = entity {
if img.definition_handle.is_none() {
use acadrust::objects::{ImageDefinition, ObjectType};
let def_handle = Handle::new(self.document.next_handle());
if self.is_recording_undo() {
self.record_undo_object_before(def_handle, None);
}
let mut img_def = ImageDefinition::with_dimensions(
&img.file_path,
img.size.x as u32,
img.size.y as u32,
);
img_def.handle = def_handle;
img_def.is_loaded = true;
self.document
.objects
.insert(def_handle, ObjectType::ImageDefinition(img_def));
img.definition_handle = Some(def_handle);
}
}
// Register the entity's layer if it names one no LAYER command created // Register the entity's layer if it names one no LAYER command created
// (e.g. a plugin-supplied layer) so it survives a DWG save instead of // (e.g. a plugin-supplied layer) so it survives a DWG save instead of
@@ -1069,6 +1048,30 @@ impl Scene {
/// caller starts an interactive insert so paste-as-block can prompt for the /// caller starts an interactive insert so paste-as-block can prompt for the
/// drop point. The geometry comes from the clipboard rather than live /// drop point. The geometry comes from the clipboard rather than live
/// entities, so there is nothing to stage or erase. (#129) /// entities, so there is nothing to stage or erase. (#129)
/// Give a new RasterImage the ImageDefinition object it must reference,
/// unless it already names one.
fn ensure_image_definition(&mut self, entity: &mut EntityType) {
let EntityType::RasterImage(img) = entity else {
return;
};
if img.definition_handle.is_some() {
return;
}
use acadrust::objects::{ImageDefinition, ObjectType};
let def_handle = Handle::new(self.document.next_handle());
if self.is_recording_undo() {
self.record_undo_object_before(def_handle, None);
}
let mut img_def =
ImageDefinition::with_dimensions(&img.file_path, img.size.x as u32, img.size.y as u32);
img_def.handle = def_handle;
img_def.is_loaded = true;
self.document
.objects
.insert(def_handle, ObjectType::ImageDefinition(img_def));
img.definition_handle = Some(def_handle);
}
pub fn define_block_from_owned_entities( pub fn define_block_from_owned_entities(
&mut self, &mut self,
entities: Vec<EntityType>, entities: Vec<EntityType>,
@@ -1125,6 +1128,7 @@ impl Scene {
Self::reset_clone_subhandles(&mut self.document, &mut entity); Self::reset_clone_subhandles(&mut self.document, &mut entity);
entity.common_mut().handle = Handle::NULL; entity.common_mut().handle = Handle::NULL;
entity.common_mut().owner_handle = br_handle; entity.common_mut().owner_handle = br_handle;
self.ensure_image_definition(&mut entity);
let handle = self let handle = self
.document .document
.add_entity(entity) .add_entity(entity)
+1 -7
View File
@@ -1268,21 +1268,15 @@ fn build_derived_caches_impl(
EntityType::Ole2Frame(ole) => ImageModel::from_ole2frame(ole).map(|m| (handle, m)), EntityType::Ole2Frame(ole) => ImageModel::from_ole2frame(ole).map(|m| (handle, m)),
EntityType::Underlay(u) => match doc.objects.get(&u.definition_handle) { EntityType::Underlay(u) => match doc.objects.get(&u.definition_handle) {
Some(acadrust::objects::ObjectType::UnderlayDefinition(def)) => { Some(acadrust::objects::ObjectType::UnderlayDefinition(def)) => {
{
// Paper-space underlays adjust to the white sheet. // Paper-space underlays adjust to the white sheet.
let model = doc.objects.values().find_map(|object| match object {
acadrust::objects::ObjectType::Layout(l) if l.name == "Model" => Some(l.block_record),
_ => None,
});
let owner = u.common.owner_handle; let owner = u.common.owner_handle;
let background = if owner.is_null() || model.is_none_or(|m| m == owner) { let background = if owner.is_null() || owner == model_block {
LOAD_BG LOAD_BG
} else { } else {
[1.0, 1.0, 1.0, 1.0] [1.0, 1.0, 1.0, 1.0]
}; };
ImageModel::from_underlay(u, def, background).map(|m| (handle, m)) ImageModel::from_underlay(u, def, background).map(|m| (handle, m))
} }
}
_ => None, _ => None,
}, },
_ => None, _ => None,
+18 -34
View File
@@ -4,8 +4,8 @@
use std::fmt; use std::fmt;
use iced::widget::{ use iced::widget::{
button, column, combo_box, container, image, pick_list, radio, row, scrollable, text, button, column, combo_box, container, image, pick_list, row, scrollable, text, text_input,
text_input, Space, Space,
}; };
use iced::{Background, Border, Element, Fill, Length, Theme}; use iced::{Background, Border, Element, Fill, Length, Theme};
@@ -14,7 +14,7 @@ use crate::io::xref_model::Pathtype;
use crate::modules::insert::pdf_import::{ImportLayers, PdfImportSettings}; use crate::modules::insert::pdf_import::{ImportLayers, PdfImportSettings};
use crate::t; use crate::t;
use crate::ui::style::common::muted_style; use crate::ui::style::common::muted_style;
use crate::ui::style::form::{button_style, field_style}; use crate::ui::style::form::{button_style, dialog_button, field_style, form_radio};
use crate::ui::window::block_definition::{group, labeled_checkbox}; use crate::ui::window::block_definition::{group, labeled_checkbox};
/// One edit in any of the PDF dialogs. /// One edit in any of the PDF dialogs.
@@ -260,18 +260,9 @@ fn read_only<'a>(label: String, value: &'a str, label_width: f32) -> Element<'a,
fn footer<'a>(ok: PdfDialogMsg, help: &'static str) -> iced::widget::Row<'a, Message> { fn footer<'a>(ok: PdfDialogMsg, help: &'static str) -> iced::widget::Row<'a, Message> {
row![ row![
Space::new().width(Fill), Space::new().width(Fill),
button(text(t!("OK")).size(11)) dialog_button(t!("OK"), msg(ok), true),
.on_press(msg(ok)) dialog_button(t!("Cancel"), Message::CloseModal, false),
.style(button_style(true)) dialog_button(t!("Help"), msg(PdfDialogMsg::Help(help)), false),
.padding([4, 16]),
button(text(t!("Cancel")).size(11))
.on_press(Message::CloseModal)
.style(button_style(false))
.padding([4, 12]),
button(text(t!("Help")).size(11))
.on_press(msg(PdfDialogMsg::Help(help)))
.style(button_style(false))
.padding([4, 12]),
] ]
.spacing(6) .spacing(6)
.align_y(iced::Center) .align_y(iced::Center)
@@ -513,10 +504,11 @@ pub fn view_attach<'a>(
} else { } else {
t!("Show Details") t!("Show Details")
}; };
let footer = row![button(text(details_label).size(11)) let footer = row![dialog_button(
.on_press(msg(PdfDialogMsg::AttachDetails(!state.details))) details_label,
.style(button_style(false)) msg(PdfDialogMsg::AttachDetails(!state.details)),
.padding([4, 12])] false
)]
.push(footer(PdfDialogMsg::AttachOk, "attach")) .push(footer(PdfDialogMsg::AttachOk, "attach"))
.align_y(iced::Center); .align_y(iced::Center);
@@ -582,13 +574,10 @@ pub fn view_layers<'a>(
.filter(|name| needle.is_empty() || name.to_lowercase().contains(&needle)) .filter(|name| needle.is_empty() || name.to_lowercase().contains(&needle))
.map(|name| { .map(|name| {
let on = !t.hidden.contains(name); let on = !t.hidden.contains(name);
let bulb = button(text("●").size(12).style(move |theme: &Theme| text::Style { let bulb = button(crate::ui::icons::semantic(
color: Some(if on { crate::ui::icons::layer_visible(on),
theme.palette().warning.base.color 14.0,
} else { ))
theme.palette().background.strong.color
}),
}))
.on_press(msg(PdfDialogMsg::LayersToggle(name.clone()))) .on_press(msg(PdfDialogMsg::LayersToggle(name.clone())))
.padding([0, 4]) .padding([0, 4])
.style(|_: &Theme, _| button::Style::default()); .style(|_: &Theme, _| button::Style::default());
@@ -649,9 +638,7 @@ fn settings_groups<'a>(s: &'a PdfImportSettings) -> (Element<'a, Message>, Eleme
Length::Fill, Length::Fill,
); );
let layer_radio = |label: std::borrow::Cow<'static, str>, value: ImportLayers| { let layer_radio = |label: std::borrow::Cow<'static, str>, value: ImportLayers| {
radio(label, value, Some(s.layers), |v| msg(PdfDialogMsg::Layers(v))) form_radio(label, value, Some(s.layers), |v| msg(PdfDialogMsg::Layers(v)))
.size(14)
.text_size(11)
}; };
let layers = group( let layers = group(
t!("Layers").into_owned(), t!("Layers").into_owned(),
@@ -827,11 +814,8 @@ pub fn view_import_file<'a>(
.width(Length::FillPortion(1)); .width(Length::FillPortion(1));
let body = row![container(page_group).width(Length::FillPortion(1)), right].spacing(8); let body = row![container(page_group).width(Length::FillPortion(1)), right].spacing(8);
let footer = row![button(text(t!("Options...")).size(11)) let footer = row![dialog_button(t!("Options..."), msg(PdfDialogMsg::Options), false)]
.on_press(msg(PdfDialogMsg::Options)) .push(footer(PdfDialogMsg::ImportOk, "import"))
.style(button_style(false))
.padding([4, 12])]
.push(footer(PdfDialogMsg::ImportOk, "import"))
.align_y(iced::Center); .align_y(iced::Center);
column![file_row, body, footer] column![file_row, body, footer]