1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +03:00

0024002: Overall code and build procedure refactoring -- automatic

Automatic upgrade of OCCT code by command "occt_upgrade . -nocdl":
- WOK-generated header files from inc and sources from drv are moved to src
- CDL files removed
- All packages are converted to nocdlpack
This commit is contained in:
abv
2015-07-12 07:42:38 +03:00
parent 543a996496
commit 42cf5bc1ca
15354 changed files with 623957 additions and 509844 deletions

View File

@@ -1,4 +1,20 @@
Geom2dHatch_Hatchings.hxx
Geom2dHatch_Classifier.hxx
Geom2dHatch_Classifier_0.cxx
Geom2dHatch_DataMapIteratorOfHatchings.hxx
Geom2dHatch_MapOfElements.hxx
Geom2dHatch_DataMapIteratorOfMapOfElements.hxx
Geom2dHatch_Element.cxx
Geom2dHatch_Element.hxx
Geom2dHatch_Elements.cxx
Geom2dHatch_Elements.hxx
Geom2dHatch_FClass2dOfClassifier.hxx
Geom2dHatch_FClass2dOfClassifier_0.cxx
Geom2dHatch_Hatcher.cxx
Geom2dHatch_Hatcher.hxx
Geom2dHatch_Hatcher.lxx
Geom2dHatch_Hatching.cxx
Geom2dHatch_Hatching.hxx
Geom2dHatch_Hatchings.hxx
Geom2dHatch_Intersector.cxx
Geom2dHatch_Intersector.hxx
Geom2dHatch_Intersector.lxx
Geom2dHatch_MapOfElements.hxx

View File

@@ -1,52 +0,0 @@
-- Created on: 1994-02-03
-- Created by: Jean Marc LACHAUME
-- Copyright (c) 1994-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.
package Geom2dHatch
uses
Geom2dAdaptor,
Geom2dInt,
gp,
HatchGen,
TCollection,
TColStd,
TopClass,
TopAbs
is
class Intersector ;
class Hatcher;
class Element;
class Elements;
class Hatching;
imported Hatchings;
imported DataMapIteratorOfHatchings;
class Classifier instantiates FaceClassifier from TopClass
(Elements from Geom2dHatch,
Curve from Geom2dAdaptor,
Intersector from Geom2dHatch);
imported MapOfElements;
imported DataMapIteratorOfMapOfElements;
end Geom2dHatch ;

View File

@@ -0,0 +1,114 @@
// Created on: 1994-02-03
// Created by: Jean Marc LACHAUME
// Copyright (c) 1994-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.
#ifndef _Geom2dHatch_Classifier_HeaderFile
#define _Geom2dHatch_Classifier_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Geom2dHatch_FClass2dOfClassifier.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Standard_Real.hxx>
#include <IntRes2d_Position.hxx>
#include <Standard_Boolean.hxx>
#include <TopAbs_State.hxx>
class Standard_DomainError;
class Geom2dHatch_Elements;
class Geom2dAdaptor_Curve;
class Geom2dHatch_Intersector;
class Geom2dHatch_FClass2dOfClassifier;
class gp_Pnt2d;
class Geom2dHatch_Classifier
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT Geom2dHatch_Classifier();
Standard_EXPORT Geom2dHatch_Classifier(Geom2dHatch_Elements& F, const gp_Pnt2d& P, const Standard_Real Tol);
Standard_EXPORT void Perform (Geom2dHatch_Elements& F, const gp_Pnt2d& P, const Standard_Real Tol);
Standard_EXPORT TopAbs_State State() const;
Standard_Boolean Rejected() const;
Standard_Boolean NoWires() const;
Standard_EXPORT const Geom2dAdaptor_Curve& Edge() const;
Standard_EXPORT Standard_Real EdgeParameter() const;
IntRes2d_Position Position() const;
protected:
Geom2dHatch_FClass2dOfClassifier myClassifier;
Geom2dAdaptor_Curve myEdge;
Standard_Real myEdgeParameter;
IntRes2d_Position myPosition;
Standard_Boolean rejected;
Standard_Boolean nowires;
private:
};
#define TheFaceExplorer Geom2dHatch_Elements
#define TheFaceExplorer_hxx <Geom2dHatch_Elements.hxx>
#define TheEdge Geom2dAdaptor_Curve
#define TheEdge_hxx <Geom2dAdaptor_Curve.hxx>
#define TheIntersection2d Geom2dHatch_Intersector
#define TheIntersection2d_hxx <Geom2dHatch_Intersector.hxx>
#define TopClass_FClass2d Geom2dHatch_FClass2dOfClassifier
#define TopClass_FClass2d_hxx <Geom2dHatch_FClass2dOfClassifier.hxx>
#define TopClass_FaceClassifier Geom2dHatch_Classifier
#define TopClass_FaceClassifier_hxx <Geom2dHatch_Classifier.hxx>
#include <TopClass_FaceClassifier.lxx>
#undef TheFaceExplorer
#undef TheFaceExplorer_hxx
#undef TheEdge
#undef TheEdge_hxx
#undef TheIntersection2d
#undef TheIntersection2d_hxx
#undef TopClass_FClass2d
#undef TopClass_FClass2d_hxx
#undef TopClass_FaceClassifier
#undef TopClass_FaceClassifier_hxx
#endif // _Geom2dHatch_Classifier_HeaderFile

View File

@@ -0,0 +1,38 @@
// Created on: 1994-02-03
// Created by: Jean Marc LACHAUME
// Copyright (c) 1994-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 <Geom2dHatch_Classifier.hxx>
#include <Standard_DomainError.hxx>
#include <Geom2dHatch_Elements.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dHatch_Intersector.hxx>
#include <Geom2dHatch_FClass2dOfClassifier.hxx>
#include <gp_Pnt2d.hxx>
#define TheFaceExplorer Geom2dHatch_Elements
#define TheFaceExplorer_hxx <Geom2dHatch_Elements.hxx>
#define TheEdge Geom2dAdaptor_Curve
#define TheEdge_hxx <Geom2dAdaptor_Curve.hxx>
#define TheIntersection2d Geom2dHatch_Intersector
#define TheIntersection2d_hxx <Geom2dHatch_Intersector.hxx>
#define TopClass_FClass2d Geom2dHatch_FClass2dOfClassifier
#define TopClass_FClass2d_hxx <Geom2dHatch_FClass2dOfClassifier.hxx>
#define TopClass_FaceClassifier Geom2dHatch_Classifier
#define TopClass_FaceClassifier_hxx <Geom2dHatch_Classifier.hxx>
#include <TopClass_FaceClassifier.gxx>

View File

