stop generating points on cuts and holes

Hi,

I am new in open cascade.

I am trying to generate points on face using U,V parameters.
But this way i also get points on the holes, protrusion, cuts etc.
Please let me know, how do i stop generating points for this cases?
also when the outer wire is not a straight line i get points which gets out of the face zone.

Fabian Hachenberg's picture

How do you generate those points?

To decide whether a certain point in parameter space is within the face or out of it, you could determine the intersection of a straight line starting from the boundary of parameter space and ending in the respective point with all the wires of the face. Then you would just have to order the intersection points by increasing curve parameter and start counting: Crossing a wire left-to-right decreases the state by 1, crossing a wire right-to-left increases the state by 1. If you're ending up at you point with a state <= 0, your point is outside, if state > 0, you're inside the face.

Pawel's picture

Hello Paul,

I suggest, you searched for

BRepClass3d_SolidClassifier
BRepClass_FaceClassifier

in the forum.

Pawel