-// File: HatchGen_PointOnHatching.cdl
-// Created: Fri Oct 29 15:21:47 1993
-// Author: Jean Marc LACHAUME
-// <jml@phobox>
-
+// Created on: 1993-10-29
+// Created by: Jean Marc LACHAUME
+// Copyright (c) 1993-1999 Matra Datavision
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+
+#include <HatchGen_PointOnElement.hxx>
+#include <HatchGen_PointOnHatching.hxx>
+#include <IntRes2d_IntersectionPoint.hxx>
+#include <Standard_OutOfRange.hxx>
#include <Standard_Stream.hxx>
-#include <HatchGen_PointOnHatching.ixx>
#define RAISE_IF_NOSUCHOBJECT 0
// Purpose : Constructor.
//=======================================================================
-HatchGen_PointOnHatching::HatchGen_PointOnHatching (const HatchGen_PointOnHatching& Point)
-{
- myIndex = Point.myIndex ;
- myParam = Point.myParam ;
- myPosit = Point.myPosit ;
- myBefore = Point.myBefore ;
- myAfter = Point.myAfter ;
- mySegBeg = Point.mySegBeg ;
- mySegEnd = Point.mySegEnd ;
- myPoints = Point.myPoints ;
-}
-
-//=======================================================================
-// Function : HatchGen_PointOnHatching
-// Purpose : Constructor.
-//=======================================================================
-
HatchGen_PointOnHatching::HatchGen_PointOnHatching (const IntRes2d_IntersectionPoint& Point)
{
myIndex = 0 ;
myPoints.Clear() ;
}
-void HatchGen_PointOnHatching::Delete()
-{}
-
//=======================================================================
// Function : AddPoint
// Purpose : Adds a point on element to the point.
if (IPnt > NbPnt) myPoints.Append (Point) ;
}
-
//=======================================================================
// Function : NbPoints
// Purpose : Returns the number of elements intersecting the hatching at
void HatchGen_PointOnHatching::Dump (const Standard_Integer Index) const
{
- cout << "--- Point on hatching " ;
+ std::cout << "--- Point on hatching " ;
if (Index > 0) {
- cout << "# " << setw(3) << Index << " " ;
+ std::cout << "# " << std::setw(3) << Index << " " ;
} else {
- cout << "------" ;
+ std::cout << "------" ;
}
- cout << "------------------" << endl ;
+ std::cout << "------------------" << std::endl ;
- cout << " Index of the hatching = " << myIndex << endl ;
- cout << " Parameter on hatching = " << myParam << endl ;
- cout << " Position on hatching = " ;
+ std::cout << " Index of the hatching = " << myIndex << std::endl ;
+ std::cout << " Parameter on hatching = " << myParam << std::endl ;
+ std::cout << " Position on hatching = " ;
switch (myPosit) {
- case TopAbs_FORWARD : cout << "FORWARD (i.e. BEGIN )" ; break ;
- case TopAbs_INTERNAL : cout << "INTERNAL (i.e. MIDDLE )" ; break ;
- case TopAbs_REVERSED : cout << "REVERSED (i.e. END )" ; break ;
- case TopAbs_EXTERNAL : cout << "EXTERNAL (i.e. UNKNOWN)" ; break ;
+ case TopAbs_FORWARD : std::cout << "FORWARD (i.e. BEGIN )" ; break ;
+ case TopAbs_INTERNAL : std::cout << "INTERNAL (i.e. MIDDLE )" ; break ;
+ case TopAbs_REVERSED : std::cout << "REVERSED (i.e. END )" ; break ;
+ case TopAbs_EXTERNAL : std::cout << "EXTERNAL (i.e. UNKNOWN)" ; break ;
}
- cout << endl ;
- cout << " State Before = " ;
+ std::cout << std::endl ;
+ std::cout << " State Before = " ;
switch (myBefore) {
- case TopAbs_IN : cout << "IN" ; break ;
- case TopAbs_OUT : cout << "OUT" ; break ;
- case TopAbs_ON : cout << "ON" ; break ;
- case TopAbs_UNKNOWN : cout << "UNKNOWN" ; break ;
+ case TopAbs_IN : std::cout << "IN" ; break ;
+ case TopAbs_OUT : std::cout << "OUT" ; break ;
+ case TopAbs_ON : std::cout << "ON" ; break ;
+ case TopAbs_UNKNOWN : std::cout << "UNKNOWN" ; break ;
}
- cout << endl ;
- cout << " State After = " ;
+ std::cout << std::endl ;
+ std::cout << " State After = " ;
switch (myAfter) {
- case TopAbs_IN : cout << "IN" ; break ;
- case TopAbs_OUT : cout << "OUT" ; break ;
- case TopAbs_ON : cout << "ON" ; break ;
- case TopAbs_UNKNOWN : cout << "UNKNOWN" ; break ;
+ case TopAbs_IN : std::cout << "IN" ; break ;
+ case TopAbs_OUT : std::cout << "OUT" ; break ;
+ case TopAbs_ON : std::cout << "ON" ; break ;
+ case TopAbs_UNKNOWN : std::cout << "UNKNOWN" ; break ;
}
- cout << endl ;
- cout << " Beginning of segment = " << (mySegBeg ? "TRUE" : "FALSE") << endl ;
- cout << " End of segment = " << (mySegEnd ? "TRUE" : "FALSE") << endl ;
+ std::cout << std::endl ;
+ std::cout << " Beginning of segment = " << (mySegBeg ? "TRUE" : "FALSE") << std::endl ;
+ std::cout << " End of segment = " << (mySegEnd ? "TRUE" : "FALSE") << std::endl ;
Standard_Integer NbPnt = myPoints.Length () ;
if (NbPnt == 0) {
- cout << " No points on element" << endl ;
+ std::cout << " No points on element" << std::endl ;
} else {
- cout << " Contains " << NbPnt << " points on element" << endl ;
+ std::cout << " Contains " << NbPnt << " points on element" << std::endl ;
for (Standard_Integer IPnt = 1 ; IPnt <= NbPnt ; IPnt++) {
const HatchGen_PointOnElement& Point = myPoints.Value (IPnt) ;
Point.Dump (IPnt) ;
}
}
- cout << "----------------------------------------------" << endl ;
+ std::cout << "----------------------------------------------" << std::endl ;
}