Skip to content
Discussion options

You must be logged in to vote

I'd switch to mesh.isOutside(p) for this. It uses the generalized winding number, so you don't need the projection at all:

inside = []
for i in range(pnts.shape[0]):
    p = mm.Vector3f(float(pnts[i, 0]), float(pnts[i, 1]), float(pnts[i, 2]))
    inside.append(not mesh.isOutside(p))  # defaults: windingNumberThreshold=0.5, beta=2
ids = tt.where(tt.tensor(inside))[0]

isOutsideByProjNorm decides the sign from just one direction: the pseudonormal at the closest point (face normal, edge normal or angle-weighted vertex normal, depending on where the projection lands). If that single normal is off, every grid point whose closest point lands there flips sign together, which would explain the lit…

Replies: 1 comment 12 replies

Comment options

You must be logged in to vote
12 replies
@ManuGraiph
Comment options

@ManuGraiph
Comment options

@Manishram-ai
Comment options

@ManuGraiph
Comment options

@ManuGraiph
Comment options

Answer selected by ManuGraiph
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants