xaeroxx Mon, 09/15/2008 - 15:46 Forums: Other usage issuesHi, Is it possible to get parameters from position? (reverse of Value(u,v)) Thanks xaeroxx Pawel Mon, 09/15/2008 - 15:55 Hi xaeroxx, 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 } Pawel Log in to post comments Bearloga Mon, 09/15/2008 - 16:00 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. Log in to post comments xaeroxx Mon, 09/15/2008 - 16:37 Thanks, that was great help Log in to post comments
Mon, 09/15/2008 - 15:55
Hi xaeroxx,
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
}
Pawel
Mon, 09/15/2008 - 16:00
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.
Mon, 09/15/2008 - 16:37
Thanks, that was great help