
Wed, 09/24/2008 - 14:00
Forums:
Hi
So far I have found point coordinates using curve parameters and then projected this point to surface to get the uv parameters of that point (point of edge) on the surface. But I encounter some problems: Congruent edges (like in cylinder) and degenerated edges (start and end points should give different uv values, but gives same since they are same points). My question is, how can I learn uv parameters correctly?
Thanks in advance
xaeroxx
Thu, 09/25/2008 - 09:33
Dear xaeroxx.
It is not possible to obtain correct U,V parameters having only 3-D point P3D as data for the cases you wrote about.
To obtain correct values U,V you have to use some additional info about coming 2-D point P2D.
For e.g P2D can be obtained as intersection between two p-curves (say between p-curve of degenerated edge and p-curve of some edge laying on the face and going through the 3D-point of the degenerated edge).
You can have a look as it has been done in BOPTools_DEProcessor::FillPaveSet(...) .
Thu, 09/25/2008 - 21:58
Hello xaeroxx,
if you have the edge and the face, you could try BRep_Tool::UVPoints:
UVPoints(myclass; E : Edge from TopoDS;
F : Face from TopoDS;
PFirst, PLast : out Pnt2d from gp)
---Purpose: Gets the UV locations of the extremities of he edge.
Note that the edge must be a part of the face topology, it has to be part of a wire that is on the face. (I guess that's your case)
Good Luck,
Francois.