# 2D point in/on/out trimmed param. domain

Hi all, someone knows how to determine if a 2D point (uv) is in/on or out of the trimmed parameter domain of a face (surface)? I can't find (in occ doc.) any API to do this job. Any hints? Thanks. FR

Dear F.-Régis Degott
Have you got any solution of this problem ?
I have the same problem with you

Look at

Regards.
Mauro

Thanks very much, Mauro Mariotti!
I have test BRepTopAdaptor_FClass2d (or IntTools_FClass2d),it works OK.
But if I want to get the point on suface when I am moving mouse on screen.
It need that this BRepTopAdaptor_FClass2d class performs high efficiency.
But after my testing,it can not be qualified to this work. Do you hava any
idea that can solve this problem?

It means that if I do 10000 times using this class, the time needed should be less than 0.5s(500ms)!

Best regards

I want to know how to solve this question too .

I think this has to do something with the algorithm that is lying behind this function.

I guess it first computes the distance of the point to all the boundaries (wires), picks the closest one, projects the point to this closest one, then computes the cross product of the projection and the tangent vector of the edge, and depending on the direction of this cross product decides whether the point lies inside or outside.

If the object has many edges, and they are not simple ones (line or arc) the distance computation takes a long time, especially if it is done many times.

I think it can be made faster by first checking if the point lies inside or outside the bounding box that encloses the trimmed surface.

Something like that (pseudo code):

bbox = compute_bbox(face);
if(bbox.point_is_inside(point))