Files
OneCAD-Draft/Cargo.toml
T
HakanandClaude Opus 4.7 8e6491d4a8 fix(wipeout): use real clip vertices, correct image-pixel→WCS mapping
acadrust's DWG reader read the wipeout/raster-image clip boundary
points only to advance the bit cursor and then discarded them, so every
wipeout fell back to `Wipeout::new()`'s default placeholder rectangle
(`-0.5..0.5`). For files that store the real polygon mask in clip
vertices (anteen.dwg's `DIMBLOCK` style: u_vector ≈ 643k, size = (1, 1),
clip polygon ~0.0016×0.0033 in pixel space), the wipeout rendered at the
full image bbox — hundreds of thousands of units wide — instead of the
intended ~1000×2000 mask.

Pinned to the new `fix/wipeout-clip-vertices` acadrust branch (carries
the upstream parser fix). On the H7CAD side, the polygon mapping now
follows the DXF convention:

  x_off = (clip.x + size.x/2) × u_vec
  y_off = (size.y/2 − clip.y) × v_vec      (image-Y points down)

…in `wipeout_boundary_2d` (fill), `Wipeout::to_truck` (border line),
and `Wipeout::grips` (vertex handles) so all three stay in sync. The
fill path also explicitly closes the polygon loop — without it the GPU
`in_polygon` ray-cast skipped the v(n-1)→v(0) edge and the solid mask
bled far past the boundary.

Co-Authored-By: Claude Opus 4.7 <[email protected]>
2026-05-22 14:14:22 +03:00

32 lines
1.2 KiB
TOML

[package]
name = "H7CAD"
version = "0.3.7"
edition = "2021"
build = "build.rs"
[dependencies]
iced = { version = "0.14", features = ["debug", "image", "svg", "advanced", "canvas"] }
bytemuck = { version = "1.14", features = ["derive"] }
glam = { version = "0.27", features = ["bytemuck"] }
truck-modeling = "0.6"
truck-meshalgo = { version = "0.4", default-features = false, features = ["tessellation"] }
truck-polymesh = "0.6"
rfd = "0.15"
acadrust = "0.3.4"
open = "5"
printpdf = "0.9.1"
flate2 = "1"
image = { version = "0.25", default-features = false, features = ["png", "jpeg", "bmp", "tiff"] }
rayon = "1"
ureq = { version = "2", default-features = false, features = ["tls"] }
[target.'cfg(target_os = "windows")'.dependencies]
windows-sys = { version = "0.59", features = ["Win32_UI_Shell", "Win32_UI_WindowsAndMessaging"] }
[patch.crates-io]
# TEMP: tracks fix/wipeout-clip-vertices on HakanSeven12/acadrust, which
# stacks the wipeout/raster-image clip-vertex fix on top of the earlier
# hatch boundary-handle cap. Revert to `branch = "main"` once both
# upstream PRs land.
acadrust = { git = "https://github.com/HakanSeven12/acadrust", branch = "fix/wipeout-clip-vertices" }