Bezier Surface

Hello to all,

how to generate a Bezier Surface ?

I have a BSPline_Surface and want to better use a BezierSPline form the data. Shall I use GeomConvert to turn the BSplineSurface into a Bezier one, or is there a straightforward way of doing it - like the createion of BSplineSurface via Interpolation etc ?

Best regards

Marc

Pavitra's picture

Hello Marc,

It's not clear in your question that you are having problem in surface convertion or surface creation.

If it's of convertion(BSpl.->Bez. Surf.):-
Better use the GeomConvert_BSplineSurfaceToBezierSurface(....), as it's straight forward.

But if it's of Creation:-
Use "GeomAPI_PointsToBSplineSurface".{As per ur requirement}

Just play with knot values,mulptiplicity....to have desired result.

If still your problem sustains,Pls. refer to Tech. Documentation.

Thanx.
Pavitra Mukherjee

marc's picture

Hello and thank you very much for your help:
The problem is the surface creation !

Any hints ?
Can I use the standard GeomAPI_PointsToBSplineSurface to create a Bezier Surface ?
How ? I do not want to play with knots etc.
I just want to receive a bezir surface just like creating a BSplineSurface.

Thank you.

Marc

marc's picture

Hello and thank you very much for your help:
The problem is the surface creation !

Any hints ?
Can I use the standard GeomAPI_PointsToBSplineSurface to create a Bezier Surface ?
How ? I do not want to play with knots etc.
I just want to receive a bezir surface just like creating a BSplineSurface.

Thank you.

Marc

Pavitra's picture

Hi marc,

I'm giving u the simplest code of Bezier Surface creation. Here you just specify the pole points(similar to the way in PointsTOBSpline...) and get a Bezier Surface. And this time u don't need to play with anything :-)

Code :
----
---
---
//include related headers
---
---
TColgp_Arry2OfPnt poles(1,2,1,2);

poles(1,1).setCoord(x,y,z);//it's on you how would you like to populate x,y & z.
poles(1,2).setCoord(x,y,z);
poles(2,1).setCoord(x,y,z);
poles(2,2).setCoord(x,y,z);

Handle(Geom_BezierSurface) BEZ = new Geom_BezierSurface(poles);

//Now you have a Bezier Surf. in straight forward way.

If you still have problm. Pls. go through the Documentation.

Thankyou
Pavitra

P G's picture

Try to use the constrcutor in Geom_BezierSurface class.

- pg