Skip to content

Commit

Permalink
Merge pull request #4985 from nortikin/fix_4959_v002_Populate_Mesh_no…
Browse files Browse the repository at this point in the history
…de_infinite_loop_clear_comments

clear comment
  • Loading branch information
satabol authored Aug 16, 2023
2 parents 54353e0 + 4b5cdee commit d492e06
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion nodes/spatial/random_points_on_mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def update_sockets(self, context):
updateNode(self, context)

modes = [('SURFACE', "Surface", "Surface", 0),
('VOLUME', "Volume", "Volume. Recomend use 'Recalculate Normals'", 1),
('VOLUME', "Volume", "Volume. The mesh is expected to represent a closed volume in this case. Recomend use 'Recalculate Normals'", 1),
('EDGES', "Edges", "Edges", 2),
]

Expand Down
9 changes: 0 additions & 9 deletions utils/sv_mesh_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,20 +377,11 @@ def point_inside_mesh(bvh, point):
point = Vector(point)
axis = Vector((1, 0, 0))
outside = True
#count = 0
location, normal, index, distance = bvh.ray_cast(point, axis)
if index is not None:
if normal.dot(point-location)<0:
outside = False

# while True:
# location, normal, index, distance = bvh.ray_cast(point, axis)
# if index is None:
# break
# count += 1
# point.x = location.x + axis.x * 0.00001
# if count % 2 == 0:
# outside = True
return not outside

################
Expand Down

0 comments on commit d492e06

Please sign in to comment.