forked from 1b-agent/opencadstudio-upstream
Merge pull request #1184 from Ramox81/codex/hatchedit-command-parity
This commit is contained in:
commit
753fa17b68
24 files changed
+926
-132
No files matched your search
@@ -1674,6 +1674,7 @@ impl Scene {
|
||||
let fill_plane_boundary = Some(Arc::new(fill_plane.1));
|
||||
let fill_plane = Some(fill_plane.0);
|
||||
models.push(HatchModel {
|
||||
pattern_origin: None,
|
||||
render_instance,
|
||||
boundary: Arc::new(boundary),
|
||||
boundary_wcs: None,
|
||||
@@ -2107,6 +2108,7 @@ impl Scene {
|
||||
|
||||
let storage = crate::entities::curve::ocs_plane(dxf.normal, dxf.elevation);
|
||||
Some(HatchModel {
|
||||
pattern_origin: Some([dxf.pattern_origin().x, dxf.pattern_origin().y]),
|
||||
render_instance: None,
|
||||
boundary: std::sync::Arc::new(boundary_f32),
|
||||
boundary_wcs: None,
|
||||
@@ -2429,6 +2431,7 @@ impl Scene {
|
||||
})
|
||||
.collect();
|
||||
HatchModel {
|
||||
pattern_origin: None,
|
||||
render_instance: None,
|
||||
boundary: std::sync::Arc::new(boundary),
|
||||
boundary_wcs: None,
|
||||
@@ -2663,6 +2666,9 @@ impl Scene {
|
||||
// carries `world_origin: [0, 0]`, which after the world_offset removal
|
||||
// leaves the fill mis-placed and effectively invisible until a later
|
||||
// edit rebuilds it from the DXF — so keep the seed, don't overwrite it.
|
||||
if let Some(origin) = model.pattern_origin {
|
||||
dxf.record_pattern_origin(Vector2::new(origin[0], origin[1]));
|
||||
}
|
||||
let mut entity = EntityType::Hatch(dxf);
|
||||
|
||||
if let Some(layer) = layer {
|
||||
@@ -2671,6 +2677,8 @@ impl Scene {
|
||||
if let Some((color, transparency)) = entity_style {
|
||||
entity.common_mut().color = color;
|
||||
entity.common_mut().transparency = transparency;
|
||||
} else {
|
||||
entity.common_mut().transparency = self.document.current_entity_transparency();
|
||||
}
|
||||
|
||||
self.add_entity(entity)
|
||||
|
||||
Reference in new issue
Block a user