DiscussionsIssue archiveOther usage issues

Archived discussion

Surface parameters

Other usage issuesMon, 09/15/2008 - 15:463 replies

Browse this forum
QuestionAuthor

Hi,
Is it possible to get parameters from position? (reverse of Value(u,v))

Thanks
Author

Discussion

3 archived replies

Posts are displayed in their archived order.

01Commenter-1

Hi Author,

I use the followin code:

...
double pU, pV;
Handle(Geom_Surface) surface = BRep_Tool::Surface(face);
...
GeomAPI_ProjectPointOnSurf projection( gp_Pnt(x, y, z), surface);

if(projection.NbPoints() > 0)
{
if(projection.LowerDistance() < Precision::Confusion() )
{
projection.LowerDistanceParameters(pU, pV);

}
else
;//your message here
}

Commenter-1

02Commenter-2

Two ways:
1. The class GeomAPI_ProjectPointOnSurf.
2. The class ShapeAnalysis_Surface, method ValueOfUV, it tries to do its best to get the result when the previous way fails.

03Author

Thanks, that was great help