1 // Created on: 1993-06-03
2 // Created by: Laurent BUCHARD
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #include <Standard_OutOfRange.hxx>
19 //======================================================================
20 inline Standard_Real IntCurve_Polygon2dGen::DeflectionOverEstimation() const {
21 return(TheDeflection);
22 }//======================================================================
23 inline void IntCurve_Polygon2dGen::SetDeflectionOverEstimation
24 (const Standard_Real x) {
26 myBox.Enlarge(TheDeflection);
28 //======================================================================
29 inline void IntCurve_Polygon2dGen::Closed(const Standard_Boolean flag) {
32 //======================================================================
33 inline Standard_Integer IntCurve_Polygon2dGen::NbSegments(void) const {
34 return((ClosedPolygon)? NbPntIn : NbPntIn-1);
36 //======================================================================
37 inline Standard_Real IntCurve_Polygon2dGen::InfParameter() const {
38 return(TheParams.Value(TheIndex(1)));
40 //======================================================================
41 inline Standard_Real IntCurve_Polygon2dGen::SupParameter() const {
42 return(TheParams.Value(TheIndex(NbPntIn)));
44 //======================================================================
46 //======================================================================
47 inline Standard_Integer IntCurve_Polygon2dGen::CalculRegion(const Standard_Real x,
48 const Standard_Real y,
49 const Standard_Real x1,
50 const Standard_Real x2,
51 const Standard_Real y1,
52 const Standard_Real y2) const {
54 if(x<x1) { r=1; } else { if(x>x2) { r=2; } else { r=0; } }
55 if(y<y1) { r|=4; } else { if(y>y2) { r|=8; } }