how to find normal vector of a surface
How tin can I get the normal vector of a bespeak on a surface?
Anonymous (not verified)
Tue, 09/27/2005 - 17:47
Hello everyone:
In my project,I desire to describe a sphere on a surface which is tangent to the surface.I accept known the three coordinates of the tangent signal,but how can I go the normal vector of the point on the surface?
Thanks.
Source: https://dev.opencascade.org/content/how-can-i-get-normal-vector-point-surface
Posted by: sandbergcasonctin.blogspot.com
Torsten Sadowski
Tue, 09/27/2005 - 18:22
Hi Andy,
you can go the direction from the plane bold its a gp_Pln:
gp_Dir dir=yourPlane.Axis().Direction();
HTH, Torsten
Stephane Routelous
Tue, 09/27/2005 - 18:32
if you have a Geom_Surface, you can use the D1 method to compute the D1U and D1V and later on that, compute the cantankerous product of both vector to get the normal (if I remember correctly. I don't have the OCC code installed)
Stephane
Andy Lg
Wed, 09/28/2005 - xv:15
Thanks,Torsten and Stephane.In my project ,the type of the surface is uncertain,maybe it's a plane,perhaps a cylindrical surface or some other blazon of suface,and then I want to find a way that will be ralative universal to all situations.I accept also thought about the method of calculating the cross of the D1U and D1V,but how to get the parameters of the point on a random surface then that I can compute the D1U and D1V ?
Cheers a lot!
Andy
Torsten Sadowski
Wed, 09/28/2005 - 15:24
Howdy Andy,
Geom_Surface::Value(U,V) returns the point on the surface.
You should take a spider web browser and point information technology to
whereeverthisis/OpenCASCADE5.2/physician/ClassBrowser/index.htm
So you have simply to notice the right class ;-))
Torsten
Andy Lg
Wed, 09/28/2005 - sixteen:xviii
Hi Torsten ,
Thanks for your assistance. I also know that function and the Geom_Surface class,but what I desire to practice is just the reverse.The three coordinates of the point is known to me,I desire to get the parameters of the signal on a random surface so that I can compute the D1U and D1V ,and afetr that,compute the cantankerous product of both vector to become the normal of the bespeak.
Torsten Sadowski
Wednesday, 09/28/2005 - xvi:31
Hi Andy,
Points are a flake difficult at this point because they are hands outside the surface. I don't know how you got your point but the GeomAPI_IntCS course gives you lot all intersection points betwixt curve and surface and the parameters for curve and surface.
Torsten
Andy Lg
Wed, 09/28/2005 - 17:sixteen
Hullo Torsten,
In fact,I merely want to draw some spheres which are all tangent to a surface.Firstly,I got some points on a bend which is in the surface, i.east. a sequence of equidistant points.That is to say,the three coordinates of the signal is known to me.So I want to draw some spheres tangent to the surface with these points.Do you have some good suggestion?
Andy
Stephane Routelous
Wed, 09/28/2005 - 16:42
the good fashion is to apply GeomAPI_ProjectPointOnSurf.
the method LowerDistanceParameters gives you the U and 5 you lot are searching
Stephane
Andy Lg
Wed, 09/28/2005 - 17:30
Thanks very much,Stephane.Your suggestion is very useful for me.That's a good idea.Merely I also have a question.If the point exists in the surface,is the way to use GeomAPI_ProjectPointOnSurf on the point also effectual?
Stephane Routelous
Thu, 09/29/2005 - 17:50
you can try to apply Geom_Tools::Parameters or ElSLib::Parameters if you lot have surfaces where you know the types
Andy Lg
Thu, 09/29/2005 - 17:58
Cheers very much!
Andy
Stephane Routelous
Thu, 09/29/2005 - eighteen:25
you can endeavour to employ Geom_Tools::Parameters or ElSLib::Parameters if you take surfaces where you know the types