1 // Created on: 1995-03-21 2 // Created by: Laurent BOURESCHE 3 // Copyright (c) 1995-1999 Matra Datavision 4 // Copyright (c) 1999-2014 OPEN CASCADE SAS 5 // 6 // This file is part of Open CASCADE Technology software library. 7 // 8 // This library is free software; you can redistribute it and/or modify it under 9 // the terms of the GNU Lesser General Public License version 2.1 as published 10 // by the Free Software Foundation, with special exception defined in the file 11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 12 // distribution for complete text of the license and disclaimer of any warranty. 13 // 14 // Alternatively, this file may be used under the terms of Open CASCADE 15 // commercial license or contractual agreement. 16 17 18 #include <ChFiDS_Regul.hxx> 19 20 //======================================================================= 21 //function : ChFiDS_Regul 22 //purpose : 23 //======================================================================= ChFiDS_Regul()24ChFiDS_Regul::ChFiDS_Regul() 25 : icurv (0), 26 is1 (0), 27 is2 (0) 28 { 29 } 30 31 32 //======================================================================= 33 //function : SetCurve 34 //purpose : 35 //======================================================================= 36 SetCurve(const Standard_Integer IC)37void ChFiDS_Regul::SetCurve(const Standard_Integer IC) 38 { 39 icurv = Abs(IC); 40 } 41 42 43 //======================================================================= 44 //function : SetS1 45 //purpose : 46 //======================================================================= 47 SetS1(const Standard_Integer IS1,const Standard_Boolean IsFace)48void ChFiDS_Regul::SetS1(const Standard_Integer IS1, 49 const Standard_Boolean IsFace) 50 { 51 if(IsFace) is1 = Abs(IS1); 52 else is1 = -Abs(IS1); 53 } 54 55 56 //======================================================================= 57 //function : SetS2 58 //purpose : 59 //======================================================================= 60 SetS2(const Standard_Integer IS2,const Standard_Boolean IsFace)61void ChFiDS_Regul::SetS2(const Standard_Integer IS2, 62 const Standard_Boolean IsFace) 63 { 64 if(IsFace) is2 = Abs(IS2); 65 else is2 = -Abs(IS2); 66 } 67 68 69 //======================================================================= 70 //function : IsSurface1 71 //purpose : 72 //======================================================================= 73 IsSurface1() const74Standard_Boolean ChFiDS_Regul::IsSurface1() const 75 { 76 return (is1<0); 77 } 78 79 80 //======================================================================= 81 //function : IsSurface2 82 //purpose : 83 //======================================================================= 84 IsSurface2() const85Standard_Boolean ChFiDS_Regul::IsSurface2() const 86 { 87 return (is2<0); 88 } 89 90 91 //======================================================================= 92 //function : Curve 93 //purpose : 94 //======================================================================= 95 Curve() const96Standard_Integer ChFiDS_Regul::Curve() const 97 { 98 return icurv; 99 } 100 101 102 //======================================================================= 103 //function : S1 104 //purpose : 105 //======================================================================= 106 S1() const107Standard_Integer ChFiDS_Regul::S1() const 108 { 109 return Abs(is1); 110 } 111 112 113 //======================================================================= 114 //function : S2 115 //purpose : 116 //======================================================================= 117 S2() const118Standard_Integer ChFiDS_Regul::S2() const 119 { 120 return Abs(is2); 121 } 122 123 124