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 / Is necessary to clean the triangles before recomputation?

Is necessary to clean the triangles before recomputation?

Is necessary to clean the triangles before recomputation?
heyuqi 2013/03/30 15:21
Hi gays,

I'm trying to upgrade OCCT to version 6.5.4 for my software, but I found that all CAD operations take 10x longer time than version 6.5.1.

Compares the changes between version 6.5.1 and version 6.5.4, I found that triangles of the shape will be clean before the re-computation of shape triangulation.

Industry geometries are usually not fine for triangulation, I think that user is unable to wait for such a long time.

Following lines please found the changes:

- OCCT 6.5.1: Prs3d_ShadedShape::Add

Standard_Real aDeflection = GetDeflection(aShape, aDrawer);
//using of plugin
BRepMesh_PDiscretRoot pAlgo;
pAlgo=BRepMesh_DiscretFactory::Get().Discret(aShape,
                          aDeflection,
                          aDrawer->HLRAngle());
if (pAlgo)
pAlgo->Perform();

- OCCT 6.5.4:

Standard_Real aDeflection = GetDeflection (theShape, theDrawer);

// Check if it is possible to avoid unnecessary recomputation
// of shape triangulation
if (!BRepTools::Triangulation (theShape, aDeflection))
{
BRepTools::Clean (theShape);

// retrieve meshing tool from Factory
Handle(BRepMesh_DiscretRoot) aMeshAlgo = BRepMesh_DiscretFactory::Get().Discret (theShape,
aDeflection,
theDrawer->HLRAngle());
if (!aMeshAlgo.IsNull())
aMeshAlgo->Perform();
}
Pawel 2013/04/03 12:46
Hello heyuqi,

I can confirm the problem.

I guess the triangulation is also performed many times on the same shape because the criteria cannot be fulfilled for some shapes (but they get triangulated every time the method is called). See the issue:

http://tracker.dev.opencascade.org/view.php?id=23200

As a workaround I have commented out the offending code portion and have to make sure the shape triangulation is made before it gets visualized.

Pawel
heyuqi 2013/04/06 20:51
Hello Pawel,

Thanks for your reply!

I will try to apply changes from your branches and found out which improvements will work.
 
 
Latest news
  • Open CASCADE Technology 6.7.0 is available for download!
  • Open CASCADE Technology 6.6.0 is available for download!
  • Open CASCADE Technology 6.5.5 is available for download!

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