Skip to content

Commit

Permalink
fix polyface mesh vertices not being applied
Browse files Browse the repository at this point in the history
  • Loading branch information
tr3ysmith committed Jan 19, 2024
1 parent eabe4e3 commit 08091f0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/entity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 08091f0

Please sign in to comment.