forked from 1b-agent/opencadstudio-upstream
Merge main into codex/graphic-attributes-cleanup
Conflicts were additions on both sides, kept together: the Count palette and Sheet Set toggles next to the Graphic Attributes toggle in the ribbon, main's new locale groups and catalog entries next to graphic-attributes, and module declarations. The palette code follows main's crate renames (acadrust -> codec, cadkernel -> kernel). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VgkJN8DEojuPTumAXLHotu
This commit is contained in:
625 files changed
+104397
-28053
No files matched your search
@@ -3,7 +3,7 @@
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
use cadkernel::geom2d::{
|
||||
use kernel::geom2d::{
|
||||
inside_spans, Curve as KernelCurve, Line as KernelLine, Tolerance, XLine as KernelXLine,
|
||||
};
|
||||
|
||||
@@ -244,11 +244,11 @@ pub struct HatchModel {
|
||||
/// Per-ring DXF role, aligned with the NaN-separated boundary paths.
|
||||
pub boundary_exterior: Option<Arc<Vec<bool>>>,
|
||||
/// Source entity handles for each boundary ring.
|
||||
pub boundary_sources: Option<Arc<Vec<Vec<acadrust::Handle>>>>,
|
||||
pub boundary_sources: Option<Arc<Vec<Vec<codec::Handle>>>>,
|
||||
/// Exact boundary paths retained for persistence and editing.
|
||||
pub boundary_paths: Option<Arc<Vec<acadrust::entities::BoundaryPath>>>,
|
||||
pub boundary_paths: Option<Arc<Vec<codec::entities::BoundaryPath>>>,
|
||||
/// Island handling used by the persisted hatch entity.
|
||||
pub style: acadrust::entities::HatchStyleType,
|
||||
pub style: codec::entities::HatchStyleType,
|
||||
/// Fill pattern.
|
||||
pub pattern: HatchPattern,
|
||||
/// Catalog name for this pattern (e.g. "ANSI31", "SOLID", "LINEAR").
|
||||
@@ -289,14 +289,14 @@ impl HatchModel {
|
||||
&self,
|
||||
angle_deg: f32,
|
||||
shift: f32,
|
||||
) -> Option<cadkernel::geom2d::GradientFrame> {
|
||||
) -> Option<kernel::geom2d::GradientFrame> {
|
||||
let boundary: Vec<[f64; 2]> = self
|
||||
.boundary
|
||||
.iter()
|
||||
.filter(|point| point[0].is_finite() && point[1].is_finite())
|
||||
.map(|point| [point[0] as f64, point[1] as f64])
|
||||
.collect();
|
||||
cadkernel::geom2d::gradient_frame(
|
||||
kernel::geom2d::gradient_frame(
|
||||
&boundary,
|
||||
(angle_deg as f64).to_radians(),
|
||||
shift as f64,
|
||||
@@ -321,7 +321,7 @@ impl HatchModel {
|
||||
rings.push(ring);
|
||||
}
|
||||
|
||||
let (points, triangles) = cadkernel::geom2d::triangulate_rings(&rings);
|
||||
let (points, triangles) = kernel::geom2d::triangulate_rings(&rings);
|
||||
let vertices = points
|
||||
.into_iter()
|
||||
.map(|[x, y]| [x as f32, y as f32])
|
||||
|
||||
Reference in new issue
Block a user