| Update a face after changes to Handle(Geom_BSplineSurface) |
 |
| Francesco Argese |
2012/04/30 12:39 |
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());
reshape.Apply(face);
2) Using BRepTools_ReShape
BRepTools_ReShape reshape;
reshape.Replace(face, newFace);
reshape.Apply(face);
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 |
2012/12/12 12:58 |
Any suggestion? Am i wrong somewhere in the code written?
Thanks,
Francesco |
 |
| |
 | | Hans |
2012/12/12 23:58 |
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 |
2012/12/14 14:15 |
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 |
2012/12/14 15:21 |
After reading recent post "Mesh a nurbs face" I have tried the following instructions:
BRepTools::Clean(face);
BRepTools::Update(face);
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 |
2012/12/14 15:27 |
I did an error in the attachment.
Here the mentioned attachment |
|
You have to be logged in to download the attached file
|
 |
| |