mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +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:
@@ -1 +1,12 @@
|
||||
TopClass.cxx
|
||||
TopClass_Classifier2d.gxx
|
||||
TopClass_Classifier2d.lxx
|
||||
TopClass_Classifier3d.gxx
|
||||
TopClass_Classifier3d.lxx
|
||||
TopClass_FaceClassifier.gxx
|
||||
TopClass_FaceClassifier.lxx
|
||||
TopClass_Intersection3d.cxx
|
||||
TopClass_Intersection3d.hxx
|
||||
TopClass_SolidClassifier.gxx
|
||||
TopClass_SolidExplorer.cxx
|
||||
TopClass_SolidExplorer.hxx
|
||||
|
@@ -1,49 +0,0 @@
|
||||
-- Created on: 1992-11-17
|
||||
-- Created by: Remi LEQUETTE
|
||||
-- Copyright (c) 1992-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 TopClass
|
||||
|
||||
---Purpose: The package TopClass provides Classification
|
||||
-- algorithms. A Classification algorithm is used to
|
||||
-- compute if a point is inside, outside or on the
|
||||
-- boundary of a Shape.
|
||||
|
||||
uses
|
||||
gp,
|
||||
TopTrans, -- complex transitions
|
||||
TopAbs, -- enumerations Orientation and State
|
||||
TopoDS,
|
||||
IntRes2d, -- to describe the result of intersections
|
||||
IntCurveSurface
|
||||
--- TopExp ------------- Pas Utilise mais sinon ca plante !!!
|
||||
|
||||
is
|
||||
|
||||
generic class Classifier2d;
|
||||
|
||||
generic class FaceClassifier, FClass2d;
|
||||
|
||||
|
||||
|
||||
deferred class Intersection3d;
|
||||
|
||||
generic class Classifier3d;
|
||||
|
||||
deferred class SolidExplorer;
|
||||
|
||||
generic class SolidClassifier;
|
||||
|
||||
end TopClass;
|
@@ -1,108 +0,0 @@
|
||||
-- Created on: 1992-11-17
|
||||
-- Created by: Remi LEQUETTE
|
||||
-- Copyright (c) 1992-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 - Wed Jul 12 15:15:38 2006 OCC12627
|
||||
|
||||
|
||||
generic class Classifier2d from TopClass
|
||||
(TheEdge as any;
|
||||
TheIntersector as any)
|
||||
|
||||
---Purpose: Basic algorithm for 2d classifications.
|
||||
|
||||
uses
|
||||
Lin2d from gp,
|
||||
CurveTransition from TopTrans,
|
||||
Orientation from TopAbs,
|
||||
State from TopAbs
|
||||
|
||||
raises
|
||||
DomainError
|
||||
|
||||
is
|
||||
Create returns Classifier2d from TopClass;
|
||||
---Purpose: Creates an undefined classifier.
|
||||
|
||||
Reset(me : in out; L : Lin2d from gp; P : Real; Tol : Real)
|
||||
---Purpose: Starts a classification process. The point to
|
||||
-- classify is the origin of the line <L>. <P> is
|
||||
-- the original length of the segment on <L> used to
|
||||
-- compute intersections. <Tol> is the tolerance
|
||||
-- attached to the line segment in intersections.
|
||||
is static;
|
||||
|
||||
Compare(me : in out; E : TheEdge;
|
||||
Or : Orientation from TopAbs)
|
||||
---Purpose: Updates the classification process with the edge
|
||||
-- <E> from the boundary.
|
||||
raises
|
||||
DomainError -- The classifier has not been set
|
||||
is static;
|
||||
|
||||
Parameter(me) returns Real
|
||||
---Purpose: Returns the current value of the parameter.
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
Intersector(me : in out) returns TheIntersector
|
||||
---Purpose: Returns the intersecting algorithm.
|
||||
--
|
||||
---C++: inline
|
||||
---C++: return &
|
||||
is static;
|
||||
|
||||
ClosestIntersection(me) returns Integer
|
||||
---Purpose: Returns 0 if the last compared edge had no
|
||||
-- relevant intersection. Else returns the index of
|
||||
-- this intersection in the last intersection
|
||||
-- algorithm.
|
||||
--
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
State(me) returns State from TopAbs
|
||||
---Purpose: Returns the current state of the point.
|
||||
--
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
-- Modified by skv - Wed Jul 12 15:15:38 2006 OCC12627 Begin
|
||||
IsHeadOrEnd(me)
|
||||
---Purpose: Returns the Standard_True if the closest intersection point
|
||||
-- represents head or end of the edge. Returns Standard_False
|
||||
-- otherwise.
|
||||
---C++: inline
|
||||
returns Boolean from Standard
|
||||
is static;
|
||||
-- Modified by skv - Wed Jul 12 15:15:38 2006 OCC12627 End
|
||||
|
||||
fields
|
||||
|
||||
myIsSet : Boolean from Standard;
|
||||
myFirstCompare : Boolean from Standard;
|
||||
myFirstTrans : Boolean from Standard;
|
||||
myLin : Lin2d from gp;
|
||||
myParam : Real from Standard;
|
||||
myTolerance : Real from Standard;
|
||||
myTrans : CurveTransition from TopTrans;
|
||||
myIntersector : TheIntersector;
|
||||
myClosest : Integer from Standard;
|
||||
myState : State from TopAbs;
|
||||
-- Modified by skv - Wed Jul 12 15:15:38 2006 OCC12627 Begin
|
||||
myIsHeadOrEnd : Boolean from Standard;
|
||||
-- Modified by skv - Wed Jul 12 15:15:38 2006 OCC12627 End
|
||||
|
||||
end Classifier2d;
|
@@ -1,88 +0,0 @@
|
||||
-- Created on: 1994-03-30
|
||||
-- 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.
|
||||
|
||||
generic class Classifier3d from TopClass
|
||||
(TheIntersector as any) -- as Intersection3d from TopClass
|
||||
|
||||
---Purpose: Basic algorithm for 3d classification.
|
||||
|
||||
uses
|
||||
Lin from gp,
|
||||
CurveTransition from TopTrans,
|
||||
Orientation from TopAbs,
|
||||
State from TopAbs,
|
||||
Face from TopoDS
|
||||
|
||||
raises
|
||||
DomainError from Standard
|
||||
|
||||
is
|
||||
Create returns Classifier3d from TopClass;
|
||||
---Purpose: Creates an undefined classifier.
|
||||
|
||||
Reset(me : in out; L : Lin from gp;
|
||||
P : Real from Standard;
|
||||
Tol : Real from Standard)
|
||||
---Purpose: Starts a classification process. The point to
|
||||
-- classify is the origin of the line <L>. <P> is
|
||||
-- the original length of the segment on <L> used to
|
||||
-- compute intersections. <Tol> is the tolerance
|
||||
-- attached to the intersections.
|
||||
is static;
|
||||
|
||||
Compare(me : in out; F : Face from TopoDS;
|
||||
Or : Orientation from TopAbs)
|
||||
---Purpose: Updates the classification process with the face
|
||||
-- <F> from the boundary.
|
||||
raises
|
||||
DomainError -- The classifier has not been set
|
||||
is static;
|
||||
|
||||
Parameter(me) returns Real
|
||||
---Purpose: Returns the current value of the parameter.
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
HasIntersection(me) returns Boolean from Standard
|
||||
---Purpose: Returns True if an intersection is computed.
|
||||
is static;
|
||||
|
||||
Intersector(me : in out) returns TheIntersector
|
||||
---Purpose: Returns the intersecting algorithm.
|
||||
--
|
||||
---C++: inline
|
||||
---C++: return &
|
||||
is static;
|
||||
|
||||
State(me) returns State from TopAbs
|
||||
---Purpose: Returns the current state of the point.
|
||||
--
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
|
||||
fields
|
||||
isSet : Boolean from Standard;
|
||||
myFace : Face from TopoDS;
|
||||
myLin : Lin from gp;
|
||||
myParam : Real from Standard;
|
||||
myTolerance : Real from Standard;
|
||||
myState : State from TopAbs;
|
||||
hasIntersect : Boolean from Standard;
|
||||
myIntersector : TheIntersector;
|
||||
|
||||
end Classifier3d;
|
||||
|
@@ -1,99 +0,0 @@
|
||||
-- Created on: 1992-11-17
|
||||
-- Created by: Remi LEQUETTE
|
||||
-- Copyright (c) 1992-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.
|
||||
|
||||
generic class FaceClassifier from TopClass
|
||||
(TheFaceExplorer as any;
|
||||
TheEdge as any;
|
||||
TheIntersection2d as any)
|
||||
|
||||
---Purpose: Provides an algorithm to classify a point in a 2D
|
||||
-- face (or in the UV space of a face on a surface).
|
||||
|
||||
uses
|
||||
Pnt2d from gp,
|
||||
Position from IntRes2d,
|
||||
State from TopAbs
|
||||
|
||||
raises
|
||||
DomainError
|
||||
|
||||
class FClass2d instantiates Classifier2d from TopClass
|
||||
(TheEdge, TheIntersection2d);
|
||||
|
||||
is
|
||||
Create returns FaceClassifier from TopClass;
|
||||
---Purpose: Empty constructor, undefined algorithm.
|
||||
|
||||
Create(F : in out TheFaceExplorer; P : Pnt2d from gp; Tol : Real)
|
||||
returns FaceClassifier from TopClass;
|
||||
---Purpose: Creates an algorithm to classify the Point P with
|
||||
-- Tolerance <T> on the face described by <F>.
|
||||
|
||||
Perform(me : in out;
|
||||
F : in out TheFaceExplorer; P : Pnt2d from gp; Tol : Real)
|
||||
---Purpose: Classify the Point P with Tolerance <T> on the
|
||||
-- face described by <F>.
|
||||
is static;
|
||||
|
||||
State(me) returns State from TopAbs
|
||||
---Purpose: Returns the result of the classification.
|
||||
is static;
|
||||
|
||||
Rejected(me) returns Boolean
|
||||
---Purpose: Returns True when the state was computed by a
|
||||
-- rejection. The state is OUT.
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
NoWires(me) returns Boolean
|
||||
---Purpose: Returns True if the face contains no wire. The
|
||||
-- state is IN.
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
Edge(me) returns TheEdge
|
||||
---Purpose: Returns the Edge used to determine the
|
||||
-- classification. When the State is ON this is the
|
||||
-- Edge containing the point.
|
||||
---C++: return const &
|
||||
raises
|
||||
DomainError -- when no edge was used (rejected or nowires)
|
||||
is static;
|
||||
|
||||
EdgeParameter(me) returns Real from Standard
|
||||
---Purpose: Returns the parameter on Edge() used to determine the
|
||||
-- classification.
|
||||
raises
|
||||
DomainError -- when no edge was used (rejected or nowires)
|
||||
is static;
|
||||
|
||||
Position(me) returns Position from IntRes2d
|
||||
---Purpose: Returns the position of the point on the edge
|
||||
-- returned by Edge.
|
||||
---C++: inline
|
||||
is static;
|
||||
|
||||
fields
|
||||
|
||||
myClassifier : FClass2d is protected;
|
||||
myEdge : TheEdge is protected;
|
||||
myEdgeParameter : Real from Standard is protected;
|
||||
myPosition : Position from IntRes2d is protected;
|
||||
rejected : Boolean from Standard is protected;
|
||||
nowires : Boolean from Standard is protected;
|
||||
|
||||
end FaceClassifier;
|
||||
|
@@ -1,88 +0,0 @@
|
||||
-- Created on: 1994-03-30
|
||||
-- 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.
|
||||
|
||||
deferred class Intersection3d from TopClass
|
||||
---Purpose: Template class for the intersection algorithm required
|
||||
-- by the 3D classifications.
|
||||
--
|
||||
-- (a intersection point near the origin of the line, ie.
|
||||
-- at a distance less or equal than <tolerance>, will be
|
||||
-- returned even if it has a negative parameter.)
|
||||
--
|
||||
|
||||
uses
|
||||
Lin from gp,
|
||||
Pnt from gp,
|
||||
Face from TopoDS,
|
||||
State from TopAbs,
|
||||
IntersectionPoint from IntCurveSurface
|
||||
|
||||
is
|
||||
|
||||
Initialize;
|
||||
---Purpose: Empty constructor.
|
||||
|
||||
Perform(me: in out; L : Lin from gp;
|
||||
Prm : Real from Standard;
|
||||
Tol : Real from Standard;
|
||||
Face : Face from TopoDS)
|
||||
---Purpose: Perform the intersection between the
|
||||
-- segment L(0) ... L(Prm) and the Face <Face>.
|
||||
--
|
||||
-- Only the point with the smallest parameter on the
|
||||
-- line is returned.
|
||||
--
|
||||
-- The Tolerance <Tol> is used to determine if the
|
||||
-- first point of the segment is near the face. In
|
||||
-- that case, the parameter of the intersection point
|
||||
-- on the line can be a negative value (greater than -Tol).
|
||||
is deferred;
|
||||
|
||||
|
||||
IsDone(me)
|
||||
---Purpose: True is returned when the intersection have been computed.
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
|
||||
HasAPoint(me)
|
||||
---Purpose: True is returned if a point has been found.
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
|
||||
|
||||
Point(me)
|
||||
---Purpose: Returns the Intersection Point.
|
||||
--
|
||||
---C++: return const &
|
||||
returns IntersectionPoint from IntCurveSurface
|
||||
is deferred;
|
||||
|
||||
|
||||
State(me)
|
||||
---Purpose: Returns the state of the point on the face.
|
||||
-- The values can be either TopAbs_IN
|
||||
-- ( the point is in the face)
|
||||
-- or TopAbs_ON
|
||||
-- ( the point is on a boudary of the face).
|
||||
|
||||
returns State from TopAbs
|
||||
is deferred;
|
||||
|
||||
---------------------- Loacl Geometry avec courbureS dans une
|
||||
-- direction et la direction normale
|
||||
end Intersection3d;
|
||||
|
99
src/TopClass/TopClass_Intersection3d.hxx
Normal file
99
src/TopClass/TopClass_Intersection3d.hxx
Normal file
@@ -0,0 +1,99 @@
|
||||
// Created on: 1994-03-30
|
||||
// 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 _TopClass_Intersection3d_HeaderFile
|
||||
#define _TopClass_Intersection3d_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <TopAbs_State.hxx>
|
||||
class gp_Lin;
|
||||
class TopoDS_Face;
|
||||
class IntCurveSurface_IntersectionPoint;
|
||||
|
||||
|
||||
//! Template class for the intersection algorithm required
|
||||
//! by the 3D classifications.
|
||||
//!
|
||||
//! (a intersection point near the origin of the line, ie.
|
||||
//! at a distance less or equal than <tolerance>, will be
|
||||
//! returned even if it has a negative parameter.)
|
||||
class TopClass_Intersection3d
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Perform the intersection between the
|
||||
//! segment L(0) ... L(Prm) and the Face <Face>.
|
||||
//!
|
||||
//! Only the point with the smallest parameter on the
|
||||
//! line is returned.
|
||||
//!
|
||||
//! The Tolerance <Tol> is used to determine if the
|
||||
//! first point of the segment is near the face. In
|
||||
//! that case, the parameter of the intersection point
|
||||
//! on the line can be a negative value (greater than -Tol).
|
||||
Standard_EXPORT virtual void Perform (const gp_Lin& L, const Standard_Real Prm, const Standard_Real Tol, const TopoDS_Face& Face) = 0;
|
||||
|
||||
//! True is returned when the intersection have been computed.
|
||||
Standard_EXPORT virtual Standard_Boolean IsDone() const = 0;
|
||||
|
||||
//! True is returned if a point has been found.
|
||||
Standard_EXPORT virtual Standard_Boolean HasAPoint() const = 0;
|
||||
|
||||
//! Returns the Intersection Point.
|
||||
Standard_EXPORT virtual const IntCurveSurface_IntersectionPoint& Point() const = 0;
|
||||
|
||||
//! Returns the state of the point on the face.
|
||||
//! The values can be either TopAbs_IN
|
||||
//! ( the point is in the face)
|
||||
//! or TopAbs_ON
|
||||
//! ( the point is on a boudary of the face).
|
||||
Standard_EXPORT virtual TopAbs_State State() const = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
//! Empty constructor.
|
||||
Standard_EXPORT TopClass_Intersection3d();
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _TopClass_Intersection3d_HeaderFile
|
@@ -1,85 +0,0 @@
|
||||
-- Created on: 1994-03-30
|
||||
-- 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.
|
||||
|
||||
generic class SolidClassifier from TopClass
|
||||
(TheSolidExplorer as any;
|
||||
TheIntersection3d as any)
|
||||
|
||||
---Purpose: Provides an algorithm to classify a point in a solid.
|
||||
|
||||
|
||||
|
||||
uses
|
||||
Pnt from gp,
|
||||
Face from TopoDS,
|
||||
Shape from TopoDS,
|
||||
State from TopAbs
|
||||
|
||||
raises
|
||||
DomainError from Standard
|
||||
|
||||
|
||||
|
||||
is
|
||||
|
||||
Create
|
||||
---Purpose: Empty constructor.
|
||||
returns SolidClassifier from TopClass;
|
||||
|
||||
|
||||
Create(S : in out TheSolidExplorer;
|
||||
P : Pnt from gp;
|
||||
Tol : Real from Standard)
|
||||
---Purpose: Constructor to classify the point P with the
|
||||
-- tolerance Tol on the solid S.
|
||||
returns SolidClassifier from TopClass;
|
||||
|
||||
|
||||
Perform(me : in out;
|
||||
S : in out TheSolidExplorer;
|
||||
P : Pnt from gp;
|
||||
Tol : Real from Standard);
|
||||
---Purpose: Classify the point P with the
|
||||
-- tolerance Tol on the solid S.
|
||||
|
||||
|
||||
Rejected(me)
|
||||
---Purpose: Returns True if the classification has been
|
||||
-- computed by rejection.
|
||||
-- The State is then OUT.
|
||||
returns Boolean from Standard;
|
||||
|
||||
|
||||
State(me) returns State from TopAbs;
|
||||
---Purpose: Returns the result of the classification.
|
||||
|
||||
IsOnAFace(me) returns Boolean from Standard;
|
||||
---Purpose: Returns True when the point is a point of a face.
|
||||
|
||||
Face(me)
|
||||
---Purpose: Returns the face used to determine the
|
||||
-- classification. When the state is ON, this is the
|
||||
-- face containing the point.
|
||||
--
|
||||
-- When Rejected() returns True, Face() has no signification.
|
||||
returns Face from TopoDS;
|
||||
|
||||
fields
|
||||
|
||||
myFace : Face from TopoDS;
|
||||
myState : Integer from Standard; -- 1: Rejected 2: IsOnFace 3: In 4: Out
|
||||
|
||||
end SolidClassifier;
|
@@ -1,114 +0,0 @@
|
||||
-- Created on: 1994-03-10
|
||||
-- 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.
|
||||
|
||||
deferred class SolidExplorer from TopClass
|
||||
|
||||
---Purpose: Provide an exploration of a BRep Shape for the
|
||||
-- classification. Defines the description of a solid for the
|
||||
-- SolidClassifier.
|
||||
|
||||
uses
|
||||
Pnt from gp,
|
||||
Lin from gp,
|
||||
Face from TopoDS,
|
||||
Shape from TopoDS
|
||||
|
||||
is
|
||||
|
||||
Reject(me; P : Pnt from gp) returns Boolean
|
||||
---Purpose: Should return True if the point is outside a
|
||||
-- bounding volume of the shape.
|
||||
is deferred;
|
||||
|
||||
Segment(me: in out; P : Pnt from gp;
|
||||
L : out Lin from gp; Par : out Real)
|
||||
---Purpose: Returns in <L>, <Par> a segment having at least
|
||||
-- one intersection with the shape boundary to
|
||||
-- compute intersections.
|
||||
--
|
||||
is deferred;
|
||||
|
||||
OtherSegment(me: in out; P : Pnt from gp;
|
||||
L : out Lin from gp; Par : out Real)
|
||||
---Purpose: Returns in <L>, <Par> a segment having at least
|
||||
-- one intersection with the shape boundary to
|
||||
-- compute intersections.
|
||||
--
|
||||
-- The First Call to this method returns a line which
|
||||
-- point to a point of the first face of the shape.
|
||||
-- The Second Call provide a line to the second face
|
||||
-- and so on.
|
||||
--
|
||||
-- if the method is called N times on a shape with F
|
||||
-- faces (N>F) the line point to other points on the
|
||||
-- face 1,2,3 ... N
|
||||
is deferred;
|
||||
|
||||
InitShell(me : in out)
|
||||
---Purpose: Starts an exploration of the shells.
|
||||
is deferred;
|
||||
|
||||
MoreShells(me) returns Boolean
|
||||
---Purpose: Returns True if there is a current shell.
|
||||
is deferred;
|
||||
|
||||
NextShell(me : in out)
|
||||
---Purpose: Sets the explorer to the next shell and returns
|
||||
-- False if there are no more wires.
|
||||
is deferred;
|
||||
|
||||
RejectShell(me; L : Lin from gp; Par : Real) returns Boolean
|
||||
---Purpose: Returns True if the shell bounding volume does not
|
||||
-- intersect the segment.
|
||||
is deferred;
|
||||
|
||||
|
||||
|
||||
InitFace(me : in out)
|
||||
---Purpose: Starts an exploration of the faces.
|
||||
is deferred;
|
||||
|
||||
MoreFaces(me) returns Boolean
|
||||
---Purpose: Returns True if there is a current face.
|
||||
is deferred;
|
||||
|
||||
NextFace(me : in out)
|
||||
---Purpose: Sets the explorer to the next face and returns
|
||||
-- False if there are no more wires.
|
||||
is deferred;
|
||||
|
||||
CurrentFace(me) returns Face from TopoDS
|
||||
---Purpose: Returns the current face.
|
||||
is deferred;
|
||||
|
||||
RejectFace(me; L : Lin from gp; Par : Real) returns Boolean
|
||||
---Purpose: Returns True if the face bounding volume does not
|
||||
-- intersect the segment.
|
||||
is deferred;
|
||||
|
||||
|
||||
--------------------------------------------------------------------
|
||||
|
||||
|
||||
end SolidExplorer;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
118
src/TopClass/TopClass_SolidExplorer.hxx
Normal file
118
src/TopClass/TopClass_SolidExplorer.hxx
Normal file
@@ -0,0 +1,118 @@
|
||||
// Created on: 1994-03-10
|
||||
// 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 _TopClass_SolidExplorer_HeaderFile
|
||||
#define _TopClass_SolidExplorer_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
class gp_Pnt;
|
||||
class gp_Lin;
|
||||
class TopoDS_Face;
|
||||
|
||||
|
||||
//! Provide an exploration of a BRep Shape for the
|
||||
//! classification. Defines the description of a solid for the
|
||||
//! SolidClassifier.
|
||||
class TopClass_SolidExplorer
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Should return True if the point is outside a
|
||||
//! bounding volume of the shape.
|
||||
Standard_EXPORT virtual Standard_Boolean Reject (const gp_Pnt& P) const = 0;
|
||||
|
||||
//! Returns in <L>, <Par> a segment having at least
|
||||
//! one intersection with the shape boundary to
|
||||
//! compute intersections.
|
||||
Standard_EXPORT virtual void Segment (const gp_Pnt& P, gp_Lin& L, Standard_Real& Par) = 0;
|
||||
|
||||
//! Returns in <L>, <Par> a segment having at least
|
||||
//! one intersection with the shape boundary to
|
||||
//! compute intersections.
|
||||
//!
|
||||
//! The First Call to this method returns a line which
|
||||
//! point to a point of the first face of the shape.
|
||||
//! The Second Call provide a line to the second face
|
||||
//! and so on.
|
||||
//!
|
||||
//! if the method is called N times on a shape with F
|
||||
//! faces (N>F) the line point to other points on the
|
||||
//! face 1,2,3 ... N
|
||||
Standard_EXPORT virtual void OtherSegment (const gp_Pnt& P, gp_Lin& L, Standard_Real& Par) = 0;
|
||||
|
||||
//! Starts an exploration of the shells.
|
||||
Standard_EXPORT virtual void InitShell() = 0;
|
||||
|
||||
//! Returns True if there is a current shell.
|
||||
Standard_EXPORT virtual Standard_Boolean MoreShells() const = 0;
|
||||
|
||||
//! Sets the explorer to the next shell and returns
|
||||
//! False if there are no more wires.
|
||||
Standard_EXPORT virtual void NextShell() = 0;
|
||||
|
||||
//! Returns True if the shell bounding volume does not
|
||||
//! intersect the segment.
|
||||
Standard_EXPORT virtual Standard_Boolean RejectShell (const gp_Lin& L, const Standard_Real Par) const = 0;
|
||||
|
||||
//! Starts an exploration of the faces.
|
||||
Standard_EXPORT virtual void InitFace() = 0;
|
||||
|
||||
//! Returns True if there is a current face.
|
||||
Standard_EXPORT virtual Standard_Boolean MoreFaces() const = 0;
|
||||
|
||||
//! Sets the explorer to the next face and returns
|
||||
//! False if there are no more wires.
|
||||
Standard_EXPORT virtual void NextFace() = 0;
|
||||
|
||||
//! Returns the current face.
|
||||
Standard_EXPORT virtual TopoDS_Face CurrentFace() const = 0;
|
||||
|
||||
//! Returns True if the face bounding volume does not
|
||||
//! intersect the segment.
|
||||
Standard_EXPORT virtual Standard_Boolean RejectFace (const gp_Lin& L, const Standard_Real Par) const = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _TopClass_SolidExplorer_HeaderFile
|
Reference in New Issue
Block a user