From d642ddf565c158976cd37a6f69f00b4d216a1400 Mon Sep 17 00:00:00 2001 From: pkv Date: Tue, 13 Nov 2012 10:49:13 +0400 Subject: [PATCH] 0023548: Boolean operation between two faces fails --- src/IntPolyh/FILES | 10 +- src/IntPolyh/IntPolyh.cdl | 26 +- src/IntPolyh/IntPolyh_Array.hxx | 233 ++++++++++++++++++ src/IntPolyh/IntPolyh_ArrayOfCouples.cdl | 73 ------ src/IntPolyh/IntPolyh_ArrayOfCouples.cxx | 104 -------- src/IntPolyh/IntPolyh_ArrayOfCouples.hxx | 35 +++ src/IntPolyh/IntPolyh_ArrayOfEdges.cdl | 88 ------- src/IntPolyh/IntPolyh_ArrayOfEdges.cxx | 113 --------- src/IntPolyh/IntPolyh_ArrayOfEdges.hxx | 35 +++ src/IntPolyh/IntPolyh_ArrayOfPoints.cdl | 84 ------- src/IntPolyh/IntPolyh_ArrayOfPoints.cxx | 119 --------- src/IntPolyh/IntPolyh_ArrayOfPoints.hxx | 36 +++ src/IntPolyh/IntPolyh_ArrayOfSectionLines.cdl | 80 ------ src/IntPolyh/IntPolyh_ArrayOfSectionLines.cxx | 101 -------- src/IntPolyh/IntPolyh_ArrayOfSectionLines.hxx | 35 +++ src/IntPolyh/IntPolyh_ArrayOfStartPoints.cdl | 74 ------ src/IntPolyh/IntPolyh_ArrayOfStartPoints.cxx | 93 ------- src/IntPolyh/IntPolyh_ArrayOfStartPoints.hxx | 35 +++ src/IntPolyh/IntPolyh_ArrayOfTangentZones.cdl | 81 ------ src/IntPolyh/IntPolyh_ArrayOfTangentZones.cxx | 108 -------- src/IntPolyh/IntPolyh_ArrayOfTangentZones.hxx | 35 +++ src/IntPolyh/IntPolyh_ArrayOfTriangles.cdl | 90 ------- src/IntPolyh/IntPolyh_ArrayOfTriangles.cxx | 120 --------- src/IntPolyh/IntPolyh_ArrayOfTriangles.hxx | 36 +++ src/IntPolyh/IntPolyh_Intersection.cxx | 21 +- src/IntPolyh/IntPolyh_Intersection_1.cxx | 23 +- src/IntPolyh/IntPolyh_MaillageAffinage.cxx | 80 +++--- src/IntPolyh/IntPolyh_Triangle.cxx | 30 +-- 28 files changed, 576 insertions(+), 1422 deletions(-) create mode 100644 src/IntPolyh/IntPolyh_Array.hxx delete mode 100755 src/IntPolyh/IntPolyh_ArrayOfCouples.cdl delete mode 100755 src/IntPolyh/IntPolyh_ArrayOfCouples.cxx create mode 100644 src/IntPolyh/IntPolyh_ArrayOfCouples.hxx delete mode 100755 src/IntPolyh/IntPolyh_ArrayOfEdges.cdl delete mode 100755 src/IntPolyh/IntPolyh_ArrayOfEdges.cxx create mode 100644 src/IntPolyh/IntPolyh_ArrayOfEdges.hxx delete mode 100755 src/IntPolyh/IntPolyh_ArrayOfPoints.cdl delete mode 100755 src/IntPolyh/IntPolyh_ArrayOfPoints.cxx create mode 100644 src/IntPolyh/IntPolyh_ArrayOfPoints.hxx delete mode 100755 src/IntPolyh/IntPolyh_ArrayOfSectionLines.cdl delete mode 100755 src/IntPolyh/IntPolyh_ArrayOfSectionLines.cxx create mode 100644 src/IntPolyh/IntPolyh_ArrayOfSectionLines.hxx delete mode 100755 src/IntPolyh/IntPolyh_ArrayOfStartPoints.cdl delete mode 100755 src/IntPolyh/IntPolyh_ArrayOfStartPoints.cxx create mode 100644 src/IntPolyh/IntPolyh_ArrayOfStartPoints.hxx delete mode 100755 src/IntPolyh/IntPolyh_ArrayOfTangentZones.cdl delete mode 100755 src/IntPolyh/IntPolyh_ArrayOfTangentZones.cxx create mode 100644 src/IntPolyh/IntPolyh_ArrayOfTangentZones.hxx delete mode 100755 src/IntPolyh/IntPolyh_ArrayOfTriangles.cdl delete mode 100755 src/IntPolyh/IntPolyh_ArrayOfTriangles.cxx create mode 100644 src/IntPolyh/IntPolyh_ArrayOfTriangles.hxx diff --git a/src/IntPolyh/FILES b/src/IntPolyh/FILES index 94227e60e6..4c965d83bc 100755 --- a/src/IntPolyh/FILES +++ b/src/IntPolyh/FILES @@ -1,3 +1,9 @@ IntPolyh_Intersection_1.cxx - - +IntPolyh_Array.hxx +IntPolyh_ArrayOfSectionLines.hxx +IntPolyh_ArrayOfCouples.hxx +IntPolyh_ArrayOfEdges.hxx +IntPolyh_ArrayOfPoints.hxx +IntPolyh_ArrayOfStartPoints.hxx +IntPolyh_ArrayOfTangentZones.hxx +IntPolyh_ArrayOfTriangles.hxx diff --git a/src/IntPolyh/IntPolyh.cdl b/src/IntPolyh/IntPolyh.cdl index 4187379e7e..02eeb14af0 100755 --- a/src/IntPolyh/IntPolyh.cdl +++ b/src/IntPolyh/IntPolyh.cdl @@ -62,7 +62,14 @@ uses Adaptor3d is - + imported ArrayOfSectionLines from IntPolyh; + imported ArrayOfCouples from IntPolyh; + imported ArrayOfEdges from IntPolyh; + imported ArrayOfPoints from IntPolyh; + imported ArrayOfStartPoints from IntPolyh; + imported ArrayOfTangentZones from IntPolyh; + imported ArrayOfTriangles from IntPolyh; + class Intersection; ---Purpose: the main algorithm. Algorythm outputs are -- -- lines and points like discribe in the last @@ -77,41 +84,28 @@ is class Couple; ---Purpose: couple of triangles - class ArrayOfCouples; class Point; - - class ArrayOfPoints; - class StartPoint; - - class ArrayOfStartPoints; - class SeqOfStartPoints instantiates Sequence from TCollection (StartPoint from IntPolyh); class Edge; - - class ArrayOfEdges; + class Triangle; - class ArrayOfTriangles; class MaillageAffinage; ---Purpose: Provide the algorythms used in the package class SectionLine; - class ArrayOfSectionLines; -- class TangentZone; For the moment we use the StartPoint Class - class ArrayOfTangentZones; - - -- Modified by skv - Thu Sep 25 18:04:05 2003 OCC567 End pointer PMaillageAffinage to MaillageAffinage from IntPolyh; - -- Modified by skv - Thu Sep 25 18:04:07 2003 OCC567 Begin + end; diff --git a/src/IntPolyh/IntPolyh_Array.hxx b/src/IntPolyh/IntPolyh_Array.hxx new file mode 100644 index 0000000000..5c5f84377f --- /dev/null +++ b/src/IntPolyh/IntPolyh_Array.hxx @@ -0,0 +1,233 @@ +// Created on: 2012-11-13 +// Created by: Peter KURNEV +// Copyright (c) 2012 OPEN CASCADE SAS +// +// The content of this file is subject to the Open CASCADE Technology Public +// License Version 6.5 (the "License"). You may not use the content of this file +// except in compliance with the License. Please obtain a copy of the License +// at http://www.opencascade.org and read it completely before using this file. +// +// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its +// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. +// +// The Original Code and all software distributed under the License is +// distributed on an "AS IS" basis, without warranty of any kind, and the +// Initial Developer hereby disclaims all such warranties, including without +// limitation, any warranties of merchantability, fitness for a particular +// purpose or non-infringement. Please see the License for the specific terms +// and conditions governing the rights and limitations under the License. + +#ifndef IntPolyh_Array_HeaderFile +#define IntPolyh_Array_HeaderFile + +#include +#include + +/** +* Class IntPolyh_Array (dynamic array of objects) +* +* 1. The Array is dynamic array of objects. +* +* 2. The Array uses NCollection_Vector to store objects +* +* 3. The Array can be created: +* 3.1. with initial length Nb=0. +* In this case Array should be initiated by invoke +* the method Init(Nb). +* 3.2. with initial length Nb>0. +* In this case Array is initiated automatically. +* +* The memory is allocated to store myNbAllocated oblects. +* +* 4. The number of items that are stored in the Array (myNbItems) +* can be increased by calling the method: IncrementNbItems(). +* The objects are stored in already allocated memory if it is +* possible. +* Otherwise the new chunk of memory is allocated to store the +* objects. +* The size of chunk can be defined during the creation +* of the Array. +* +* 5. The start index of the Array is 0, The end index of the Array +* can be obtained by the method NbItems(); + +* 6. The contents of the element with index "i" can be queried or +* modified by the methods: Value(i), ChangeValue(i), operator[](i) +*/ + +//======================================================================= +// class : IntPolyh_Array +// +//======================================================================= +template class IntPolyh_Array { + public: + typedef NCollection_Vector IntPolyh_VectorOfType; + + /** + * Constructor. + * @param aIncrement + * size of memory (in terms of Items) to expand the array + */ + IntPolyh_Array(const Standard_Integer aIncrement=256) { + myNbAllocated=0; + myNbItems=0; + myIncrement=aIncrement; + } + + /** + * Constructor. + * @param aN + * size of memory (in terms of Items) to allocate + * @param aIncrement + * size of memory (in terms of Items) to expand the array + */ + IntPolyh_Array(const Standard_Integer aN, + const Standard_Integer aIncrement=256) { + myNbItems=0; + myIncrement=aIncrement; + Init(aN); + } + + /** + * Assignment operator + * @param + * aOther - the array to copy from + * @return + * the array + */ + IntPolyh_Array& operator =(const IntPolyh_Array& aOther) { + return Copy(aOther); + } + + /** + * Copy + * @param + * aOther - the array to copy from + * @return + * the array + */ + IntPolyh_Array& Copy(const IntPolyh_Array& aOther) { + myVectorOfType.Clear(); + Init(aOther.myNbAllocated); + myVectorOfType=aOther.myVectorOfType; + myNbItems=aOther.myNbItems; + // + return *this; + } + + /** + * Init - allocate memory for items + * @param + * aN - the number of items to allocate the memory + */ + void Init(const Standard_Integer aN) { + Type aSL; + // + myVectorOfType.SetValue(aN, aSL); + myNbAllocated=aN; + } + + /** + * IncrementNbItems - increment the number of stored items + */ + void IncrementNbItems() { + myNbItems++; + if (myNbItems>=myNbAllocated) { + Standard_Integer aN; + // + aN=myNbAllocated+myIncrement; + Init(aN); + } + } + + /** + * GetN - returns the number of 'allocated' items + * @return + * the number of 'allocated' items + */ + Standard_Integer GetN() const { + return myNbAllocated; + } + + /** + * NbItems - returns the number of stored items + * @return + * the number of stored items + */ + Standard_Integer NbItems() const { + return myNbItems; + } + + + /** + * set the number of stored items + * @param aNb + * the number of stored items + */ + void SetNbItems(const Standard_Integer aNb){ + myNbItems=aNb; + } + + /** + * query the const value + * @param aIndex + * index + * @return + * the const item + */ + const Type& Value(const Standard_Integer aIndex) const { + return myVectorOfType.Value(aIndex); + } + + /** + * query the const value + * @param aIndex + * index + * @return + * the const item + */ + const Type& operator [](const Standard_Integer aIndex) const { + return Value(aIndex); + } + + /** + * query the value + * @param aIndex + * index + * @return + * the item + */ + Type& ChangeValue(const Standard_Integer aIndex) { + return myVectorOfType.ChangeValue(aIndex); + } + + /** + * query the value + * @param aIndex + * index + * @return + * the item + */ + Type& operator [](const Standard_Integer aIndex) { + return ChangeValue(aIndex); + } + + /** + * dump the contents + */ + void Dump() const { + printf("\n ArrayOfSectionLines 0-> %d",myNbItems-1); + for(Standard_Integer i=0;i -#include - -#include - -IntPolyh_ArrayOfCouples::IntPolyh_ArrayOfCouples() : n(0),eoa(0),ptr(0){ -} - -IntPolyh_ArrayOfCouples::IntPolyh_ArrayOfCouples(const Standard_Integer N) : n(N),eoa(0){ - Init(N); -} - -void IntPolyh_ArrayOfCouples::Init(const Standard_Integer N) { - Destroy(); - ptr = (void *) (new IntPolyh_Couple [N]); - n=N; -} - -Standard_Integer IntPolyh_ArrayOfCouples::NbCouples() const { - return(eoa); -} - -void IntPolyh_ArrayOfCouples::SetNbCouples(const Standard_Integer fint) { - eoa=fint; -} - -void IntPolyh_ArrayOfCouples::IncNbCouples() { - eoa++; -} - -# ifdef DEB - #define BORNES 1 -# endif - -const IntPolyh_Couple& IntPolyh_ArrayOfCouples::Value(const Standard_Integer Index) const { - IntPolyh_Couple* ptrCouple = (IntPolyh_Couple*) ptr; -#if BORNES - if(Index<0 || Index>=n) { - cerr<<" Erreur4 "<=n) { - cerr<<" Erreur4"< %d",n-1); - for(Standard_Integer i=0;i +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +#include +#include + +typedef IntPolyh_Array IntPolyh_ArrayOfCouples; + +#endif diff --git a/src/IntPolyh/IntPolyh_ArrayOfEdges.cdl b/src/IntPolyh/IntPolyh_ArrayOfEdges.cdl deleted file mode 100755 index e5f142a31a..0000000000 --- a/src/IntPolyh/IntPolyh_ArrayOfEdges.cdl +++ /dev/null @@ -1,88 +0,0 @@ --- Created on: 1999-03-09 --- Created by: Fabrice SERVANT --- Copyright (c) 1999 Matra Datavision --- Copyright (c) 1999-2012 OPEN CASCADE SAS --- --- The content of this file is subject to the Open CASCADE Technology Public --- License Version 6.5 (the "License"). You may not use the content of this file --- except in compliance with the License. Please obtain a copy of the License --- at http://www.opencascade.org and read it completely before using this file. --- --- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its --- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. --- --- The Original Code and all software distributed under the License is --- distributed on an "AS IS" basis, without warranty of any kind, and the --- Initial Developer hereby disclaims all such warranties, including without --- limitation, any warranties of merchantability, fitness for a particular --- purpose or non-infringement. Please see the License for the specific terms --- and conditions governing the rights and limitations under the License. - - -class ArrayOfEdges from IntPolyh - -uses - - Edge from IntPolyh - -is - - - Create; - - Create(nn : Integer from Standard) ; - - Init(me: in out; nn: Integer from Standard) - is static; - - GetN(me) - returns Integer from Standard - ---C++: return const - is static; - - NbEdges(me) - returns Integer from Standard - ---C++: return const - is static; - - SetNbEdges(me: in out; endaof: Integer from Standard) - is static; - - IncNbEdges(me: in out) - is static; - - Value(me; nn: Integer from Standard) - ---C++: alias operator [] - ---C++: return const & - returns Edge from IntPolyh - is static; - - ChangeValue(me: in out; nn: Integer from Standard) - ---C++: alias operator [] - ---C++: return & - returns Edge from IntPolyh - is static; - - Copy(me: in out; Other : ArrayOfEdges from IntPolyh) - ---C++: alias operator = - ---C++: return & - returns ArrayOfEdges from IntPolyh - is static; - - Destroy(me:in out) - ---C++: alias ~ - is static; - - Dump(me) - is static; - - -fields - - n,finte : Integer from Standard; - ptr : Address from Standard; - -end ArrayOfEdges from IntPolyh; - - - diff --git a/src/IntPolyh/IntPolyh_ArrayOfEdges.cxx b/src/IntPolyh/IntPolyh_ArrayOfEdges.cxx deleted file mode 100755 index d3fd7f1a88..0000000000 --- a/src/IntPolyh/IntPolyh_ArrayOfEdges.cxx +++ /dev/null @@ -1,113 +0,0 @@ -// Created on: 1999-03-08 -// Created by: Fabrice SERVANT -// Copyright (c) 1999-1999 Matra Datavision -// Copyright (c) 1999-2012 OPEN CASCADE SAS -// -// The content of this file is subject to the Open CASCADE Technology Public -// License Version 6.5 (the "License"). You may not use the content of this file -// except in compliance with the License. Please obtain a copy of the License -// at http://www.opencascade.org and read it completely before using this file. -// -// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its -// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. -// -// The Original Code and all software distributed under the License is -// distributed on an "AS IS" basis, without warranty of any kind, and the -// Initial Developer hereby disclaims all such warranties, including without -// limitation, any warranties of merchantability, fitness for a particular -// purpose or non-infringement. Please see the License for the specific terms -// and conditions governing the rights and limitations under the License. - - - -#include -#include -#include - -IntPolyh_ArrayOfEdges::IntPolyh_ArrayOfEdges() : n(0),finte(0),ptr(0) { } - -IntPolyh_ArrayOfEdges::IntPolyh_ArrayOfEdges(const Standard_Integer N) : n(N),finte(0) { - Init(N); -} - -void IntPolyh_ArrayOfEdges::Init(const Standard_Integer N) { - Destroy(); - n=N; - ptr = (void*) (new IntPolyh_Edge [n]); -} - -const Standard_Integer IntPolyh_ArrayOfEdges::GetN() const { - return(n); -} -const Standard_Integer IntPolyh_ArrayOfEdges::NbEdges() const { - return(finte); -} - -void IntPolyh_ArrayOfEdges::SetNbEdges(const Standard_Integer endaoe) { - finte = endaoe; -} - -void IntPolyh_ArrayOfEdges::IncNbEdges(){ - finte++; -} - -# ifdef DEB - #define BORNES 1 -# endif - -const IntPolyh_Edge& IntPolyh_ArrayOfEdges::Value(const Standard_Integer Index) const { - IntPolyh_Edge* ptredge = (IntPolyh_Edge*) ptr; -#if BORNES - if(Index<0 || Index>=n) { - cerr<<" Erreur2 value"<=n) { - cerr<<" Erreur2 chgVal"< %d",n-1); - for(Standard_Integer i=0;i +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +#include +#include + +typedef IntPolyh_Array IntPolyh_ArrayOfEdges; + +#endif diff --git a/src/IntPolyh/IntPolyh_ArrayOfPoints.cdl b/src/IntPolyh/IntPolyh_ArrayOfPoints.cdl deleted file mode 100755 index f3d117ea01..0000000000 --- a/src/IntPolyh/IntPolyh_ArrayOfPoints.cdl +++ /dev/null @@ -1,84 +0,0 @@ --- Created on: 1999-03-08 --- Created by: Fabrice SERVANT --- Copyright (c) 1999 Matra Datavision --- Copyright (c) 1999-2012 OPEN CASCADE SAS --- --- The content of this file is subject to the Open CASCADE Technology Public --- License Version 6.5 (the "License"). You may not use the content of this file --- except in compliance with the License. Please obtain a copy of the License --- at http://www.opencascade.org and read it completely before using this file. --- --- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its --- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. --- --- The Original Code and all software distributed under the License is --- distributed on an "AS IS" basis, without warranty of any kind, and the --- Initial Developer hereby disclaims all such warranties, including without --- limitation, any warranties of merchantability, fitness for a particular --- purpose or non-infringement. Please see the License for the specific terms --- and conditions governing the rights and limitations under the License. - - - -class ArrayOfPoints from IntPolyh - -uses - - Point from IntPolyh - - -is - - - Create; - - Create(nn : Integer from Standard) ; - - Init(me: in out; nn: Integer from Standard) - is static; - - Value(me; nn: Integer from Standard) - ---C++: alias operator [] - ---C++: return const & - returns Point from IntPolyh - is static; - - ChangeValue(me: in out; nn: Integer from Standard) - ---C++: alias operator [] - ---C++: return & - returns Point from IntPolyh - is static; - - Copy(me: in out; Other : ArrayOfPoints from IntPolyh) - ---C++: alias operator = - ---C++: return & - returns ArrayOfPoints from IntPolyh - is static; - - GetN(me) - returns Integer from Standard - is static; - - NbPoints(me) - returns Integer from Standard - is static; - - IncNbPoints(me: in out) - is static; - - SetNbPoints(me: in out; END: Integer from Standard) - is static; - - Destroy(me: in out) - ---C++: alias ~ - is static; - - Dump(me) - is static; - -fields - - n,fintp : Integer from Standard; - ptr :Address from Standard; - -end ArrayOfPoints from IntPolyh; diff --git a/src/IntPolyh/IntPolyh_ArrayOfPoints.cxx b/src/IntPolyh/IntPolyh_ArrayOfPoints.cxx deleted file mode 100755 index 4e4df09673..0000000000 --- a/src/IntPolyh/IntPolyh_ArrayOfPoints.cxx +++ /dev/null @@ -1,119 +0,0 @@ -// Created on: 1999-03-08 -// Created by: Fabrice SERVANT -// Copyright (c) 1999-1999 Matra Datavision -// Copyright (c) 1999-2012 OPEN CASCADE SAS -// -// The content of this file is subject to the Open CASCADE Technology Public -// License Version 6.5 (the "License"). You may not use the content of this file -// except in compliance with the License. Please obtain a copy of the License -// at http://www.opencascade.org and read it completely before using this file. -// -// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its -// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. -// -// The Original Code and all software distributed under the License is -// distributed on an "AS IS" basis, without warranty of any kind, and the -// Initial Developer hereby disclaims all such warranties, including without -// limitation, any warranties of merchantability, fitness for a particular -// purpose or non-infringement. Please see the License for the specific terms -// and conditions governing the rights and limitations under the License. - - - -#include - -#include - - -IntPolyh_ArrayOfPoints::IntPolyh_ArrayOfPoints() : n(0),fintp(0),ptr(0) { } - -IntPolyh_ArrayOfPoints::IntPolyh_ArrayOfPoints(const Standard_Integer N): fintp(0){ - Init(N); -} - -void IntPolyh_ArrayOfPoints::Init(const Standard_Integer N) { - Destroy(); - ptr = (void*) (new IntPolyh_Point [N]); - n = N; -} - -Standard_Integer IntPolyh_ArrayOfPoints::GetN() const { - return(n); -} - -Standard_Integer IntPolyh_ArrayOfPoints::NbPoints() const { - return(fintp); -} - -void IntPolyh_ArrayOfPoints::IncNbPoints() { - fintp++; -} - -void IntPolyh_ArrayOfPoints::SetNbPoints(const Standard_Integer endaop) { - fintp = endaop; -} - -# ifdef DEB - #define BORNES 1 -# endif - -const IntPolyh_Point& IntPolyh_ArrayOfPoints::Value(const Standard_Integer Index) const { - IntPolyh_Point *ptrpoint = (IntPolyh_Point *)ptr; -#if BORNES - if(Index<0 || Index>=n) { - cerr<<" Erreur1 "<=n) { - cerr<<" Erreur1 "< %d\n",fintp-1); - printf("size %d, room left%d", n, n-fintp); - for(Standard_Integer i=0;i +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +#include +#include + +typedef IntPolyh_Array IntPolyh_ArrayOfPoints; + +#endif diff --git a/src/IntPolyh/IntPolyh_ArrayOfSectionLines.cdl b/src/IntPolyh/IntPolyh_ArrayOfSectionLines.cdl deleted file mode 100755 index 3a1b1167ee..0000000000 --- a/src/IntPolyh/IntPolyh_ArrayOfSectionLines.cdl +++ /dev/null @@ -1,80 +0,0 @@ --- Created on: 1999-04-06 --- Created by: Fabrice SERVANT --- Copyright (c) 1999 Matra Datavision --- Copyright (c) 1999-2012 OPEN CASCADE SAS --- --- The content of this file is subject to the Open CASCADE Technology Public --- License Version 6.5 (the "License"). You may not use the content of this file --- except in compliance with the License. Please obtain a copy of the License --- at http://www.opencascade.org and read it completely before using this file. --- --- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its --- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. --- --- The Original Code and all software distributed under the License is --- distributed on an "AS IS" basis, without warranty of any kind, and the --- Initial Developer hereby disclaims all such warranties, including without --- limitation, any warranties of merchantability, fitness for a particular --- purpose or non-infringement. Please see the License for the specific terms --- and conditions governing the rights and limitations under the License. - - - -class ArrayOfSectionLines from IntPolyh - -uses - - SectionLine from IntPolyh - -is - - - Create; - - Create(nn : Integer from Standard) ; - - Init(me: in out; nn: Integer from Standard) - is static; - - Value(me; nn: Integer from Standard) - ---C++: alias operator [] - ---C++: return const & - returns SectionLine from IntPolyh - is static; - - ChangeValue(me: in out; nn: Integer from Standard) - ---C++: alias operator [] - ---C++: return & - returns SectionLine from IntPolyh - is static; - - Copy(me: in out; Other : ArrayOfSectionLines from IntPolyh) - ---C++: alias operator = - ---C++: return & - returns ArrayOfSectionLines from IntPolyh - is static; - - GetN(me) - returns Integer from Standard - is static; - - NbSectionLines(me) - returns Integer from Standard - is static; - - IncrementNbSectionLines(me: in out) - is static; - - Destroy(me: in out) - ---C++: alias ~ - is static; - - Dump(me) - is static; - -fields - - n,nbsectionlines : Integer from Standard; - ptr : Address from Standard; - -end ArrayOfSectionLines from IntPolyh; diff --git a/src/IntPolyh/IntPolyh_ArrayOfSectionLines.cxx b/src/IntPolyh/IntPolyh_ArrayOfSectionLines.cxx deleted file mode 100755 index 61f76bb238..0000000000 --- a/src/IntPolyh/IntPolyh_ArrayOfSectionLines.cxx +++ /dev/null @@ -1,101 +0,0 @@ -// Created on: 1999-04-06 -// Created by: Fabrice SERVANT -// Copyright (c) 1999-1999 Matra Datavision -// Copyright (c) 1999-2012 OPEN CASCADE SAS -// -// The content of this file is subject to the Open CASCADE Technology Public -// License Version 6.5 (the "License"). You may not use the content of this file -// except in compliance with the License. Please obtain a copy of the License -// at http://www.opencascade.org and read it completely before using this file. -// -// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its -// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. -// -// The Original Code and all software distributed under the License is -// distributed on an "AS IS" basis, without warranty of any kind, and the -// Initial Developer hereby disclaims all such warranties, including without -// limitation, any warranties of merchantability, fitness for a particular -// purpose or non-infringement. Please see the License for the specific terms -// and conditions governing the rights and limitations under the License. - - - -#include -#include -#include - - -IntPolyh_ArrayOfSectionLines::IntPolyh_ArrayOfSectionLines() : n(0),nbsectionlines(0),ptr(0) { } - -IntPolyh_ArrayOfSectionLines::IntPolyh_ArrayOfSectionLines(const Standard_Integer N) : nbsectionlines(0){ - Init(N); -} - -void IntPolyh_ArrayOfSectionLines::Init(const Standard_Integer N) { - Destroy(); - ptr = (void*) (new IntPolyh_SectionLine [N]); - n=N; -} - -Standard_Integer IntPolyh_ArrayOfSectionLines::GetN() const { - return(n); -} - -Standard_Integer IntPolyh_ArrayOfSectionLines::NbSectionLines() const { - return(nbsectionlines); -} - -void IntPolyh_ArrayOfSectionLines::IncrementNbSectionLines() { - nbsectionlines++; -} - -#define BORNES1 -const IntPolyh_SectionLine& IntPolyh_ArrayOfSectionLines::Value(const Standard_Integer Index) const { - IntPolyh_SectionLine *ptrstpoint = (IntPolyh_SectionLine *)ptr; -#if BORNES - if(Index<0 || Index>=n) { cerr<<" Erreur1 "<=n) { cerr<<" Erreur1 "< %d",nbsectionlines-1); - for(Standard_Integer i=0;i +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +#include +#include + +typedef IntPolyh_Array IntPolyh_ArrayOfSectionLines; + +#endif diff --git a/src/IntPolyh/IntPolyh_ArrayOfStartPoints.cdl b/src/IntPolyh/IntPolyh_ArrayOfStartPoints.cdl deleted file mode 100755 index 72aed850d0..0000000000 --- a/src/IntPolyh/IntPolyh_ArrayOfStartPoints.cdl +++ /dev/null @@ -1,74 +0,0 @@ --- Created on: 1999-04-06 --- Created by: Fabrice SERVANT --- Copyright (c) 1999 Matra Datavision --- Copyright (c) 1999-2012 OPEN CASCADE SAS --- --- The content of this file is subject to the Open CASCADE Technology Public --- License Version 6.5 (the "License"). You may not use the content of this file --- except in compliance with the License. Please obtain a copy of the License --- at http://www.opencascade.org and read it completely before using this file. --- --- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its --- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. --- --- The Original Code and all software distributed under the License is --- distributed on an "AS IS" basis, without warranty of any kind, and the --- Initial Developer hereby disclaims all such warranties, including without --- limitation, any warranties of merchantability, fitness for a particular --- purpose or non-infringement. Please see the License for the specific terms --- and conditions governing the rights and limitations under the License. - - - -class ArrayOfStartPoints from IntPolyh - -uses - - StartPoint from IntPolyh - - -is - - - Create; - - Create(nn : Integer from Standard) ; - - Init(me: in out; nn: Integer from Standard) - is static; - - Value(me; nn: Integer from Standard) - ---C++: alias operator [] - ---C++: return const & - returns StartPoint from IntPolyh - is static; - - ChangeValue(me: in out; nn: Integer from Standard) - ---C++: alias operator [] - ---C++: return & - returns StartPoint from IntPolyh - is static; - - Copy(me: in out; Other : ArrayOfStartPoints from IntPolyh) - ---C++: alias operator = - ---C++: return & - returns ArrayOfStartPoints from IntPolyh - is static; - - NbPoints(me) - returns Integer from Standard - is static; - - Destroy(me: in out) - ---C++: alias ~ - is static; - - Dump(me) - is static; - -fields - - n : Integer from Standard; - ptr :Address from Standard; - -end ArrayOfStartPoints from IntPolyh; diff --git a/src/IntPolyh/IntPolyh_ArrayOfStartPoints.cxx b/src/IntPolyh/IntPolyh_ArrayOfStartPoints.cxx deleted file mode 100755 index 7450c89c20..0000000000 --- a/src/IntPolyh/IntPolyh_ArrayOfStartPoints.cxx +++ /dev/null @@ -1,93 +0,0 @@ -// Created on: 1999-04-06 -// Created by: Fabrice SERVANT -// Copyright (c) 1999-1999 Matra Datavision -// Copyright (c) 1999-2012 OPEN CASCADE SAS -// -// The content of this file is subject to the Open CASCADE Technology Public -// License Version 6.5 (the "License"). You may not use the content of this file -// except in compliance with the License. Please obtain a copy of the License -// at http://www.opencascade.org and read it completely before using this file. -// -// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its -// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. -// -// The Original Code and all software distributed under the License is -// distributed on an "AS IS" basis, without warranty of any kind, and the -// Initial Developer hereby disclaims all such warranties, including without -// limitation, any warranties of merchantability, fitness for a particular -// purpose or non-infringement. Please see the License for the specific terms -// and conditions governing the rights and limitations under the License. - - - -#include -#include -#include - - - -IntPolyh_ArrayOfStartPoints::IntPolyh_ArrayOfStartPoints() : n(0),ptr(0) { } - -IntPolyh_ArrayOfStartPoints::IntPolyh_ArrayOfStartPoints(const Standard_Integer N){ - Init(N); -} - -void IntPolyh_ArrayOfStartPoints::Init(const Standard_Integer N) { - Destroy(); - ptr = (void*) (new IntPolyh_StartPoint [N]); - n=N; -} - -Standard_Integer IntPolyh_ArrayOfStartPoints::NbPoints() const { - return(n); -} - - -#define BORNES1 -const IntPolyh_StartPoint& IntPolyh_ArrayOfStartPoints::Value(const Standard_Integer Index) const { - IntPolyh_StartPoint *ptrstpoint = (IntPolyh_StartPoint *)ptr; -#if BORNES - if(Index<0 || Index>=n) { cerr<<" Erreur1 "<=n) { cerr<<" Erreur1 "< %d",n-1); - for(Standard_Integer i=0;i +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +#include +#include + +typedef IntPolyh_Array IntPolyh_ArrayOfStartPoints; + +#endif diff --git a/src/IntPolyh/IntPolyh_ArrayOfTangentZones.cdl b/src/IntPolyh/IntPolyh_ArrayOfTangentZones.cdl deleted file mode 100755 index fcd5f97fba..0000000000 --- a/src/IntPolyh/IntPolyh_ArrayOfTangentZones.cdl +++ /dev/null @@ -1,81 +0,0 @@ --- Created on: 1999-04-06 --- Created by: Fabrice SERVANT --- Copyright (c) 1999 Matra Datavision --- Copyright (c) 1999-2012 OPEN CASCADE SAS --- --- The content of this file is subject to the Open CASCADE Technology Public --- License Version 6.5 (the "License"). You may not use the content of this file --- except in compliance with the License. Please obtain a copy of the License --- at http://www.opencascade.org and read it completely before using this file. --- --- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its --- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. --- --- The Original Code and all software distributed under the License is --- distributed on an "AS IS" basis, without warranty of any kind, and the --- Initial Developer hereby disclaims all such warranties, including without --- limitation, any warranties of merchantability, fitness for a particular --- purpose or non-infringement. Please see the License for the specific terms --- and conditions governing the rights and limitations under the License. - - - -class ArrayOfTangentZones from IntPolyh - -uses - - StartPoint from IntPolyh - -is - - - Create; - - Create(nn : Integer from Standard) ; - - Init(me: in out; nn: Integer from Standard) - is static; - - Value(me; nn: Integer from Standard) - ---C++: alias operator [] - ---C++: return const & - returns StartPoint from IntPolyh - is static; - - ChangeValue(me: in out; nn: Integer from Standard) - ---C++: alias operator [] - ---C++: return & - returns StartPoint from IntPolyh - is static; - - Copy(me: in out; Other : ArrayOfTangentZones from IntPolyh) - ---C++: alias operator = - ---C++: return & - returns ArrayOfTangentZones from IntPolyh - is static; - - GetN(me) - returns Integer from Standard - is static; - - NbTangentZones(me) - returns Integer from Standard - is static; - - IncrementNbTangentZones(me: in out) - is static; - - Destroy(me: in out) - ---C++: alias ~ - is static; - - Dump(me) - is static; - -fields - - n,nbtangentzones : Integer from Standard; - ptr : Address from Standard; - -end ArrayOfTangentZones from IntPolyh; - diff --git a/src/IntPolyh/IntPolyh_ArrayOfTangentZones.cxx b/src/IntPolyh/IntPolyh_ArrayOfTangentZones.cxx deleted file mode 100755 index 653e634e36..0000000000 --- a/src/IntPolyh/IntPolyh_ArrayOfTangentZones.cxx +++ /dev/null @@ -1,108 +0,0 @@ -// Created on: 1999-04-06 -// Created by: Fabrice SERVANT -// Copyright (c) 1999-1999 Matra Datavision -// Copyright (c) 1999-2012 OPEN CASCADE SAS -// -// The content of this file is subject to the Open CASCADE Technology Public -// License Version 6.5 (the "License"). You may not use the content of this file -// except in compliance with the License. Please obtain a copy of the License -// at http://www.opencascade.org and read it completely before using this file. -// -// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its -// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. -// -// The Original Code and all software distributed under the License is -// distributed on an "AS IS" basis, without warranty of any kind, and the -// Initial Developer hereby disclaims all such warranties, including without -// limitation, any warranties of merchantability, fitness for a particular -// purpose or non-infringement. Please see the License for the specific terms -// and conditions governing the rights and limitations under the License. - - - -#include -#include -#include - -IntPolyh_ArrayOfTangentZones::IntPolyh_ArrayOfTangentZones() : n(0),nbtangentzones(0),ptr(0) { } - -IntPolyh_ArrayOfTangentZones::IntPolyh_ArrayOfTangentZones(const Standard_Integer N) : nbtangentzones(0){ - Init(N); -} - -void IntPolyh_ArrayOfTangentZones::Init(const Standard_Integer N) { - Destroy(); - ptr = (void*) (new IntPolyh_StartPoint [N]); - n=N; -} - -Standard_Integer IntPolyh_ArrayOfTangentZones::GetN() const { - return(n); -} - -Standard_Integer IntPolyh_ArrayOfTangentZones::NbTangentZones() const { - return(nbtangentzones); -} - -void IntPolyh_ArrayOfTangentZones::IncrementNbTangentZones() { - nbtangentzones++; -} - -# ifdef DEB - # define BORNES1 -# endif -const IntPolyh_StartPoint& IntPolyh_ArrayOfTangentZones::Value(const Standard_Integer Index) const { - IntPolyh_StartPoint *ptrstpoint = (IntPolyh_StartPoint *)ptr; -#if BORNES - if(Index<0 || Index>=n) { - cerr<<" Erreur1 "<=n) { - cerr<<" Erreur1 "< %d",nbtangentzones-1); - for(Standard_Integer i=0;i +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +#include +#include + +typedef IntPolyh_Array IntPolyh_ArrayOfTangentZones; + +#endif diff --git a/src/IntPolyh/IntPolyh_ArrayOfTriangles.cdl b/src/IntPolyh/IntPolyh_ArrayOfTriangles.cdl deleted file mode 100755 index 0093677aba..0000000000 --- a/src/IntPolyh/IntPolyh_ArrayOfTriangles.cdl +++ /dev/null @@ -1,90 +0,0 @@ --- Created on: 1999-03-08 --- Created by: Fabrice SERVANT --- Copyright (c) 1999 Matra Datavision --- Copyright (c) 1999-2012 OPEN CASCADE SAS --- --- The content of this file is subject to the Open CASCADE Technology Public --- License Version 6.5 (the "License"). You may not use the content of this file --- except in compliance with the License. Please obtain a copy of the License --- at http://www.opencascade.org and read it completely before using this file. --- --- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its --- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. --- --- The Original Code and all software distributed under the License is --- distributed on an "AS IS" basis, without warranty of any kind, and the --- Initial Developer hereby disclaims all such warranties, including without --- limitation, any warranties of merchantability, fitness for a particular --- purpose or non-infringement. Please see the License for the specific terms --- and conditions governing the rights and limitations under the License. - - - -class ArrayOfTriangles from IntPolyh - -uses - - Triangle from IntPolyh - - -is - - - Create; - - Create(nn : Integer from Standard) ; - - Init(me: in out; nn: Integer from Standard) - is static; - - GetN(me) - returns Integer from Standard - ---C++: return const - is static; - - NbTriangles(me) - returns Integer from Standard - ---C++: return const - is static; - - SetNbTriangles(me : in out; endaot: Integer from Standard) - is static; - - IncNbTriangles(me: in out) - is static; - - Value(me; nn: Integer from Standard) - ---C++: alias operator [] - ---C++: return const & - returns Triangle from IntPolyh - is static; - - ChangeValue(me: in out; nn: Integer from Standard) - ---C++: alias operator [] - ---C++: return & - returns Triangle from IntPolyh - is static; - - Copy(me: in out; Other : ArrayOfTriangles from IntPolyh) - ---C++: alias operator = - ---C++: return & - returns ArrayOfTriangles from IntPolyh - is static; - - Destroy(me:in out) - ---C++: alias ~ - is static; - - Dump(me) - is static; - - DumpFleches(me) - is static; - - -fields - - n, fintt : Integer from Standard; - ptr : Address from Standard; - -end ArrayOfTriangles from IntPolyh; diff --git a/src/IntPolyh/IntPolyh_ArrayOfTriangles.cxx b/src/IntPolyh/IntPolyh_ArrayOfTriangles.cxx deleted file mode 100755 index dea3376e5c..0000000000 --- a/src/IntPolyh/IntPolyh_ArrayOfTriangles.cxx +++ /dev/null @@ -1,120 +0,0 @@ -// Created on: 1999-03-08 -// Created by: Fabrice SERVANT -// Copyright (c) 1999-1999 Matra Datavision -// Copyright (c) 1999-2012 OPEN CASCADE SAS -// -// The content of this file is subject to the Open CASCADE Technology Public -// License Version 6.5 (the "License"). You may not use the content of this file -// except in compliance with the License. Please obtain a copy of the License -// at http://www.opencascade.org and read it completely before using this file. -// -// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its -// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. -// -// The Original Code and all software distributed under the License is -// distributed on an "AS IS" basis, without warranty of any kind, and the -// Initial Developer hereby disclaims all such warranties, including without -// limitation, any warranties of merchantability, fitness for a particular -// purpose or non-infringement. Please see the License for the specific terms -// and conditions governing the rights and limitations under the License. - - - -#include -#include -#include - -IntPolyh_ArrayOfTriangles::IntPolyh_ArrayOfTriangles() : n(0),fintt(0),ptr(0) { } - -IntPolyh_ArrayOfTriangles::IntPolyh_ArrayOfTriangles(const Standard_Integer N): fintt(0) { - Init(N); -} - -void IntPolyh_ArrayOfTriangles::Init(const Standard_Integer N) { - Destroy(); - ptr = (void*) (new IntPolyh_Triangle [N]); - n=N; -} - -const Standard_Integer IntPolyh_ArrayOfTriangles::GetN() const { - return(n); -} - -const Standard_Integer IntPolyh_ArrayOfTriangles::NbTriangles() const { - return(fintt); -} - -void IntPolyh_ArrayOfTriangles::SetNbTriangles(const Standard_Integer endaot) { - fintt=endaot; -} - -void IntPolyh_ArrayOfTriangles::IncNbTriangles() { - fintt++; -} - -# ifdef DEB - # define BORNES 1 -# endif -const IntPolyh_Triangle& IntPolyh_ArrayOfTriangles::Value(const Standard_Integer Index) const { -IntPolyh_Triangle* ptrtriangle = (IntPolyh_Triangle*)ptr; -#if BORNES - if(Index<0 || Index>=n) { - cerr<<" Erreur31 "<=n) { - cerr<<" Erreur32 "< %d",n-1); - for(Standard_Integer i=0;i %d",n-1); - for(Standard_Integer i=0;i +#endif +#ifndef _Standard_Macro_HeaderFile +#include +#endif + +#include +//#include +class IntPolyh_Triangle; + +typedef IntPolyh_Array IntPolyh_ArrayOfTriangles; + +#endif diff --git a/src/IntPolyh/IntPolyh_Intersection.cxx b/src/IntPolyh/IntPolyh_Intersection.cxx index 22f05177aa..96785704fd 100755 --- a/src/IntPolyh/IntPolyh_Intersection.cxx +++ b/src/IntPolyh/IntPolyh_Intersection.cxx @@ -27,6 +27,7 @@ #include #include #include +#include #ifdef DEB # define MYDEBUG DEB @@ -164,8 +165,8 @@ void IntPolyh_Intersection::Perform() { } // start from advanced // accept result - nbsectionlines = TSectionLines.NbSectionLines(); - nbtangentzones = TTangentZones.NbTangentZones(); + nbsectionlines = TSectionLines.NbItems(); + nbtangentzones = TTangentZones.NbItems(); // clean up if(aPMaillageStd) delete aPMaillageStd; @@ -293,8 +294,8 @@ Standard_Boolean IntPolyh_Intersection::PerformMaillage // if too many intersections, consider surfaces parallel (eap) if(FinTTC > 200 && - (FinTTC >= theMaillageS->GetArrayOfTriangles(1).NbTriangles() || - FinTTC >= theMaillageS->GetArrayOfTriangles(2).NbTriangles()) ) { + (FinTTC >= theMaillageS->GetArrayOfTriangles(1).NbItems() || + FinTTC >= theMaillageS->GetArrayOfTriangles(2).NbItems()) ) { return Standard_False; } @@ -390,7 +391,7 @@ void IntPolyh_Intersection::MergeCouples anArrays[3] = &anArrayRR; for (i = 0; i < 4; i++) - aNbCouples[i] = anArrays[i]->NbCouples(); + aNbCouples[i] = anArrays[i]->NbItems(); Standard_Boolean isChanged = Standard_True; @@ -444,7 +445,7 @@ Standard_Boolean IntPolyh_Intersection::PerformStd(IntPolyh_PMaillageAffinage& M Standard_Integer& NbCouples) { Standard_Boolean isdone = PerformMaillage(MaillageS); - NbCouples = (isdone) ? (MaillageS->GetArrayOfCouples().NbCouples()) : 0; + NbCouples = (isdone) ? (MaillageS->GetArrayOfCouples().NbItems()) : 0; return isdone; } @@ -464,10 +465,10 @@ Standard_Boolean IntPolyh_Intersection::PerformAdv(IntPolyh_PMaillageAffinage& M isdone = Standard_False; if(isdone) { - NbCouples = MaillageFF->GetArrayOfCouples().NbCouples() + - MaillageFR->GetArrayOfCouples().NbCouples() + - MaillageRF->GetArrayOfCouples().NbCouples() + - MaillageRR->GetArrayOfCouples().NbCouples(); + NbCouples = MaillageFF->GetArrayOfCouples().NbItems() + + MaillageFR->GetArrayOfCouples().NbItems() + + MaillageRF->GetArrayOfCouples().NbItems() + + MaillageRR->GetArrayOfCouples().NbItems(); if(NbCouples > 0) MergeCouples(MaillageFF->GetArrayOfCouples(),MaillageFR->GetArrayOfCouples(), diff --git a/src/IntPolyh/IntPolyh_Intersection_1.cxx b/src/IntPolyh/IntPolyh_Intersection_1.cxx index 4a7fe5905b..4526bb492a 100755 --- a/src/IntPolyh/IntPolyh_Intersection_1.cxx +++ b/src/IntPolyh/IntPolyh_Intersection_1.cxx @@ -24,6 +24,7 @@ #include #include #include +#include Standard_Integer MYPRINT1 = 0; @@ -147,8 +148,8 @@ void IntPolyh_Intersection::Perform(const TColStd_Array1OfReal& Upars1, } // start from advanced // accept result - nbsectionlines = TSectionLines.NbSectionLines(); - nbtangentzones = TTangentZones.NbTangentZones(); + nbsectionlines = TSectionLines.NbItems(); + nbtangentzones = TTangentZones.NbItems(); // clean up if(aPMaillageStd) delete aPMaillageStd; @@ -218,8 +219,8 @@ Standard_Boolean IntPolyh_Intersection::PerformMaillage(const Standard_Boolean i Standard_Real cosa = Abs(Couples[i].AngleValue()); if(cosa > eps) ++npara; } - if(npara >= theMaillageS->GetArrayOfTriangles(1).NbTriangles() || - npara >= theMaillageS->GetArrayOfTriangles(2).NbTriangles() ) { + if(npara >= theMaillageS->GetArrayOfTriangles(1).NbItems() || + npara >= theMaillageS->GetArrayOfTriangles(2).NbItems() ) { return Standard_False; } } @@ -297,8 +298,8 @@ Standard_Boolean IntPolyh_Intersection::PerformMaillage(const TColStd_Array1OfRe Standard_Real cosa = Abs(Couples[i].AngleValue()); if(cosa > eps) ++npara; } - if(npara >= theMaillageS->GetArrayOfTriangles(1).NbTriangles() || - npara >= theMaillageS->GetArrayOfTriangles(2).NbTriangles() ) { + if(npara >= theMaillageS->GetArrayOfTriangles(1).NbItems() || + npara >= theMaillageS->GetArrayOfTriangles(2).NbItems() ) { return Standard_False; } } @@ -339,10 +340,10 @@ Standard_Boolean IntPolyh_Intersection::PerformAdv(const TColStd_Array1OfReal& U isdone = Standard_False; if(isdone) { - NbCouples = MaillageFF->GetArrayOfCouples().NbCouples() + - MaillageFR->GetArrayOfCouples().NbCouples() + - MaillageRF->GetArrayOfCouples().NbCouples() + - MaillageRR->GetArrayOfCouples().NbCouples(); + NbCouples = MaillageFF->GetArrayOfCouples().NbItems() + + MaillageFR->GetArrayOfCouples().NbItems() + + MaillageRF->GetArrayOfCouples().NbItems() + + MaillageRR->GetArrayOfCouples().NbItems(); if(NbCouples > 0) MergeCouples(MaillageFF->GetArrayOfCouples(),MaillageFR->GetArrayOfCouples(), @@ -364,6 +365,6 @@ Standard_Boolean IntPolyh_Intersection::PerformStd(const TColStd_Array1OfReal& U { Standard_Boolean isdone = PerformMaillage(Upars1, Vpars1, Upars2, Vpars2, MaillageS); - NbCouples = (isdone) ? (MaillageS->GetArrayOfCouples().NbCouples()) : 0; + NbCouples = (isdone) ? (MaillageS->GetArrayOfCouples().NbItems()) : 0; return isdone; } diff --git a/src/IntPolyh/IntPolyh_MaillageAffinage.cxx b/src/IntPolyh/IntPolyh_MaillageAffinage.cxx index 4affa9df76..2485a25351 100755 --- a/src/IntPolyh/IntPolyh_MaillageAffinage.cxx +++ b/src/IntPolyh/IntPolyh_MaillageAffinage.cxx @@ -271,7 +271,7 @@ void IntPolyh_MaillageAffinage::FillArrayOfPnt PtrBox->Add(PtXYZ); } } - TPoints.SetNbPoints(iCnt); + TPoints.SetNbItems(iCnt); // IntCurveSurface_ThePolyhedronOfHInter polyhedron(MaSurface, NbSamplesU, @@ -368,7 +368,7 @@ void IntPolyh_MaillageAffinage::FillArrayOfPnt PtrBox->Add(PtXYZ); } } - TPoints.SetNbPoints(CpteurTabPnt); + TPoints.SetNbItems(CpteurTabPnt); Tol*=1.2; @@ -433,7 +433,7 @@ void IntPolyh_MaillageAffinage::FillArrayOfPnt } } // - TPoints.SetNbPoints(iCnt); + TPoints.SetNbItems(iCnt); // IntCurveSurface_ThePolyhedronOfHInter polyhedron(aS, Upars, Vpars); // @@ -530,7 +530,7 @@ void IntPolyh_MaillageAffinage::FillArrayOfPnt } } // - TPoints.SetNbPoints(iCnt); + TPoints.SetNbItems(iCnt); // Tol*=1.2; // @@ -612,7 +612,7 @@ void IntPolyh_MaillageAffinage::CommonBox (const Bnd_Box &, ZMin-=Z; ZMax+=Z; //Marking of points included in the common - const Standard_Integer FinTP1 = TPoints1.NbPoints(); + const Standard_Integer FinTP1 = TPoints1.NbItems(); // for(Standard_Integer i=0; i= NbTTC) { - TTrianglesContacts.SetNbCouples(CpteurTab); + TTrianglesContacts.SetNbItems(CpteurTab); return(CpteurTab); } @@ -3330,7 +3330,7 @@ Standard_Integer IntPolyh_MaillageAffinage::TriangleCompare () } } } - TTrianglesContacts.SetNbCouples(CpteurTab); + TTrianglesContacts.SetNbItems(CpteurTab); return(CpteurTab); } @@ -3342,7 +3342,7 @@ Standard_Integer IntPolyh_MaillageAffinage::TriangleCompare () //======================================================================= void IntPolyh_MaillageAffinage::StartPointsCalcul() const { - const Standard_Integer FinTTC = TTrianglesContacts.NbCouples(); + const Standard_Integer FinTTC = TTrianglesContacts.NbItems(); // printf("StartPointsCalcul() from IntPolyh_MaillageAffinage.cxx : StartPoints:\n"); for(Standard_Integer ii=0; ii 0 && TSectionLines[SectionLineIndex-1].NbStartPoints() == 0) SectionLineIndex -= 1; else - TSectionLines.IncrementNbSectionLines(); + TSectionLines.IncrementNbItems(); IntPolyh_SectionLine & MySectionLine=TSectionLines[SectionLineIndex]; if (MySectionLine.GetN() == 0) // eap @@ -3559,8 +3559,8 @@ Standard_Integer IntPolyh_MaillageAffinage::StartPointsChain } else { if(NbPoints11>1) {//The point is input in the array TTangentZones - TTangentZones[TTangentZones.NbTangentZones()]=SP11;//default list number = -1 - TTangentZones.IncrementNbTangentZones(); + TTangentZones[TTangentZones.NbItems()]=SP11;//default list number = -1 + TTangentZones.IncrementNbItems(); } else { @@ -3606,8 +3606,8 @@ Standard_Integer IntPolyh_MaillageAffinage::StartPointsChain else { if(NbPoints12>1) {//The points are input in the array TTangentZones - TTangentZones[TTangentZones.NbTangentZones()]=SP12;//default list number = -1 - TTangentZones.IncrementNbTangentZones(); + TTangentZones[TTangentZones.NbItems()]=SP12;//default list number = -1 + TTangentZones.IncrementNbItems(); } else { @@ -4018,19 +4018,19 @@ static TopoDS_Shape TriangleShape(const IntPolyh_ArrayOfTriangles & TTriangles, const IntPolyh_ArrayOfPoints & TPoints) { TopoDS_Face aFace; - if (TPoints.NbPoints() < 1 || TTriangles.NbTriangles() < 1) return aFace; + if (TPoints.NbItems() < 1 || TTriangles.NbItems() < 1) return aFace; Handle(Poly_Triangulation) aPTriangulation = - new Poly_Triangulation(TPoints.NbPoints(),TTriangles.NbTriangles(),Standard_False); + new Poly_Triangulation(TPoints.NbItems(),TTriangles.NbItems(),Standard_False); TColgp_Array1OfPnt & aPNodes = aPTriangulation->ChangeNodes(); Poly_Array1OfTriangle & aPTrialgles = aPTriangulation->ChangeTriangles(); Standard_Integer i; - for (i=0; iL23) && (L12>L31)) { - const Standard_Integer FinTP = TPoints.NbPoints(); + const Standard_Integer FinTP = TPoints.NbItems(); (TPoints[FinTP]).Middle( MySurface,P1, P2); ///les nouveaux triangles @@ -758,7 +758,7 @@ void IntPolyh_Triangle::MiddleRefinement(const Standard_Integer NumTri, } else if ((L23>L31) && (L23>L12)){ - const Standard_Integer FinTP = TPoints.NbPoints(); + const Standard_Integer FinTP = TPoints.NbItems(); (TPoints[FinTP]).Middle(MySurface, P2,P3); ///les nouveaux triangles @@ -844,7 +844,7 @@ void IntPolyh_Triangle::MiddleRefinement(const Standard_Integer NumTri, } } else { - const Standard_Integer FinTP = TPoints.NbPoints(); + const Standard_Integer FinTP = TPoints.NbItems(); (TPoints[FinTP]).Middle(MySurface, P3,P1); Standard_Integer T1,T2,T3,T4; @@ -934,7 +934,7 @@ void IntPolyh_Triangle::MiddleRefinement(const Standard_Integer NumTri, Fleche=-1.0; IP=0; - TPoints.IncNbPoints(); + TPoints.IncrementNbItems(); } //======================================================================= @@ -948,7 +948,7 @@ void IntPolyh_Triangle::MultipleMiddleRefinement(const Standard_Integer NbAffina IntPolyh_ArrayOfTriangles &TTriangles, IntPolyh_ArrayOfEdges & TEdges) { - const Standard_Integer FinTTInit = TTriangles.NbTriangles(); + const Standard_Integer FinTTInit = TTriangles.NbItems(); //On sait qu'il faut affiner au moins une fois TTriangles[NumTri].MiddleRefinement(NumTri,MySurface,TPoints, @@ -1020,16 +1020,16 @@ void IntPolyh_Triangle::MultipleMiddleRefinement2(const Standard_Real CritereAff IntPolyh_ArrayOfTriangles &TTriangles, IntPolyh_ArrayOfEdges & TEdges) { - const Standard_Integer FinTTInit = TTriangles.NbTriangles(); + const Standard_Integer FinTTInit = TTriangles.NbItems(); Standard_Integer CritereArret=FinTTInit+250; //On sait qu'il faut affiner une fois au moins MiddleRefinement(NumTri,MySurface,TPoints, TTriangles,TEdges); - Standard_Integer FinTT = TTriangles.NbTriangles();// FinTT n'est pas une constante, elle augmente avec l'affinage + Standard_Integer FinTT = TTriangles.NbItems();// FinTT n'est pas une constante, elle augmente avec l'affinage - for(Standard_Integer iii=FinTTInit; iii<(FinTT=TTriangles.NbTriangles()); iii++) { + for(Standard_Integer iii=FinTTInit; iii<(FinTT=TTriangles.NbItems()); iii++) { IntPolyh_Triangle& TriangleCourant = TTriangles[iii]; if(TriangleCourant.CompareBoxTriangle(b,TPoints)==0) //On n'affine pas le triangle @@ -1049,7 +1049,7 @@ void IntPolyh_Triangle::MultipleMiddleRefinement2(const Standard_Real CritereAff //======================================================================= void IntPolyh_Triangle::SetEdgeandOrientation(const Standard_Integer EdgeIndex, const IntPolyh_ArrayOfEdges &TEdges) { - const Standard_Integer FinTE = TEdges.NbEdges(); + const Standard_Integer FinTE = TEdges.NbItems(); Standard_Integer PE1 =0,PE2 =0;