@@ -1,85 +0,0 @@
-- Created on: 1993-11-10
-- 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.
class Element from Geom2dHatch
uses
Orientation from TopAbs,
Curve from Geom2dAdaptor
is
Create
returns Element from Geom2dHatch;
Create (Other : Element from Geom2dHatch)
---Purpose: Magic constructor.
returns Element from Geom2dHatch ;
Create (Curve : Curve from Geom2dAdaptor ;
Orientation : Orientation from TopAbs = TopAbs_FORWARD)
---Purpose: Creates an element.
returns Element from Geom2dHatch ;
Curve (me)
---Purpose: Returns the curve associated to the element.
---C++: return const &
returns Curve from Geom2dAdaptor
is static ;
ChangeCurve (me : in out)
---Purpose: Returns the curve associated to the element.
---C++: return &
returns Curve from Geom2dAdaptor
is static ;
Orientation (me : in out ; Orientation : Orientation from TopAbs)
---Purpose: Sets the orientation of the element.
is static ;
Orientation (me)
---Purpose: Returns the orientation of the element.
returns Orientation from TopAbs
is static ;
fields
myCurve : Curve from Geom2dAdaptor ;
myOrientation : Orientation from TopAbs ;
end Element from Geom2dHatch;

View File

@@ -19,9 +19,8 @@
// Purpose : Magic Constructor.
//=======================================================================
#include <Geom2dHatch_Element.ixx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dHatch_Element.hxx>
Geom2dHatch_Element::Geom2dHatch_Element (const Geom2dHatch_Element& Other)
: myCurve(Other.myCurve), myOrientation(Other.myOrientation) {

View File

@@ -0,0 +1,82 @@
// Created on: 1993-11-10
// 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.
#ifndef _Geom2dHatch_Element_HeaderFile
#define _Geom2dHatch_Element_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <TopAbs_Orientation.hxx>
class Geom2dAdaptor_Curve;
class Geom2dHatch_Element
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT Geom2dHatch_Element();
//! Magic constructor.
Standard_EXPORT Geom2dHatch_Element(const Geom2dHatch_Element& Other);
//! Creates an element.
Standard_EXPORT Geom2dHatch_Element(const Geom2dAdaptor_Curve& Curve, const TopAbs_Orientation Orientation = TopAbs_FORWARD);
//! Returns the curve associated to the element.
Standard_EXPORT const Geom2dAdaptor_Curve& Curve() const;
//! Returns the curve associated to the element.
Standard_EXPORT Geom2dAdaptor_Curve& ChangeCurve();
//! Sets the orientation of the element.
Standard_EXPORT void Orientation (const TopAbs_Orientation Orientation);
//! Returns the orientation of the element.
Standard_EXPORT TopAbs_Orientation Orientation() const;
protected:
private:
Geom2dAdaptor_Curve myCurve;
TopAbs_Orientation myOrientation;
};
#endif // _Geom2dHatch_Element_HeaderFile

View File

@@ -1,147 +0,0 @@
-- Created on: 1994-12-16
-- Created by: Laurent BUCHARD
-- Copyright (c) 1994-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.
-- Modified by skv - Fri Jul 14 16:46:18 2006 OCC12627
class Elements from Geom2dHatch
uses
Orientation from TopAbs,
Lin2d from gp,
Pnt2d from gp,
Integer from Standard,
Element from Geom2dHatch,
MapIntegerHasher from TColStd,
Curve from Geom2dAdaptor,
MapOfElements from Geom2dHatch,
DataMapIteratorOfMapOfElements from Geom2dHatch
raises
DomainError from Standard,
NoSuchObject from Standard
is
Create
returns Elements from Geom2dHatch;
Create(Other : Elements from Geom2dHatch)
returns Elements from Geom2dHatch;
----------------------------------------------------------------------
-- E m u l a t i o n o f D a t a M a p
--
-- f r o m T C o l l e c t i o n
----------------------------------------------------------------------
Clear(me : in out)
---C++: alias ~
is static;
Bind(me : in out; K : Integer from Standard; I : Element from Geom2dHatch) returns Boolean
is static;
IsBound(me; K : Integer from Standard) returns Boolean
is static;
UnBind(me : in out; K : Integer from Standard) returns Boolean
is static;
Find(me; K : Integer from Standard) returns any Element from Geom2dHatch
raises NoSuchObject from Standard -- when <K> is not in the map.
---C++: alias operator()
---C++: return const &
is static;
ChangeFind(me : in out; K : Integer from Standard) returns any Element from Geom2dHatch
raises NoSuchObject from Standard -- when <K> is not in the map.
---C++: alias operator()
---C++: return &
is static;
----------------------------------------------------------------------
-- M e t h o d s u s e d b y t h e C l a s s i f i e r
--
-- see BRepClass_FaceExplorer for the Purposes
----------------------------------------------------------------------
Reject(me; P : Pnt2d from gp)
returns Boolean from Standard
is static;
-- Modified by skv - Fri Jul 14 16:46:18 2006 OCC12627 Begin
Segment(me: in out; P : Pnt2d from gp;
L : out Lin2d from gp;
Par : out Real)
returns Boolean from Standard
is static;
OtherSegment(me: in out; P : Pnt2d from gp;
L : out Lin2d from gp;
Par : out Real)
returns Boolean from Standard
is static;
-- Modified by skv - Fri Jul 14 16:46:18 2006 OCC12627 End
InitWires(me : in out)
is static;
MoreWires(me) returns
Boolean from Standard
is static;
NextWire(me : in out)
is static;
RejectWire(me; L : Lin2d from gp;
Par : Real from Standard)
returns Boolean from Standard
is static;
InitEdges(me : in out)
is static;
MoreEdges(me)
returns Boolean from Standard
is static;
NextEdge(me : in out)
is static;
RejectEdge(me; L : Lin2d from gp;
Par : Real from Standard)
returns Boolean from Standard
is static;
CurrentEdge(me; E : out Curve from Geom2dAdaptor;
Or : out Orientation from TopAbs)
is static;
fields
myMap : MapOfElements from Geom2dHatch;
Iter : DataMapIteratorOfMapOfElements;
NumWire : Integer from Standard;
NumEdge : Integer from Standard;
myCurEdge: Integer from Standard;
end Elements from Geom2dHatch;

View File

