* add BRepAlgoAPI wrapper files to CMakeList * introduce wrapper for BRepAlgoAPI_BooleanOperation and derivatives, set sensible default Fuzzyness for boolean operations * allow default fuzzyness to be set in settings - including off * backwards compatibility with OCCT 7.3.3 - removed newer paramateres from wrapper * added missing header * reverted src/Mod/Part/App/OpenCascadeAll.h to original state * implement some changes suggested by @wwmayer * removed unneeded destructor definitions * moved getDefaultFuzzyValue into its own helper class * removed unneeded references to base class default constructor * default to SetRunParallel(Standard_True) as suggested by @FlachyJoe * fixed license header as requested * Added new method to autocalculate fuzzyness to BooleanOperation base class and use it for those parts that do not call the obsolete constructor but also do not set precision * implemented static variable solution as suggested by @wwmayer * added helix for test case * Refactoring FCRepAlgoAPI to FCBRepAlgoAPI * Added Test Case (fuse cylinder with helix with different working and non-working Fuzzy values) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * increased default value of FuzzyBoolean and made tests more robust for compatibility with OCCT 7.3 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixes for FREECAD_USE_PCH - allow testing of FREECAD_USE_PCH on linux with cmake switch (default OFF) * removed surplus line - wasn't needed after all * included precompiled as instructed * set anti-corruption flag in boolean operations, ensures source shape is not damaged in OCCT 7.1 and higher * fix #17085 * disable subtests that were too specific for now * fixed all CLI tests - see comments in Pull Request https://github.com/FreeCAD/FreeCAD/pull/17119#issuecomment-2420772452 * Update src/Mod/PartDesign/PartDesignTests/TestTopologicalNamingProblem.py suggested updated test by CalligaroV Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com> * Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp suggested updated test by CalligaroV Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com> * Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp suggested updated test by CalligaroV Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com> * Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp suggested updated test by CalligaroV Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com> * Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp suggested updated test by CalligaroV Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com> * Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp suggested updated test by CalligaroV Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com> * Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp suggested updated test by CalligaroV Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com> * Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp suggested updated test by CalligaroV Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com> * Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp suggested updated test by CalligaroV Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com> * Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp suggested updated test by CalligaroV Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com> * Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp suggested updated test by CalligaroV Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com> * Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp suggested updated test by CalligaroV Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com> * Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp suggested updated test by CalligaroV Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com> * Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp suggested updated test by CalligaroV Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com> * Update tests/src/Mod/Part/App/TopoShapeExpansion.cpp Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com> * remove surplus tests from github suggestion interface bug * hide the BooleanFuzzy variable - can now be only set by manually editing the config file i in FCParamGroup "Boolean" <FCFloat Name="BooleanFuzzy" Value="10.000000000000"/> * Suggestion by @FlachyJoe - add validity checks to the base and tool shape in any direct boolean op --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Vincenzo Calligaro <vincenzo.calligaro@gmail.com>
117 lines
4.1 KiB
C++
117 lines
4.1 KiB
C++
/***************************************************************************
|
|
* Copyright (c) 2008 Jürgen Riegel <juergen.riegel@web.de> *
|
|
* *
|
|
* This file is part of the FreeCAD CAx development system. *
|
|
* *
|
|
* This library is free software; you can redistribute it and/or *
|
|
* modify it under the terms of the GNU Library General Public *
|
|
* License as published by the Free Software Foundation; either *
|
|
* version 2 of the License, or (at your option) any later version. *
|
|
* *
|
|
* This library is distributed in the hope that it will be useful, *
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
* GNU Library General Public License for more details. *
|
|
* *
|
|
* You should have received a copy of the GNU Library General Public *
|
|
* License along with this library; see the file COPYING.LIB. If not, *
|
|
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
|
* Suite 330, Boston, MA 02111-1307, USA *
|
|
* *
|
|
***************************************************************************/
|
|
|
|
#ifndef __PRECOMPILED__
|
|
#define __PRECOMPILED__
|
|
|
|
#include <FCConfig.h>
|
|
|
|
#ifdef _MSC_VER
|
|
#pragma warning(disable : 4251)
|
|
#endif
|
|
|
|
#ifdef _PreComp_
|
|
|
|
// standard
|
|
#include <cassert>
|
|
#include <cmath>
|
|
#include <iostream>
|
|
#include <memory>
|
|
#include <sstream>
|
|
#include <vector>
|
|
|
|
// Qt
|
|
#include <QDateTime>
|
|
|
|
// Boost
|
|
#include <boost/algorithm/string.hpp>
|
|
#include <boost/algorithm/string/predicate.hpp>
|
|
#include <boost/algorithm/string/regex.hpp>
|
|
#include <boost/format.hpp>
|
|
#include <boost/geometry/geometries/register/point.hpp>
|
|
#include <boost/iostreams/device/array.hpp>
|
|
#include <boost/iostreams/stream.hpp>
|
|
#include <boost/random.hpp>
|
|
#include <boost/range/adaptor/map.hpp>
|
|
#include <boost/uuid/uuid_io.hpp>
|
|
#include <boost_geometry.hpp>
|
|
|
|
// OpenCasCade
|
|
#include <BRepAdaptor_Curve.hxx>
|
|
#include <BRepAdaptor_Surface.hxx>
|
|
#include <Mod/Part/App/FCBRepAlgoAPI_Section.h>
|
|
#include <BRepBuilderAPI_MakeEdge.hxx>
|
|
#include <BRepBuilderAPI_MakeFace.hxx>
|
|
#include <BRepBuilderAPI_MakeVertex.hxx>
|
|
#include <BRepBuilderAPI_MakeWire.hxx>
|
|
#include <BRepMesh_IncrementalMesh.hxx>
|
|
#include <BRepOffsetAPI_NormalProjection.hxx>
|
|
#include <BRepTools_WireExplorer.hxx>
|
|
#include <BRep_Builder.hxx>
|
|
#include <BRep_Tool.hxx>
|
|
#include <ElCLib.hxx>
|
|
#include <GCPnts_AbscissaPoint.hxx>
|
|
#include <GC_MakeArcOfCircle.hxx>
|
|
#include <GC_MakeCircle.hxx>
|
|
#include <GeomAPI_ProjectPointOnCurve.hxx>
|
|
#include <GeomAPI_ProjectPointOnSurf.hxx>
|
|
#include <GeomConvert_BSplineCurveKnotSplitting.hxx>
|
|
#include <GeomLProp_CLProps.hxx>
|
|
#include <Geom_BSplineCurve.hxx>
|
|
#include <Geom_Circle.hxx>
|
|
#include <Geom_Ellipse.hxx>
|
|
#include <Geom_Hyperbola.hxx>
|
|
#include <Geom_Line.hxx>
|
|
#include <Geom_Parabola.hxx>
|
|
#include <Geom_Plane.hxx>
|
|
#include <Geom_TrimmedCurve.hxx>
|
|
#include <Precision.hxx>
|
|
#include <ShapeFix_Wire.hxx>
|
|
#include <Standard_Version.hxx>
|
|
#include <TColStd_Array1OfInteger.hxx>
|
|
#include <TopExp.hxx>
|
|
#include <TopExp_Explorer.hxx>
|
|
#include <TopTools_IndexedMapOfShape.hxx>
|
|
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
|
#include <TopoDS.hxx>
|
|
#include <TopoDS_Compound.hxx>
|
|
#include <TopoDS_Edge.hxx>
|
|
#include <TopoDS_Face.hxx>
|
|
#include <TopoDS_Shape.hxx>
|
|
#include <TopoDS_Vertex.hxx>
|
|
#include <gp_Ax3.hxx>
|
|
#include <gp_Circ.hxx>
|
|
#include <gp_Elips.hxx>
|
|
#include <gp_Hypr.hxx>
|
|
#include <gp_Parab.hxx>
|
|
#include <gp_Pln.hxx>
|
|
#include <gp_Pnt.hxx>
|
|
|
|
#elif defined(FC_OS_WIN32)
|
|
#ifndef NOMINMAX
|
|
#define NOMINMAX
|
|
#endif
|
|
#include <windows.h>
|
|
#endif // _PreComp_
|
|
|
|
#endif
|