1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00
Files
occt/src/BOPTest/BOPTest_Objects.hxx
emv eea21625fb 0029237: Improve performance of Boolean Operations
In order to improve performance of Boolean Operations on the relatively fast cases the following improvements have been made:
1. Initialization of the FaceInfo information for the faces participating in Face/Face interference, even when the gluing is ON, to take into account intersection of their sub-shapes.
2. Code simplification & duplication removal - the methods BOPAlgo_ShellSplitter::MakeConnexityBlocks and BOPAlgo_WireSplitter::MakeConnexityBlocks have been unified into BOPTools_AlgoTools::MakeConnexityBlocks.
3. Avoid unnecessary bounding box computation for solids during DS initialization. The bounding boxes for solids will be computed during the building stage to find faces located inside solids.
   For the shape self-interference check (performed by the BOPAlgo_CheckerSI), the bounding box is still computed, as it is necessary to resolve Shape/Solid intersections.
4. Use only three sample points to check coincidence of line and plane.
5. Perform necessity of planes intersection only when the gluing is off.
6. Avoid repeated initialization of 2D classifier while building splits of the faces.
7. Post treat stage:
7.1. Method CorrectWires: Save edge's data (PCurve, parameter of the vertex, range) to avoid its recalculation.
7.2. Method CheckEdge: While checking vertices on edges avoid unnecessary calculation of their location.
8. Provide possibility to disable the classification of the input solids on the inverted status (to be the holes in the space).
9. Avoid building of bounding boxes for faces/solids during splitting of the input arguments for their classification relatively hole faces/shells if there are no holes created.
10. Avoid rebuilding of the faces/solids from arguments which does not acquire any inside parts from other arguments during the operation by using their draft versions as their splits.

Test cases for the issue.
Correction of the test cases boolean gdml_public A9 and bugs modalg_7 bug28485 as they are improvements.
Additional test case for the issue #28485 as it is fixed by the current changes.
2017-11-02 07:07:01 +03:00

101 lines
2.8 KiB
C++

// Created by: Peter KURNEV
// Copyright (c) 1999-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _BOPTest_Objects_HeaderFile
#define _BOPTest_Objects_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <BOPDS_PDS.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <BOPAlgo_PBuilder.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
#include <BOPAlgo_CellsBuilder.hxx>
#include <BOPAlgo_GlueEnum.hxx>
//
class BOPAlgo_PaveFiller;
class BOPAlgo_Builder;
class BOPAlgo_BOP;
class BOPAlgo_Section;
class BOPAlgo_Splitter;
class BOPTest_Objects
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT static BOPAlgo_PaveFiller& PaveFiller();
Standard_EXPORT static void Init();
Standard_EXPORT static void Clear();
Standard_EXPORT static BOPDS_PDS PDS();
Standard_EXPORT static BOPAlgo_Builder& Builder();
Standard_EXPORT static BOPAlgo_BOP& BOP();
Standard_EXPORT static BOPAlgo_Section& Section();
Standard_EXPORT static BOPAlgo_CellsBuilder& CellsBuilder();
Standard_EXPORT static BOPAlgo_Splitter& Splitter();
Standard_EXPORT static BOPCol_ListOfShape& Shapes();
Standard_EXPORT static BOPCol_ListOfShape& Tools();
Standard_EXPORT static void SetBuilder (const BOPAlgo_PBuilder& theBuilder);
Standard_EXPORT static void SetBuilderDefault();
Standard_EXPORT static void SetRunParallel (const Standard_Boolean theFlag);
Standard_EXPORT static Standard_Boolean RunParallel();
Standard_EXPORT static void SetFuzzyValue (const Standard_Real theValue);
Standard_EXPORT static Standard_Real FuzzyValue();
Standard_EXPORT static void SetNonDestructive(const Standard_Boolean theFlag);
Standard_EXPORT static Standard_Boolean NonDestructive();
Standard_EXPORT static void SetGlue(const BOPAlgo_GlueEnum aGlue);
Standard_EXPORT static BOPAlgo_GlueEnum Glue();
Standard_EXPORT static void SetDrawWarnShapes(const Standard_Boolean bDraw);
Standard_EXPORT static Standard_Boolean DrawWarnShapes();
Standard_EXPORT static void SetCheckInverted(const Standard_Boolean bCheck);
Standard_EXPORT static Standard_Boolean CheckInverted();
protected:
private:
};
#endif // _BOPTest_Objects_HeaderFile