mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
Integration of OCCT 6.5.0 from SVN
This commit is contained in:
82
src/HatchGen/HatchGen_Domain.cxx
Executable file
82
src/HatchGen/HatchGen_Domain.cxx
Executable file
@@ -0,0 +1,82 @@
|
||||
// File: HatchGen_Domain.cxx
|
||||
// Created: Wed Nov 10 15:33:27 1993
|
||||
// Author: Jean Marc LACHAUME
|
||||
// <jml@sdsun1>
|
||||
|
||||
#include <Standard_Stream.hxx>
|
||||
#include <HatchGen_Domain.ixx>
|
||||
|
||||
//=======================================================================
|
||||
// Function : HatchGen_Domain
|
||||
// Purpose : Constructor.
|
||||
//=======================================================================
|
||||
|
||||
HatchGen_Domain::HatchGen_Domain () :
|
||||
myHasFirstPoint (Standard_False) ,
|
||||
myHasSecondPoint (Standard_False)
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// Function : HatchGen_Domain
|
||||
// Purpose : Constructor.
|
||||
//=======================================================================
|
||||
|
||||
HatchGen_Domain::HatchGen_Domain (const HatchGen_PointOnHatching& P1,
|
||||
const HatchGen_PointOnHatching& P2) :
|
||||
myHasFirstPoint (Standard_True) ,
|
||||
myFirstPoint (P1),
|
||||
myHasSecondPoint (Standard_True) ,
|
||||
mySecondPoint (P2)
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// Function : HatchGen_Domain
|
||||
// Purpose : Constructor.
|
||||
//=======================================================================
|
||||
|
||||
HatchGen_Domain::HatchGen_Domain (const HatchGen_PointOnHatching& P,
|
||||
const Standard_Boolean First)
|
||||
{
|
||||
if (First) {
|
||||
myHasFirstPoint = Standard_True ;
|
||||
myHasSecondPoint = Standard_False ;
|
||||
myFirstPoint = P ;
|
||||
} else {
|
||||
myHasFirstPoint = Standard_False ;
|
||||
myHasSecondPoint = Standard_True ;
|
||||
mySecondPoint = P ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//=======================================================================
|
||||
// Function : Dump
|
||||
// Purpose : Dump of the domain.
|
||||
//=======================================================================
|
||||
|
||||
void HatchGen_Domain::Dump (const Standard_Integer Index) const
|
||||
{
|
||||
cout << "=== Domain " ;
|
||||
if (Index > 0) {
|
||||
cout << "# " << setw(3) << Index << " " ;
|
||||
} else {
|
||||
cout << "======" ;
|
||||
}
|
||||
cout << "=============================" << endl ;
|
||||
|
||||
if (myHasFirstPoint) {
|
||||
myFirstPoint.Dump (1) ;
|
||||
} else {
|
||||
cout << " Has not a first point" << endl ;
|
||||
}
|
||||
|
||||
if (myHasSecondPoint) {
|
||||
mySecondPoint.Dump (2) ;
|
||||
} else {
|
||||
cout << " Has not a second point" << endl ;
|
||||
}
|
||||
|
||||
cout << "==============================================" << endl ;
|
||||
}
|
Reference in New Issue
Block a user