diff --git a/src/ModelingData/TKBRep/BinTools/BinTools_LocationSetPtr.hxx b/src/ModelingData/TKBRep/BinTools/BinTools_LocationSetPtr.hxx deleted file mode 100644 index 650845fb58..0000000000 --- a/src/ModelingData/TKBRep/BinTools/BinTools_LocationSetPtr.hxx +++ /dev/null @@ -1,22 +0,0 @@ -// Created on: 2004-05-11 -// Created by: Sergey ZARITCHNY -// Copyright (c) 2004-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 _BinTools_LocationSetPtr_HeaderFile -#define _BinTools_LocationSetPtr_HeaderFile - -class BinTools_LocationSet; -typedef BinTools_LocationSet* BinTools_LocationSetPtr; - -#endif // _BinTools_LocationSetPtr_HeaderFile diff --git a/src/ModelingData/TKBRep/BinTools/FILES.cmake b/src/ModelingData/TKBRep/BinTools/FILES.cmake index f7429f5636..059b774ee9 100644 --- a/src/ModelingData/TKBRep/BinTools/FILES.cmake +++ b/src/ModelingData/TKBRep/BinTools/FILES.cmake @@ -13,7 +13,6 @@ set(OCCT_BinTools_FILES BinTools_IStream.hxx BinTools_LocationSet.cxx BinTools_LocationSet.hxx - BinTools_LocationSetPtr.hxx BinTools_ShapeSet.cxx BinTools_ShapeSet.hxx BinTools_ShapeSetBase.cxx diff --git a/src/ModelingData/TKBRep/TopTools/FILES.cmake b/src/ModelingData/TKBRep/TopTools/FILES.cmake index f9f03a1994..0483a385b5 100644 --- a/src/ModelingData/TKBRep/TopTools/FILES.cmake +++ b/src/ModelingData/TKBRep/TopTools/FILES.cmake @@ -2,14 +2,10 @@ set(OCCT_TopTools_FILES_LOCATION "${CMAKE_CURRENT_LIST_DIR}") set(OCCT_TopTools_FILES - TopTools.cxx - TopTools.hxx - TopTools_FormatVersion.hxx TopTools_LocationSet.cxx TopTools_LocationSet.hxx - TopTools_LocationSetPtr.hxx TopTools_ShapeMapHasher.hxx TopTools_ShapeSet.cxx diff --git a/src/ModelingData/TKBRep/TopTools/TopTools.cxx b/src/ModelingData/TKBRep/TopTools/TopTools.cxx deleted file mode 100644 index 42036c381b..0000000000 --- a/src/ModelingData/TKBRep/TopTools/TopTools.cxx +++ /dev/null @@ -1,31 +0,0 @@ -// Created on: 1993-01-20 -// Created by: Remi LEQUETTE -// Copyright (c) 1993-1999 Matra Datavision -// 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. - -#include - -#include - -//================================================================================================= - -void TopTools::Dump(const TopoDS_Shape& Sh, Standard_OStream& S) -{ - TopTools_ShapeSet SSet; - SSet.Add(Sh); - SSet.Dump(Sh, S); - SSet.Dump(S); -} - -void TopTools::Dummy(const int) {} diff --git a/src/ModelingData/TKBRep/TopTools/TopTools.hxx b/src/ModelingData/TKBRep/TopTools/TopTools.hxx deleted file mode 100644 index 69b8b154cb..0000000000 --- a/src/ModelingData/TKBRep/TopTools/TopTools.hxx +++ /dev/null @@ -1,84 +0,0 @@ -// Created on: 1993-01-14 -// Created by: Remi LEQUETTE -// Copyright (c) 1993-1999 Matra Datavision -// 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 _TopTools_HeaderFile -#define _TopTools_HeaderFile - -#include -#include -#include - -#include -class TopoDS_Shape; - -//! The TopTools package provides utilities for the -//! topological data structure. -//! -//! * ShapeMapHasher. Hash a Shape base on the TShape -//! and the Location. The Orientation is not used. -//! -//! * OrientedShapeMapHasher. Hash a Shape base on the -//! TShape ,the Location and the Orientation. -//! -//! * Instantiations of TCollection for Shapes : -//! MapOfShape -//! IndexedMapOfShape -//! DataMapOfIntegerShape -//! DataMapOfShapeInteger -//! DataMapOfShapeReal -//! Array1OfShape -//! HArray1OfShape -//! SequenceOfShape -//! HSequenceOfShape -//! ListOfShape -//! Array1OfListShape -//! HArray1OfListShape -//! DataMapOfIntegerListOfShape -//! DataMapOfShapeListOfShape -//! DataMapOfShapeListOfInteger -//! IndexedDataMapOfShapeShape -//! IndexedDataMapOfShapeListOfShape -//! DataMapOfShapeShape -//! IndexedMapOfOrientedShape -//! DataMapOfShapeSequenceOfShape -//! IndexedDataMapOfShapeAddress -//! DataMapOfOrientedShapeShape -//! -//! * LocationSet: to write sets of locations. -//! -//! * ShapeSet: to writes sets of TShapes. -//! -//! Package Methods: -//! -//! Dump: To dump the topology of a Shape. -class TopTools -{ -public: - DEFINE_STANDARD_ALLOC - - //! A set of Shapes. Can be dump, wrote or read. - //! Dumps the topological structure of on the - //! stream . - Standard_EXPORT static void Dump(const TopoDS_Shape& Sh, Standard_OStream& S); - - //! This is to bypass an extraction bug. It will force - //! the inclusion of int.hxx itself - //! including Standard_OStream.hxx at the correct - //! position. - Standard_EXPORT static void Dummy(const int I); -}; - -#endif // _TopTools_HeaderFile diff --git a/src/ModelingData/TKBRep/TopTools/TopTools_LocationSetPtr.hxx b/src/ModelingData/TKBRep/TopTools/TopTools_LocationSetPtr.hxx deleted file mode 100644 index 2530facb87..0000000000 --- a/src/ModelingData/TKBRep/TopTools/TopTools_LocationSetPtr.hxx +++ /dev/null @@ -1,23 +0,0 @@ -// Created on: 1993-01-14 -// Created by: Remi LEQUETTE -// Copyright (c) 1993-1999 Matra Datavision -// 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 _TopTools_LocationSetPtr_HeaderFile -#define _TopTools_LocationSetPtr_HeaderFile - -class TopTools_LocationSet; -typedef TopTools_LocationSet* TopTools_LocationSetPtr; - -#endif // _TopTools_LocationSetPtr_HeaderFile diff --git a/src/ModelingData/TKG3d/AdvApprox/AdvApprox_PrefCutting.cxx b/src/ModelingData/TKG3d/AdvApprox/AdvApprox_PrefCutting.cxx deleted file mode 100644 index 61d4abc500..0000000000 --- a/src/ModelingData/TKG3d/AdvApprox/AdvApprox_PrefCutting.cxx +++ /dev/null @@ -1,44 +0,0 @@ -// Created on: 1996-07-03 -// Created by: Joelle CHAUVET -// Copyright (c) 1996-1999 Matra Datavision -// 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. - -#include -#include - -AdvApprox_PrefCutting::AdvApprox_PrefCutting(const NCollection_Array1& CutPnts) - : myPntOfCutting(1, CutPnts.Length()) -{ - myPntOfCutting = CutPnts; -} - -bool AdvApprox_PrefCutting::Value(const double a, const double b, double& cuttingvalue) const -{ - // Minimum length of a parametric interval: PConfusion() - // for F(U,V): EPS1=1.e-9 (cf. MMEPS1) - constexpr double lgmin = 10 * Precision::PConfusion(); - int i; - double cut, mil = (a + b) / 2, dist = std::abs((a - b) / 2); - cut = mil; - for (i = myPntOfCutting.Lower(); i <= myPntOfCutting.Upper(); i++) - { - if ((dist - lgmin) > std::abs(mil - myPntOfCutting.Value(i))) - { - cut = myPntOfCutting.Value(i); - dist = std::abs(mil - myPntOfCutting.Value(i)); - } - } - cuttingvalue = cut; - return (std::abs(cut - a) >= lgmin && std::abs(b - cut) >= lgmin); -} diff --git a/src/ModelingData/TKG3d/AdvApprox/AdvApprox_PrefCutting.hxx b/src/ModelingData/TKG3d/AdvApprox/AdvApprox_PrefCutting.hxx deleted file mode 100644 index ef4aed2816..0000000000 --- a/src/ModelingData/TKG3d/AdvApprox/AdvApprox_PrefCutting.hxx +++ /dev/null @@ -1,43 +0,0 @@ -// Created on: 1996-04-05 -// Created by: Joelle CHAUVET -// Copyright (c) 1996-1999 Matra Datavision -// 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 _AdvApprox_PrefCutting_HeaderFile -#define _AdvApprox_PrefCutting_HeaderFile - -#include -#include -#include - -#include -#include -#include - -//! inherits class Cutting; contains a list of preferential points (di)i -//! if Cutting is necessary in [a,b], we cut at the di nearest from (a+b)/2. -class AdvApprox_PrefCutting : public AdvApprox_Cutting -{ -public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT AdvApprox_PrefCutting(const NCollection_Array1& CutPnts); - - Standard_EXPORT bool Value(const double a, const double b, double& cuttingvalue) const override; - -private: - NCollection_Array1 myPntOfCutting; -}; - -#endif // _AdvApprox_PrefCutting_HeaderFile diff --git a/src/ModelingData/TKG3d/AdvApprox/FILES.cmake b/src/ModelingData/TKG3d/AdvApprox/FILES.cmake index 7ec124446f..0733712b21 100644 --- a/src/ModelingData/TKG3d/AdvApprox/FILES.cmake +++ b/src/ModelingData/TKG3d/AdvApprox/FILES.cmake @@ -12,8 +12,6 @@ set(OCCT_AdvApprox_FILES AdvApprox_EvaluatorFunction.hxx AdvApprox_PrefAndRec.cxx AdvApprox_PrefAndRec.hxx - AdvApprox_PrefCutting.cxx - AdvApprox_PrefCutting.hxx AdvApprox_SimpleApprox.cxx AdvApprox_SimpleApprox.hxx ) diff --git a/src/ModelingData/TKGeomBase/Extrema/Extrema_CCLocFOfLocECC2d.hxx b/src/ModelingData/TKGeomBase/Extrema/Extrema_CCLocFOfLocECC2d.hxx deleted file mode 100644 index 6f1e809eb8..0000000000 --- a/src/ModelingData/TKGeomBase/Extrema/Extrema_CCLocFOfLocECC2d.hxx +++ /dev/null @@ -1,38 +0,0 @@ -// Created on: 1991-02-26 -// Created by: Isabelle GRIGNON -// Copyright (c) 1991-1999 Matra Datavision -// 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 _Extrema_CCLocFOfLocECC2d_HeaderFile -#define _Extrema_CCLocFOfLocECC2d_HeaderFile - -#include -#include -#include -#include -#include -#include -#include - -//! Type alias for 2D curve-curve extremum function. -using Extrema_CCLocFOfLocECC2d = Extrema_GFuncExtCC>; - -#endif // _Extrema_CCLocFOfLocECC2d_HeaderFile diff --git a/src/ModelingData/TKGeomBase/Extrema/Extrema_GenLocateExtCS.cxx b/src/ModelingData/TKGeomBase/Extrema/Extrema_GenLocateExtCS.cxx deleted file mode 100644 index 38323a2cca..0000000000 --- a/src/ModelingData/TKGeomBase/Extrema/Extrema_GenLocateExtCS.cxx +++ /dev/null @@ -1,139 +0,0 @@ -// Created on: 1996-01-25 -// Created by: Laurent PAINNOT -// Copyright (c) 1996-1999 Matra Datavision -// 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. - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//================================================================================================= - -Extrema_GenLocateExtCS::Extrema_GenLocateExtCS() - : myDone(false), - mySqDist(RealLast()) -{ -} - -//================================================================================================= - -Extrema_GenLocateExtCS::Extrema_GenLocateExtCS(const Adaptor3d_Curve& C, - const Adaptor3d_Surface& S, - const double T, - const double U, - const double V, - const double Tol1, - const double Tol2) -{ - Perform(C, S, T, U, V, Tol1, Tol2); -} - -//================================================================================================= - -void Extrema_GenLocateExtCS::Perform(const Adaptor3d_Curve& C, - const Adaptor3d_Surface& S, - const double T, - const double U, - const double V, - const double Tol1, - const double Tol2) -{ - myDone = false; - - double Tinf, Tsup; - Tinf = C.FirstParameter(); - Tsup = C.LastParameter(); - - double Uinf, Usup, Vinf, Vsup; - Uinf = S.FirstUParameter(); - Usup = S.LastUParameter(); - Vinf = S.FirstVParameter(); - Vsup = S.LastVParameter(); - - Extrema_FuncExtCS F(C, S); - math_Vector Tol(1, 3), Start(1, 3), BInf(1, 3), BSup(1, 3); - Tol(1) = Tol1; - Tol(2) = Tol2; - Tol(3) = Tol2; - - Start(1) = T; - Start(2) = U; - Start(3) = V; - - BInf(1) = Tinf; - BInf(2) = Uinf; - BInf(3) = Vinf; - - BSup(1) = Tsup; - BSup(2) = Usup; - BSup(3) = Vsup; - - math_FunctionSetRoot SR(F, Tol); - SR.Perform(F, Start, BInf, BSup); - if (!SR.IsDone()) - { - return; - } - - mySqDist = F.SquareDistance(1); - myPoint1 = F.PointOnCurve(1); - myPoint2 = F.PointOnSurface(1); - myDone = true; -} - -//================================================================================================= - -bool Extrema_GenLocateExtCS::IsDone() const -{ - return myDone; -} - -//================================================================================================= - -double Extrema_GenLocateExtCS::SquareDistance() const -{ - if (!IsDone()) - { - throw StdFail_NotDone(); - } - return mySqDist; -} - -//================================================================================================= - -const Extrema_POnCurv& Extrema_GenLocateExtCS::PointOnCurve() const -{ - if (!IsDone()) - { - throw StdFail_NotDone(); - } - return myPoint1; -} - -//================================================================================================= - -const Extrema_POnSurf& Extrema_GenLocateExtCS::PointOnSurface() const -{ - if (!IsDone()) - { - throw StdFail_NotDone(); - } - return myPoint2; -} diff --git a/src/ModelingData/TKGeomBase/Extrema/Extrema_GenLocateExtCS.hxx b/src/ModelingData/TKGeomBase/Extrema/Extrema_GenLocateExtCS.hxx deleted file mode 100644 index 1ac6347ee7..0000000000 --- a/src/ModelingData/TKGeomBase/Extrema/Extrema_GenLocateExtCS.hxx +++ /dev/null @@ -1,79 +0,0 @@ -// Created on: 1996-01-25 -// Created by: Laurent PAINNOT -// Copyright (c) 1996-1999 Matra Datavision -// 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 _Extrema_GenLocateExtCS_HeaderFile -#define _Extrema_GenLocateExtCS_HeaderFile - -#include -#include - -#include -#include -class Adaptor3d_Curve; -class Adaptor3d_Surface; - -//! With two close points it calculates the distance -//! between two surfaces. -//! This distance can be a minimum or a maximum. -class Extrema_GenLocateExtCS -{ -public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT Extrema_GenLocateExtCS(); - - //! Calculates the distance with two close points. - //! The close points are defined by the parameter values - //! T for C and (U,V) for S. - //! The function F(t,u,v)=distance(C(t),S(u,v)) - //! has an extremun when gradient(F)=0. The algorithm searches - //! a zero near the close points. - Standard_EXPORT Extrema_GenLocateExtCS(const Adaptor3d_Curve& C, - const Adaptor3d_Surface& S, - const double T, - const double U, - const double V, - const double Tol1, - const double Tol2); - - Standard_EXPORT void Perform(const Adaptor3d_Curve& C, - const Adaptor3d_Surface& S, - const double T, - const double U, - const double V, - const double Tol1, - const double Tol2); - - //! Returns True if the distance is found. - Standard_EXPORT bool IsDone() const; - - //! Returns the value of the extremum square distance. - Standard_EXPORT double SquareDistance() const; - - //! Returns the point of the extremum distance on C. - Standard_EXPORT const Extrema_POnCurv& PointOnCurve() const; - - //! Returns the point of the extremum distance on S. - Standard_EXPORT const Extrema_POnSurf& PointOnSurface() const; - -private: - bool myDone; - double mySqDist; - Extrema_POnCurv myPoint1; - Extrema_POnSurf myPoint2; -}; - -#endif // _Extrema_GenLocateExtCS_HeaderFile diff --git a/src/ModelingData/TKGeomBase/Extrema/Extrema_GenLocateExtSS.cxx b/src/ModelingData/TKGeomBase/Extrema/Extrema_GenLocateExtSS.cxx deleted file mode 100644 index 14eb4f7a74..0000000000 --- a/src/ModelingData/TKGeomBase/Extrema/Extrema_GenLocateExtSS.cxx +++ /dev/null @@ -1,146 +0,0 @@ -// Created on: 1995-07-18 -// Created by: Modelistation -// Copyright (c) 1995-1999 Matra Datavision -// 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. - -#include -#include -#include -#include -#include -#include -#include -#include - -//================================================================================================= - -Extrema_GenLocateExtSS::Extrema_GenLocateExtSS() - : myDone(false), - mySqDist(RealLast()) -{ -} - -//================================================================================================= - -Extrema_GenLocateExtSS::Extrema_GenLocateExtSS(const Adaptor3d_Surface& S1, - const Adaptor3d_Surface& S2, - const double U1, - const double V1, - const double U2, - const double V2, - const double Tol1, - const double Tol2) -{ - Perform(S1, S2, U1, V1, U2, V2, Tol1, Tol2); -} - -//================================================================================================= - -void Extrema_GenLocateExtSS::Perform(const Adaptor3d_Surface& S1, - const Adaptor3d_Surface& S2, - const double U1, - const double V1, - const double U2, - const double V2, - const double Tol1, - const double Tol2) -{ - myDone = false; - - double Uinf1, Usup1, Vinf1, Vsup1; - Uinf1 = S1.FirstUParameter(); - Usup1 = S1.LastUParameter(); - Vinf1 = S1.FirstVParameter(); - Vsup1 = S1.LastVParameter(); - - double Uinf2, Usup2, Vinf2, Vsup2; - Uinf2 = S2.FirstUParameter(); - Usup2 = S2.LastUParameter(); - Vinf2 = S2.FirstVParameter(); - Vsup2 = S2.LastVParameter(); - - Extrema_FuncExtSS F(S1, S2); - math_Vector Tol(1, 4), Start(1, 4), BInf(1, 4), BSup(1, 4); - - Tol(1) = Tol1; - Tol(2) = Tol1; - Tol(3) = Tol2; - Tol(4) = Tol2; - - Start(1) = U1; - Start(2) = V1; - Start(3) = U2; - Start(4) = V2; - - BInf(1) = Uinf1; - BInf(2) = Vinf1; - BInf(3) = Uinf2; - BInf(4) = Vinf2; - BSup(1) = Usup1; - BSup(2) = Vsup1; - BSup(3) = Usup2; - BSup(4) = Vsup2; - - math_FunctionSetRoot SR(F, Tol); - SR.Perform(F, Start, BInf, BSup); - if (!SR.IsDone()) - { - return; - } - - mySqDist = F.SquareDistance(1); - myPoint1 = F.PointOnS1(1); - myPoint2 = F.PointOnS2(1); - myDone = true; -} - -//================================================================================================= - -bool Extrema_GenLocateExtSS::IsDone() const -{ - return myDone; -} - -//================================================================================================= - -double Extrema_GenLocateExtSS::SquareDistance() const -{ - if (!IsDone()) - { - throw StdFail_NotDone(); - } - return mySqDist; -} - -//================================================================================================= - -const Extrema_POnSurf& Extrema_GenLocateExtSS::PointOnS1() const -{ - if (!IsDone()) - { - throw StdFail_NotDone(); - } - return myPoint1; -} - -//================================================================================================= - -const Extrema_POnSurf& Extrema_GenLocateExtSS::PointOnS2() const -{ - if (!IsDone()) - { - throw StdFail_NotDone(); - } - return myPoint2; -} diff --git a/src/ModelingData/TKGeomBase/Extrema/Extrema_GenLocateExtSS.hxx b/src/ModelingData/TKGeomBase/Extrema/Extrema_GenLocateExtSS.hxx deleted file mode 100644 index b0bc8aba2a..0000000000 --- a/src/ModelingData/TKGeomBase/Extrema/Extrema_GenLocateExtSS.hxx +++ /dev/null @@ -1,79 +0,0 @@ -// Created on: 1996-01-22 -// Created by: Laurent PAINNOT -// Copyright (c) 1996-1999 Matra Datavision -// 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 _Extrema_GenLocateExtSS_HeaderFile -#define _Extrema_GenLocateExtSS_HeaderFile - -#include -#include - -#include -class Adaptor3d_Surface; - -//! With two close points it calculates the distance -//! between two surfaces. -//! This distance can be a minimum or a maximum. -class Extrema_GenLocateExtSS -{ -public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT Extrema_GenLocateExtSS(); - - //! Calculates the distance with two close points. - //! The close points are defined by the parameter values - //! (U1,V1) for S1 and (U2,V2) for S2. - //! The function F(u1,v1,u2,v2)=distance(S1(u1,v1),S2(u2,v2)) - //! has an extremun when gradient(F)=0. The algorithm searches - //! a zero near the close points. - Standard_EXPORT Extrema_GenLocateExtSS(const Adaptor3d_Surface& S1, - const Adaptor3d_Surface& S2, - const double U1, - const double V1, - const double U2, - const double V2, - const double Tol1, - const double Tol2); - - Standard_EXPORT void Perform(const Adaptor3d_Surface& S1, - const Adaptor3d_Surface& S2, - const double U1, - const double V1, - const double U2, - const double V2, - const double Tol1, - const double Tol2); - - //! Returns True if the distance is found. - Standard_EXPORT bool IsDone() const; - - //! Returns the value of the extremum square distance. - Standard_EXPORT double SquareDistance() const; - - //! Returns the point of the extremum distance on S1. - Standard_EXPORT const Extrema_POnSurf& PointOnS1() const; - - //! Returns the point of the extremum distance on S2. - Standard_EXPORT const Extrema_POnSurf& PointOnS2() const; - -private: - bool myDone; - double mySqDist; - Extrema_POnSurf myPoint1; - Extrema_POnSurf myPoint2; -}; - -#endif // _Extrema_GenLocateExtSS_HeaderFile diff --git a/src/ModelingData/TKGeomBase/Extrema/Extrema_LocECC2d.hxx b/src/ModelingData/TKGeomBase/Extrema/Extrema_LocECC2d.hxx deleted file mode 100644 index 6ede311e76..0000000000 --- a/src/ModelingData/TKGeomBase/Extrema/Extrema_LocECC2d.hxx +++ /dev/null @@ -1,32 +0,0 @@ -// Created on: 1991-02-26 -// Created by: Isabelle GRIGNON -// Copyright (c) 1991-1999 Matra Datavision -// 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 _Extrema_LocECC2d_HeaderFile -#define _Extrema_LocECC2d_HeaderFile - -#include -#include -#include -#include -#include - -//! Type alias for 2D curve-curve local extremum locator. -using Extrema_LocECC2d = Extrema_GenLocateExtCC; - -#endif // _Extrema_LocECC2d_HeaderFile diff --git a/src/ModelingData/TKGeomBase/Extrema/Extrema_LocateExtCC2d.cxx b/src/ModelingData/TKGeomBase/Extrema/Extrema_LocateExtCC2d.cxx deleted file mode 100644 index 89f41cad2d..0000000000 --- a/src/ModelingData/TKGeomBase/Extrema/Extrema_LocateExtCC2d.cxx +++ /dev/null @@ -1,82 +0,0 @@ -// Created on: 1994-07-06 -// Created by: Laurent PAINNOT -// Copyright (c) 1994-1999 Matra Datavision -// 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. - -#include - -#include -#include - -#include -#include - -//================================================================================================= - -Extrema_LocateExtCC2d::Extrema_LocateExtCC2d(const Adaptor2d_Curve2d& C1, - const Adaptor2d_Curve2d& C2, - const double U0, - const double V0) - : mySqDist(RealLast()) -{ - double TolU = Extrema_Curve2dTool::Resolution(C1, Precision::Confusion()); - double TolV = Extrema_Curve2dTool::Resolution(C2, Precision::Confusion()); - Extrema_POnCurv2d P1, P2; - - // Not implemented for now: the call to Geom2dExtrema_ExtCC. - - Extrema_LocECC2d Xtrem(C1, C2, U0, V0, TolU, TolV); - // Exploitation - - myDone = Xtrem.IsDone(); - if (Xtrem.IsDone()) - { - mySqDist = Xtrem.SquareDistance(); - Xtrem.Point(P1, P2); - myPoint1 = P1; - myPoint2 = P2; - } -} - -//================================================================================================= - -bool Extrema_LocateExtCC2d::IsDone() const -{ - - return myDone; -} - -//================================================================================================= - -double Extrema_LocateExtCC2d::SquareDistance() const -{ - - if (!IsDone()) - { - throw StdFail_NotDone(); - } - return mySqDist; -} - -//================================================================================================= - -void Extrema_LocateExtCC2d::Point(Extrema_POnCurv2d& P1, Extrema_POnCurv2d& P2) const -{ - if (!IsDone()) - { - throw StdFail_NotDone(); - } - P1 = myPoint1; - P2 = myPoint2; -} diff --git a/src/ModelingData/TKGeomBase/Extrema/Extrema_LocateExtCC2d.hxx b/src/ModelingData/TKGeomBase/Extrema/Extrema_LocateExtCC2d.hxx deleted file mode 100644 index 98fb23dbbf..0000000000 --- a/src/ModelingData/TKGeomBase/Extrema/Extrema_LocateExtCC2d.hxx +++ /dev/null @@ -1,64 +0,0 @@ -// Created on: 1994-07-06 -// Created by: Laurent PAINNOT -// Copyright (c) 1994-1999 Matra Datavision -// 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 _Extrema_LocateExtCC2d_HeaderFile -#define _Extrema_LocateExtCC2d_HeaderFile - -#include -#include -#include - -#include -#include -class Adaptor2d_Curve2d; - -//! It calculates the distance between two curves with -//! a close point; these distances can be maximum or -//! minimum. -class Extrema_LocateExtCC2d -{ -public: - DEFINE_STANDARD_ALLOC - - //! Calculates the distance with a close point. The - //! close point is defined by a parameter value on each - //! curve. - //! The function F(u,v)=distance(C1(u),C2(v)) has an - //! extremun when gradient(f)=0. The algorithm searches - //! the zero near the close point. - Standard_EXPORT Extrema_LocateExtCC2d(const Adaptor2d_Curve2d& C1, - const Adaptor2d_Curve2d& C2, - const double U0, - const double V0); - - //! Returns True if the distance is found. - Standard_EXPORT bool IsDone() const; - - //! Returns the value of the extremum square distance. - Standard_EXPORT double SquareDistance() const; - - //! Returns the points of the extremum distance. - //! P1 is on the first curve, P2 on the second one. - Standard_EXPORT void Point(Extrema_POnCurv2d& P1, Extrema_POnCurv2d& P2) const; - -private: - bool myDone; - double mySqDist; - Extrema_POnCurv2d myPoint1; - Extrema_POnCurv2d myPoint2; -}; - -#endif // _Extrema_LocateExtCC2d_HeaderFile diff --git a/src/ModelingData/TKGeomBase/Extrema/FILES.cmake b/src/ModelingData/TKGeomBase/Extrema/FILES.cmake index dba3f95877..d31c89861b 100644 --- a/src/ModelingData/TKGeomBase/Extrema/FILES.cmake +++ b/src/ModelingData/TKGeomBase/Extrema/FILES.cmake @@ -4,7 +4,6 @@ set(OCCT_Extrema_FILES_LOCATION "${CMAKE_CURRENT_LIST_DIR}") set(OCCT_Extrema_FILES Extrema_CCLocFOfLocECC.hxx - Extrema_CCLocFOfLocECC2d.hxx Extrema_Curve2dTool.cxx Extrema_Curve2dTool.hxx Extrema_CurveTool.cxx @@ -70,13 +69,9 @@ set(OCCT_Extrema_FILES Extrema_GenExtSS.cxx Extrema_GenExtSS.hxx Extrema_GenLocateExtCC.hxx - Extrema_GenLocateExtCS.cxx - Extrema_GenLocateExtCS.hxx Extrema_GenLocateExtPC.hxx Extrema_GenLocateExtPS.cxx Extrema_GenLocateExtPS.hxx - Extrema_GenLocateExtSS.cxx - Extrema_GenLocateExtSS.hxx Extrema_GGExtPC.hxx Extrema_GlobOptFuncCC.cxx Extrema_GlobOptFuncCC.hxx @@ -90,12 +85,9 @@ set(OCCT_Extrema_FILES Extrema_LocateExtCC.cxx Extrema_LocateExtCC.hxx - Extrema_LocateExtCC2d.cxx - Extrema_LocateExtCC2d.hxx Extrema_LocateExtPC.hxx Extrema_LocateExtPC2d.hxx Extrema_LocECC.hxx - Extrema_LocECC2d.hxx Extrema_LocEPCOfLocateExtPC.hxx Extrema_LocEPCOfLocateExtPC2d.hxx Extrema_PCFOfEPCOfELPCOfLocateExtPC.hxx diff --git a/src/ModelingData/TKGeomBase/GeomLib/FILES.cmake b/src/ModelingData/TKGeomBase/GeomLib/FILES.cmake index f89abf7b9e..532ba4d5ab 100644 --- a/src/ModelingData/TKGeomBase/GeomLib/FILES.cmake +++ b/src/ModelingData/TKGeomBase/GeomLib/FILES.cmake @@ -15,7 +15,6 @@ set(OCCT_GeomLib_FILES GeomLib_CheckBSplineCurve.lxx GeomLib_DenominatorMultiplier.cxx GeomLib_DenominatorMultiplier.hxx - GeomLib_DenominatorMultiplierPtr.hxx GeomLib_Interpolate.cxx GeomLib_Interpolate.hxx GeomLib_Interpolate.lxx diff --git a/src/ModelingData/TKGeomBase/GeomLib/GeomLib.cxx b/src/ModelingData/TKGeomBase/GeomLib/GeomLib.cxx index 656398ba2d..2bbf1c8a51 100644 --- a/src/ModelingData/TKGeomBase/GeomLib/GeomLib.cxx +++ b/src/ModelingData/TKGeomBase/GeomLib/GeomLib.cxx @@ -76,7 +76,6 @@ #include #include #include -#include #include #include #include @@ -2175,7 +2174,7 @@ class law_evaluator : public BSplSLib_EvaluatorFunction { public: - law_evaluator(const GeomLib_DenominatorMultiplierPtr theDenominatorPtr) + law_evaluator(GeomLib_DenominatorMultiplier* theDenominatorPtr) : myDenominator(theDenominatorPtr) { } @@ -2198,7 +2197,7 @@ public: } private: - GeomLib_DenominatorMultiplierPtr myDenominator; + GeomLib_DenominatorMultiplier* myDenominator; }; //================================================================================================= diff --git a/src/ModelingData/TKGeomBase/GeomLib/GeomLib_DenominatorMultiplierPtr.hxx b/src/ModelingData/TKGeomBase/GeomLib/GeomLib_DenominatorMultiplierPtr.hxx deleted file mode 100644 index 0fa303e943..0000000000 --- a/src/ModelingData/TKGeomBase/GeomLib/GeomLib_DenominatorMultiplierPtr.hxx +++ /dev/null @@ -1,23 +0,0 @@ -// Created on: 1993-07-07 -// Created by: Jean Claude VAUTHIER -// Copyright (c) 1993-1999 Matra Datavision -// 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 _GeomLib_DenominatorMultiplierPtr_HeaderFile -#define _GeomLib_DenominatorMultiplierPtr_HeaderFile - -class GeomLib_DenominatorMultiplier; -typedef GeomLib_DenominatorMultiplier* GeomLib_DenominatorMultiplierPtr; - -#endif // _GeomLib_DenominatorMultiplierPtr_HeaderFile diff --git a/src/ModelingData/TKGeomBase/IntAna/FILES.cmake b/src/ModelingData/TKGeomBase/IntAna/FILES.cmake index 2c6c8697af..5109c46b52 100644 --- a/src/ModelingData/TKGeomBase/IntAna/FILES.cmake +++ b/src/ModelingData/TKGeomBase/IntAna/FILES.cmake @@ -4,9 +4,6 @@ set(OCCT_IntAna_FILES_LOCATION "${CMAKE_CURRENT_LIST_DIR}") set(OCCT_IntAna_FILES IntAna_Curve.cxx IntAna_Curve.hxx - IntAna_Int3Pln.cxx - IntAna_Int3Pln.hxx - IntAna_Int3Pln.lxx IntAna_IntConicQuad.cxx IntAna_IntConicQuad.hxx IntAna_IntConicQuad.lxx diff --git a/src/ModelingData/TKGeomBase/IntAna/IntAna_Int3Pln.cxx b/src/ModelingData/TKGeomBase/IntAna/IntAna_Int3Pln.cxx deleted file mode 100644 index 2055775b37..0000000000 --- a/src/ModelingData/TKGeomBase/IntAna/IntAna_Int3Pln.cxx +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 1995-1999 Matra Datavision -// 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 OCCT_DEBUG - #define No_Standard_RangeError - #define No_Standard_OutOfRange -#endif - -#include -#include -#include -#include -#include -#include -#include - -IntAna_Int3Pln::IntAna_Int3Pln() - : done(false), - empt(true) -{ -} - -IntAna_Int3Pln::IntAna_Int3Pln(const gp_Pln& P1, const gp_Pln& P2, const gp_Pln& P3) -{ - - Perform(P1, P2, P3); -} - -void IntAna_Int3Pln::Perform(const gp_Pln& P1, const gp_Pln& P2, const gp_Pln& P3) -{ - - done = false; - math_Matrix M(1, 3, 1, 3); - math_Vector V(1, 3); - - P1.Coefficients(M(1, 1), M(1, 2), M(1, 3), V(1)); - P2.Coefficients(M(2, 1), M(2, 2), M(2, 3), V(2)); - P3.Coefficients(M(3, 1), M(3, 2), M(3, 3), V(3)); - - math_Gauss Resol(M, gp::Resolution()); - - if (!Resol.IsDone()) - { - empt = true; - } - else - { - empt = false; - V = -V; - Resol.Solve(V); - pnt.SetCoord(V(1), V(2), V(3)); - } - done = true; -} diff --git a/src/ModelingData/TKGeomBase/IntAna/IntAna_Int3Pln.hxx b/src/ModelingData/TKGeomBase/IntAna/IntAna_Int3Pln.hxx deleted file mode 100644 index 8eea6adb79..0000000000 --- a/src/ModelingData/TKGeomBase/IntAna/IntAna_Int3Pln.hxx +++ /dev/null @@ -1,63 +0,0 @@ -// Created on: 1991-05-16 -// Created by: Isabelle GRIGNON -// Copyright (c) 1991-1999 Matra Datavision -// 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 _IntAna_Int3Pln_HeaderFile -#define _IntAna_Int3Pln_HeaderFile - -#include -#include - -#include -class gp_Pln; - -//! Intersection between 3 planes. The algorithm searches -//! for an intersection point. If two of the planes are -//! parallel or identical, IsEmpty returns TRUE. -class IntAna_Int3Pln -{ -public: - DEFINE_STANDARD_ALLOC - - Standard_EXPORT IntAna_Int3Pln(); - - //! Determination of the intersection point between - //! 3 planes. - Standard_EXPORT IntAna_Int3Pln(const gp_Pln& P1, const gp_Pln& P2, const gp_Pln& P3); - - //! Determination of the intersection point between - //! 3 planes. - Standard_EXPORT void Perform(const gp_Pln& P1, const gp_Pln& P2, const gp_Pln& P3); - - //! Returns True if the computation was successful. - bool IsDone() const; - - //! Returns TRUE if there is no intersection POINT. - //! If 2 planes are identical or parallel, IsEmpty - //! will return TRUE. - bool IsEmpty() const; - - //! Returns the intersection point. - const gp_Pnt& Value() const; - -private: - bool done; - bool empt; - gp_Pnt pnt; -}; - -#include - -#endif // _IntAna_Int3Pln_HeaderFile diff --git a/src/ModelingData/TKGeomBase/IntAna/IntAna_Int3Pln.lxx b/src/ModelingData/TKGeomBase/IntAna/IntAna_Int3Pln.lxx deleted file mode 100644 index 6423e37975..0000000000 --- a/src/ModelingData/TKGeomBase/IntAna/IntAna_Int3Pln.lxx +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) 1995-1999 Matra Datavision -// 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. - -#include -#include - -inline bool IntAna_Int3Pln::IsDone() const -{ - - return done; -} - -inline bool IntAna_Int3Pln::IsEmpty() const -{ - - if (!done) - { - throw StdFail_NotDone(); - } - return empt; -} - -inline const gp_Pnt& IntAna_Int3Pln::Value() const -{ - - if (!done) - { - throw StdFail_NotDone(); - } - if (empt) - { - throw Standard_DomainError(); - } - return pnt; -} diff --git a/src/ModelingData/TKGeomBase/LProp/FILES.cmake b/src/ModelingData/TKGeomBase/LProp/FILES.cmake index 0a8e97d7d8..2dfa251808 100644 --- a/src/ModelingData/TKGeomBase/LProp/FILES.cmake +++ b/src/ModelingData/TKGeomBase/LProp/FILES.cmake @@ -9,6 +9,5 @@ set(OCCT_LProp_FILES LProp_CurAndInf.hxx LProp_CurveUtils.hxx LProp_NotDefined.hxx - LProp_SLProps3d.hxx LProp_Status.hxx ) diff --git a/src/ModelingData/TKGeomBase/LProp/LProp_SLProps3d.hxx b/src/ModelingData/TKGeomBase/LProp/LProp_SLProps3d.hxx deleted file mode 100644 index 209c292ebf..0000000000 --- a/src/ModelingData/TKGeomBase/LProp/LProp_SLProps3d.hxx +++ /dev/null @@ -1,25 +0,0 @@ -// Created on: 2002-08-02 -// Created by: Alexander KARTOMIN (akm) -// Copyright (c) 2002-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 _LProp_SLProps3d_HeaderFile -#define _LProp_SLProps3d_HeaderFile - -#include -#include - -//! Alias for surface local properties using Adaptor3d_Surface interface. -using LProp_SLProps3d = GeomLProp_SLPropsBase>; - -#endif // _LProp_SLProps3d_HeaderFile diff --git a/src/ModelingData/TKGeomBase/ProjLib/FILES.cmake b/src/ModelingData/TKGeomBase/ProjLib/FILES.cmake index fb47092584..cf554e31e4 100644 --- a/src/ModelingData/TKGeomBase/ProjLib/FILES.cmake +++ b/src/ModelingData/TKGeomBase/ProjLib/FILES.cmake @@ -15,7 +15,6 @@ set(OCCT_ProjLib_FILES ProjLib_Cylinder.cxx ProjLib_Cylinder.hxx ProjLib_HCompProjectedCurve.hxx - ProjLib_HProjectedCurve.hxx ProjLib_Plane.cxx ProjLib_Plane.hxx @@ -27,8 +26,6 @@ set(OCCT_ProjLib_FILES ProjLib_ProjectedCurve.hxx ProjLib_ProjectOnPlane.cxx ProjLib_ProjectOnPlane.hxx - ProjLib_ProjectOnSurface.cxx - ProjLib_ProjectOnSurface.hxx ProjLib_Projector.cxx ProjLib_Projector.hxx diff --git a/src/ModelingData/TKGeomBase/ProjLib/ProjLib_HProjectedCurve.hxx b/src/ModelingData/TKGeomBase/ProjLib/ProjLib_HProjectedCurve.hxx deleted file mode 100644 index 6927c125a2..0000000000 --- a/src/ModelingData/TKGeomBase/ProjLib/ProjLib_HProjectedCurve.hxx +++ /dev/null @@ -1,25 +0,0 @@ -// Created on: 1993-08-11 -// Created by: Bruno DUMORTIER -// Copyright (c) 1993-1999 Matra Datavision -// 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 _ProjLib_HProjectedCurve_HeaderFile -#define _ProjLib_HProjectedCurve_HeaderFile - -#include - -// alias for porting old code -typedef ProjLib_ProjectedCurve ProjLib_HProjectedCurve; - -#endif // _ProjLib_HProjectedCurve_HeaderFile diff --git a/src/ModelingData/TKGeomBase/ProjLib/ProjLib_ProjectOnSurface.cxx b/src/ModelingData/TKGeomBase/ProjLib/ProjLib_ProjectOnSurface.cxx deleted file mode 100644 index 3e1b7be2ab..0000000000 --- a/src/ModelingData/TKGeomBase/ProjLib/ProjLib_ProjectOnSurface.cxx +++ /dev/null @@ -1,259 +0,0 @@ -// Created on: 1994-09-15 -// Created by: Bruno DUMORTIER -// Copyright (c) 1994-1999 Matra Datavision -// 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. - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//================================================================================================= -static gp_Pnt OnSurface_Value(const double U, - const occ::handle& myCurve, - Extrema_ExtPS* myExtPS) -{ - // Try to find the closest solution point. - myExtPS->Perform(myCurve->Value(U)); - - double Dist2Min = RealLast(); - int Index = 0; - - for (int i = 1; i <= myExtPS->NbExt(); i++) - { - if (myExtPS->SquareDistance(i) < Dist2Min) - { - Index = i; - Dist2Min = myExtPS->SquareDistance(Index); - } - } - if (Index == 0) - { - std::cout << " Extrema non trouve pour U = " << U << '\n'; - return gp_Pnt(0., 0., 0.); - } - else - { - return (myExtPS->Point(Index)).Value(); - } -} - -//================================================================================================= - -static bool OnSurface_D1(const double, // U, - gp_Pnt&, // P, - gp_Vec&, // V, - const occ::handle&, // myCurve, - Extrema_ExtPS*) // myExtPS) -{ - return false; -} - -//================================================================================================= - -class ProjLib_OnSurface : public AppCont_Function - -{ -public: - ProjLib_OnSurface(const occ::handle& C, const occ::handle& S) - : myCurve(C) - { - myNbPnt = 1; - myNbPnt2d = 0; - double U = myCurve->FirstParameter(); - gp_Pnt P = myCurve->Value(U); - constexpr double Tol = Precision::PConfusion(); - myExtPS = new Extrema_ExtPS(P, *S, Tol, Tol); - } - - ~ProjLib_OnSurface() override { delete myExtPS; } - - double FirstParameter() const override { return myCurve->FirstParameter(); } - - double LastParameter() const override { return myCurve->LastParameter(); } - - bool Value(const double theT, - NCollection_Array1& /*thePnt2d*/, - NCollection_Array1& thePnt) const override - { - thePnt(1) = OnSurface_Value(theT, myCurve, myExtPS); - return true; - } - - bool D1(const double theT, - NCollection_Array1& /*theVec2d*/, - NCollection_Array1& theVec) const override - { - gp_Pnt aPnt; - return OnSurface_D1(theT, aPnt, theVec(1), myCurve, myExtPS); - } - -private: - ProjLib_OnSurface(const ProjLib_OnSurface&) = delete; - ProjLib_OnSurface& operator=(const ProjLib_OnSurface&) = delete; - -private: - occ::handle myCurve; - Extrema_ExtPS* myExtPS; -}; - -//=====================================================================// -// // -// D E S C R I P T I O N O F T H E C L A S S : // -// // -// P r o j L i b _ A p p r o x P r o j e c t O n P l a n e // -// // -//=====================================================================// - -//================================================================================================= - -ProjLib_ProjectOnSurface::ProjLib_ProjectOnSurface() - : myTolerance(0.0), - myIsDone(false) -{ -} - -//================================================================================================= - -ProjLib_ProjectOnSurface::ProjLib_ProjectOnSurface(const occ::handle& S) - : myTolerance(0.0), - myIsDone(false) -{ - mySurface = S; -} - -//================================================================================================= - -void ProjLib_ProjectOnSurface::Load(const occ::handle& S) -{ - mySurface = S; - myIsDone = false; -} - -//================================================================================================= - -void ProjLib_ProjectOnSurface::Load(const occ::handle& C, const double Tolerance) -{ - myTolerance = Tolerance; - myCurve = C; - myIsDone = false; - if (!mySurface.IsNull()) - { - - ProjLib_OnSurface F(myCurve, mySurface); - - int Deg1, Deg2; - Deg1 = 8; - Deg2 = 8; - - Approx_FitAndDivide Fit(F, - Deg1, - Deg2, - Precision::Approximation(), - Precision::PApproximation(), - true); - int i; - int NbCurves = Fit.NbMultiCurves(); - int MaxDeg = 0; - - // To convert the MultiCurve to BSpline, all constituent Bezier curves - // must have the same degree -> Calculate MaxDeg - int NbPoles = 1; - for (i = 1; i <= NbCurves; i++) - { - int Deg = Fit.Value(i).Degree(); - MaxDeg = std::max(MaxDeg, Deg); - } - NbPoles = MaxDeg * NbCurves + 1; // Poles on the BSpline - NCollection_Array1 Poles(1, NbPoles); - - NCollection_Array1 TempPoles(1, MaxDeg + 1); // for degree elevation - - NCollection_Array1 Knots(1, NbCurves + 1); // Knots of the BSpline - - int Compt = 1; - for (i = 1; i <= Fit.NbMultiCurves(); i++) - { - Fit.Parameters(i, Knots(i), Knots(i + 1)); - - AppParCurves_MultiCurve MC = Fit.Value(i); // Load the i-th Curve - NCollection_Array1 LocalPoles(1, MC.Degree() + 1); // Get the poles - MC.Curve(1, Poles); - - // Possible degree elevation - int Inc = MaxDeg - MC.Degree(); - if (Inc > 0) - { - BSplCLib::IncreaseDegree(Inc, - LocalPoles, - BSplCLib::NoWeights(), - TempPoles, - BSplCLib::NoWeights()); - // update the poles of the PCurve - for (int j = 1; j <= MaxDeg + 1; j++) - { - Poles.SetValue(Compt, TempPoles(j)); - Compt++; - } - } - else - { - // update the poles of the PCurve - for (int j = 1; j <= MaxDeg + 1; j++) - { - Poles.SetValue(Compt, LocalPoles(j)); - Compt++; - } - } - - Compt--; - } - - // update the fields of ProjLib_Approx - - int NbKnots = NbCurves + 1; - - NCollection_Array1 Mults(1, NbKnots); - Mults.SetValue(1, MaxDeg + 1); - for (i = 2; i <= NbCurves; i++) - { - Mults.SetValue(i, MaxDeg); - } - Mults.SetValue(NbKnots, MaxDeg + 1); - myResult = new Geom_BSplineCurve(Poles, Knots, Mults, MaxDeg, false); - myIsDone = true; - } -} - -//================================================================================================= - -ProjLib_ProjectOnSurface::~ProjLib_ProjectOnSurface() = default; - -//================================================================================================= - -occ::handle ProjLib_ProjectOnSurface::BSpline() const -{ - Standard_NoSuchObject_Raise_if(!myIsDone, "ProjLib_ProjectOnSurface:BSpline"); - return myResult; -} diff --git a/src/ModelingData/TKGeomBase/ProjLib/ProjLib_ProjectOnSurface.hxx b/src/ModelingData/TKGeomBase/ProjLib/ProjLib_ProjectOnSurface.hxx deleted file mode 100644 index a5a5006e0c..0000000000 --- a/src/ModelingData/TKGeomBase/ProjLib/ProjLib_ProjectOnSurface.hxx +++ /dev/null @@ -1,58 +0,0 @@ -// Created on: 1994-09-15 -// Created by: Bruno DUMORTIER -// Copyright (c) 1994-1999 Matra Datavision -// 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 _ProjLib_ProjectOnSurface_HeaderFile -#define _ProjLib_ProjectOnSurface_HeaderFile - -#include - -class Geom_BSplineCurve; - -//! Project a curve on a surface. The result -//! (a 3D Curve) will be an approximation -class ProjLib_ProjectOnSurface -{ -public: - DEFINE_STANDARD_ALLOC - - //! Create an empty projector. - Standard_EXPORT ProjLib_ProjectOnSurface(); - - //! Create a projector normally to the surface . - Standard_EXPORT ProjLib_ProjectOnSurface(const occ::handle& S); - - Standard_EXPORT virtual ~ProjLib_ProjectOnSurface(); - - //! Set the Surface to . - //! To compute the projection, you have to Load the Curve. - Standard_EXPORT void Load(const occ::handle& S); - - //! Compute the projection of the curve on the Surface. - Standard_EXPORT void Load(const occ::handle& C, const double Tolerance); - - bool IsDone() const { return myIsDone; } - - Standard_EXPORT occ::handle BSpline() const; - -private: - occ::handle myCurve; - occ::handle mySurface; - double myTolerance; - bool myIsDone; - occ::handle myResult; -}; - -#endif // _ProjLib_ProjectOnSurface_HeaderFile