Skip to content

Commit

Permalink
test clear_faceviews with mesh.views
Browse files Browse the repository at this point in the history
  • Loading branch information
ffreyer committed Sep 16, 2024
1 parent 92f79b4 commit cb1ad71
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/meshes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ end
@test !allunique([idx for f in faces(dm.normal) for idx in f])

indirect_meshes = map(rects) do r
GeometryBasics.mesh(coordinates(r), faces(r), normal = normals(r), facetype = QuadFace{Int64})
m = GeometryBasics.mesh(coordinates(r), faces(r), normal = normals(r), facetype = QuadFace{Int64})
# Also testing merge of meshes with views
push!(m.views, 1:length(faces(m)))
m
end
im = merge(indirect_meshes)

Expand All @@ -93,8 +96,8 @@ end
@test allunique([idx for f in faces(cm) for idx in f])


mixed_meshes = map(direct_meshes, converted_meshes) do dm, cm
rand() > 0.5 ? dm : cm
mixed_meshes = map(direct_meshes, indirect_meshes, converted_meshes) do dm, im, cm
rand((dm, im, cm)) # (with FaceView, with mesh.views & FaceView, w/o FaceView)
end
mm = merge(mixed_meshes)

Expand Down

0 comments on commit cb1ad71

Please sign in to comment.