@@ -16,16 +16,18 @@
// Modified by skv - Fri Jul 14 17:03:47 2006 OCC12627
#include <Geom2dHatch_Elements.ixx>
#include <Standard_Integer.hxx>
#include <Geom2dHatch_Element.hxx>
#include <TColStd_MapIntegerHasher.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <TopAbs_Orientation.hxx>
#include <Geom2dHatch_Element.hxx>
#include <Geom2dHatch_Elements.hxx>
#include <gp.hxx>
#include <gp_Lin2d.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Vec2d.hxx>
#include <Standard_DomainError.hxx>
#include <Standard_Integer.hxx>
#include <Standard_NoSuchObject.hxx>
#include <TColStd_MapIntegerHasher.hxx>
#include <TopAbs_Orientation.hxx>
Geom2dHatch_Elements::Geom2dHatch_Elements(const Geom2dHatch_Elements& )
{

View File

@@ -0,0 +1,126 @@
// Created on: 1994-12-16
// Created by: Laurent BUCHARD
// Copyright (c) 1994-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.
#ifndef _Geom2dHatch_Elements_HeaderFile
#define _Geom2dHatch_Elements_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Geom2dHatch_MapOfElements.hxx>
#include <Geom2dHatch_DataMapIteratorOfMapOfElements.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
#include <TopAbs_Orientation.hxx>
class Standard_DomainError;
class Standard_NoSuchObject;
class Geom2dHatch_Element;
class gp_Pnt2d;
class gp_Lin2d;
class Geom2dAdaptor_Curve;
class Geom2dHatch_Elements
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT Geom2dHatch_Elements();
Standard_EXPORT Geom2dHatch_Elements(const Geom2dHatch_Elements& Other);
Standard_EXPORT void Clear();
~Geom2dHatch_Elements()
{
Clear();
}
Standard_EXPORT Standard_Boolean Bind (const Standard_Integer K, const Geom2dHatch_Element& I);
Standard_EXPORT Standard_Boolean IsBound (const Standard_Integer K) const;
Standard_EXPORT Standard_Boolean UnBind (const Standard_Integer K);
Standard_EXPORT const Geom2dHatch_Element& Find (const Standard_Integer K) const;
const Geom2dHatch_Element& operator() (const Standard_Integer K) const
{
return Find(K);
}
Standard_EXPORT Geom2dHatch_Element& ChangeFind (const Standard_Integer K);
Geom2dHatch_Element& operator() (const Standard_Integer K)
{
return ChangeFind(K);
}
Standard_EXPORT Standard_Boolean Reject (const gp_Pnt2d& P) const;
Standard_EXPORT Standard_Boolean Segment (const gp_Pnt2d& P, gp_Lin2d& L, Standard_Real& Par);
Standard_EXPORT Standard_Boolean OtherSegment (const gp_Pnt2d& P, gp_Lin2d& L, Standard_Real& Par);
Standard_EXPORT void InitWires();
Standard_EXPORT Standard_Boolean MoreWires() const;
Standard_EXPORT void NextWire();
Standard_EXPORT Standard_Boolean RejectWire (const gp_Lin2d& L, const Standard_Real Par) const;
Standard_EXPORT void InitEdges();
Standard_EXPORT Standard_Boolean MoreEdges() const;
Standard_EXPORT void NextEdge();
Standard_EXPORT Standard_Boolean RejectEdge (const gp_Lin2d& L, const Standard_Real Par) const;
Standard_EXPORT void CurrentEdge (Geom2dAdaptor_Curve& E, TopAbs_Orientation& Or) const;
protected:
private:
Geom2dHatch_MapOfElements myMap;
Geom2dHatch_DataMapIteratorOfMapOfElements Iter;
Standard_Integer NumWire;
Standard_Integer NumEdge;
Standard_Integer myCurEdge;
};
#endif // _Geom2dHatch_Elements_HeaderFile

View File

@@ -0,0 +1,109 @@
// Created on: 1994-02-03
// Created by: Jean Marc LACHAUME
// Copyright (c) 1994-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.
#ifndef _Geom2dHatch_FClass2dOfClassifier_HeaderFile
#define _Geom2dHatch_FClass2dOfClassifier_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <gp_Lin2d.hxx>
#include <Standard_Real.hxx>
#include <TopTrans_CurveTransition.hxx>
#include <Geom2dHatch_Intersector.hxx>
#include <Standard_Integer.hxx>
#include <TopAbs_State.hxx>
#include <TopAbs_Orientation.hxx>
class Standard_DomainError;
class Geom2dAdaptor_Curve;
class Geom2dHatch_Intersector;
class gp_Lin2d;
class Geom2dHatch_FClass2dOfClassifier
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT Geom2dHatch_FClass2dOfClassifier();
Standard_EXPORT void Reset (const gp_Lin2d& L, const Standard_Real P, const Standard_Real Tol);
Standard_EXPORT void Compare (const Geom2dAdaptor_Curve& E, const TopAbs_Orientation Or);
Standard_Real Parameter() const;
Geom2dHatch_Intersector& Intersector();
Standard_Integer ClosestIntersection() const;
TopAbs_State State() const;
Standard_Boolean IsHeadOrEnd() const;
protected:
private:
Standard_Boolean myIsSet;
Standard_Boolean myFirstCompare;
Standard_Boolean myFirstTrans;
gp_Lin2d myLin;
Standard_Real myParam;
Standard_Real myTolerance;
TopTrans_CurveTransition myTrans;
Geom2dHatch_Intersector myIntersector;
Standard_Integer myClosest;
TopAbs_State myState;
Standard_Boolean myIsHeadOrEnd;
};
#define TheEdge Geom2dAdaptor_Curve
#define TheEdge_hxx <Geom2dAdaptor_Curve.hxx>
#define TheIntersector Geom2dHatch_Intersector
#define TheIntersector_hxx <Geom2dHatch_Intersector.hxx>
#define TopClass_Classifier2d Geom2dHatch_FClass2dOfClassifier
#define TopClass_Classifier2d_hxx <Geom2dHatch_FClass2dOfClassifier.hxx>
#include <TopClass_Classifier2d.lxx>
#undef TheEdge
#undef TheEdge_hxx
#undef TheIntersector
#undef TheIntersector_hxx
#undef TopClass_Classifier2d
#undef TopClass_Classifier2d_hxx
#endif // _Geom2dHatch_FClass2dOfClassifier_HeaderFile

View File

@@ -0,0 +1,32 @@
// Created on: 1994-02-03
// Created by: Jean Marc LACHAUME
// Copyright (c) 1994-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 <Geom2dHatch_FClass2dOfClassifier.hxx>
#include <Standard_DomainError.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dHatch_Intersector.hxx>
#include <gp_Lin2d.hxx>
#define TheEdge Geom2dAdaptor_Curve
#define TheEdge_hxx <Geom2dAdaptor_Curve.hxx>
#define TheIntersector Geom2dHatch_Intersector
#define TheIntersector_hxx <Geom2dHatch_Intersector.hxx>
#define TopClass_Classifier2d Geom2dHatch_FClass2dOfClassifier
#define TopClass_Classifier2d_hxx <Geom2dHatch_FClass2dOfClassifier.hxx>
#include <TopClass_Classifier2d.gxx>

