For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Update a face after changes to Handle(Geom_BSplineSurface)

Francesco Argese's picture

Hi all,

I'm having some troubles updating a face that is:
- loaded from an iges file
- converted to NURBS
- modified changing NURBS poles.

After these operations I want to retrieve new triangulation and display it though my graphics library.

It works correctly if I create a new face using the Handle(Geom_BSplineSurface) modified:

BRepBuilderAPI_MakeFace newFace(bSplineSurface, 0.001);

If I try to update the old face (that has Handle(Geom_BSplineSurface) correctly modified) I display always the old face without changes introduced through bSplineSurface. After reading other similar posts I have tried the following solutions but none was successfull:

1) Using ShapeBuild_ReShape
ShapeBuild_ReShape reshape;
reshape.Replace(face, newFace.Face());

2) Using BRepTools_ReShape
BRepTools_ReShape reshape;
reshape.Replace(face, newFace);

3) BRep_Builder
BRep_Builder builder;
builder.UpdateFace(face, 0.001);

Where could be the problem? I'm using OpenCascade 6.5.2 with Visual Studio 2005 on Windows XP.

Thanks in advance,
Francesco Argese

Francesco Argese's picture

Any suggestion? Am i wrong somewhere in the code written?


Hans's picture

Maybe you can use the Set()-function of the AIS_Shape? But i don't know if you have a AIS_Shape face?
Second one: Maybe try to redisplay your face? --> AIS_InteractiveContext->Redisplay(face)

Francesco Argese's picture

I don't use AIS_Shape to display but another open source library (OpenSceneGraph). I'd like to have a function that force recalculating triangles of the face based on the modified spline.

It seemed to me that the 3 options written in the first post could do that but they don't work as I expected.

Francesco Argese's picture

After reading recent post "Mesh a nurbs face" I have tried the following instructions:


With these two instructions face is updated but I obtain a strange result, different from expected (among attachments).

Am I wrong somewhere? Or could it be an error inside OpenCascade?

Thanks in advance,
Francesco Argese

Francesco Argese's picture

I did an error in the attachment.

Here the mentioned attachment