Any suggestion? Am i wrong somewhere in the code written?
Thanks,
Author
Archived discussion
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,
Author
Discussion
Posts are displayed in their archived order.
Any suggestion? Am i wrong somewhere in the code written?
Thanks,
Author
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)
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.
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,
Author
I did an error in the attachment.
Here the mentioned attachment