View File

@@ -1,491 +0,0 @@
-- Created on: 1993-10-25
-- 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.
class Hatcher from Geom2dHatch
uses
MapIntegerHasher from TColStd,
PointOnHatching from HatchGen,
Orientation from TopAbs,
State from TopAbs,
Domain from HatchGen,
ErrorStatus from HatchGen,
Curve from Geom2dAdaptor,
Intersector from Geom2dHatch,
Element from Geom2dHatch,
Elements from Geom2dHatch,
Hatching from Geom2dHatch,
Hatchings from Geom2dHatch,
Classifier from Geom2dHatch
raises
NoSuchObject from Standard ,
OutOfRange from Standard ,
NotDone from StdFail
----------------------------------------------------------------------
-- class Hatcher description.
----------------------------------------------------------------------
is
---Category: General use
Create (Intersector : Intersector from Geom2dHatch ;
Confusion2d : Real from Standard ;
Confusion3d : Real from Standard ;
KeepPnt : Boolean from Standard = Standard_False ;
KeepSeg : Boolean from Standard = Standard_False)
---Purpose: Returns an empty hatcher.
returns Hatcher from Geom2dHatch;
Intersector (me : in out ; Intersector : Intersector from Geom2dHatch)
---Purpose: Sets the associated intersector.
is static ;
Intersector (me : in out)
---Purpose: Returns the associated intersector.
---C++: inline
---C++: return const &
returns Intersector from Geom2dHatch
is static ;
ChangeIntersector (me : in out)
---Purpose: Returns the associated intersector.
---C++: inline
---C++: return &
returns Intersector from Geom2dHatch
is static ;
Confusion2d (me : in out ; Confusion : Real from Standard)
---Purpose: Sets the confusion tolerance.
is static ;
Confusion2d (me)
---Purpose: Returns the 2d confusion tolerance, i.e. the value under
-- which two points are considered identical in the
-- parametric space of the hatching.
---C++: inline
returns Real from Standard
is static ;
Confusion3d (me : in out ; Confusion : Real from Standard)
---Purpose: Sets the confusion tolerance.
is static ;
Confusion3d (me)
---Purpose: Returns the 3d confusion tolerance, i.e. the value under
-- which two points are considered identical in the
-- 3d space of the hatching.
---C++: inline
returns Real from Standard
is static ;
KeepPoints (me : in out; Keep : Boolean from Standard)
---Purpose: Sets the above flag.
is static ;
KeepPoints (me)
---Purpose: Returns the flag about the points consideration.
---C++: inline
returns Boolean from Standard
is static ;
KeepSegments (me : in out; Keep : Boolean from Standard)
---Purpose: Sets the above flag.
is static ;
KeepSegments (me)
---Purpose: Returns the flag about the segments consideration.
---C++: inline
returns Boolean from Standard
is static ;
Clear (me : in out)
---Purpose: Removes all the hatchings and all the elements.
---C++: inline
is static ;
---Category: Element
Element (me : in out ; IndE : Integer from Standard)
---Purpose: Returns the IndE-th element.
---Category: Element
---C++: inline
---C++: return &
returns Element from Geom2dHatch
raises NoSuchObject from Standard
is static protected ;
ElementCurve (me; IndE : Integer from Standard)
---Purpose: Returns the curve associated to the IndE-th element.
---Category: Element
---C++: inline
---C++: return const &
returns Curve from Geom2dAdaptor
raises NoSuchObject from Standard
is static ;
AddElement (me : in out ; Curve : Curve from Geom2dAdaptor ;
Orientation : Orientation from TopAbs = TopAbs_FORWARD)
---Purpose: Adds an element to the hatcher and returns its index.
---Category: Element
returns Integer from Standard
is static ;
RemElement (me : in out ; IndE : Integer from Standard)
---Purpose: Removes the IndE-th element from the hatcher.
---Category: Element
raises NoSuchObject from Standard
is static ;
ClrElements (me : in out)
---Purpose: Removes all the elements from the hatcher.
---Category: Element
is static ;
---Category: Hatching
Hatching (me : in out ; IndH : Integer from Standard)
---Purpose: Returns the IndH-th hatching.
---Category: Hatching
---C++: inline
---C++: return &
returns Hatching from Geom2dHatch
raises NoSuchObject from Standard
is static protected ;
HatchingCurve (me; IndH : Integer from Standard)
---Purpose: Returns the curve associated to the IndH-th hatching.
---Category: Hatching
---C++: inline
---C++: return const &
returns Curve from Geom2dAdaptor
raises NoSuchObject from Standard
is static ;
AddHatching (me : in out ; Curve : Curve from Geom2dAdaptor)
---Purpose: Adds a hatching to the hatcher and returns its index.
---Category: Hatching
returns Integer from Standard
is static ;
RemHatching (me : in out ; IndH : Integer from Standard)
---Purpose: Removes the IndH-th hatching from the hatcher.
---Category: Hatching
raises NoSuchObject from Standard
is static ;
ClrHatchings (me : in out)
---Purpose: Removes all the hatchings from the hatcher.
---Category: Hatching
is static ;
NbPoints (me; IndH : Integer from Standard)
---Purpose: Returns the number of intersection points of
-- the IndH-th hatching.
---Category: Hatching - Test
---C++: inline
returns Integer from Standard
raises NoSuchObject from Standard
is static ;
Point (me; IndH, IndP : Integer from Standard)
---Purpose: Returns the IndP-th intersection point of the
-- IndH-th hatching.
---Category: Hatching - Test
---C++: inline
---C++: return const &
returns PointOnHatching from HatchGen
raises NoSuchObject from Standard,
OutOfRange from Standard
is static ;
---Category: Computation - Trimming
Trim (me : in out)
---Purpose: Trims all the hatchings of the hatcher by all the
-- elements of the hatcher.
is static ;
Trim (me : in out ; Curve : Curve from Geom2dAdaptor)
---Purpose: Adds a hatching to the hatcher and trims it by
-- the elements already given and returns its index.
---Category: Computation
returns Integer from Standard
is static ;
Trim (me : in out ; IndH : Integer from Standard)
---Purpose: Trims the IndH-th hatching by the elements
-- already given.
---Category: Computation
raises NoSuchObject from Standard
is static ;
Trim (me : in out ; IndH, IndE : Integer from Standard)
---Purpose: Trims the IndH-th hatching of the hatcher by the
-- IndE-th element.
---Category: Computation
returns Boolean from Standard
is static private ;
---Category: Computation - Domains
GlobalTransition (me : in out; Point : in out PointOnHatching from HatchGen)
---Purpose: Sets the global transition (the before and after
-- states and segment extremities flags) of the point.
---Category: Computation - Domains
returns Boolean from Standard
is static private ;
ComputeDomains (me : in out)
---Purpose: Computes the domains of all the hatchings.
---Category: Computation - Domains
is static ;
ComputeDomains (me : in out ; IndH : Integer from Standard)
---Purpose: Computes the domains of the IndH-th hatching.
---Category: Computation - Domains
raises NoSuchObject from Standard
is static ;
---Category: Results
TrimDone (me; IndH : Integer from Standard)
---Purpose: Returns the fact that the intersections were computed
-- for the IndH-th hatching.
---C++: inline
returns Boolean from Standard
raises NoSuchObject from Standard
is static ;
TrimFailed (me; IndH : Integer from Standard)
---Purpose: Returns the fact that the intersections failed
-- for the IndH-th hatching.
---C++: inline
returns Boolean from Standard
raises NoSuchObject from Standard
is static ;
IsDone (me)
---Purpose: Returns the fact that the domains were computed
-- for all the hatchings.
---C++: inline
returns Boolean from Standard
raises NoSuchObject from Standard
is static ;
IsDone (me; IndH : Integer from Standard)
---Purpose: Returns the fact that the domains were computed
-- for the IndH-th hatching.
returns Boolean from Standard
raises NoSuchObject from Standard
is static ;
Status (me; IndH : Integer from Standard)
---Purpose: Returns the status about the IndH-th hatching.
---C++: inline
returns ErrorStatus from HatchGen
raises NoSuchObject from Standard
is static ;
NbDomains (me; IndH : Integer from Standard)
---Purpose: Returns the number of domains of the IndH-th hatching.
-- Only ONE "INFINITE" domain means that the hatching is
-- fully included in the contour defined by the elements.
---C++: inline
returns Integer from Standard
raises NoSuchObject from Standard ,
NotDone from StdFail
is static ;
Domain (me; IndH : Integer from Standard ;
IDom : Integer from Standard )
---Purpose: Returns the IDom-th domain of the IndH-th hatching.
---C++: return const &
returns Domain from HatchGen
raises NoSuchObject from Standard ,
NotDone from StdFail ,
OutOfRange from Standard
is static ;
---Category: Dump
Dump (me)
---Purpose: Dump the hatcher.
is static ;
fields
myIntersector : Intersector from Geom2dHatch;
myConfusion2d : Real from Standard ;
myConfusion3d : Real from Standard ;
myKeepPoints : Boolean from Standard ;
myKeepSegments : Boolean from Standard ;
myNbElements : Integer from Standard ;
myElements : Elements from Geom2dHatch ;
myNbHatchings : Integer from Standard ;
myHatchings : Hatchings from Geom2dHatch;
end Hatcher from Geom2dHatch;

