mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0023548: Boolean operation between two faces fails
This commit is contained in:
parent
1c418d0e12
commit
d642ddf565
@ -1,3 +1,9 @@
|
|||||||
IntPolyh_Intersection_1.cxx
|
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
|
||||||
|
@ -62,7 +62,14 @@ uses
|
|||||||
Adaptor3d
|
Adaptor3d
|
||||||
|
|
||||||
is
|
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;
|
class Intersection;
|
||||||
---Purpose: the main algorithm. Algorythm outputs are --
|
---Purpose: the main algorithm. Algorythm outputs are --
|
||||||
-- lines and points like discribe in the last
|
-- lines and points like discribe in the last
|
||||||
@ -77,41 +84,28 @@ is
|
|||||||
class Couple;
|
class Couple;
|
||||||
---Purpose: couple of triangles
|
---Purpose: couple of triangles
|
||||||
|
|
||||||
class ArrayOfCouples;
|
|
||||||
|
|
||||||
class Point;
|
class Point;
|
||||||
|
|
||||||
class ArrayOfPoints;
|
|
||||||
|
|
||||||
class StartPoint;
|
class StartPoint;
|
||||||
|
|
||||||
class ArrayOfStartPoints;
|
|
||||||
|
|
||||||
class SeqOfStartPoints instantiates Sequence from TCollection
|
class SeqOfStartPoints instantiates Sequence from TCollection
|
||||||
(StartPoint from IntPolyh);
|
(StartPoint from IntPolyh);
|
||||||
|
|
||||||
class Edge;
|
class Edge;
|
||||||
|
|
||||||
class ArrayOfEdges;
|
|
||||||
|
|
||||||
class Triangle;
|
class Triangle;
|
||||||
|
|
||||||
class ArrayOfTriangles;
|
|
||||||
|
|
||||||
class MaillageAffinage;
|
class MaillageAffinage;
|
||||||
---Purpose: Provide the algorythms used in the package
|
---Purpose: Provide the algorythms used in the package
|
||||||
|
|
||||||
class SectionLine;
|
class SectionLine;
|
||||||
|
|
||||||
class ArrayOfSectionLines;
|
|
||||||
|
|
||||||
-- class TangentZone; For the moment we use the StartPoint Class
|
-- 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;
|
pointer PMaillageAffinage to MaillageAffinage from IntPolyh;
|
||||||
-- Modified by skv - Thu Sep 25 18:04:07 2003 OCC567 Begin
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
233
src/IntPolyh/IntPolyh_Array.hxx
Normal file
233
src/IntPolyh/IntPolyh_Array.hxx
Normal file
@ -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 <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
|
@ -1,73 +0,0 @@
|
|||||||
-- 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;
|
|
@ -1,104 +0,0 @@
|
|||||||
// 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");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
35
src/IntPolyh/IntPolyh_ArrayOfCouples.hxx
Normal file
35
src/IntPolyh/IntPolyh_ArrayOfCouples.hxx
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
// 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
|
@ -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;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -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 <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");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
35
src/IntPolyh/IntPolyh_ArrayOfEdges.hxx
Normal file
35
src/IntPolyh/IntPolyh_ArrayOfEdges.hxx
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
// 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
|
@ -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;
|
|
@ -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 <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");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
36
src/IntPolyh/IntPolyh_ArrayOfPoints.hxx
Normal file
36
src/IntPolyh/IntPolyh_ArrayOfPoints.hxx
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
// 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
|
@ -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;
|
|
@ -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 <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");
|
|
||||||
}
|
|
||||||
|
|
35
src/IntPolyh/IntPolyh_ArrayOfSectionLines.hxx
Normal file
35
src/IntPolyh/IntPolyh_ArrayOfSectionLines.hxx
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
// 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
|
@ -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;
|
|
@ -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 <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");
|
|
||||||
}
|
|
||||||
|
|
35
src/IntPolyh/IntPolyh_ArrayOfStartPoints.hxx
Normal file
35
src/IntPolyh/IntPolyh_ArrayOfStartPoints.hxx
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
// 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
|
@ -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;
|
|
||||||
|
|
@ -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 <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");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
35
src/IntPolyh/IntPolyh_ArrayOfTangentZones.hxx
Normal file
35
src/IntPolyh/IntPolyh_ArrayOfTangentZones.hxx
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
// 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
|
@ -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;
|
|
@ -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 <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");
|
|
||||||
}
|
|
||||||
|
|
36
src/IntPolyh/IntPolyh_ArrayOfTriangles.hxx
Normal file
36
src/IntPolyh/IntPolyh_ArrayOfTriangles.hxx
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
// 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
|
@ -27,6 +27,7 @@
|
|||||||
#include <IntPolyh_StartPoint.hxx>
|
#include <IntPolyh_StartPoint.hxx>
|
||||||
#include <IntPolyh_MaillageAffinage.hxx>
|
#include <IntPolyh_MaillageAffinage.hxx>
|
||||||
#include <IntPolyh_Couple.hxx>
|
#include <IntPolyh_Couple.hxx>
|
||||||
|
#include <IntPolyh_Triangle.hxx>
|
||||||
|
|
||||||
#ifdef DEB
|
#ifdef DEB
|
||||||
# define MYDEBUG DEB
|
# define MYDEBUG DEB
|
||||||
@ -164,8 +165,8 @@ void IntPolyh_Intersection::Perform() {
|
|||||||
} // start from advanced
|
} // start from advanced
|
||||||
|
|
||||||
// accept result
|
// accept result
|
||||||
nbsectionlines = TSectionLines.NbSectionLines();
|
nbsectionlines = TSectionLines.NbItems();
|
||||||
nbtangentzones = TTangentZones.NbTangentZones();
|
nbtangentzones = TTangentZones.NbItems();
|
||||||
|
|
||||||
// clean up
|
// clean up
|
||||||
if(aPMaillageStd) delete aPMaillageStd;
|
if(aPMaillageStd) delete aPMaillageStd;
|
||||||
@ -293,8 +294,8 @@ Standard_Boolean IntPolyh_Intersection::PerformMaillage
|
|||||||
|
|
||||||
// if too many intersections, consider surfaces parallel (eap)
|
// if too many intersections, consider surfaces parallel (eap)
|
||||||
if(FinTTC > 200 &&
|
if(FinTTC > 200 &&
|
||||||
(FinTTC >= theMaillageS->GetArrayOfTriangles(1).NbTriangles() ||
|
(FinTTC >= theMaillageS->GetArrayOfTriangles(1).NbItems() ||
|
||||||
FinTTC >= theMaillageS->GetArrayOfTriangles(2).NbTriangles()) ) {
|
FinTTC >= theMaillageS->GetArrayOfTriangles(2).NbItems()) ) {
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -390,7 +391,7 @@ void IntPolyh_Intersection::MergeCouples
|
|||||||
anArrays[3] = &anArrayRR;
|
anArrays[3] = &anArrayRR;
|
||||||
|
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
aNbCouples[i] = anArrays[i]->NbCouples();
|
aNbCouples[i] = anArrays[i]->NbItems();
|
||||||
|
|
||||||
Standard_Boolean isChanged = Standard_True;
|
Standard_Boolean isChanged = Standard_True;
|
||||||
|
|
||||||
@ -444,7 +445,7 @@ Standard_Boolean IntPolyh_Intersection::PerformStd(IntPolyh_PMaillageAffinage& M
|
|||||||
Standard_Integer& NbCouples)
|
Standard_Integer& NbCouples)
|
||||||
{
|
{
|
||||||
Standard_Boolean isdone = PerformMaillage(MaillageS);
|
Standard_Boolean isdone = PerformMaillage(MaillageS);
|
||||||
NbCouples = (isdone) ? (MaillageS->GetArrayOfCouples().NbCouples()) : 0;
|
NbCouples = (isdone) ? (MaillageS->GetArrayOfCouples().NbItems()) : 0;
|
||||||
return isdone;
|
return isdone;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -464,10 +465,10 @@ Standard_Boolean IntPolyh_Intersection::PerformAdv(IntPolyh_PMaillageAffinage& M
|
|||||||
isdone = Standard_False;
|
isdone = Standard_False;
|
||||||
|
|
||||||
if(isdone) {
|
if(isdone) {
|
||||||
NbCouples = MaillageFF->GetArrayOfCouples().NbCouples() +
|
NbCouples = MaillageFF->GetArrayOfCouples().NbItems() +
|
||||||
MaillageFR->GetArrayOfCouples().NbCouples() +
|
MaillageFR->GetArrayOfCouples().NbItems() +
|
||||||
MaillageRF->GetArrayOfCouples().NbCouples() +
|
MaillageRF->GetArrayOfCouples().NbItems() +
|
||||||
MaillageRR->GetArrayOfCouples().NbCouples();
|
MaillageRR->GetArrayOfCouples().NbItems();
|
||||||
|
|
||||||
if(NbCouples > 0)
|
if(NbCouples > 0)
|
||||||
MergeCouples(MaillageFF->GetArrayOfCouples(),MaillageFR->GetArrayOfCouples(),
|
MergeCouples(MaillageFF->GetArrayOfCouples(),MaillageFR->GetArrayOfCouples(),
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include <IntPolyh_MaillageAffinage.hxx>
|
#include <IntPolyh_MaillageAffinage.hxx>
|
||||||
#include <IntPolyh_ArrayOfCouples.hxx>
|
#include <IntPolyh_ArrayOfCouples.hxx>
|
||||||
#include <IntPolyh_Couple.hxx>
|
#include <IntPolyh_Couple.hxx>
|
||||||
|
#include <IntPolyh_Triangle.hxx>
|
||||||
|
|
||||||
Standard_Integer MYPRINT1 = 0;
|
Standard_Integer MYPRINT1 = 0;
|
||||||
|
|
||||||
@ -147,8 +148,8 @@ void IntPolyh_Intersection::Perform(const TColStd_Array1OfReal& Upars1,
|
|||||||
} // start from advanced
|
} // start from advanced
|
||||||
|
|
||||||
// accept result
|
// accept result
|
||||||
nbsectionlines = TSectionLines.NbSectionLines();
|
nbsectionlines = TSectionLines.NbItems();
|
||||||
nbtangentzones = TTangentZones.NbTangentZones();
|
nbtangentzones = TTangentZones.NbItems();
|
||||||
|
|
||||||
// clean up
|
// clean up
|
||||||
if(aPMaillageStd) delete aPMaillageStd;
|
if(aPMaillageStd) delete aPMaillageStd;
|
||||||
@ -218,8 +219,8 @@ Standard_Boolean IntPolyh_Intersection::PerformMaillage(const Standard_Boolean i
|
|||||||
Standard_Real cosa = Abs(Couples[i].AngleValue());
|
Standard_Real cosa = Abs(Couples[i].AngleValue());
|
||||||
if(cosa > eps) ++npara;
|
if(cosa > eps) ++npara;
|
||||||
}
|
}
|
||||||
if(npara >= theMaillageS->GetArrayOfTriangles(1).NbTriangles() ||
|
if(npara >= theMaillageS->GetArrayOfTriangles(1).NbItems() ||
|
||||||
npara >= theMaillageS->GetArrayOfTriangles(2).NbTriangles() ) {
|
npara >= theMaillageS->GetArrayOfTriangles(2).NbItems() ) {
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -297,8 +298,8 @@ Standard_Boolean IntPolyh_Intersection::PerformMaillage(const TColStd_Array1OfRe
|
|||||||
Standard_Real cosa = Abs(Couples[i].AngleValue());
|
Standard_Real cosa = Abs(Couples[i].AngleValue());
|
||||||
if(cosa > eps) ++npara;
|
if(cosa > eps) ++npara;
|
||||||
}
|
}
|
||||||
if(npara >= theMaillageS->GetArrayOfTriangles(1).NbTriangles() ||
|
if(npara >= theMaillageS->GetArrayOfTriangles(1).NbItems() ||
|
||||||
npara >= theMaillageS->GetArrayOfTriangles(2).NbTriangles() ) {
|
npara >= theMaillageS->GetArrayOfTriangles(2).NbItems() ) {
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -339,10 +340,10 @@ Standard_Boolean IntPolyh_Intersection::PerformAdv(const TColStd_Array1OfReal& U
|
|||||||
isdone = Standard_False;
|
isdone = Standard_False;
|
||||||
|
|
||||||
if(isdone) {
|
if(isdone) {
|
||||||
NbCouples = MaillageFF->GetArrayOfCouples().NbCouples() +
|
NbCouples = MaillageFF->GetArrayOfCouples().NbItems() +
|
||||||
MaillageFR->GetArrayOfCouples().NbCouples() +
|
MaillageFR->GetArrayOfCouples().NbItems() +
|
||||||
MaillageRF->GetArrayOfCouples().NbCouples() +
|
MaillageRF->GetArrayOfCouples().NbItems() +
|
||||||
MaillageRR->GetArrayOfCouples().NbCouples();
|
MaillageRR->GetArrayOfCouples().NbItems();
|
||||||
|
|
||||||
if(NbCouples > 0)
|
if(NbCouples > 0)
|
||||||
MergeCouples(MaillageFF->GetArrayOfCouples(),MaillageFR->GetArrayOfCouples(),
|
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,
|
Standard_Boolean isdone = PerformMaillage(Upars1, Vpars1, Upars2, Vpars2,
|
||||||
MaillageS);
|
MaillageS);
|
||||||
NbCouples = (isdone) ? (MaillageS->GetArrayOfCouples().NbCouples()) : 0;
|
NbCouples = (isdone) ? (MaillageS->GetArrayOfCouples().NbItems()) : 0;
|
||||||
return isdone;
|
return isdone;
|
||||||
}
|
}
|
||||||
|
@ -271,7 +271,7 @@ void IntPolyh_MaillageAffinage::FillArrayOfPnt
|
|||||||
PtrBox->Add(PtXYZ);
|
PtrBox->Add(PtXYZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TPoints.SetNbPoints(iCnt);
|
TPoints.SetNbItems(iCnt);
|
||||||
//
|
//
|
||||||
IntCurveSurface_ThePolyhedronOfHInter polyhedron(MaSurface,
|
IntCurveSurface_ThePolyhedronOfHInter polyhedron(MaSurface,
|
||||||
NbSamplesU,
|
NbSamplesU,
|
||||||
@ -368,7 +368,7 @@ void IntPolyh_MaillageAffinage::FillArrayOfPnt
|
|||||||
PtrBox->Add(PtXYZ);
|
PtrBox->Add(PtXYZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TPoints.SetNbPoints(CpteurTabPnt);
|
TPoints.SetNbItems(CpteurTabPnt);
|
||||||
|
|
||||||
Tol*=1.2;
|
Tol*=1.2;
|
||||||
|
|
||||||
@ -433,7 +433,7 @@ void IntPolyh_MaillageAffinage::FillArrayOfPnt
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
TPoints.SetNbPoints(iCnt);
|
TPoints.SetNbItems(iCnt);
|
||||||
//
|
//
|
||||||
IntCurveSurface_ThePolyhedronOfHInter polyhedron(aS, Upars, Vpars);
|
IntCurveSurface_ThePolyhedronOfHInter polyhedron(aS, Upars, Vpars);
|
||||||
//
|
//
|
||||||
@ -530,7 +530,7 @@ void IntPolyh_MaillageAffinage::FillArrayOfPnt
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
TPoints.SetNbPoints(iCnt);
|
TPoints.SetNbItems(iCnt);
|
||||||
//
|
//
|
||||||
Tol*=1.2;
|
Tol*=1.2;
|
||||||
//
|
//
|
||||||
@ -612,7 +612,7 @@ void IntPolyh_MaillageAffinage::CommonBox (const Bnd_Box &,
|
|||||||
ZMin-=Z; ZMax+=Z;
|
ZMin-=Z; ZMax+=Z;
|
||||||
|
|
||||||
//Marking of points included in the common
|
//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++) {
|
// for(Standard_Integer i=0; i<FinTP1; i++) {
|
||||||
Standard_Integer i ;
|
Standard_Integer i ;
|
||||||
for( i=0; i<FinTP1; i++) {
|
for( i=0; i<FinTP1; i++) {
|
||||||
@ -646,7 +646,7 @@ void IntPolyh_MaillageAffinage::CommonBox (const Bnd_Box &,
|
|||||||
Pt1.SetPartOfCommon(r);
|
Pt1.SetPartOfCommon(r);
|
||||||
}
|
}
|
||||||
|
|
||||||
const Standard_Integer FinTP2 = TPoints2.NbPoints();
|
const Standard_Integer FinTP2 = TPoints2.NbItems();
|
||||||
for(Standard_Integer ii=0; ii<FinTP2; ii++) {
|
for(Standard_Integer ii=0; ii<FinTP2; ii++) {
|
||||||
IntPolyh_Point & Pt2 = TPoints2[ii];
|
IntPolyh_Point & Pt2 = TPoints2[ii];
|
||||||
Standard_Integer rr;
|
Standard_Integer rr;
|
||||||
@ -806,7 +806,7 @@ void IntPolyh_MaillageAffinage::FillArrayOfEdges
|
|||||||
TEdges[CpteurTabEdges].SetSecondTriangle(BoucleMeshV*2*(NbSamplesV-1)+(NbSamplesV-2)*2);
|
TEdges[CpteurTabEdges].SetSecondTriangle(BoucleMeshV*2*(NbSamplesV-1)+(NbSamplesV-2)*2);
|
||||||
CpteurTabEdges++;
|
CpteurTabEdges++;
|
||||||
}
|
}
|
||||||
TEdges.SetNbEdges(CpteurTabEdges);
|
TEdges.SetNbItems(CpteurTabEdges);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -865,8 +865,8 @@ void IntPolyh_MaillageAffinage::FillArrayOfTriangles
|
|||||||
}
|
}
|
||||||
PntInit++;//Pass the last point of the column
|
PntInit++;//Pass the last point of the column
|
||||||
}
|
}
|
||||||
TTriangles.SetNbTriangles(CpteurTabTriangles);
|
TTriangles.SetNbItems(CpteurTabTriangles);
|
||||||
const Standard_Integer FinTT = TTriangles.NbTriangles();
|
const Standard_Integer FinTT = TTriangles.NbItems();
|
||||||
if (FinTT==0) {
|
if (FinTT==0) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -877,8 +877,8 @@ void IntPolyh_MaillageAffinage::FillArrayOfTriangles
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
void IntPolyh_MaillageAffinage::LinkEdges2Triangles()
|
void IntPolyh_MaillageAffinage::LinkEdges2Triangles()
|
||||||
{
|
{
|
||||||
const Standard_Integer FinTT1 = TTriangles1.NbTriangles();
|
const Standard_Integer FinTT1 = TTriangles1.NbItems();
|
||||||
const Standard_Integer FinTT2 = TTriangles2.NbTriangles();
|
const Standard_Integer FinTT2 = TTriangles2.NbItems();
|
||||||
|
|
||||||
for(Standard_Integer uiui1=0; uiui1<FinTT1; uiui1++) {
|
for(Standard_Integer uiui1=0; uiui1<FinTT1; uiui1++) {
|
||||||
IntPolyh_Triangle & MyTriangle1=TTriangles1[uiui1];
|
IntPolyh_Triangle & MyTriangle1=TTriangles1[uiui1];
|
||||||
@ -904,13 +904,13 @@ void IntPolyh_MaillageAffinage::LinkEdges2Triangles()
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
void IntPolyh_MaillageAffinage::CommonPartRefinement()
|
void IntPolyh_MaillageAffinage::CommonPartRefinement()
|
||||||
{
|
{
|
||||||
Standard_Integer FinInit1 = TTriangles1.NbTriangles();
|
Standard_Integer FinInit1 = TTriangles1.NbItems();
|
||||||
for(Standard_Integer i=0; i<FinInit1; i++) {
|
for(Standard_Integer i=0; i<FinInit1; i++) {
|
||||||
if(TTriangles1[i].IndiceIntersectionPossible()!=0)
|
if(TTriangles1[i].IndiceIntersectionPossible()!=0)
|
||||||
TTriangles1[i].MiddleRefinement(i,MaSurface1,TPoints1,TTriangles1,TEdges1);
|
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++) {
|
for(Standard_Integer ii=0; ii<FinInit2; ii++) {
|
||||||
if(TTriangles2[ii].IndiceIntersectionPossible()!=0)
|
if(TTriangles2[ii].IndiceIntersectionPossible()!=0)
|
||||||
TTriangles2[ii].MiddleRefinement(ii,MaSurface2,TPoints2,TTriangles2,TEdges2);
|
TTriangles2[ii].MiddleRefinement(ii,MaSurface2,TPoints2,TTriangles2,TEdges2);
|
||||||
@ -924,7 +924,7 @@ void IntPolyh_MaillageAffinage::CommonPartRefinement()
|
|||||||
void IntPolyh_MaillageAffinage::LocalSurfaceRefinement(const Standard_Integer SurfID) {
|
void IntPolyh_MaillageAffinage::LocalSurfaceRefinement(const Standard_Integer SurfID) {
|
||||||
//refine locally, but systematically the chosen surface
|
//refine locally, but systematically the chosen surface
|
||||||
if (SurfID==1) {
|
if (SurfID==1) {
|
||||||
const Standard_Integer FinInit1 = TTriangles1.NbTriangles();
|
const Standard_Integer FinInit1 = TTriangles1.NbItems();
|
||||||
for(Standard_Integer i=0; i<FinInit1; i++) {
|
for(Standard_Integer i=0; i<FinInit1; i++) {
|
||||||
if(TTriangles1[i].IndiceIntersectionPossible()!=0)
|
if(TTriangles1[i].IndiceIntersectionPossible()!=0)
|
||||||
TTriangles1[i].MiddleRefinement(i,MaSurface1,TPoints1,TTriangles1,TEdges1);
|
TTriangles1[i].MiddleRefinement(i,MaSurface1,TPoints1,TTriangles1,TEdges1);
|
||||||
@ -932,7 +932,7 @@ void IntPolyh_MaillageAffinage::LocalSurfaceRefinement(const Standard_Integer Su
|
|||||||
}
|
}
|
||||||
//
|
//
|
||||||
if (SurfID==2) {
|
if (SurfID==2) {
|
||||||
const Standard_Integer FinInit2 = TTriangles2.NbTriangles();
|
const Standard_Integer FinInit2 = TTriangles2.NbItems();
|
||||||
for(Standard_Integer ii=0; ii<FinInit2; ii++) {
|
for(Standard_Integer ii=0; ii<FinInit2; ii++) {
|
||||||
if(TTriangles2[ii].IndiceIntersectionPossible()!=0)
|
if(TTriangles2[ii].IndiceIntersectionPossible()!=0)
|
||||||
TTriangles2[ii].MiddleRefinement(ii,MaSurface2,TPoints2,TTriangles2,TEdges2);
|
TTriangles2[ii].MiddleRefinement(ii,MaSurface2,TPoints2,TTriangles2,TEdges2);
|
||||||
@ -962,7 +962,7 @@ void IntPolyh_MaillageAffinage::ComputeDeflections
|
|||||||
FlecheMax=-RealLast();
|
FlecheMax=-RealLast();
|
||||||
FlecheMin=RealLast();
|
FlecheMin=RealLast();
|
||||||
FlecheMoy=0.0;
|
FlecheMoy=0.0;
|
||||||
const Standard_Integer FinTT = TTriangles.NbTriangles();
|
const Standard_Integer FinTT = TTriangles.NbItems();
|
||||||
|
|
||||||
for(CpteurTabFleche=0; CpteurTabFleche<FinTT; CpteurTabFleche++) {
|
for(CpteurTabFleche=0; CpteurTabFleche<FinTT; CpteurTabFleche++) {
|
||||||
IntPolyh_Triangle &Triangle = TTriangles[CpteurTabFleche];
|
IntPolyh_Triangle &Triangle = TTriangles[CpteurTabFleche];
|
||||||
@ -990,8 +990,8 @@ void IntPolyh_MaillageAffinage::ComputeDeflections
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
void IntPolyh_MaillageAffinage::TrianglesDeflectionsRefinementBSB()
|
void IntPolyh_MaillageAffinage::TrianglesDeflectionsRefinementBSB()
|
||||||
{
|
{
|
||||||
const Standard_Integer FinTT1 = TTriangles1.NbTriangles();
|
const Standard_Integer FinTT1 = TTriangles1.NbItems();
|
||||||
const Standard_Integer FinTT2 = TTriangles2.NbTriangles();
|
const Standard_Integer FinTT2 = TTriangles2.NbItems();
|
||||||
|
|
||||||
ComputeDeflections(1);
|
ComputeDeflections(1);
|
||||||
// To estimate a surface in general it can be interesting
|
// To estimate a surface in general it can be interesting
|
||||||
@ -3216,8 +3216,8 @@ Standard_Integer IntPolyh_MaillageAffinage::TriangleComparePSP ()
|
|||||||
Standard_Integer CpteurTab=0;
|
Standard_Integer CpteurTab=0;
|
||||||
Standard_Integer CpteurTabSP=0;
|
Standard_Integer CpteurTabSP=0;
|
||||||
Standard_Real CoupleAngle=-2.0;
|
Standard_Real CoupleAngle=-2.0;
|
||||||
const Standard_Integer FinTT1 = TTriangles1.NbTriangles();
|
const Standard_Integer FinTT1 = TTriangles1.NbItems();
|
||||||
const Standard_Integer FinTT2 = TTriangles2.NbTriangles();
|
const Standard_Integer FinTT2 = TTriangles2.NbItems();
|
||||||
|
|
||||||
for(Standard_Integer i_S1=0; i_S1<FinTT1; i_S1++) {
|
for(Standard_Integer i_S1=0; i_S1<FinTT1; i_S1++) {
|
||||||
for(Standard_Integer i_S2=0; i_S2<FinTT2; i_S2++){
|
for(Standard_Integer i_S2=0; i_S2<FinTT2; i_S2++){
|
||||||
@ -3283,8 +3283,8 @@ Standard_Integer IntPolyh_MaillageAffinage::TriangleCompare ()
|
|||||||
{
|
{
|
||||||
Standard_Integer CpteurTab=0;
|
Standard_Integer CpteurTab=0;
|
||||||
|
|
||||||
const Standard_Integer FinTT1 = TTriangles1.NbTriangles();
|
const Standard_Integer FinTT1 = TTriangles1.NbItems();
|
||||||
const Standard_Integer FinTT2 = TTriangles2.NbTriangles();
|
const Standard_Integer FinTT2 = TTriangles2.NbItems();
|
||||||
|
|
||||||
Standard_Integer TTClimit = 200;
|
Standard_Integer TTClimit = 200;
|
||||||
Standard_Integer NbTTC = FinTT1 * FinTT2 / 10;
|
Standard_Integer NbTTC = FinTT1 * FinTT2 / 10;
|
||||||
@ -3315,7 +3315,7 @@ Standard_Integer IntPolyh_MaillageAffinage::TriangleCompare ()
|
|||||||
|
|
||||||
if (CpteurTab >= NbTTC)
|
if (CpteurTab >= NbTTC)
|
||||||
{
|
{
|
||||||
TTrianglesContacts.SetNbCouples(CpteurTab);
|
TTrianglesContacts.SetNbItems(CpteurTab);
|
||||||
|
|
||||||
return(CpteurTab);
|
return(CpteurTab);
|
||||||
}
|
}
|
||||||
@ -3330,7 +3330,7 @@ Standard_Integer IntPolyh_MaillageAffinage::TriangleCompare ()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TTrianglesContacts.SetNbCouples(CpteurTab);
|
TTrianglesContacts.SetNbItems(CpteurTab);
|
||||||
|
|
||||||
return(CpteurTab);
|
return(CpteurTab);
|
||||||
}
|
}
|
||||||
@ -3342,7 +3342,7 @@ Standard_Integer IntPolyh_MaillageAffinage::TriangleCompare ()
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
void IntPolyh_MaillageAffinage::StartPointsCalcul() const
|
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");
|
// printf("StartPointsCalcul() from IntPolyh_MaillageAffinage.cxx : StartPoints:\n");
|
||||||
for(Standard_Integer ii=0; ii<FinTTC; ii++) {
|
for(Standard_Integer ii=0; ii<FinTTC; ii++) {
|
||||||
IntPolyh_StartPoint SP1,SP2;
|
IntPolyh_StartPoint SP1,SP2;
|
||||||
@ -3364,7 +3364,7 @@ Standard_Integer CheckCoupleAndGetAngle(const Standard_Integer T1,
|
|||||||
IntPolyh_ArrayOfCouples &TTrianglesContacts)
|
IntPolyh_ArrayOfCouples &TTrianglesContacts)
|
||||||
{
|
{
|
||||||
Standard_Integer Test=0;
|
Standard_Integer Test=0;
|
||||||
const Standard_Integer FinTTC = TTrianglesContacts.NbCouples();
|
const Standard_Integer FinTTC = TTrianglesContacts.NbItems();
|
||||||
for (Standard_Integer oioi=0; oioi<FinTTC; oioi++) {
|
for (Standard_Integer oioi=0; oioi<FinTTC; oioi++) {
|
||||||
IntPolyh_Couple TestCouple = TTrianglesContacts[oioi];
|
IntPolyh_Couple TestCouple = TTrianglesContacts[oioi];
|
||||||
if ( (TestCouple.FirstValue()==T1)&&(TestCouple.AnalyseFlagValue()!=1) ) {
|
if ( (TestCouple.FirstValue()==T1)&&(TestCouple.AnalyseFlagValue()!=1) ) {
|
||||||
@ -3398,7 +3398,7 @@ Standard_Integer CheckCoupleAndGetAngle2(const Standard_Integer T1,
|
|||||||
Standard_Integer Test1=0;
|
Standard_Integer Test1=0;
|
||||||
Standard_Integer Test2=0;
|
Standard_Integer Test2=0;
|
||||||
Standard_Integer Test3=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++) {
|
for (Standard_Integer oioi=0; oioi<FinTTC; oioi++) {
|
||||||
IntPolyh_Couple TestCouple = TTrianglesContacts[oioi];
|
IntPolyh_Couple TestCouple = TTrianglesContacts[oioi];
|
||||||
if( (Test1==0)||(Test2==0)||(Test3==0) ) {
|
if( (Test1==0)||(Test2==0)||(Test3==0) ) {
|
||||||
@ -3442,7 +3442,7 @@ Standard_Integer CheckNextStartPoint(IntPolyh_SectionLine & SectionLine,
|
|||||||
if( (SP.E1()==-1)||(SP.E2()==-1) ) {
|
if( (SP.E1()==-1)||(SP.E2()==-1) ) {
|
||||||
//The tops of triangle are analyzed
|
//The tops of triangle are analyzed
|
||||||
//It is checked if they are not in the array TTangentZones
|
//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++) {
|
for(Standard_Integer uiui=0; uiui<FinTTZ; uiui++) {
|
||||||
IntPolyh_StartPoint TestSP=TTangentZones[uiui];
|
IntPolyh_StartPoint TestSP=TTangentZones[uiui];
|
||||||
if ( (Abs(SP.U1()-TestSP.U1())<MyConfusionPrecision)
|
if ( (Abs(SP.U1()-TestSP.U1())<MyConfusionPrecision)
|
||||||
@ -3457,7 +3457,7 @@ Standard_Integer CheckNextStartPoint(IntPolyh_SectionLine & SectionLine,
|
|||||||
if (Test) {//the top does not belong to the list of TangentZones
|
if (Test) {//the top does not belong to the list of TangentZones
|
||||||
SP.SetChainList(-1);
|
SP.SetChainList(-1);
|
||||||
TTangentZones[FinTTZ]=SP;
|
TTangentZones[FinTTZ]=SP;
|
||||||
TTangentZones.IncrementNbTangentZones();
|
TTangentZones.IncrementNbItems();
|
||||||
Test=0;//the examined point is a top
|
Test=0;//the examined point is a top
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3486,7 +3486,7 @@ Standard_Integer IntPolyh_MaillageAffinage::StartPointsChain
|
|||||||
IntPolyh_ArrayOfTangentZones& TTangentZones)
|
IntPolyh_ArrayOfTangentZones& TTangentZones)
|
||||||
{
|
{
|
||||||
//Loop on the array of couples filled in the function COMPARE()
|
//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
|
//Array of tops of triangles
|
||||||
for(Standard_Integer IndexA=0; IndexA<FinTTC; IndexA++) {
|
for(Standard_Integer IndexA=0; IndexA<FinTTC; IndexA++) {
|
||||||
@ -3494,14 +3494,14 @@ Standard_Integer IntPolyh_MaillageAffinage::StartPointsChain
|
|||||||
//It is checked if the couple of triangles has not been already examined.
|
//It is checked if the couple of triangles has not been already examined.
|
||||||
if(TTrianglesContacts[IndexA].AnalyseFlagValue()!=1) {
|
if(TTrianglesContacts[IndexA].AnalyseFlagValue()!=1) {
|
||||||
|
|
||||||
Standard_Integer SectionLineIndex=TSectionLines.NbSectionLines();
|
Standard_Integer SectionLineIndex=TSectionLines.NbItems();
|
||||||
// fill last section line if still empty (eap)
|
// fill last section line if still empty (eap)
|
||||||
if (SectionLineIndex > 0
|
if (SectionLineIndex > 0
|
||||||
&&
|
&&
|
||||||
TSectionLines[SectionLineIndex-1].NbStartPoints() == 0)
|
TSectionLines[SectionLineIndex-1].NbStartPoints() == 0)
|
||||||
SectionLineIndex -= 1;
|
SectionLineIndex -= 1;
|
||||||
else
|
else
|
||||||
TSectionLines.IncrementNbSectionLines();
|
TSectionLines.IncrementNbItems();
|
||||||
|
|
||||||
IntPolyh_SectionLine & MySectionLine=TSectionLines[SectionLineIndex];
|
IntPolyh_SectionLine & MySectionLine=TSectionLines[SectionLineIndex];
|
||||||
if (MySectionLine.GetN() == 0) // eap
|
if (MySectionLine.GetN() == 0) // eap
|
||||||
@ -3559,8 +3559,8 @@ Standard_Integer IntPolyh_MaillageAffinage::StartPointsChain
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(NbPoints11>1) {//The point is input in the array TTangentZones
|
if(NbPoints11>1) {//The point is input in the array TTangentZones
|
||||||
TTangentZones[TTangentZones.NbTangentZones()]=SP11;//default list number = -1
|
TTangentZones[TTangentZones.NbItems()]=SP11;//default list number = -1
|
||||||
TTangentZones.IncrementNbTangentZones();
|
TTangentZones.IncrementNbItems();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
@ -3606,8 +3606,8 @@ Standard_Integer IntPolyh_MaillageAffinage::StartPointsChain
|
|||||||
|
|
||||||
else {
|
else {
|
||||||
if(NbPoints12>1) {//The points are input in the array TTangentZones
|
if(NbPoints12>1) {//The points are input in the array TTangentZones
|
||||||
TTangentZones[TTangentZones.NbTangentZones()]=SP12;//default list number = -1
|
TTangentZones[TTangentZones.NbItems()]=SP12;//default list number = -1
|
||||||
TTangentZones.IncrementNbTangentZones();
|
TTangentZones.IncrementNbItems();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
@ -4018,19 +4018,19 @@ static TopoDS_Shape TriangleShape(const IntPolyh_ArrayOfTriangles & TTriangles,
|
|||||||
const IntPolyh_ArrayOfPoints & TPoints)
|
const IntPolyh_ArrayOfPoints & TPoints)
|
||||||
{
|
{
|
||||||
TopoDS_Face aFace;
|
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 =
|
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();
|
TColgp_Array1OfPnt & aPNodes = aPTriangulation->ChangeNodes();
|
||||||
Poly_Array1OfTriangle & aPTrialgles = aPTriangulation->ChangeTriangles();
|
Poly_Array1OfTriangle & aPTrialgles = aPTriangulation->ChangeTriangles();
|
||||||
|
|
||||||
Standard_Integer i;
|
Standard_Integer i;
|
||||||
for (i=0; i<TPoints.NbPoints(); i++) {
|
for (i=0; i<TPoints.NbItems(); i++) {
|
||||||
const IntPolyh_Point& P = TPoints[i];
|
const IntPolyh_Point& P = TPoints[i];
|
||||||
aPNodes(i+1).SetCoord(P.X(), P.Y(), P.Z());
|
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];
|
const IntPolyh_Triangle& T = TTriangles[i];
|
||||||
aPTrialgles(i+1).Set(T.FirstPoint()+1, T.SecondPoint()+1, T.ThirdPoint()+1);
|
aPTrialgles(i+1).Set(T.FirstPoint()+1, T.SecondPoint()+1, T.ThirdPoint()+1);
|
||||||
}
|
}
|
||||||
|
@ -558,12 +558,12 @@ void NewTriangle(const Standard_Integer P1,
|
|||||||
IntPolyh_ArrayOfTriangles &TTriangles,
|
IntPolyh_ArrayOfTriangles &TTriangles,
|
||||||
const Handle(Adaptor3d_HSurface)& MySurface,
|
const Handle(Adaptor3d_HSurface)& MySurface,
|
||||||
IntPolyh_ArrayOfPoints &TPoints) {
|
IntPolyh_ArrayOfPoints &TPoints) {
|
||||||
const Standard_Integer FinTT = TTriangles.NbTriangles();
|
const Standard_Integer FinTT = TTriangles.NbItems();
|
||||||
TTriangles[FinTT].SetFirstPoint(P1);
|
TTriangles[FinTT].SetFirstPoint(P1);
|
||||||
TTriangles[FinTT].SetSecondPoint(P2);
|
TTriangles[FinTT].SetSecondPoint(P2);
|
||||||
TTriangles[FinTT].SetThirdPoint(P3);
|
TTriangles[FinTT].SetThirdPoint(P3);
|
||||||
TTriangles[FinTT].TriangleDeflection(MySurface, TPoints);
|
TTriangles[FinTT].TriangleDeflection(MySurface, TPoints);
|
||||||
TTriangles.IncNbTriangles();
|
TTriangles.IncrementNbItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -577,13 +577,13 @@ void NewEdge(const Standard_Integer P1,
|
|||||||
IntPolyh_ArrayOfEdges & TEdges)
|
IntPolyh_ArrayOfEdges & TEdges)
|
||||||
{
|
{
|
||||||
|
|
||||||
const Standard_Integer FinTE = TEdges.NbEdges();
|
const Standard_Integer FinTE = TEdges.NbItems();
|
||||||
|
|
||||||
TEdges[FinTE].SetFirstPoint(P1);
|
TEdges[FinTE].SetFirstPoint(P1);
|
||||||
TEdges[FinTE].SetSecondPoint(P2);
|
TEdges[FinTE].SetSecondPoint(P2);
|
||||||
TEdges[FinTE].SetFirstTriangle(T1);
|
TEdges[FinTE].SetFirstTriangle(T1);
|
||||||
TEdges[FinTE].SetSecondTriangle(T2);
|
TEdges[FinTE].SetSecondTriangle(T2);
|
||||||
TEdges.IncNbEdges();
|
TEdges.IncrementNbItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -649,8 +649,8 @@ void IntPolyh_Triangle::MiddleRefinement(const Standard_Integer NumTri,
|
|||||||
IntPolyh_ArrayOfTriangles &TTriangles,
|
IntPolyh_ArrayOfTriangles &TTriangles,
|
||||||
IntPolyh_ArrayOfEdges & TEdges) {
|
IntPolyh_ArrayOfEdges & TEdges) {
|
||||||
|
|
||||||
Standard_Integer FinTE = TEdges.NbEdges();
|
Standard_Integer FinTE = TEdges.NbItems();
|
||||||
Standard_Integer FinTT = TTriangles.NbTriangles();
|
Standard_Integer FinTT = TTriangles.NbItems();
|
||||||
|
|
||||||
///Raffinage de la maille et de ses voisines par le milieu du plus grand des cotes
|
///Raffinage de la maille et de ses voisines par le milieu du plus grand des cotes
|
||||||
|
|
||||||
@ -670,7 +670,7 @@ void IntPolyh_Triangle::MiddleRefinement(const Standard_Integer NumTri,
|
|||||||
Standard_Real L31 = P3.SquareDistance(P1);
|
Standard_Real L31 = P3.SquareDistance(P1);
|
||||||
|
|
||||||
if ((L12>L23) && (L12>L31)) {
|
if ((L12>L23) && (L12>L31)) {
|
||||||
const Standard_Integer FinTP = TPoints.NbPoints();
|
const Standard_Integer FinTP = TPoints.NbItems();
|
||||||
(TPoints[FinTP]).Middle( MySurface,P1, P2);
|
(TPoints[FinTP]).Middle( MySurface,P1, P2);
|
||||||
|
|
||||||
///les nouveaux triangles
|
///les nouveaux triangles
|
||||||
@ -758,7 +758,7 @@ void IntPolyh_Triangle::MiddleRefinement(const Standard_Integer NumTri,
|
|||||||
}
|
}
|
||||||
|
|
||||||
else if ((L23>L31) && (L23>L12)){
|
else if ((L23>L31) && (L23>L12)){
|
||||||
const Standard_Integer FinTP = TPoints.NbPoints();
|
const Standard_Integer FinTP = TPoints.NbItems();
|
||||||
(TPoints[FinTP]).Middle(MySurface, P2,P3);
|
(TPoints[FinTP]).Middle(MySurface, P2,P3);
|
||||||
|
|
||||||
///les nouveaux triangles
|
///les nouveaux triangles
|
||||||
@ -844,7 +844,7 @@ void IntPolyh_Triangle::MiddleRefinement(const Standard_Integer NumTri,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const Standard_Integer FinTP = TPoints.NbPoints();
|
const Standard_Integer FinTP = TPoints.NbItems();
|
||||||
(TPoints[FinTP]).Middle(MySurface, P3,P1);
|
(TPoints[FinTP]).Middle(MySurface, P3,P1);
|
||||||
|
|
||||||
Standard_Integer T1,T2,T3,T4;
|
Standard_Integer T1,T2,T3,T4;
|
||||||
@ -934,7 +934,7 @@ void IntPolyh_Triangle::MiddleRefinement(const Standard_Integer NumTri,
|
|||||||
Fleche=-1.0;
|
Fleche=-1.0;
|
||||||
IP=0;
|
IP=0;
|
||||||
|
|
||||||
TPoints.IncNbPoints();
|
TPoints.IncrementNbItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
@ -948,7 +948,7 @@ void IntPolyh_Triangle::MultipleMiddleRefinement(const Standard_Integer NbAffina
|
|||||||
IntPolyh_ArrayOfTriangles &TTriangles,
|
IntPolyh_ArrayOfTriangles &TTriangles,
|
||||||
IntPolyh_ArrayOfEdges & TEdges) {
|
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
|
//On sait qu'il faut affiner au moins une fois
|
||||||
TTriangles[NumTri].MiddleRefinement(NumTri,MySurface,TPoints,
|
TTriangles[NumTri].MiddleRefinement(NumTri,MySurface,TPoints,
|
||||||
@ -1020,16 +1020,16 @@ void IntPolyh_Triangle::MultipleMiddleRefinement2(const Standard_Real CritereAff
|
|||||||
IntPolyh_ArrayOfTriangles &TTriangles,
|
IntPolyh_ArrayOfTriangles &TTriangles,
|
||||||
IntPolyh_ArrayOfEdges & TEdges) {
|
IntPolyh_ArrayOfEdges & TEdges) {
|
||||||
|
|
||||||
const Standard_Integer FinTTInit = TTriangles.NbTriangles();
|
const Standard_Integer FinTTInit = TTriangles.NbItems();
|
||||||
Standard_Integer CritereArret=FinTTInit+250;
|
Standard_Integer CritereArret=FinTTInit+250;
|
||||||
|
|
||||||
//On sait qu'il faut affiner une fois au moins
|
//On sait qu'il faut affiner une fois au moins
|
||||||
MiddleRefinement(NumTri,MySurface,TPoints,
|
MiddleRefinement(NumTri,MySurface,TPoints,
|
||||||
TTriangles,TEdges);
|
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];
|
IntPolyh_Triangle& TriangleCourant = TTriangles[iii];
|
||||||
if(TriangleCourant.CompareBoxTriangle(b,TPoints)==0)
|
if(TriangleCourant.CompareBoxTriangle(b,TPoints)==0)
|
||||||
//On n'affine pas le triangle
|
//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,
|
void IntPolyh_Triangle::SetEdgeandOrientation(const Standard_Integer EdgeIndex,
|
||||||
const IntPolyh_ArrayOfEdges &TEdges) {
|
const IntPolyh_ArrayOfEdges &TEdges) {
|
||||||
const Standard_Integer FinTE = TEdges.NbEdges();
|
const Standard_Integer FinTE = TEdges.NbItems();
|
||||||
|
|
||||||
Standard_Integer PE1 =0,PE2 =0;
|
Standard_Integer PE1 =0,PE2 =0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user