Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
Open CASCADEShowroomGet it!Developer CornerSupport and ProductsAbout us
Technical overview
Areas of use
Advantages
FAQ
Screenshots
Shape factory
Shape gallery
Demonstrations
What's new
System requirements
Download Center
Public license
Documentation
Getting started
Forums
Open Source community
Training and e-learning
A-la Carte Support
Value-added software
Complementary Components
Customer Corner
Company Profile
Marketing Materials
Contact Us
News
Home / Developer Corner / Forums / Usage issues / Update a face after changes to Handle(Geom_BSplineSurface)

Update a face after changes to Handle(Geom_BSplineSurface)

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
 
 
Latest news
  • Open CASCADE Technology 6.7.1 is available for download!
  • Open CASCADE Technology 6.7.0 is available for download!
  • Open CASCADE Technology 6.6.0 is available for download!

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map