View File

@@ -14,8 +14,13 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Geom2dHatch_Hatcher.ixx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dHatch_Classifier.hxx>
#include <Geom2dHatch_Element.hxx>
#include <Geom2dHatch_Hatcher.hxx>
#include <Geom2dHatch_Hatching.hxx>
#include <Geom2dHatch_Intersector.hxx>
#include <HatchGen_Domain.hxx>
#include <HatchGen_Domains.hxx>
#include <HatchGen_PointOnElement.hxx>
@@ -24,13 +29,12 @@
#include <IntRes2d_IntersectionSegment.hxx>
#include <IntRes2d_Transition.hxx>
#include <Precision.hxx>
#include <Standard_NoSuchObject.hxx>
#include <Standard_OutOfRange.hxx>
#include <StdFail_NotDone.hxx>
#include <TopAbs.hxx>
#include <TopTrans_CurveTransition.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dHatch_Intersector.hxx>
#include <Geom2dHatch_Classifier.hxx>
#define RAISE_IF_NOSUCHOBJECT 0
#define TRACE_HATCHER 0

View File

@@ -0,0 +1,221 @@
// Created on: 1993-10-25
// 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.
#ifndef _Geom2dHatch_Hatcher_HeaderFile
#define _Geom2dHatch_Hatcher_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Geom2dHatch_Intersector.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Integer.hxx>
#include <Geom2dHatch_Elements.hxx>
#include <Geom2dHatch_Hatchings.hxx>
#include <TopAbs_Orientation.hxx>
#include <HatchGen_ErrorStatus.hxx>
class Standard_NoSuchObject;
class Standard_OutOfRange;
class StdFail_NotDone;
class Geom2dHatch_Intersector;
class Geom2dHatch_Element;
class Geom2dAdaptor_Curve;
class Geom2dHatch_Hatching;
class HatchGen_PointOnHatching;
class HatchGen_Domain;
class Geom2dHatch_Hatcher
{
public:
DEFINE_STANDARD_ALLOC
//! Returns an empty hatcher.
Standard_EXPORT Geom2dHatch_Hatcher(const Geom2dHatch_Intersector& Intersector, const Standard_Real Confusion2d, const Standard_Real Confusion3d, const Standard_Boolean KeepPnt = Standard_False, const Standard_Boolean KeepSeg = Standard_False);
//! Sets the associated intersector.
Standard_EXPORT void Intersector (const Geom2dHatch_Intersector& Intersector);
//! Returns the associated intersector.
const Geom2dHatch_Intersector& Intersector();
//! Returns the associated intersector.
Geom2dHatch_Intersector& ChangeIntersector();
//! Sets the confusion tolerance.
Standard_EXPORT void Confusion2d (const Standard_Real Confusion);
//! Returns the 2d confusion tolerance, i.e. the value under
//! which two points are considered identical in the
//! parametric space of the hatching.
Standard_Real Confusion2d() const;
//! Sets the confusion tolerance.
Standard_EXPORT void Confusion3d (const Standard_Real Confusion);
//! Returns the 3d confusion tolerance, i.e. the value under
//! which two points are considered identical in the
//! 3d space of the hatching.
Standard_Real Confusion3d() const;
//! Sets the above flag.
Standard_EXPORT void KeepPoints (const Standard_Boolean Keep);
//! Returns the flag about the points consideration.
Standard_Boolean KeepPoints() const;
//! Sets the above flag.
Standard_EXPORT void KeepSegments (const Standard_Boolean Keep);
//! Returns the flag about the segments consideration.
Standard_Boolean KeepSegments() const;
//! Removes all the hatchings and all the elements.
void Clear();
//! Returns the curve associated to the IndE-th element.
const Geom2dAdaptor_Curve& ElementCurve (const Standard_Integer IndE) const;
//! Adds an element to the hatcher and returns its index.
Standard_EXPORT Standard_Integer AddElement (const Geom2dAdaptor_Curve& Curve, const TopAbs_Orientation Orientation = TopAbs_FORWARD);
//! Removes the IndE-th element from the hatcher.
Standard_EXPORT void RemElement (const Standard_Integer IndE);
//! Removes all the elements from the hatcher.
Standard_EXPORT void ClrElements();
//! Returns the curve associated to the IndH-th hatching.
const Geom2dAdaptor_Curve& HatchingCurve (const Standard_Integer IndH) const;
//! Adds a hatching to the hatcher and returns its index.
Standard_EXPORT Standard_Integer AddHatching (const Geom2dAdaptor_Curve& Curve);
//! Removes the IndH-th hatching from the hatcher.
Standard_EXPORT void RemHatching (const Standard_Integer IndH);
//! Removes all the hatchings from the hatcher.
Standard_EXPORT void ClrHatchings();
//! Returns the number of intersection points of
//! the IndH-th hatching.
Standard_Integer NbPoints (const Standard_Integer IndH) const;
//! Returns the IndP-th intersection point of the
//! IndH-th hatching.
const HatchGen_PointOnHatching& Point (const Standard_Integer IndH, const Standard_Integer IndP) const;
//! Trims all the hatchings of the hatcher by all the
//! elements of the hatcher.
Standard_EXPORT void Trim();
//! Adds a hatching to the hatcher and trims it by
//! the elements already given and returns its index.
Standard_EXPORT Standard_Integer Trim (const Geom2dAdaptor_Curve& Curve);
//! Trims the IndH-th hatching by the elements
//! already given.
Standard_EXPORT void Trim (const Standard_Integer IndH);
//! Computes the domains of all the hatchings.
Standard_EXPORT void ComputeDomains();
//! Computes the domains of the IndH-th hatching.
Standard_EXPORT void ComputeDomains (const Standard_Integer IndH);
//! Returns the fact that the intersections were computed
//! for the IndH-th hatching.
Standard_Boolean TrimDone (const Standard_Integer IndH) const;
//! Returns the fact that the intersections failed
//! for the IndH-th hatching.
Standard_Boolean TrimFailed (const Standard_Integer IndH) const;
//! Returns the fact that the domains were computed
//! for all the hatchings.
Standard_Boolean IsDone() const;
//! Returns the fact that the domains were computed
//! for the IndH-th hatching.
Standard_EXPORT Standard_Boolean IsDone (const Standard_Integer IndH) const;
//! Returns the status about the IndH-th hatching.
HatchGen_ErrorStatus Status (const Standard_Integer IndH) const;
//! Returns the number of domains of the IndH-th hatching.
//! Only ONE "INFINITE" domain means that the hatching is
//! fully included in the contour defined by the elements.
Standard_Integer NbDomains (const Standard_Integer IndH) const;
//! Returns the IDom-th domain of the IndH-th hatching.
Standard_EXPORT const HatchGen_Domain& Domain (const Standard_Integer IndH, const Standard_Integer IDom) const;
//! Dump the hatcher.
Standard_EXPORT void Dump() const;
protected:
//! Returns the IndE-th element.
Geom2dHatch_Element& Element (const Standard_Integer IndE);
//! Returns the IndH-th hatching.
Geom2dHatch_Hatching& Hatching (const Standard_Integer IndH);
private:
//! Trims the IndH-th hatching of the hatcher by the
//! IndE-th element.
Standard_EXPORT Standard_Boolean Trim (const Standard_Integer IndH, const Standard_Integer IndE);
//! Sets the global transition (the before and after
//! states and segment extremities flags) of the point.
Standard_EXPORT Standard_Boolean GlobalTransition (HatchGen_PointOnHatching& Point);
Geom2dHatch_Intersector myIntersector;
Standard_Real myConfusion2d;
Standard_Real myConfusion3d;
Standard_Boolean myKeepPoints;
Standard_Boolean myKeepSegments;
Standard_Integer myNbElements;
Geom2dHatch_Elements myElements;
Standard_Integer myNbHatchings;
Geom2dHatch_Hatchings myHatchings;
};
#include <Geom2dHatch_Hatcher.lxx>
#endif // _Geom2dHatch_Hatcher_HeaderFile

