IntTools_CArray1OfReal has been replaced by TColStd_Array1OfReal.
IntTools_CArray1OfInteger has been removed (unused).
IntTools_Array1OfRoots.hxx
IntTools_BaseRangeSample.cxx
IntTools_BaseRangeSample.hxx
-IntTools_BaseRangeSample.lxx
IntTools_BeanFaceIntersector.cxx
IntTools_BeanFaceIntersector.hxx
-IntTools_CArray1.gxx
-IntTools_CArray1.lxx
-IntTools_CArray1OfInteger.hxx
-IntTools_CArray1OfInteger_0.cxx
IntTools_CArray1OfReal.hxx
-IntTools_CArray1OfReal_0.cxx
IntTools_CommonPrt.cxx
IntTools_CommonPrt.hxx
IntTools_Context.cxx
IntTools_Curve.hxx
IntTools_CurveRangeLocalizeData.cxx
IntTools_CurveRangeLocalizeData.hxx
-IntTools_CurveRangeLocalizeData.lxx
IntTools_CurveRangeSample.cxx
IntTools_CurveRangeSample.hxx
-IntTools_CurveRangeSample.lxx
IntTools_CurveRangeSampleMapHasher.hxx
-IntTools_CurveRangeSampleMapHasher.lxx
IntTools_DataMapIteratorOfDataMapOfCurveSampleBox.hxx
IntTools_DataMapIteratorOfDataMapOfSurfaceSampleBox.hxx
IntTools_DataMapOfCurveSampleBox.hxx
IntTools_MapOfSurfaceSample.hxx
IntTools_MarkedRangeSet.cxx
IntTools_MarkedRangeSet.hxx
-IntTools_MarkedRangeSet.lxx
IntTools_PntOn2Faces.cxx
IntTools_PntOn2Faces.hxx
IntTools_PntOnFace.cxx
IntTools_SurfaceRangeSample.hxx
IntTools_SurfaceRangeSample.lxx
IntTools_SurfaceRangeSampleMapHasher.hxx
-IntTools_SurfaceRangeSampleMapHasher.lxx
IntTools_Tools.cxx
IntTools_Tools.hxx
IntTools_TopolTool.cxx
IntTools_TopolTool.hxx
IntTools_WLineTool.hxx
-IntTools_WLineTool.cxx
\ No newline at end of file
+IntTools_WLineTool.cxx
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
+#include <IntTools.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
#include <gp_Circ.hxx>
#include <gp_Pnt.hxx>
#include <GProp_GProps.hxx>
-#include <IntTools.hxx>
#include <IntTools_Array1OfRoots.hxx>
-#include <IntTools_CArray1OfReal.hxx>
#include <IntTools_Root.hxx>
#include <TColStd_ListIteratorOfListOfReal.hxx>
#include <TColStd_ListOfReal.hxx>
#include <TopoDS_Edge.hxx>
#include <algorithm>
+
//=======================================================================
//function : IntTools::GetRadius
//purpose :
//function : PrepareArgs
//purpose :
//=======================================================================
- Standard_Integer IntTools::PrepareArgs(BRepAdaptor_Curve& C,
- const Standard_Real Tmax,
- const Standard_Real Tmin,
- const Standard_Integer Discret,
- const Standard_Real Deflection,
- IntTools_CArray1OfReal& anArgs)
+Standard_Integer IntTools::PrepareArgs (BRepAdaptor_Curve& C,
+ const Standard_Real Tmax,
+ const Standard_Real Tmin,
+ const Standard_Integer Discret,
+ const Standard_Real Deflection,
+ TColStd_Array1OfReal& anArgs)
{
TColStd_ListOfReal aPars;
Standard_Real dt, tCurrent, tNext, aR, anAbsDeflection;
- Standard_Integer ip, i, j, aNbDeflectionPoints, aDiscretBis;
+ Standard_Integer ip, i, j, aNbDeflectionPoints;
Standard_Boolean aRFlag;
GeomAbs_CurveType aCurveType;
}
aPars.Append(Tmax);
- aDiscretBis=aPars.Extent();
- anArgs.Resize(aDiscretBis);
+ const Standard_Integer aDiscretBis = aPars.Extent();
+ anArgs.Resize (0, aDiscretBis - 1, false);
TColStd_ListIteratorOfListOfReal anIt(aPars);
- for (i=0; anIt.More(); anIt.Next(), i++) {
- anArgs(i)=anIt.Value();
+ for (i = 0; anIt.More(); anIt.Next(), i++)
+ {
+ anArgs.SetValue (i, anIt.Value());
}
return 0;
}
#ifndef _IntTools_HeaderFile
#define _IntTools_HeaderFile
-#include <Standard.hxx>
-#include <Standard_DefineAlloc.hxx>
-#include <Standard_Handle.hxx>
-
-#include <Standard_Real.hxx>
+#include <IntTools_CArray1OfReal.hxx>
#include <IntTools_SequenceOfRoots.hxx>
-#include <Standard_Integer.hxx>
+
class TopoDS_Edge;
class gp_Pnt;
class Geom_Curve;
class BRepAdaptor_Curve;
-class IntTools_CArray1OfReal;
-class IntTools_Context;
-class IntTools_ShrunkRange;
-class IntTools_Range;
-class IntTools_CommonPrt;
-class IntTools_Root;
-class IntTools_EdgeEdge;
-class IntTools_EdgeFace;
-class IntTools_FClass2d;
-class IntTools_MarkedRangeSet;
-class IntTools_BaseRangeSample;
-class IntTools_CurveRangeSample;
-class IntTools_SurfaceRangeSample;
-class IntTools_CurveRangeLocalizeData;
-class IntTools_SurfaceRangeLocalizeData;
-class IntTools_BeanFaceIntersector;
-class IntTools_Curve;
-class IntTools_PntOnFace;
-class IntTools_PntOn2Faces;
-class IntTools_TopolTool;
-class IntTools_FaceFace;
-class IntTools_Tools;
-class IntTools_CArray1;
-class IntTools_CArray1OfInteger;
-class IntTools_CArray1OfReal;
-class IntTools_CurveRangeSampleMapHasher;
-class IntTools_SurfaceRangeSampleMapHasher;
-
-//! Contains classes for intersection and classification
-//! purposes and accompanying classes
+//! Contains classes for intersection and classification purposes and accompanying classes.
class IntTools
{
public:
DEFINE_STANDARD_ALLOC
-
//! returns the length of the edge;
Standard_EXPORT static Standard_Real Length (const TopoDS_Edge& E);
-
+
//! Remove from the sequence aSeq the Roots that have
//! values ti and tj such as |ti-tj] < anEpsT.
Standard_EXPORT static void RemoveIdenticalRoots (IntTools_SequenceOfRoots& aSeq, const Standard_Real anEpsT);
-
- //! Sort the sequence aSeq of the Roots to arrange the
- //! Roons in increasing order
- Standard_EXPORT static void SortRoots (IntTools_SequenceOfRoots& aSeq, const Standard_Real anEpsT);
-
- //! Find the states (before and after) for each Root
- //! from the sequence aSeq
- Standard_EXPORT static void FindRootStates (IntTools_SequenceOfRoots& aSeq, const Standard_Real anEpsNull);
-
- Standard_EXPORT static Standard_Integer Parameter (const gp_Pnt& P, const Handle(Geom_Curve)& Curve, Standard_Real& aParm);
-
- Standard_EXPORT static Standard_Integer GetRadius (const BRepAdaptor_Curve& C, const Standard_Real t1, const Standard_Real t3, Standard_Real& R);
-
- Standard_EXPORT static Standard_Integer PrepareArgs (BRepAdaptor_Curve& C, const Standard_Real tMax, const Standard_Real tMin, const Standard_Integer Discret, const Standard_Real Deflect, IntTools_CArray1OfReal& anArgs);
-
-
-
-
-protected:
-
+ //! Sort the sequence aSeq of the Roots to arrange the Roots in increasing order.
+ Standard_EXPORT static void SortRoots (IntTools_SequenceOfRoots& aSeq, const Standard_Real anEpsT);
+ //! Find the states (before and after) for each Root from the sequence aSeq
+ Standard_EXPORT static void FindRootStates (IntTools_SequenceOfRoots& aSeq, const Standard_Real anEpsNull);
+ Standard_EXPORT static Standard_Integer Parameter (const gp_Pnt& P, const Handle(Geom_Curve)& Curve, Standard_Real& aParm);
-private:
-
-
-
+ Standard_EXPORT static Standard_Integer GetRadius (const BRepAdaptor_Curve& C, const Standard_Real t1, const Standard_Real t3, Standard_Real& R);
-friend class IntTools_Context;
-friend class IntTools_ShrunkRange;
-friend class IntTools_Range;
-friend class IntTools_CommonPrt;
-friend class IntTools_Root;
-friend class IntTools_EdgeEdge;
-friend class IntTools_EdgeFace;
-friend class IntTools_FClass2d;
-friend class IntTools_MarkedRangeSet;
-friend class IntTools_BaseRangeSample;
-friend class IntTools_CurveRangeSample;
-friend class IntTools_SurfaceRangeSample;
-friend class IntTools_CurveRangeLocalizeData;
-friend class IntTools_SurfaceRangeLocalizeData;
-friend class IntTools_BeanFaceIntersector;
-friend class IntTools_Curve;
-friend class IntTools_PntOnFace;
-friend class IntTools_PntOn2Faces;
-friend class IntTools_TopolTool;
-friend class IntTools_FaceFace;
-friend class IntTools_Tools;
-friend class IntTools_CArray1;
-friend class IntTools_CArray1OfInteger;
-friend class IntTools_CArray1OfReal;
-friend class IntTools_CurveRangeSampleMapHasher;
-friend class IntTools_SurfaceRangeSampleMapHasher;
+ Standard_EXPORT static Standard_Integer PrepareArgs (BRepAdaptor_Curve& C,
+ const Standard_Real tMax, const Standard_Real tMin,
+ const Standard_Integer Discret, const Standard_Real Deflect,
+ TColStd_Array1OfReal& anArgs);
};
-
-
-
-
-
-
#endif // _IntTools_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
-
#include <Standard_Integer.hxx>
-
//! base class for range index management
class IntTools_BaseRangeSample
{
DEFINE_STANDARD_ALLOC
-
Standard_EXPORT IntTools_BaseRangeSample();
-
- Standard_EXPORT IntTools_BaseRangeSample(const Standard_Integer theDepth);
-
- void SetDepth (const Standard_Integer theDepth);
-
- Standard_Integer GetDepth() const;
-
-
-
-
-protected:
-
+ Standard_EXPORT IntTools_BaseRangeSample(const Standard_Integer theDepth);
+ void SetDepth (const Standard_Integer theDepth) { myDepth = theDepth; }
+ Standard_Integer GetDepth() const { return myDepth; }
private:
-
-
Standard_Integer myDepth;
-
};
-
-#include <IntTools_BaseRangeSample.lxx>
-
-
-
-
-
#endif // _IntTools_BaseRangeSample_HeaderFile
+++ /dev/null
-// Created on: 2005-10-05
-// Created by: Mikhail KLOKOV
-// Copyright (c) 2005-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.
-
-inline void IntTools_BaseRangeSample::SetDepth(const Standard_Integer theDepth)
-{
- myDepth = theDepth;
-}
-
-
-inline Standard_Integer IntTools_BaseRangeSample::GetDepth() const
-{
- return myDepth;
-}
+++ /dev/null
-// Created on: 2000-05-26
-// Created by: Peter KURNEV
-// Copyright (c) 2000-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.
-
-//=======================================================================
-//function : IntTools_CArray1
-//purpose :
-//=======================================================================
-IntTools_CArray1::IntTools_CArray1 (const Standard_Integer Length):
- myStart(NULL),
- myLength(0),
- myIsAllocated(Standard_False)
-{
- Resize(Length);
-}
-
-//=======================================================================
-//function : IntTools_CArray1
-//purpose :
-//=======================================================================
- IntTools_CArray1::IntTools_CArray1 (const Array1Item& Item,
- const Standard_Integer Length):
- myLength(Length),
- myIsAllocated(Standard_False)
-{
- Standard_ConstructionError_Raise_if(Length < 0,"IntTools_CArray1:: Length < 0");
- myStart = (void*)(&Item);
-}
-
-//=======================================================================
-//function : Init
-//purpose :
-//=======================================================================
- void IntTools_CArray1::Init (const Array1Item& V)
-{
- Array1Item* p = (Array1Item*) myStart;
- for(Standard_Integer i = 0; i < Length() ; i++) {
- *p++ = V;
- }
-}
-
-//=======================================================================
-//function : Destroy
-//purpose :
-//=======================================================================
- void IntTools_CArray1::Destroy()
-{
- if (myIsAllocated) {
- delete [] (Array1Item *)myStart;
- myIsAllocated = Standard_False;
- }
- myStart = NULL;
-}
-
-//=======================================================================
-//function : IsEqual
-//purpose :
-//=======================================================================
- Standard_Boolean IntTools_CArray1::IsEqual(const IntTools_CArray1& Other) const
-{
- if (&Other == this)
- return Standard_True;
- else if (Length() != Other.Length())
- return Standard_False;
- else if (Length() == 0)
- return Standard_True;
- //
- return Standard_False;
-}
-
-
-//=======================================================================
-//function : Resize
-//purpose :
-//=======================================================================
- void IntTools_CArray1::Resize(const Standard_Integer theNewLength)
-{
- Standard_ConstructionError_Raise_if(theNewLength < 0,"IntTools_CArray1: length < 0");
-
- Array1Item* p = NULL;
-
- Destroy();
-
- myLength = theNewLength;
-
- if (theNewLength > 0) {
- // default creator called for each item of the array
- p = new Array1Item[theNewLength];
- if (!p) throw Standard_OutOfMemory("IntTools_CArray1 : Allocation failed.");
- myIsAllocated = Standard_True;
- }
-
- myStart = (void*) p;
-}
-
-//=======================================================================
-//function : Append
-//purpose :
-//=======================================================================
- void IntTools_CArray1::Append (const Array1Item& Value)
-{
- const Standard_Integer theNewLength=myLength+1;
-
- Array1Item* p = NULL;
-
- if (theNewLength > 0) {
- // default creator called for each item of the array
- p = new Array1Item[theNewLength];
- if (!p) throw Standard_OutOfMemory("IntTools_CArray1 : Allocation failed.");
-
- if (myLength!=0) {
- Standard_Integer aBytesPerItem=sizeof(Array1Item);
- memcpy (p, myStart, myLength*aBytesPerItem);
- }
-
- *(p+myLength)=Value;
- Destroy();
- myLength = theNewLength;
- myIsAllocated = Standard_True;
- }
-
- myStart = (void*) p;
-}
-//=======================================================================
-//function : Value
-//purpose :
-//=======================================================================
- const Array1Item& IntTools_CArray1::Value(const Standard_Integer Index) const
-{
- if (myLength <1 || Index < 0 || Index >= myLength)
- throw Standard_OutOfRange("IntTools_CArray1::Value");
-
- return ((Array1Item *)myStart)[Index];
-}
-
-//=======================================================================
-//function : SetValue
-//purpose :
-//=======================================================================
- void IntTools_CArray1::SetValue (const Standard_Integer Index,
- const Array1Item& Value)
-{
- ChangeValue(Index) = Value;
-}
-
-
-//=======================================================================
-//function : ChangeValue
-//purpose :
-//=======================================================================
- Array1Item& IntTools_CArray1::ChangeValue(const Standard_Integer Index)
-{
- if (myLength < 1 || Index < 0 || Index >= myLength)
- throw Standard_OutOfRange("IntTools_CArray1::ChangeValue");
-
- return ((Array1Item *)myStart)[Index];
-}
-
+++ /dev/null
-// Created on: 2000-05-26
-// Created by: Peter KURNEV
-// Copyright (c) 2000-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 <Standard_OutOfRange.hxx>
-
-//=======================================================================
-//function : Length
-//purpose :
-//=======================================================================
-inline Standard_Integer IntTools_CArray1::Length() const
-{
- return myLength;
-}
-
+++ /dev/null
-// Created on: 2000-05-18
-// Created by: Peter KURNEV
-// Copyright (c) 2000-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 _IntTools_CArray1OfInteger_HeaderFile
-#define _IntTools_CArray1OfInteger_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_DefineAlloc.hxx>
-#include <Standard_Handle.hxx>
-
-#include <Standard_Address.hxx>
-#include <Standard_Integer.hxx>
-#include <Standard_Boolean.hxx>
-class Standard_ConstructionError;
-class Standard_OutOfRange;
-class Standard_OutOfMemory;
-
-
-
-class IntTools_CArray1OfInteger
-{
-public:
-
- DEFINE_STANDARD_ALLOC
-
-
-
- //! Creates an array of given Length.
- Standard_EXPORT IntTools_CArray1OfInteger(const Standard_Integer Length = 0);
-
-
- //! Creates an array sharing datas with an other.
- //! Example:
- //! Item tab[100];
- //! CArray1OfItem thetab (tab[0],100);
- //!
- //! CArray1OfItem aArray1(100);
- //! CArray1OfItem anSharedArray1(aArray1.ChangeValue(0),aArray1.Length());
- //!
- //! Warning:
- //! The validity of length are under the responsibility
- //! of the user.
- //! The sahred array must have a valid address during the life of
- //! the Array1.
- Standard_EXPORT IntTools_CArray1OfInteger(const Standard_Integer& Item, const Standard_Integer Length);
-
-
- //! Initializes the array with a given value.
- Standard_EXPORT void Init (const Standard_Integer& V);
-
-
- //! destroy current content and realloc the new size
- //! does nothing if Length() == theLength
- Standard_EXPORT void Resize (const Standard_Integer theNewLength);
-
-
- //! Frees the allocated area corresponding to the
- //! array.
- Standard_EXPORT void Destroy();
-~IntTools_CArray1OfInteger()
-{
- Destroy();
-}
-
-
- //! Returns the number of elements of <me>.
- Standard_Integer Length() const;
-
- Standard_EXPORT void Append (const Standard_Integer& Value);
-
-
- //! Sets the <Index>th element of the array to
- //! <Value>.
- Standard_EXPORT void SetValue (const Standard_Integer Index, const Standard_Integer& Value);
-
-
- //! Returns the value of the <Index>th element of the
- //! array.
- Standard_EXPORT const Standard_Integer& Value (const Standard_Integer Index) const;
-const Standard_Integer& operator () (const Standard_Integer Index) const
-{
- return Value(Index);
-}
-
-
- //! Returns the value of the <Index>th element of the
- //! array.
- Standard_EXPORT Standard_Integer& ChangeValue (const Standard_Integer Index);
-Standard_Integer& operator () (const Standard_Integer Index)
-{
- return ChangeValue(Index);
-}
-
-
- //! Applyies the == operator on each array item
- Standard_EXPORT Standard_Boolean IsEqual (const IntTools_CArray1OfInteger& Other) const;
-Standard_Boolean operator == (const IntTools_CArray1OfInteger& Other) const
-{
- return IsEqual(Other);
-}
-
-
-
-
-protected:
-
-
-
-
-
-private:
-
-
-
- //! Prohibits the creator by copy
- Standard_EXPORT IntTools_CArray1OfInteger(const IntTools_CArray1OfInteger& AnArray);
-
-
- Standard_Address myStart;
- Standard_Integer myLength;
- Standard_Boolean myIsAllocated;
-
-
-};
-
-#define Array1Item Standard_Integer
-#define Array1Item_hxx <Standard_Integer.hxx>
-#define IntTools_CArray1 IntTools_CArray1OfInteger
-#define IntTools_CArray1_hxx <IntTools_CArray1OfInteger.hxx>
-
-#include <IntTools_CArray1.lxx>
-
-#undef Array1Item
-#undef Array1Item_hxx
-#undef IntTools_CArray1
-#undef IntTools_CArray1_hxx
-
-
-
-
-#endif // _IntTools_CArray1OfInteger_HeaderFile
+++ /dev/null
-// Created on: 2000-05-18
-// Created by: Peter KURNEV
-// Copyright (c) 2000-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 <IntTools_CArray1OfInteger.hxx>
-
-#include <Standard_ConstructionError.hxx>
-#include <Standard_OutOfRange.hxx>
-#include <Standard_OutOfMemory.hxx>
-
-
-#define Array1Item Standard_Integer
-#define Array1Item_hxx <Standard_Integer.hxx>
-#define IntTools_CArray1 IntTools_CArray1OfInteger
-#define IntTools_CArray1_hxx <IntTools_CArray1OfInteger.hxx>
-#include <IntTools_CArray1.gxx>
-
#ifndef _IntTools_CArray1OfReal_HeaderFile
#define _IntTools_CArray1OfReal_HeaderFile
-#include <Standard.hxx>
-#include <Standard_DefineAlloc.hxx>
-#include <Standard_Handle.hxx>
-
-#include <Standard_Address.hxx>
-#include <Standard_Integer.hxx>
-#include <Standard_Boolean.hxx>
-#include <Standard_Real.hxx>
-class Standard_ConstructionError;
-class Standard_OutOfRange;
-class Standard_OutOfMemory;
-
-
-
-class IntTools_CArray1OfReal
-{
-public:
-
- DEFINE_STANDARD_ALLOC
-
-
-
- //! Creates an array of given Length.
- Standard_EXPORT IntTools_CArray1OfReal(const Standard_Integer Length = 0);
-
-
- //! Creates an array sharing datas with an other.
- //! Example:
- //! Item tab[100];
- //! CArray1OfItem thetab (tab[0],100);
- //!
- //! CArray1OfItem aArray1(100);
- //! CArray1OfItem anSharedArray1(aArray1.ChangeValue(0),aArray1.Length());
- //!
- //! Warning:
- //! The validity of length are under the responsibility
- //! of the user.
- //! The sahred array must have a valid address during the life of
- //! the Array1.
- Standard_EXPORT IntTools_CArray1OfReal(const Standard_Real& Item, const Standard_Integer Length);
-
-
- //! Initializes the array with a given value.
- Standard_EXPORT void Init (const Standard_Real& V);
-
-
- //! destroy current content and realloc the new size
- //! does nothing if Length() == theLength
- Standard_EXPORT void Resize (const Standard_Integer theNewLength);
-
-
- //! Frees the allocated area corresponding to the
- //! array.
- Standard_EXPORT void Destroy();
-~IntTools_CArray1OfReal()
-{
- Destroy();
-}
-
-
- //! Returns the number of elements of <me>.
- Standard_Integer Length() const;
-
- Standard_EXPORT void Append (const Standard_Real& Value);
-
-
- //! Sets the <Index>th element of the array to
- //! <Value>.
- Standard_EXPORT void SetValue (const Standard_Integer Index, const Standard_Real& Value);
-
-
- //! Returns the value of the <Index>th element of the
- //! array.
- Standard_EXPORT const Standard_Real& Value (const Standard_Integer Index) const;
-const Standard_Real& operator () (const Standard_Integer Index) const
-{
- return Value(Index);
-}
-
-
- //! Returns the value of the <Index>th element of the
- //! array.
- Standard_EXPORT Standard_Real& ChangeValue (const Standard_Integer Index);
-Standard_Real& operator () (const Standard_Integer Index)
-{
- return ChangeValue(Index);
-}
-
-
- //! Applies the == operator on each array item
- Standard_EXPORT Standard_Boolean IsEqual (const IntTools_CArray1OfReal& Other) const;
-Standard_Boolean operator == (const IntTools_CArray1OfReal& Other) const
-{
- return IsEqual(Other);
-}
-
-
-
-
-protected:
-
-
-
-
-
-private:
-
-
-
- //! Prohibits the creator by copy
- Standard_EXPORT IntTools_CArray1OfReal(const IntTools_CArray1OfReal& AnArray);
-
-
- Standard_Address myStart;
- Standard_Integer myLength;
- Standard_Boolean myIsAllocated;
-
-
-};
-
-#define Array1Item Standard_Real
-#define Array1Item_hxx <Standard_Real.hxx>
-#define IntTools_CArray1 IntTools_CArray1OfReal
-#define IntTools_CArray1_hxx <IntTools_CArray1OfReal.hxx>
-
-#include <IntTools_CArray1.lxx>
-
-#undef Array1Item
-#undef Array1Item_hxx
-#undef IntTools_CArray1
-#undef IntTools_CArray1_hxx
-
-
+#include <TColStd_Array1OfReal.hxx>
+Standard_DEPRECATED("Deprecated alias - TColStd_Array1OfReal should be used instead")
+typedef TColStd_Array1OfReal IntTools_CArray1OfReal;
#endif // _IntTools_CArray1OfReal_HeaderFile
+++ /dev/null
-// Created on: 2000-05-18
-// Created by: Peter KURNEV
-// Copyright (c) 2000-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 <IntTools_CArray1OfReal.hxx>
-
-#include <Standard_ConstructionError.hxx>
-#include <Standard_OutOfRange.hxx>
-#include <Standard_OutOfMemory.hxx>
-
-
-#define Array1Item Standard_Real
-#define Array1Item_hxx <Standard_Real.hxx>
-#define IntTools_CArray1 IntTools_CArray1OfReal
-#define IntTools_CArray1_hxx <IntTools_CArray1OfReal.hxx>
-#include <IntTools_CArray1.gxx>
-
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
-
-#include <Standard_Integer.hxx>
#include <Standard_Real.hxx>
#include <IntTools_MapOfCurveSample.hxx>
#include <IntTools_DataMapOfCurveSampleBox.hxx>
-#include <Standard_Boolean.hxx>
#include <IntTools_ListOfCurveRangeSample.hxx>
+
class IntTools_CurveRangeSample;
class Bnd_Box;
-
-
class IntTools_CurveRangeLocalizeData
{
public:
Standard_EXPORT IntTools_CurveRangeLocalizeData(const Standard_Integer theNbSample, const Standard_Real theMinRange);
- Standard_Integer GetNbSample() const;
-
- Standard_Real GetMinRange() const;
-
- Standard_EXPORT void AddOutRange (const IntTools_CurveRangeSample& theRange);
-
- Standard_EXPORT void AddBox (const IntTools_CurveRangeSample& theRange, const Bnd_Box& theBox);
-
- Standard_EXPORT Standard_Boolean FindBox (const IntTools_CurveRangeSample& theRange, Bnd_Box& theBox) const;
-
- Standard_EXPORT Standard_Boolean IsRangeOut (const IntTools_CurveRangeSample& theRange) const;
-
- Standard_EXPORT void ListRangeOut (IntTools_ListOfCurveRangeSample& theList) const;
-
+ Standard_Integer GetNbSample() const { return myNbSampleC; }
+ Standard_Real GetMinRange() const { return myMinRangeC; }
+ Standard_EXPORT void AddOutRange (const IntTools_CurveRangeSample& theRange);
-protected:
-
+ Standard_EXPORT void AddBox (const IntTools_CurveRangeSample& theRange, const Bnd_Box& theBox);
+ Standard_EXPORT Standard_Boolean FindBox (const IntTools_CurveRangeSample& theRange, Bnd_Box& theBox) const;
+ Standard_EXPORT Standard_Boolean IsRangeOut (const IntTools_CurveRangeSample& theRange) const;
+ Standard_EXPORT void ListRangeOut (IntTools_ListOfCurveRangeSample& theList) const;
private:
-
-
Standard_Integer myNbSampleC;
Standard_Real myMinRangeC;
IntTools_MapOfCurveSample myMapRangeOut;
IntTools_DataMapOfCurveSampleBox myMapBox;
-
};
-
-#include <IntTools_CurveRangeLocalizeData.lxx>
-
-
-
-
-
#endif // _IntTools_CurveRangeLocalizeData_HeaderFile
+++ /dev/null
-// Created on: 2005-10-14
-// Created by: Mikhail KLOKOV
-// Copyright (c) 2005-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.
-
-inline Standard_Integer IntTools_CurveRangeLocalizeData::GetNbSample() const
-{
- return myNbSampleC;
-}
-
-
-inline Standard_Real IntTools_CurveRangeLocalizeData::GetMinRange() const
-{
- return myMinRangeC;
-}
-
-
#include <IntTools_BaseRangeSample.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
-class IntTools_Range;
+class IntTools_Range;
//! class for range index management of curve
class IntTools_CurveRangeSample : public IntTools_BaseRangeSample
Standard_EXPORT IntTools_CurveRangeSample(const Standard_Integer theIndex);
- void SetRangeIndex (const Standard_Integer theIndex);
-
- Standard_Integer GetRangeIndex() const;
-
- Standard_Boolean IsEqual (const IntTools_CurveRangeSample& Other) const;
-
- Standard_EXPORT IntTools_Range GetRange (const Standard_Real theFirst, const Standard_Real theLast, const Standard_Integer theNbSample) const;
-
- Standard_Integer GetRangeIndexDeeper (const Standard_Integer theNbSample) const;
-
-
-
-
-protected:
-
+ void SetRangeIndex (const Standard_Integer theIndex) { myIndex = theIndex; }
+ Standard_Integer GetRangeIndex() const { return myIndex; }
+ Standard_Boolean IsEqual (const IntTools_CurveRangeSample& Other) const
+ {
+ return ((myIndex == Other.myIndex) && (GetDepth() == Other.GetDepth()));
+ }
+ Standard_EXPORT IntTools_Range GetRange (const Standard_Real theFirst, const Standard_Real theLast, const Standard_Integer theNbSample) const;
+
+ Standard_Integer GetRangeIndexDeeper (const Standard_Integer theNbSample) const
+ {
+ return myIndex * theNbSample;
+ }
private:
-
-
Standard_Integer myIndex;
-
};
-
-#include <IntTools_CurveRangeSample.lxx>
-
-
-
-
-
#endif // _IntTools_CurveRangeSample_HeaderFile
+++ /dev/null
-// Created on: 2005-10-05
-// Created by: Mikhail KLOKOV
-// Copyright (c) 2005-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.
-
-inline void IntTools_CurveRangeSample::SetRangeIndex(const Standard_Integer theIndex)
-{
- myIndex = theIndex;
-}
-
-
-inline Standard_Integer IntTools_CurveRangeSample::GetRangeIndex() const
-{
- return myIndex;
-}
-
-inline Standard_Boolean IntTools_CurveRangeSample::IsEqual(const IntTools_CurveRangeSample& Other) const
-{
- return ((myIndex == Other.myIndex) && (GetDepth() == Other.GetDepth()));
-}
-
-
-inline Standard_Integer IntTools_CurveRangeSample::GetRangeIndexDeeper(const Standard_Integer theNbSample) const
-{
- return myIndex * theNbSample;
-}
#ifndef _IntTools_CurveRangeSampleMapHasher_HeaderFile
#define _IntTools_CurveRangeSampleMapHasher_HeaderFile
+#include <IntTools_CurveRangeSample.hxx>
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
-
#include <Standard_Integer.hxx>
-#include <Standard_Boolean.hxx>
-class IntTools_CurveRangeSample;
-
//! class for range index management of curve
class IntTools_CurveRangeSampleMapHasher
//! @param theKey the key which hash code is to be computed
//! @param theUpperBound the upper bound of the range a computing hash code must be within
//! @return a computed hash code, in the range [1, theUpperBound]
- static Standard_Integer HashCode (const IntTools_CurveRangeSample& theKey, const Standard_Integer theUpperBound);
+ static Standard_Integer HashCode (const IntTools_CurveRangeSample& theKey, const Standard_Integer theUpperBound)
+ {
+ return ::HashCode(theKey.GetDepth(), theUpperBound);
+ }
//! Returns True when the two keys are the same. Two
//! same keys must have the same hashcode, the
//! contrary is not necessary.
- static Standard_Boolean IsEqual (const IntTools_CurveRangeSample& S1, const IntTools_CurveRangeSample& S2);
-
-
-
-
-protected:
-
-
-
-
-
-private:
-
-
-
-
+ static Standard_Boolean IsEqual (const IntTools_CurveRangeSample& S1, const IntTools_CurveRangeSample& S2)
+ {
+ return S1.IsEqual(S2);
+ }
};
-
-#include <IntTools_CurveRangeSampleMapHasher.lxx>
-
-
-
-
-
#endif // _IntTools_CurveRangeSampleMapHasher_HeaderFile
+++ /dev/null
-// Created on: 2005-10-14
-// Created by: Mikhail KLOKOV
-// Copyright (c) 2005-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.
-
-//=======================================================================
-// function : HashCode
-// purpose :
-//=======================================================================
-inline Standard_Integer IntTools_CurveRangeSampleMapHasher::HashCode (const IntTools_CurveRangeSample& theKey,
- const Standard_Integer theUpperBound)
-{
- return ::HashCode(theKey.GetDepth(), theUpperBound);
-}
-
-inline Standard_Boolean IntTools_CurveRangeSampleMapHasher::IsEqual(const IntTools_CurveRangeSample& S1,
- const IntTools_CurveRangeSample& S2) {
- return S1.IsEqual(S2);
-}
#include <IntCurveSurface_IntersectionPoint.hxx>
#include <IntTools.hxx>
#include <IntTools_BeanFaceIntersector.hxx>
-#include <IntTools_CArray1OfInteger.hxx>
#include <IntTools_CommonPrt.hxx>
#include <IntTools_Context.hxx>
#include <IntTools_FClass2d.hxx>
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-
-#include <IntTools_CArray1OfReal.hxx>
#include <IntTools_MarkedRangeSet.hxx>
+
#include <IntTools_Range.hxx>
IntTools_MarkedRangeSet::IntTools_MarkedRangeSet() :
SetBoundaries(theFirstBoundary, theLastBoundary, theInitFlag);
}
-IntTools_MarkedRangeSet::IntTools_MarkedRangeSet(const IntTools_CArray1OfReal& theSortedArray,
- const Standard_Integer theInitFlag)
-
+IntTools_MarkedRangeSet::IntTools_MarkedRangeSet (const TColStd_Array1OfReal& theSortedArray,
+ const Standard_Integer theInitFlag)
{
SetRanges(theSortedArray, theInitFlag);
}
myFlags.Append(theInitFlag);
}
-void IntTools_MarkedRangeSet::SetRanges(const IntTools_CArray1OfReal& theSortedArray,
- const Standard_Integer theInitFlag)
+void IntTools_MarkedRangeSet::SetRanges (const TColStd_Array1OfReal& theSortedArray,
+ const Standard_Integer theInitFlag)
{
myRangeSetStorer.Clear();
myFlags.Clear();
- Standard_Integer i = 0;
-
- for(i = 0; i < theSortedArray.Length(); i++) {
- myRangeSetStorer.Append(theSortedArray(i));
+ for (TColStd_Array1OfReal::Iterator aRangeIter (theSortedArray); aRangeIter.More(); aRangeIter.Next())
+ {
+ myRangeSetStorer.Append (aRangeIter.Value());
}
myRangeNumber = myRangeSetStorer.Length() - 1;
- for(i = 1; i <= myRangeNumber; i++) {
+ for (Standard_Integer i = 1; i <= myRangeNumber; i++)
+ {
myFlags.Append(theInitFlag);
}
}
#ifndef _IntTools_MarkedRangeSet_HeaderFile
#define _IntTools_MarkedRangeSet_HeaderFile
-#include <Standard.hxx>
-#include <Standard_DefineAlloc.hxx>
-#include <Standard_Handle.hxx>
-
+#include <IntTools_CArray1OfReal.hxx>
#include <TColStd_SequenceOfReal.hxx>
-#include <Standard_Integer.hxx>
#include <TColStd_SequenceOfInteger.hxx>
-#include <Standard_Real.hxx>
-#include <Standard_Boolean.hxx>
-class IntTools_CArray1OfReal;
-class IntTools_Range;
+class IntTools_Range;
//! class MarkedRangeSet provides continuous set of ranges marked with flags
class IntTools_MarkedRangeSet
DEFINE_STANDARD_ALLOC
-
-
//! Empty constructor
Standard_EXPORT IntTools_MarkedRangeSet();
//! Warning:
//! The constructor do not check if the values of array are not sorted
//! It should be checked before function invocation
- Standard_EXPORT IntTools_MarkedRangeSet(const IntTools_CArray1OfReal& theSortedArray, const Standard_Integer theInitFlag);
+ Standard_EXPORT IntTools_MarkedRangeSet(const TColStd_Array1OfReal& theSortedArray, const Standard_Integer theInitFlag);
//! build set of ranges which consists of one range with
//! Warning:
//! The function do not check if the values of array are not sorted
//! It should be checked before function invocation
- Standard_EXPORT void SetRanges (const IntTools_CArray1OfReal& theSortedArray, const Standard_Integer theInitFlag);
+ Standard_EXPORT void SetRanges (const TColStd_Array1OfReal& theSortedArray, const Standard_Integer theInitFlag);
//! Inserts a new range marked with flag theFlag
//! can be equal to theValue, otherwise upper boundary of the range
//! can be equal to theValue.
Standard_EXPORT Standard_Integer GetIndex (const Standard_Real theValue, const Standard_Boolean UseLower) const;
-
//! Returns number of ranges
- Standard_Integer Length() const;
-
+ Standard_Integer Length() const { return myRangeNumber; }
//! Returns the range with index theIndex.
//! the Index can be from 1 to Length()
Standard_EXPORT IntTools_Range Range (const Standard_Integer theIndex) const;
-
-
-
-protected:
-
-
-
-
-
private:
-
-
TColStd_SequenceOfReal myRangeSetStorer;
Standard_Integer myRangeNumber;
TColStd_SequenceOfInteger myFlags;
TColStd_SequenceOfInteger myFoundIndices;
-
};
-
-#include <IntTools_MarkedRangeSet.lxx>
-
-
-
-
-
#endif // _IntTools_MarkedRangeSet_HeaderFile
+++ /dev/null
-// 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.
-
-inline Standard_Integer IntTools_MarkedRangeSet::Length() const
-{
- return myRangeNumber;
-}
#ifndef _IntTools_SurfaceRangeSampleMapHasher_HeaderFile
#define _IntTools_SurfaceRangeSampleMapHasher_HeaderFile
+#include <IntTools_SurfaceRangeSample.hxx>
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
-
#include <Standard_Integer.hxx>
-#include <Standard_Boolean.hxx>
-class IntTools_SurfaceRangeSample;
-
-
class IntTools_SurfaceRangeSampleMapHasher
{
//! @param theKey the key which hash code is to be computed
//! @param theUpperBound the upper bound of the range a computing hash code must be within
//! @return a computed hash code, in the range [1, theUpperBound]
- static Standard_Integer HashCode (const IntTools_SurfaceRangeSample& theKey, Standard_Integer theUpperBound);
+ static Standard_Integer HashCode (const IntTools_SurfaceRangeSample& theKey, Standard_Integer theUpperBound)
+ {
+ return ::HashCode (theKey.GetIndexU() * theKey.GetIndexV(), theUpperBound);
+ }
//! Returns True when the two keys are the same. Two
//! same keys must have the same hashcode, the
//! contrary is not necessary.
- static Standard_Boolean IsEqual (const IntTools_SurfaceRangeSample& S1, const IntTools_SurfaceRangeSample& S2);
-
-
-
-
-protected:
-
-
-
-
-
-private:
-
-
-
-
+ static Standard_Boolean IsEqual (const IntTools_SurfaceRangeSample& S1, const IntTools_SurfaceRangeSample& S2)
+ {
+ return S1.IsEqual(S2);
+ }
};
-
-#include <IntTools_SurfaceRangeSampleMapHasher.lxx>
-
-
-
-
-
#endif // _IntTools_SurfaceRangeSampleMapHasher_HeaderFile
+++ /dev/null
-// Created on: 2005-10-14
-// Created by: Mikhail KLOKOV
-// Copyright (c) 2005-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.
-
-//=======================================================================
-// function : HashCode
-// purpose :
-//=======================================================================
-inline Standard_Integer IntTools_SurfaceRangeSampleMapHasher::HashCode (const IntTools_SurfaceRangeSample& theKey,
- const Standard_Integer theUpperBound)
-{
- // return (((K.GetDepthU() % Upper) ^ (K.GetDepthV() % Upper)) % Upper);
- return ::HashCode (theKey.GetIndexU() * theKey.GetIndexV(), theUpperBound);
-}
-
-inline Standard_Boolean IntTools_SurfaceRangeSampleMapHasher::IsEqual(const IntTools_SurfaceRangeSample& S1,
- const IntTools_SurfaceRangeSample& S2) {
- return S1.IsEqual(S2);
-}