1 // Created on: 1999-04-06
2 // Created by: Fabrice SERVANT
3 // Copyright (c) 1999-1999 Matra Datavision
4 // Copyright (c) 1999-2012 OPEN CASCADE SAS
6 // The content of this file is subject to the Open CASCADE Technology Public
7 // License Version 6.5 (the "License"). You may not use the content of this file
8 // except in compliance with the License. Please obtain a copy of the License
9 // at http://www.opencascade.org and read it completely before using this file.
11 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 // The Original Code and all software distributed under the License is
15 // distributed on an "AS IS" basis, without warranty of any kind, and the
16 // Initial Developer hereby disclaims all such warranties, including without
17 // limitation, any warranties of merchantability, fitness for a particular
18 // purpose or non-infringement. Please see the License for the specific terms
19 // and conditions governing the rights and limitations under the License.
23 #include <IntPolyh_StartPoint.ixx>
24 #include <IntPolyh_ArrayOfTangentZones.ixx>
27 IntPolyh_ArrayOfTangentZones::IntPolyh_ArrayOfTangentZones() : n(0),nbtangentzones(0),ptr(0) { }
29 IntPolyh_ArrayOfTangentZones::IntPolyh_ArrayOfTangentZones(const Standard_Integer N) : nbtangentzones(0){
33 void IntPolyh_ArrayOfTangentZones::Init(const Standard_Integer N) {
35 ptr = (void*) (new IntPolyh_StartPoint [N]);
39 Standard_Integer IntPolyh_ArrayOfTangentZones::GetN() const {
43 Standard_Integer IntPolyh_ArrayOfTangentZones::NbTangentZones() const {
44 return(nbtangentzones);
47 void IntPolyh_ArrayOfTangentZones::IncrementNbTangentZones() {
54 const IntPolyh_StartPoint& IntPolyh_ArrayOfTangentZones::Value(const Standard_Integer Index) const {
55 IntPolyh_StartPoint *ptrstpoint = (IntPolyh_StartPoint *)ptr;
57 if(Index<0 || Index>=n) {
58 cerr<<" Erreur1 "<<endl;
59 printf("Value() from IntPolyh_ArrayOfTangentZones :ERROR value out of array\n");
62 return(ptrstpoint[Index]);
65 IntPolyh_StartPoint& IntPolyh_ArrayOfTangentZones::ChangeValue(const Standard_Integer Index) {
66 IntPolyh_StartPoint *ptrstpoint = (IntPolyh_StartPoint *)ptr;
68 if(Index<0 || Index>=n) {
69 cerr<<" Erreur1 "<<endl;
70 printf("Value() from IntPolyh_ArrayOfTangentZones :ERROR value out of array\n");
73 return(ptrstpoint[Index]);
76 void IntPolyh_ArrayOfTangentZones::Destroy() {
79 IntPolyh_StartPoint *ptrstpoint = (IntPolyh_StartPoint *)ptr;
88 IntPolyh_ArrayOfTangentZones & IntPolyh_ArrayOfTangentZones::Copy(const IntPolyh_ArrayOfTangentZones& Other) {
89 if(ptr==Other.ptr) return(*this);
92 ptr = (void *) (new IntPolyh_StartPoint[n]);
93 for(Standard_Integer i=0;i<=n;i++) {
99 void IntPolyh_ArrayOfTangentZones::Dump() const{
100 printf("\n ArrayOfTangentZones 0-> %d",nbtangentzones-1);
101 for(Standard_Integer i=0;i<nbtangentzones;i++) {