View File

@@ -1,257 +0,0 @@
-- Created on: 1993-11-10
-- 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.
class Hatching from Geom2dHatch
uses
ErrorStatus from HatchGen ,
PointOnHatching from HatchGen ,
PointsOnHatching from HatchGen ,
Domain from HatchGen ,
Domains from HatchGen ,
Pnt2d from gp,
Curve from Geom2dAdaptor
raises
OutOfRange from Standard
is
Create
returns Hatching from Geom2dHatch;
Create (Curve : Curve from Geom2dAdaptor)
---Purpose: Creates a hatching.
returns Hatching from Geom2dHatch ;
Curve (me)
---Purpose: Returns the curve associated to the hatching.
---C++: return const &
returns Curve from Geom2dAdaptor
is static ;
ChangeCurve (me : in out)
---Purpose: Returns the curve associated to the hatching.
---C++: return &
returns Curve from Geom2dAdaptor
is static ;
TrimDone (me : in out ; Flag : Boolean from Standard)
---Purpose: Sets the flag about the trimming computations to the
-- given value.
is static ;
TrimDone (me)
---Purpose: Returns the flag about the trimming computations.
returns Boolean from Standard
is static ;
TrimFailed (me : in out ; Flag : Boolean from Standard)
---Purpose: Sets the flag about the trimming failure to the
-- given value.
is static ;
TrimFailed (me)
---Purpose: Returns the flag about the trimming failure.
returns Boolean from Standard
is static ;
IsDone (me : in out ; Flag : Boolean from Standard)
---Purpose: Sets the flag about the domains computation to the
-- given value.
is static ;
IsDone (me)
---Purpose: Returns the flag about the domains computation.
returns Boolean from Standard
is static ;
Status (me : in out ; Status : ErrorStatus from HatchGen)
---Purpose: Sets the error status.
is static ;
Status (me)
---Purpose: Returns the error status.
returns ErrorStatus from HatchGen
is static ;
---Category: Points on hatching.
AddPoint (me : in out ; Point : PointOnHatching from HatchGen ;
Confusion : Real from Standard)
---Purpose: Adds an intersection point to the hatching.
is static ;
NbPoints (me)
---Purpose: Returns the number of intersection points
-- of the hatching.
returns Integer from Standard
is static ;
Point (me ; Index : Integer from Standard)
---Purpose: Returns the Index-th intersection point of the
-- hatching.
-- The exception OutOfRange is raised if
-- Index < 1 or Index > NbPoints.
---C++: return const &
returns PointOnHatching from HatchGen
raises OutOfRange from Standard
is static ;
ChangePoint (me : in out ; Index : Integer from Standard)
---Purpose: Returns the Index-th intersection point of the
-- hatching.
-- The exception OutOfRange is raised if
-- Index < 1 or Index > NbPoints.
---C++: return &
returns PointOnHatching from HatchGen
raises OutOfRange from Standard
is static ;
RemPoint (me : in out ; Index : Integer from Standard)
---Purpose: Removes the Index-th intersection point of the
-- hatching.
-- The exception OutOfRange is raised if
-- Index < 1 or Index > NbPoints.
raises OutOfRange from Standard
is static ;
ClrPoints (me : in out)
---Purpose: Removes all the intersection points of the hatching.
is static ;
---Category: Domains.
AddDomain (me : in out ; Domain : Domain from HatchGen)
---Purpose: Adds a domain to the hatching.
is static ;
NbDomains (me)
---Purpose: Returns the number of domains of the hatching.
returns Integer from Standard
is static ;
Domain (me ; Index : Integer from Standard)
---Purpose: Returns the Index-th domain of the hatching.
-- The exception OutOfRange is raised if
-- Index < 1 or Index > NbDomains.
---C++: return const &
returns Domain from HatchGen
raises OutOfRange from Standard
is static ;
RemDomain (me : in out ; Index : Integer from Standard)
---Purpose: Removes the Index-th domain of the hatching.
-- The exception OutOfRange is raised if
-- Index < 1 or Index > NbDomains.
raises OutOfRange from Standard
is static ;
ClrDomains (me : in out)
---Purpose: Removes all the domains of the hatching.
is static ;
ClassificationPoint (me)
---Purpose: Returns a point on the curve.
-- This point will be used for the classification.
returns Pnt2d from gp
is static;
fields
myCurve : Curve from Geom2dAdaptor ;
myTrimDone : Boolean from Standard ;
myTrimFailed : Boolean from Standard ;
myPoints : PointsOnHatching from HatchGen ;
myIsDone : Boolean from Standard ;
myStatus : ErrorStatus from HatchGen ;
myDomains : Domains from HatchGen ;
end Hatching from Geom2dHatch ;

