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
Shape factory
Shape gallery
What's new
System requirements
Download Center
Public license
Getting started
Open Source community
Training and e-learning
A-la Carte Support
Value-added software
Complementary Components
Customer Corner
Company Profile
Marketing Materials
Contact Us
Home / Developer Corner / Forums / Usage issues / Mysterious settings in BrepOffsetAPI_ThruSections

Mysterious settings in BrepOffsetAPI_ThruSections

Mysterious settings in BrepOffsetAPI_ThruSections
Mauro Mariotti 2012/11/09 22:00
In BrepOffsetAPI_ThruSections, there are some mysterious methods to change its behaviour.
Does anyone know their meaning and use?

void SetSmoothing (const Standard_Boolean UseSmoothing)
"Define the approximation algorithm"

The following method has effect just if UseSmoothing is true:

void SetParType (const Approx_ParametrizationType ParType)
"Define the type of parametrization used in the approximation",

where an Approx_ParametrizationType can have one of these values:

The following method has effect just if UseSmoothing is false:

void SetCriteriumWeight(const Standard_Real W1, const Standard_Real W2, const Standard_Real W3)
"define the Weights associed to the criterium used in the optimization"

void      CheckCompatibility (const Standard_Boolean check=Standard_True)
I guess that the aim of this is to orient the wires in a consistent way.

The default values are:

smoothing: false;
criterium weights: 0.4, 0.2, 0.4;
parametrization type: ChordLength
check compatibility: true

Thanks again.
Timo 2014/05/14 14:59
Dear Mauro,

what you wrote regarding which method has effect if UseSmoothing is true/false is not correct.

See the following code from BRepOffsetAPI_ThruSections::TotalSurf

if(myUseSmoothing) {
anApprox.SetCriteriumWeight(myCritWeights[0], myCritWeights[1], myCritWeights[2]);
anApprox.PerformSmoothing(line, section);
else {
anApprox.Perform(line, section, SpApprox);

So, only if UseSmoothing is true, SetCriteriumWeight has effect.
Only if UseSmoothing is false, SetParType has effect.

I also think that the documentation should be improved here regarding the Smoothing.

In OCC 6.3.1 Release Notes I found the following:

Advanced approximation method (implemented in class AppDef_TheVariational) has been
included in algorithms for creation of curves and surfaces:
􀂃 GeomAPI_PointsToBSpline,
􀂃 GeomAPI_PointsToBSplineSurface,
􀂃 Geom2dAPI_PointsToBSpline,
􀂃 GeomFill_AppSurf,
􀂃 BRepOffsetAPI_ThruSection

Here is an explanation about the meaning of the weight parameters for smoothing:

When I tried smoothing with more complex surfaces, I often got exceptions. Does anyone have experience with smoothing / using AppDef_TheVariational? What are the requirements in order to use it successfully?

Kind regards,
Latest news
  • New features to enhance the development process
  • Open CASCADE Technology 6.7.1 is available for download!
  • Open CASCADE Technology 6.7.0 is available for download!

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