1 // Created on: 1993-11-10
2 // Created by: Jean Marc LACHAUME
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.
18 #include <HatchGen_Domain.hxx>
19 #include <HatchGen_PointOnHatching.hxx>
20 #include <Standard_Stream.hxx>
22 //=======================================================================
23 // Function : HatchGen_Domain
24 // Purpose : Constructor.
25 //=======================================================================
26 HatchGen_Domain::HatchGen_Domain () :
27 myHasFirstPoint (Standard_False) ,
28 myHasSecondPoint (Standard_False)
32 //=======================================================================
33 // Function : HatchGen_Domain
34 // Purpose : Constructor.
35 //=======================================================================
37 HatchGen_Domain::HatchGen_Domain (const HatchGen_PointOnHatching& P1,
38 const HatchGen_PointOnHatching& P2) :
39 myHasFirstPoint (Standard_True) ,
41 myHasSecondPoint (Standard_True) ,
46 //=======================================================================
47 // Function : HatchGen_Domain
48 // Purpose : Constructor.
49 //=======================================================================
51 HatchGen_Domain::HatchGen_Domain (const HatchGen_PointOnHatching& P,
52 const Standard_Boolean First)
55 myHasFirstPoint = Standard_True ;
56 myHasSecondPoint = Standard_False ;
59 myHasFirstPoint = Standard_False ;
60 myHasSecondPoint = Standard_True ;
66 //=======================================================================
68 // Purpose : Dump of the domain.
69 //=======================================================================
71 void HatchGen_Domain::Dump (const Standard_Integer Index) const
73 std::cout << "=== Domain " ;
75 std::cout << "# " << std::setw(3) << Index << " " ;
77 std::cout << "======" ;
79 std::cout << "=============================" << std::endl ;
81 if (myHasFirstPoint) {
82 myFirstPoint.Dump (1) ;
84 std::cout << " Has not a first point" << std::endl ;
87 if (myHasSecondPoint) {
88 mySecondPoint.Dump (2) ;
90 std::cout << " Has not a second point" << std::endl ;
93 std::cout << "==============================================" << std::endl ;