View File

@@ -14,10 +14,14 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Geom2dHatch_Hatching.ixx>
#include <HatchGen_PointOnElement.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dHatch_Hatching.hxx>
#include <gp_Pnt2d.hxx>
#include <HatchGen_Domain.hxx>
#include <HatchGen_PointOnElement.hxx>
#include <HatchGen_PointOnHatching.hxx>
#include <Standard_OutOfRange.hxx>
#define RAISE_IF_NOSUCHOBJECT 0

View File

@@ -0,0 +1,165 @@
// Created on: 1993-11-10
// 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.
#ifndef _Geom2dHatch_Hatching_HeaderFile
#define _Geom2dHatch_Hatching_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Standard_Boolean.hxx>
#include <HatchGen_PointsOnHatching.hxx>
#include <HatchGen_ErrorStatus.hxx>
#include <HatchGen_Domains.hxx>
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
class Standard_OutOfRange;
class Geom2dAdaptor_Curve;
class HatchGen_PointOnHatching;
class HatchGen_Domain;
class gp_Pnt2d;
class Geom2dHatch_Hatching
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT Geom2dHatch_Hatching();
//! Creates a hatching.
Standard_EXPORT Geom2dHatch_Hatching(const Geom2dAdaptor_Curve& Curve);
//! Returns the curve associated to the hatching.
Standard_EXPORT const Geom2dAdaptor_Curve& Curve() const;
//! Returns the curve associated to the hatching.
Standard_EXPORT Geom2dAdaptor_Curve& ChangeCurve();
//! Sets the flag about the trimming computations to the
//! given value.
Standard_EXPORT void TrimDone (const Standard_Boolean Flag);
//! Returns the flag about the trimming computations.
Standard_EXPORT Standard_Boolean TrimDone() const;
//! Sets the flag about the trimming failure to the
//! given value.
Standard_EXPORT void TrimFailed (const Standard_Boolean Flag);
//! Returns the flag about the trimming failure.
Standard_EXPORT Standard_Boolean TrimFailed() const;
//! Sets the flag about the domains computation to the
//! given value.
Standard_EXPORT void IsDone (const Standard_Boolean Flag);
//! Returns the flag about the domains computation.
Standard_EXPORT Standard_Boolean IsDone() const;
//! Sets the error status.
Standard_EXPORT void Status (const HatchGen_ErrorStatus Status);
//! Returns the error status.
Standard_EXPORT HatchGen_ErrorStatus Status() const;
//! Adds an intersection point to the hatching.
Standard_EXPORT void AddPoint (const HatchGen_PointOnHatching& Point, const Standard_Real Confusion);
//! Returns the number of intersection points
//! of the hatching.
Standard_EXPORT Standard_Integer NbPoints() const;
//! Returns the Index-th intersection point of the
//! hatching.
//! The exception OutOfRange is raised if
//! Index < 1 or Index > NbPoints.
Standard_EXPORT const HatchGen_PointOnHatching& Point (const Standard_Integer Index) const;
//! Returns the Index-th intersection point of the
//! hatching.
//! The exception OutOfRange is raised if
//! Index < 1 or Index > NbPoints.
Standard_EXPORT HatchGen_PointOnHatching& ChangePoint (const Standard_Integer Index);
//! Removes the Index-th intersection point of the
//! hatching.
//! The exception OutOfRange is raised if
//! Index < 1 or Index > NbPoints.
Standard_EXPORT void RemPoint (const Standard_Integer Index);
//! Removes all the intersection points of the hatching.
Standard_EXPORT void ClrPoints();
//! Adds a domain to the hatching.
Standard_EXPORT void AddDomain (const HatchGen_Domain& Domain);
//! Returns the number of domains of the hatching.
Standard_EXPORT Standard_Integer NbDomains() const;
//! Returns the Index-th domain of the hatching.
//! The exception OutOfRange is raised if
//! Index < 1 or Index > NbDomains.
Standard_EXPORT const HatchGen_Domain& Domain (const Standard_Integer Index) const;
//! Removes the Index-th domain of the hatching.
//! The exception OutOfRange is raised if
//! Index < 1 or Index > NbDomains.
Standard_EXPORT void RemDomain (const Standard_Integer Index);
//! Removes all the domains of the hatching.
Standard_EXPORT void ClrDomains();
//! Returns a point on the curve.
//! This point will be used for the classification.
Standard_EXPORT gp_Pnt2d ClassificationPoint() const;
protected:
private:
Geom2dAdaptor_Curve myCurve;
Standard_Boolean myTrimDone;
Standard_Boolean myTrimFailed;
HatchGen_PointsOnHatching myPoints;
Standard_Boolean myIsDone;
HatchGen_ErrorStatus myStatus;
HatchGen_Domains myDomains;
};
#endif // _Geom2dHatch_Hatching_HeaderFile

