banner



how to find normal vector of a surface

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.

Torsten Sadowski's picture

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's picture

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's picture

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's picture

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's picture

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's picture

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's picture

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's picture

the good fashion is to apply GeomAPI_ProjectPointOnSurf.
the method LowerDistanceParameters gives you the U and 5 you lot are searching

Stephane

Andy Lg's picture

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's picture

you can try to apply Geom_Tools::Parameters or ElSLib::Parameters if you lot have surfaces where you know the types

Andy Lg's picture

Cheers very much!

Andy

Stephane Routelous's picture

you can endeavour to employ Geom_Tools::Parameters or ElSLib::Parameters if you take surfaces where you know the types

Source: https://dev.opencascade.org/content/how-can-i-get-normal-vector-point-surface

Posted by: sandbergcasonctin.blogspot.com

0 Response to "how to find normal vector of a surface"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel