From 08091f09d20625fcae613e3b95472bd46f68a4b7 Mon Sep 17 00:00:00 2001 From: Trey Smith Date: Thu, 18 Jan 2024 21:13:51 -0500 Subject: [PATCH] fix polyface mesh vertices not being applied --- src/entity.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/entity.rs b/src/entity.rs index ff24a59..19e2d67 100644 --- a/src/entity.rs +++ b/src/entity.rs @@ -1515,7 +1515,7 @@ impl Entity { } pairs.push(CodePair::new_i16(70, v.flags as i16)); pairs.push(CodePair::new_f64(50, v.curve_fit_tangent_direction)); - if version >= AcadVersion::R13 { + if version >= AcadVersion::R12 { if v.polyface_mesh_vertex_index1 != 0 { pairs.push(CodePair::new_i16(71, v.polyface_mesh_vertex_index1 as i16)); } @@ -1572,7 +1572,13 @@ impl Entity { for (v, vertex_handle) in &poly.__vertices_and_handles { let mut v = v.clone(); v.set_is_3d_polyline_vertex(poly.is_3d_polyline()); - v.set_is_3d_polygon_mesh(poly.is_3d_polygon_mesh()); + if v.polyface_mesh_vertex_index1 == 0 + && v.polyface_mesh_vertex_index2 == 0 + && v.polyface_mesh_vertex_index3 == 0 + && v.polyface_mesh_vertex_index4 == 0 + { + v.set_is_3d_polygon_mesh(poly.is_3d_polygon_mesh()); + } let v = Entity { common: EntityCommon { handle: *vertex_handle,