View File

@@ -1,137 +0,0 @@
-- Created on: 1994-03-23
-- Created by: Jean Marc LACHAUME
-- Copyright (c) 1994-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.
class Intersector from Geom2dHatch
inherits GInter from Geom2dInt
uses
Curve from Geom2dAdaptor,
Lin2d from gp,
Dir2d from gp
is
Create (Confusion : Real from Standard ;
Tangency : Real from Standard)
---Purpose: Creates an intersector.
---C++: inline
returns Intersector from Geom2dHatch ;
ConfusionTolerance (me)
---Purpose: Returns the confusion tolerance of the
-- intersector.
---C++: inline
returns Real from Standard
is static ;
SetConfusionTolerance (me : in out ;
Confusion : Real from Standard)
---Purpose: Sets the confusion tolerance of the intersector.
---C++: inline
is static ;
TangencyTolerance (me)
---Purpose: Returns the tangency tolerance of the
-- intersector.
---C++: inline
returns Real from Standard
is static ;
SetTangencyTolerance (me : in out ;
Tangency : Real from Standard)
---Purpose: Sets the tangency tolerance of the intersector.
---C++: inline
is static ;
Intersect (me : in out ; C1 : Curve from Geom2dAdaptor ;
C2 : Curve from Geom2dAdaptor )
---Purpose: Intersects the curves C1 and C2.
-- The results are retreived by the usual methods
-- described in IntRes2d_Intersection.
---C++: inline
is static ;
-------------------------------------------------------------------------
---- M e t h o d s u s e d b y t h e C l a s s i f i e r 2 d ---
-------------------------------------------------------------------------
Create
---Purpose: Creates an intersector.
---C++: inline
returns Intersector from Geom2dHatch ;
Perform(me : in out;
L : Lin2d from gp;
P : Real from Standard;
Tol : Real from Standard;
E : Curve from Geom2dAdaptor) -- en fait in out
---Purpose: Performs the intersection between the 2d line
-- segment (<L>, <P>) and the Curve <E>. The line
-- segment is the part of the 2d line <L> of
-- parameter range [0, <P>] (P is positive and can be
-- RealLast()). Tol is the Tolerance on the segment.
-- The order is relevant, the first argument is the
-- segment, the second the Edge.
is static;
LocalGeometry(me;
E : Curve from Geom2dAdaptor;
U : Real from Standard;
T : out Dir2d from gp;
N : out Dir2d from gp;
C : out Real)
---Purpose: Returns in <T>, <N> and <C> the tangent, normal
-- and curvature of the edge <E> at parameter value
-- <U>.
is static;
fields
myConfusionTolerance : Real from Standard ;
myTangencyTolerance : Real from Standard ;
end Intersector from Geom2dHatch ;

View File

@@ -14,18 +14,20 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <Geom2dHatch_Intersector.ixx>
#include <ElCLib.hxx>
#include <Geom2d_Line.hxx>
#include <Precision.hxx>
#include <Geom2dAdaptor_Curve.hxx>
#include <Geom2dHatch_Intersector.hxx>
#include <Geom2dLProp_CLProps2d.hxx>
#include <gp_Dir2d.hxx>
#include <gp_Lin2d.hxx>
#include <Precision.hxx>
//=======================================================================
//function : Geom2dHatch_Intersector
//purpose :
//=======================================================================
Geom2dHatch_Intersector::Geom2dHatch_Intersector() :
myConfusionTolerance(0.0),
myTangencyTolerance(0.0)

View File

@@ -0,0 +1,104 @@
// Created on: 1994-03-23
// Created by: Jean Marc LACHAUME
// Copyright (c) 1994-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.
#ifndef _Geom2dHatch_Intersector_HeaderFile
#define _Geom2dHatch_Intersector_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Real.hxx>
#include <Geom2dInt_GInter.hxx>
class Geom2dAdaptor_Curve;
class gp_Lin2d;
class gp_Dir2d;
class Geom2dHatch_Intersector : public Geom2dInt_GInter
{
public:
DEFINE_STANDARD_ALLOC
//! Creates an intersector.
Geom2dHatch_Intersector(const Standard_Real Confusion, const Standard_Real Tangency);
//! Returns the confusion tolerance of the
//! intersector.
Standard_Real ConfusionTolerance() const;
//! Sets the confusion tolerance of the intersector.
void SetConfusionTolerance (const Standard_Real Confusion);
//! Returns the tangency tolerance of the
//! intersector.
Standard_Real TangencyTolerance() const;
//! Sets the tangency tolerance of the intersector.
void SetTangencyTolerance (const Standard_Real Tangency);
//! Intersects the curves C1 and C2.
//! The results are retreived by the usual methods
//! described in IntRes2d_Intersection.
//! Creates an intersector.
void Intersect (const Geom2dAdaptor_Curve& C1, const Geom2dAdaptor_Curve& C2);
Standard_EXPORT Geom2dHatch_Intersector();
//! Performs the intersection between the 2d line
//! segment (<L>, <P>) and the Curve <E>. The line
//! segment is the part of the 2d line <L> of
//! parameter range [0, <P>] (P is positive and can be
//! RealLast()). Tol is the Tolerance on the segment.
//! The order is relevant, the first argument is the
//! segment, the second the Edge.
Standard_EXPORT void Perform (const gp_Lin2d& L, const Standard_Real P, const Standard_Real Tol, const Geom2dAdaptor_Curve& E);
//! Returns in <T>, <N> and <C> the tangent, normal
//! and curvature of the edge <E> at parameter value
//! <U>.
Standard_EXPORT void LocalGeometry (const Geom2dAdaptor_Curve& E, const Standard_Real U, gp_Dir2d& T, gp_Dir2d& N, Standard_Real& C) const;
protected:
private:
Standard_Real myConfusionTolerance;
Standard_Real myTangencyTolerance;
};
#include <Geom2dHatch_Intersector.lxx>
#endif // _Geom2dHatch_Intersector_HeaderFile