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
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
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;
--- /dev/null
+// 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 <NCollection_Vector.hxx>
+#include <stdio.h>
+
+/**
+* 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 <aIncrement> 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 Type> class IntPolyh_Array {
+ public:
+ typedef NCollection_Vector <Type> 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 <aN> 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<myNbItems;i++) {
+ (*this)[i].Dump();
+ }
+ printf("\n");
+ }
+
+ protected:
+ Standard_Integer myNbAllocated;
+ Standard_Integer myNbItems;
+ Standard_Integer myIncrement;
+ IntPolyh_VectorOfType myVectorOfType;
+};
+
+#endif
+++ /dev/null
--- Created on: 1999-04-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 ArrayOfCouples from IntPolyh
-
-uses
-
- Couple from IntPolyh
-
-is
-
- Create;
-
- Create(nn: Integer from Standard);
-
- Init(me: in out; nn: Integer from Standard)
- is static;
-
- NbCouples(me)
- returns Integer from Standard
- is static;
-
- SetNbCouples(me: in out; fint: Integer from Standard)
- is static;
-
- IncNbCouples(me: in out)
- is static;
-
- Value(me; nn: Integer from Standard)
- ---C++: alias operator []
- ---C++: return const &
- returns Couple from IntPolyh
- is static;
-
- ChangeValue(me: in out; nn: Integer from Standard)
- ---C++: alias operator []
- ---C++: return &
- returns Couple from IntPolyh
- is static;
-
- Destroy(me: in out)
- ---C++: alias ~
- is static;
-
- Dump(me)
- is static;
-
-
-fields
-
- n,eoa : Integer from Standard;
- ptr :Address from Standard;
-
-end ArrayOfCouples from IntPolyh;
+++ /dev/null
-// Created on: 1999-04-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 <IntPolyh_ArrayOfCouples.ixx>
-#include <stdio.h>
-
-#include <Standard_Stream.hxx>
-
-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 "<<endl;
- printf("Value() from IntPolyh_ArrayOfCouples : value out of array\n");
- }
-#endif
- return(ptrCouple[Index]);
-}
-
-IntPolyh_Couple& IntPolyh_ArrayOfCouples::ChangeValue(const Standard_Integer Index) {
- IntPolyh_Couple* ptrCouple = (IntPolyh_Couple*) ptr;
-#if BORNES
- if(Index<0 || Index>=n) {
- cerr<<" Erreur4"<<endl;
- printf("ChangeValue() from IntPolyh_ArrayOfCouples : value out of array\n");
- }
-#endif
- return(ptrCouple[Index]);
-}
-
-void IntPolyh_ArrayOfCouples::Destroy() {
- if(n) {
- if(ptr) {
- IntPolyh_Couple* ptrCouple = (IntPolyh_Couple*) ptr;
- delete [] ptrCouple;
- ptrCouple=0;
- ptr=0;
- n=0;
- }
- }
-}
-
-void IntPolyh_ArrayOfCouples::Dump() const{
- printf("\n ArrayOfCouples 0-> %d",n-1);
- for(Standard_Integer i=0;i<n;i++) {
- (*this)[i].Dump(i);
- }
- printf("\n");
-}
-
-
-
-
-
-
-
--- /dev/null
+// 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_ArrayOfCouples_HeaderFile
+#define IntPolyh_ArrayOfCouples_HeaderFile
+
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+#ifndef _Standard_Macro_HeaderFile
+#include <Standard_Macro.hxx>
+#endif
+
+#include <IntPolyh_Array.hxx>
+#include <IntPolyh_Couple.hxx>
+
+typedef IntPolyh_Array <IntPolyh_Couple> IntPolyh_ArrayOfCouples;
+
+#endif
+++ /dev/null
--- 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;
-
-
-
+++ /dev/null
-// 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 <IntPolyh_ArrayOfEdges.ixx>
-#include <stdio.h>
-#include <Standard_Stream.hxx>
-
-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"<<endl;
- printf("Value() from IntPolyh_ArrayOfEdges : ERROR value outside of the array\n");
- }
-#endif
- return(ptredge[Index]);
-}
-
-IntPolyh_Edge& IntPolyh_ArrayOfEdges::ChangeValue(const Standard_Integer Index) {
- IntPolyh_Edge* ptredge = (IntPolyh_Edge*) ptr;
-#if BORNES
- if(Index<0 || Index>=n) {
- cerr<<" Erreur2 chgVal"<<endl;
- printf("ChangeValue() from IntPolyh_ArrayOfEdges : ERROR value outside of the array\n");
- }
-#endif
- return(ptredge[Index]);
-}
-
-void IntPolyh_ArrayOfEdges::Destroy() {
- if(n) {
- if(ptr) {
- IntPolyh_Edge* ptredge = (IntPolyh_Edge*) ptr;
- delete [] ptredge;
- ptredge=0;
- ptr=0;
- n=0;
- }
- }
-}
-
-IntPolyh_ArrayOfEdges & IntPolyh_ArrayOfEdges::Copy(const IntPolyh_ArrayOfEdges& Other) {
- if(ptr==Other.ptr) return(*this);
- Destroy();
- n=Other.n;
- ptr = (void*) (new IntPolyh_Edge[n]);
- for(Standard_Integer i=0;i<n;i++) {
- (*this)[i]=Other[i];
- }
- return(*this);
-}
-
-void IntPolyh_ArrayOfEdges::Dump() const{
- printf("\n ArrayOfEdges 0-> %d",n-1);
- for(Standard_Integer i=0;i<n;i++) {
- (*this)[i].Dump(i);
- }
- printf("\n");
-}
-
-
-
-
--- /dev/null
+// 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_ArrayOfEdges_HeaderFile
+#define IntPolyh_ArrayOfEdges_HeaderFile
+
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+#ifndef _Standard_Macro_HeaderFile
+#include <Standard_Macro.hxx>
+#endif
+
+#include <IntPolyh_Array.hxx>
+#include <IntPolyh_Edge.hxx>
+
+typedef IntPolyh_Array <IntPolyh_Edge> IntPolyh_ArrayOfEdges;
+
+#endif
+++ /dev/null
--- 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;
+++ /dev/null
-// 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 <IntPolyh_ArrayOfPoints.ixx>
-
-#include <stdio.h>
-
-
-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 "<<endl;
- printf("Value() from IntPolyh_ArrayOfPoints : ERROR value outside of the array\n");
- }
-#endif
- return(ptrpoint[Index]);
-}
-
-IntPolyh_Point& IntPolyh_ArrayOfPoints::ChangeValue(const Standard_Integer Index) {
- IntPolyh_Point *ptrpoint = (IntPolyh_Point *)ptr;
-#if BORNES
- if(Index<0 || Index>=n) {
- cerr<<" Erreur1 "<<endl;
- printf("ChangeValue() from IntPolyh_ArrayOfPoints : ERROR value outside of the array\n");
- }
-#endif
- return(ptrpoint[Index]);
-}
-
-void IntPolyh_ArrayOfPoints::Destroy() {
- if(n) {
- if(ptr) {
- IntPolyh_Point *ptrpoint = (IntPolyh_Point *)ptr;
- delete [] ptrpoint;
- ptrpoint=0;
- ptr=0;
- n=0;
- }
- }
-}
-
-IntPolyh_ArrayOfPoints & IntPolyh_ArrayOfPoints::Copy(const IntPolyh_ArrayOfPoints& Other) {
- if(ptr==Other.ptr) return(*this);
- Destroy();
- n=Other.n;
- ptr = (void *) (new IntPolyh_Point[n]);
- for(Standard_Integer i=0;i<=n;i++) {
- (*this)[i]=Other[i];
- }
- return(*this);
-}
-
-void IntPolyh_ArrayOfPoints::Dump() const{
- printf("\n ArrayOfPoints 0-> %d\n",fintp-1);
- printf("size %d, room left%d", n, n-fintp);
- for(Standard_Integer i=0;i<fintp;i++) {
- (*this)[i].Dump(i);
- }
- printf("\n");
-}
-
-
-
-
-
-
-
--- /dev/null
+// 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_ArrayOfPoints_HeaderFile
+#define IntPolyh_ArrayOfPoints_HeaderFile
+
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+#ifndef _Standard_Macro_HeaderFile
+#include <Standard_Macro.hxx>
+#endif
+
+#include <IntPolyh_Array.hxx>
+#include <IntPolyh_Point.hxx>
+
+typedef IntPolyh_Array <IntPolyh_Point> IntPolyh_ArrayOfPoints;
+
+#endif
+++ /dev/null
--- 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;
+++ /dev/null
-// 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 <IntPolyh_StartPoint.ixx>
-#include <IntPolyh_ArrayOfSectionLines.ixx>
-#include <stdio.h>
-
-
-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 "<<endl; cout<<"1dd";}
-#endif
- return(ptrstpoint[Index]);
-}
-
-IntPolyh_SectionLine& IntPolyh_ArrayOfSectionLines::ChangeValue(const Standard_Integer Index) {
- IntPolyh_SectionLine *ptrstpoint = (IntPolyh_SectionLine *)ptr;
-#if BORNES
- if(Index<0 || Index>=n) { cerr<<" Erreur1 "<<endl; cout<<"1dd"; }
-#endif
- return(ptrstpoint[Index]);
-}
-
-void IntPolyh_ArrayOfSectionLines::Destroy() {
- if(n) {
- if(ptr) {
- IntPolyh_SectionLine *ptrsectionline = (IntPolyh_SectionLine *)ptr;
- for(Standard_Integer i=0; i<n; i++)
- ptrsectionline[i].Destroy();
- delete [] ptrsectionline;
- ptrsectionline=0;
- ptr=0;
- n=0;
- }
- }
-}
-
-IntPolyh_ArrayOfSectionLines & IntPolyh_ArrayOfSectionLines::Copy(const IntPolyh_ArrayOfSectionLines& Other) {
- if(ptr==Other.ptr) return(*this);
- Destroy();
- n=Other.n;
- ptr = (void *) (new IntPolyh_SectionLine[n]);
- for(Standard_Integer i=0;i<=n;i++) {
- (*this)[i]=Other[i];
- }
- return(*this);
-}
-
-void IntPolyh_ArrayOfSectionLines::Dump() const{
- printf("\n ArrayOfSectionLines 0-> %d",nbsectionlines-1);
- for(Standard_Integer i=0;i<nbsectionlines;i++) {
- (*this)[i].Dump();
- }
- printf("\n");
-}
-
--- /dev/null
+// 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_ArrayOfSectionLines_HeaderFile
+#define IntPolyh_ArrayOfSectionLines_HeaderFile
+
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+#ifndef _Standard_Macro_HeaderFile
+#include <Standard_Macro.hxx>
+#endif
+
+#include <IntPolyh_Array.hxx>
+#include <IntPolyh_SectionLine.hxx>
+
+typedef IntPolyh_Array <IntPolyh_SectionLine> IntPolyh_ArrayOfSectionLines;
+
+#endif
+++ /dev/null
--- 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;
+++ /dev/null
-// 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 <IntPolyh_StartPoint.ixx>
-#include <IntPolyh_ArrayOfStartPoints.ixx>
-#include <stdio.h>
-
-
-
-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 "<<endl; cout<<"1dd";}
-#endif
- return(ptrstpoint[Index]);
-}
-
-IntPolyh_StartPoint& IntPolyh_ArrayOfStartPoints::ChangeValue(const Standard_Integer Index) {
- IntPolyh_StartPoint *ptrstpoint = (IntPolyh_StartPoint *)ptr;
-#if BORNES
- if(Index<0 || Index>=n) { cerr<<" Erreur1 "<<endl; cout<<"1dd"; }
-#endif
- return(ptrstpoint[Index]);
-}
-
-void IntPolyh_ArrayOfStartPoints::Destroy() {
- if(n) {
- if(ptr) {
- IntPolyh_StartPoint *ptrstpoint = (IntPolyh_StartPoint *)ptr;
- delete [] ptrstpoint;
- ptrstpoint=0;
- ptr=0;
- n=0;
- }
- }
-}
-
-IntPolyh_ArrayOfStartPoints & IntPolyh_ArrayOfStartPoints::Copy(const IntPolyh_ArrayOfStartPoints& Other) {
- if(ptr==Other.ptr) return(*this);
- Destroy();
- n=Other.NbPoints();
- ptr = (void *) (new IntPolyh_StartPoint[n]);
- for(Standard_Integer i=0;i<=n;i++) {
- (*this)[i]=Other[i];
- }
- return(*this);
-}
-
-void IntPolyh_ArrayOfStartPoints::Dump() const{
- printf("\n ArrayOfStartPoints 0-> %d",n-1);
- for(Standard_Integer i=0;i<n;i++) {
- (*this)[i].Dump(i);
- }
- printf("\n");
-}
-
--- /dev/null
+// 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_ArrayOfStartPoints_HeaderFile
+#define IntPolyh_ArrayOfStartPoints_HeaderFile
+
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+#ifndef _Standard_Macro_HeaderFile
+#include <Standard_Macro.hxx>
+#endif
+
+#include <IntPolyh_Array.hxx>
+#include <IntPolyh_StartPoint.hxx>
+
+typedef IntPolyh_Array <IntPolyh_StartPoint> IntPolyh_ArrayOfStartPoints;
+
+#endif
+++ /dev/null
--- 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;
-
+++ /dev/null
-// 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 <IntPolyh_StartPoint.ixx>
-#include <IntPolyh_ArrayOfTangentZones.ixx>
-#include <stdio.h>
-
-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 "<<endl;
- printf("Value() from IntPolyh_ArrayOfTangentZones :ERROR value out of array\n");
- }
-#endif
- return(ptrstpoint[Index]);
-}
-
-IntPolyh_StartPoint& IntPolyh_ArrayOfTangentZones::ChangeValue(const Standard_Integer Index) {
- IntPolyh_StartPoint *ptrstpoint = (IntPolyh_StartPoint *)ptr;
-#if BORNES
- if(Index<0 || Index>=n) {
- cerr<<" Erreur1 "<<endl;
- printf("Value() from IntPolyh_ArrayOfTangentZones :ERROR value out of array\n");
- }
-#endif
- return(ptrstpoint[Index]);
-}
-
-void IntPolyh_ArrayOfTangentZones::Destroy() {
- if(n) {
- if(ptr) {
- IntPolyh_StartPoint *ptrstpoint = (IntPolyh_StartPoint *)ptr;
- delete [] ptrstpoint;
- ptrstpoint=0;
- ptr=0;
- n=0;
- }
- }
-}
-
-IntPolyh_ArrayOfTangentZones & IntPolyh_ArrayOfTangentZones::Copy(const IntPolyh_ArrayOfTangentZones& Other) {
- if(ptr==Other.ptr) return(*this);
- Destroy();
- n=Other.n;
- ptr = (void *) (new IntPolyh_StartPoint[n]);
- for(Standard_Integer i=0;i<=n;i++) {
- (*this)[i]=Other[i];
- }
- return(*this);
-}
-
-void IntPolyh_ArrayOfTangentZones::Dump() const{
- printf("\n ArrayOfTangentZones 0-> %d",nbtangentzones-1);
- for(Standard_Integer i=0;i<nbtangentzones;i++) {
- (*this)[i].Dump(i);
- }
- printf("\n");
-}
-
-
-
--- /dev/null
+// 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_ArrayOfTangentZones_HeaderFile
+#define IntPolyh_ArrayOfTangentZones_HeaderFile
+
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+#ifndef _Standard_Macro_HeaderFile
+#include <Standard_Macro.hxx>
+#endif
+
+#include <IntPolyh_Array.hxx>
+#include <IntPolyh_StartPoint.hxx>
+
+typedef IntPolyh_Array <IntPolyh_StartPoint> IntPolyh_ArrayOfTangentZones;
+
+#endif
+++ /dev/null
--- 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;
+++ /dev/null
-// 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 <IntPolyh_ArrayOfTriangles.ixx>
-#include <stdio.h>
-#include <Standard_Stream.hxx>
-
-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 "<<endl;
- printf("Value() from IntPolyh_ArrayOfTriangles.cxx : ERROR value out of array\n");
- }
-#endif
- return(ptrtriangle[Index]);
-}
-
-IntPolyh_Triangle& IntPolyh_ArrayOfTriangles::ChangeValue(const Standard_Integer Index) {
- IntPolyh_Triangle* ptrtriangle = (IntPolyh_Triangle*)ptr;
-#if BORNES
- if(Index<0 || Index>=n) {
- cerr<<" Erreur32 "<<endl;
- printf("ChangeValue() from IntPolyh_ArrayOfTriangles.cxx : ERROR value out of array\n");
- }
-#endif
- return(ptrtriangle[Index]);
-}
-
-
-IntPolyh_ArrayOfTriangles & IntPolyh_ArrayOfTriangles::Copy(const IntPolyh_ArrayOfTriangles& Other) {
- if(ptr==Other.ptr) return(*this);
- Destroy();
- n=Other.n;
- ptr = (void *)(new IntPolyh_Triangle[n]);
- for(Standard_Integer i=0;i<n;i++) {
- (*this)[i]=Other[i];
- }
- return(*this);
-}
-
-void IntPolyh_ArrayOfTriangles::Destroy(){
- if(n) {
- if(ptr) {
- IntPolyh_Triangle* ptrtriangle = (IntPolyh_Triangle*)ptr;
- delete [] ptrtriangle;
- ptrtriangle=0;
- ptr=0;
- n=0;
- }
- }
-}
-
-
-void IntPolyh_ArrayOfTriangles::Dump() const{
- printf("\n ArrayOfTriangles 0-> %d",n-1);
- for(Standard_Integer i=0;i<n;i++) {
- ((*this)[i]).Dump(i);
- }
- printf("\n");
-}
-
-void IntPolyh_ArrayOfTriangles::DumpFleches() const{
- printf("\n ArrayOfTriangles 0-> %d",n-1);
- for(Standard_Integer i=0;i<n;i++) {
- ((*this)[i]).DumpFleche(i);
- }
- printf("\n");
-}
-
--- /dev/null
+// 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_ArrayOfTriangles_HeaderFile
+#define IntPolyh_ArrayOfTriangles_HeaderFile
+
+#ifndef _Standard_HeaderFile
+#include <Standard.hxx>
+#endif
+#ifndef _Standard_Macro_HeaderFile
+#include <Standard_Macro.hxx>
+#endif
+
+#include <IntPolyh_Array.hxx>
+//#include <IntPolyh_Triangle.hxx>
+class IntPolyh_Triangle;
+
+typedef IntPolyh_Array <IntPolyh_Triangle> IntPolyh_ArrayOfTriangles;
+
+#endif
#include <IntPolyh_StartPoint.hxx>
#include <IntPolyh_MaillageAffinage.hxx>
#include <IntPolyh_Couple.hxx>
+#include <IntPolyh_Triangle.hxx>
#ifdef DEB
# define MYDEBUG DEB
} // start from advanced
// accept result
- nbsectionlines = TSectionLines.NbSectionLines();
- nbtangentzones = TTangentZones.NbTangentZones();
+ nbsectionlines = TSectionLines.NbItems();
+ nbtangentzones = TTangentZones.NbItems();
// clean up
if(aPMaillageStd) delete aPMaillageStd;
// 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;
}
anArrays[3] = &anArrayRR;
for (i = 0; i < 4; i++)
- aNbCouples[i] = anArrays[i]->NbCouples();
+ aNbCouples[i] = anArrays[i]->NbItems();
Standard_Boolean isChanged = Standard_True;
Standard_Integer& NbCouples)
{
Standard_Boolean isdone = PerformMaillage(MaillageS);
- NbCouples = (isdone) ? (MaillageS->GetArrayOfCouples().NbCouples()) : 0;
+ NbCouples = (isdone) ? (MaillageS->GetArrayOfCouples().NbItems()) : 0;
return isdone;
}
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(),
#include <IntPolyh_MaillageAffinage.hxx>
#include <IntPolyh_ArrayOfCouples.hxx>
#include <IntPolyh_Couple.hxx>
+#include <IntPolyh_Triangle.hxx>
Standard_Integer MYPRINT1 = 0;
} // start from advanced
// accept result
- nbsectionlines = TSectionLines.NbSectionLines();
- nbtangentzones = TTangentZones.NbTangentZones();
+ nbsectionlines = TSectionLines.NbItems();
+ nbtangentzones = TTangentZones.NbItems();
// clean up
if(aPMaillageStd) delete aPMaillageStd;
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;
}
}
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;
}
}
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(),
{
Standard_Boolean isdone = PerformMaillage(Upars1, Vpars1, Upars2, Vpars2,
MaillageS);
- NbCouples = (isdone) ? (MaillageS->GetArrayOfCouples().NbCouples()) : 0;
+ NbCouples = (isdone) ? (MaillageS->GetArrayOfCouples().NbItems()) : 0;
return isdone;
}
PtrBox->Add(PtXYZ);
}
}
- TPoints.SetNbPoints(iCnt);
+ TPoints.SetNbItems(iCnt);
//
IntCurveSurface_ThePolyhedronOfHInter polyhedron(MaSurface,
NbSamplesU,
PtrBox->Add(PtXYZ);
}
}
- TPoints.SetNbPoints(CpteurTabPnt);
+ TPoints.SetNbItems(CpteurTabPnt);
Tol*=1.2;
}
}
//
- TPoints.SetNbPoints(iCnt);
+ TPoints.SetNbItems(iCnt);
//
IntCurveSurface_ThePolyhedronOfHInter polyhedron(aS, Upars, Vpars);
//
}
}
//
- TPoints.SetNbPoints(iCnt);
+ TPoints.SetNbItems(iCnt);
//
Tol*=1.2;
//
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<FinTP1; i++) {
Standard_Integer i ;
for( i=0; i<FinTP1; i++) {
Pt1.SetPartOfCommon(r);
}
- const Standard_Integer FinTP2 = TPoints2.NbPoints();
+ const Standard_Integer FinTP2 = TPoints2.NbItems();
for(Standard_Integer ii=0; ii<FinTP2; ii++) {
IntPolyh_Point & Pt2 = TPoints2[ii];
Standard_Integer rr;
TEdges[CpteurTabEdges].SetSecondTriangle(BoucleMeshV*2*(NbSamplesV-1)+(NbSamplesV-2)*2);
CpteurTabEdges++;
}
- TEdges.SetNbEdges(CpteurTabEdges);
+ TEdges.SetNbItems(CpteurTabEdges);
}
}
PntInit++;//Pass the last point of the column
}
- TTriangles.SetNbTriangles(CpteurTabTriangles);
- const Standard_Integer FinTT = TTriangles.NbTriangles();
+ TTriangles.SetNbItems(CpteurTabTriangles);
+ const Standard_Integer FinTT = TTriangles.NbItems();
if (FinTT==0) {
}
}
//=======================================================================
void IntPolyh_MaillageAffinage::LinkEdges2Triangles()
{
- const Standard_Integer FinTT1 = TTriangles1.NbTriangles();
- const Standard_Integer FinTT2 = TTriangles2.NbTriangles();
+ const Standard_Integer FinTT1 = TTriangles1.NbItems();
+ const Standard_Integer FinTT2 = TTriangles2.NbItems();
for(Standard_Integer uiui1=0; uiui1<FinTT1; uiui1++) {
IntPolyh_Triangle & MyTriangle1=TTriangles1[uiui1];
//=======================================================================
void IntPolyh_MaillageAffinage::CommonPartRefinement()
{
- Standard_Integer FinInit1 = TTriangles1.NbTriangles();
+ Standard_Integer FinInit1 = TTriangles1.NbItems();
for(Standard_Integer i=0; i<FinInit1; i++) {
if(TTriangles1[i].IndiceIntersectionPossible()!=0)
TTriangles1[i].MiddleRefinement(i,MaSurface1,TPoints1,TTriangles1,TEdges1);
}
- Standard_Integer FinInit2=TTriangles2.NbTriangles();
+ Standard_Integer FinInit2=TTriangles2.NbItems();
for(Standard_Integer ii=0; ii<FinInit2; ii++) {
if(TTriangles2[ii].IndiceIntersectionPossible()!=0)
TTriangles2[ii].MiddleRefinement(ii,MaSurface2,TPoints2,TTriangles2,TEdges2);
void IntPolyh_MaillageAffinage::LocalSurfaceRefinement(const Standard_Integer SurfID) {
//refine locally, but systematically the chosen surface
if (SurfID==1) {
- const Standard_Integer FinInit1 = TTriangles1.NbTriangles();
+ const Standard_Integer FinInit1 = TTriangles1.NbItems();
for(Standard_Integer i=0; i<FinInit1; i++) {
if(TTriangles1[i].IndiceIntersectionPossible()!=0)
TTriangles1[i].MiddleRefinement(i,MaSurface1,TPoints1,TTriangles1,TEdges1);
}
//
if (SurfID==2) {
- const Standard_Integer FinInit2 = TTriangles2.NbTriangles();
+ const Standard_Integer FinInit2 = TTriangles2.NbItems();
for(Standard_Integer ii=0; ii<FinInit2; ii++) {
if(TTriangles2[ii].IndiceIntersectionPossible()!=0)
TTriangles2[ii].MiddleRefinement(ii,MaSurface2,TPoints2,TTriangles2,TEdges2);
FlecheMax=-RealLast();
FlecheMin=RealLast();
FlecheMoy=0.0;
- const Standard_Integer FinTT = TTriangles.NbTriangles();
+ const Standard_Integer FinTT = TTriangles.NbItems();
for(CpteurTabFleche=0; CpteurTabFleche<FinTT; CpteurTabFleche++) {
IntPolyh_Triangle &Triangle = TTriangles[CpteurTabFleche];
//=======================================================================
void IntPolyh_MaillageAffinage::TrianglesDeflectionsRefinementBSB()
{
- const Standard_Integer FinTT1 = TTriangles1.NbTriangles();
- const Standard_Integer FinTT2 = TTriangles2.NbTriangles();
+ const Standard_Integer FinTT1 = TTriangles1.NbItems();
+ const Standard_Integer FinTT2 = TTriangles2.NbItems();
ComputeDeflections(1);
// To estimate a surface in general it can be interesting
Standard_Integer CpteurTab=0;
Standard_Integer CpteurTabSP=0;
Standard_Real CoupleAngle=-2.0;
- const Standard_Integer FinTT1 = TTriangles1.NbTriangles();
- const Standard_Integer FinTT2 = TTriangles2.NbTriangles();
+ const Standard_Integer FinTT1 = TTriangles1.NbItems();
+ const Standard_Integer FinTT2 = TTriangles2.NbItems();
for(Standard_Integer i_S1=0; i_S1<FinTT1; i_S1++) {
for(Standard_Integer i_S2=0; i_S2<FinTT2; i_S2++){
{
Standard_Integer CpteurTab=0;
- const Standard_Integer FinTT1 = TTriangles1.NbTriangles();
- const Standard_Integer FinTT2 = TTriangles2.NbTriangles();
+ const Standard_Integer FinTT1 = TTriangles1.NbItems();
+ const Standard_Integer FinTT2 = TTriangles2.NbItems();
Standard_Integer TTClimit = 200;
Standard_Integer NbTTC = FinTT1 * FinTT2 / 10;
if (CpteurTab >= NbTTC)
{
- TTrianglesContacts.SetNbCouples(CpteurTab);
+ TTrianglesContacts.SetNbItems(CpteurTab);
return(CpteurTab);
}
}
}
}
- TTrianglesContacts.SetNbCouples(CpteurTab);
+ TTrianglesContacts.SetNbItems(CpteurTab);
return(CpteurTab);
}
//=======================================================================
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<FinTTC; ii++) {
IntPolyh_StartPoint SP1,SP2;
IntPolyh_ArrayOfCouples &TTrianglesContacts)
{
Standard_Integer Test=0;
- const Standard_Integer FinTTC = TTrianglesContacts.NbCouples();
+ const Standard_Integer FinTTC = TTrianglesContacts.NbItems();
for (Standard_Integer oioi=0; oioi<FinTTC; oioi++) {
IntPolyh_Couple TestCouple = TTrianglesContacts[oioi];
if ( (TestCouple.FirstValue()==T1)&&(TestCouple.AnalyseFlagValue()!=1) ) {
Standard_Integer Test1=0;
Standard_Integer Test2=0;
Standard_Integer Test3=0;
- const Standard_Integer FinTTC = TTrianglesContacts.NbCouples();
+ const Standard_Integer FinTTC = TTrianglesContacts.NbItems();
for (Standard_Integer oioi=0; oioi<FinTTC; oioi++) {
IntPolyh_Couple TestCouple = TTrianglesContacts[oioi];
if( (Test1==0)||(Test2==0)||(Test3==0) ) {
if( (SP.E1()==-1)||(SP.E2()==-1) ) {
//The tops of triangle are analyzed
//It is checked if they are not in the array TTangentZones
- Standard_Integer FinTTZ=TTangentZones.NbTangentZones();
+ Standard_Integer FinTTZ=TTangentZones.NbItems();
for(Standard_Integer uiui=0; uiui<FinTTZ; uiui++) {
IntPolyh_StartPoint TestSP=TTangentZones[uiui];
if ( (Abs(SP.U1()-TestSP.U1())<MyConfusionPrecision)
if (Test) {//the top does not belong to the list of TangentZones
SP.SetChainList(-1);
TTangentZones[FinTTZ]=SP;
- TTangentZones.IncrementNbTangentZones();
+ TTangentZones.IncrementNbItems();
Test=0;//the examined point is a top
}
}
IntPolyh_ArrayOfTangentZones& TTangentZones)
{
//Loop on the array of couples filled in the function COMPARE()
- const Standard_Integer FinTTC = TTrianglesContacts.NbCouples();
+ const Standard_Integer FinTTC = TTrianglesContacts.NbItems();
//Array of tops of triangles
for(Standard_Integer IndexA=0; IndexA<FinTTC; IndexA++) {
//It is checked if the couple of triangles has not been already examined.
if(TTrianglesContacts[IndexA].AnalyseFlagValue()!=1) {
- Standard_Integer SectionLineIndex=TSectionLines.NbSectionLines();
+ Standard_Integer SectionLineIndex=TSectionLines.NbItems();
// fill last section line if still empty (eap)
if (SectionLineIndex > 0
&&
TSectionLines[SectionLineIndex-1].NbStartPoints() == 0)
SectionLineIndex -= 1;
else
- TSectionLines.IncrementNbSectionLines();
+ TSectionLines.IncrementNbItems();
IntPolyh_SectionLine & MySectionLine=TSectionLines[SectionLineIndex];
if (MySectionLine.GetN() == 0) // eap
}
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 {
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 {
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; i<TPoints.NbPoints(); i++) {
+ for (i=0; i<TPoints.NbItems(); i++) {
const IntPolyh_Point& P = TPoints[i];
aPNodes(i+1).SetCoord(P.X(), P.Y(), P.Z());
}
- for (i=0; i<TTriangles.NbTriangles(); i++) {
+ for (i=0; i<TTriangles.NbItems(); i++) {
const IntPolyh_Triangle& T = TTriangles[i];
aPTrialgles(i+1).Set(T.FirstPoint()+1, T.SecondPoint()+1, T.ThirdPoint()+1);
}
IntPolyh_ArrayOfTriangles &TTriangles,
const Handle(Adaptor3d_HSurface)& MySurface,
IntPolyh_ArrayOfPoints &TPoints) {
- const Standard_Integer FinTT = TTriangles.NbTriangles();
+ const Standard_Integer FinTT = TTriangles.NbItems();
TTriangles[FinTT].SetFirstPoint(P1);
TTriangles[FinTT].SetSecondPoint(P2);
TTriangles[FinTT].SetThirdPoint(P3);
TTriangles[FinTT].TriangleDeflection(MySurface, TPoints);
- TTriangles.IncNbTriangles();
+ TTriangles.IncrementNbItems();
}
//=======================================================================
IntPolyh_ArrayOfEdges & TEdges)
{
- const Standard_Integer FinTE = TEdges.NbEdges();
+ const Standard_Integer FinTE = TEdges.NbItems();
TEdges[FinTE].SetFirstPoint(P1);
TEdges[FinTE].SetSecondPoint(P2);
TEdges[FinTE].SetFirstTriangle(T1);
TEdges[FinTE].SetSecondTriangle(T2);
- TEdges.IncNbEdges();
+ TEdges.IncrementNbItems();
}
//=======================================================================
IntPolyh_ArrayOfTriangles &TTriangles,
IntPolyh_ArrayOfEdges & TEdges) {
- Standard_Integer FinTE = TEdges.NbEdges();
- Standard_Integer FinTT = TTriangles.NbTriangles();
+ Standard_Integer FinTE = TEdges.NbItems();
+ Standard_Integer FinTT = TTriangles.NbItems();
///Raffinage de la maille et de ses voisines par le milieu du plus grand des cotes
Standard_Real L31 = P3.SquareDistance(P1);
if ((L12>L23) && (L12>L31)) {
- const Standard_Integer FinTP = TPoints.NbPoints();
+ const Standard_Integer FinTP = TPoints.NbItems();
(TPoints[FinTP]).Middle( MySurface,P1, P2);
///les nouveaux triangles
}
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
}
}
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;
Fleche=-1.0;
IP=0;
- TPoints.IncNbPoints();
+ TPoints.IncrementNbItems();
}
//=======================================================================
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,
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
//=======================================================================
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;