1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +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,58 +0,0 @@
-- Created on: 1994-04-18
-- 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.
package BRepClass3d
uses
gp,
TopAbs,
TopoDS,
TopTools,
TCollection,
TopExp,
TopClass,
BRepClass,
Geom2dInt,
IntCurveSurface,
IntCurvesFace,
Bnd,
BRepAdaptor
is
class Intersector3d;
imported MapOfInter;
imported DataMapIteratorOfMapOfInter;
class SolidExplorer;
class SolidPassiveClassifier instantiates
Classifier3d from TopClass (Intersector3d from BRepClass3d);
class SClassifier;
class SolidClassifier;
OuterShell(S : Solid from TopoDS)
returns Shell from TopoDS;
---Purpose: Returns the outer most shell of <S>. Returns a Null
-- shell if <S> has no outer shell.
-- If <S> has only one shell, then it will return, without checking orientation.
end BRepClass3d;

View File

@@ -19,19 +19,14 @@
// Author:
// <pkv@PETREX>
#include <BRepClass3d.ixx>
#include <TopAbs_State.hxx>
#include <TopAbs_Orientation.hxx>
#include <TopoDS_Solid.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Iterator.hxx>
#include <BRep_Builder.hxx>
#include <BRepClass3d.hxx>
#include <BRepClass3d_SolidClassifier.hxx>
#include <TopAbs_Orientation.hxx>
#include <TopAbs_State.hxx>
#include <TopoDS_Iterator.hxx>
#include <TopoDS_Shell.hxx>
#include <TopoDS_Solid.hxx>
static
Standard_Boolean IsInternal(const TopoDS_Shell& aSx);

View File

@@ -0,0 +1,74 @@
// Created on: 1994-04-18
// 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 _BRepClass3d_HeaderFile
#define _BRepClass3d_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
class TopoDS_Shell;
class TopoDS_Solid;
class BRepClass3d_Intersector3d;
class BRepClass3d_SolidExplorer;
class BRepClass3d_SolidPassiveClassifier;
class BRepClass3d_SClassifier;
class BRepClass3d_SolidClassifier;
class BRepClass3d
{
public:
DEFINE_STANDARD_ALLOC
//! Returns the outer most shell of <S>. Returns a Null
//! shell if <S> has no outer shell.
//! If <S> has only one shell, then it will return, without checking orientation.
Standard_EXPORT static TopoDS_Shell OuterShell (const TopoDS_Solid& S);
protected:
private:
friend class BRepClass3d_Intersector3d;
friend class BRepClass3d_SolidExplorer;
friend class BRepClass3d_SolidPassiveClassifier;
friend class BRepClass3d_SClassifier;
friend class BRepClass3d_SolidClassifier;
};
#endif // _BRepClass3d_HeaderFile

View File

@@ -1,146 +0,0 @@
-- Created on: 1994-04-01
-- 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.
class Intersector3d from BRepClass3d
uses
Lin from gp,
Pnt from gp,
Face from TopoDS,
Shape from TopoDS,
State from TopAbs,
TransitionOnCurve from IntCurveSurface
is
Create returns Intersector3d from BRepClass3d;
---Purpose: Empty constructor.
Perform(me: in out; L : Lin from gp;
Prm : Real from Standard;
Tol : Real from Standard;
F : Face from TopoDS)
---Purpose: Perform the intersection between the
-- segment L(0) ... L(Prm) and the Shape <Sh>.
--
-- 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 static;
IsDone(me)
---Purpose: True is returned when the intersection have been computed.
---C++: inline
returns Boolean from Standard
is static;
HasAPoint(me)
---Purpose: True is returned if a point has been found.
---C++: inline
returns Boolean from Standard
is static;
UParameter(me)
---Purpose: Returns the U parameter of the intersection point
-- on the surface.
---C++: inline
returns Real from Standard
is static;
VParameter(me)
---Purpose: Returns the V parameter of the intersection point
-- on the surface.
---C++: inline
returns Real from Standard
is static;
WParameter(me)
---Purpose: Returns the parameter of the intersection point
-- on the line.
---C++: inline
returns Real from Standard
is static;
Pnt(me)
---Purpose: Returns the geometric point of the intersection
-- between the line and the surface.
---C++: inline
---C++: return const &
returns Pnt from gp
is static;
Transition(me)
---Purpose: Returns the transition of the line on the surface.
---C++: inline
returns TransitionOnCurve from IntCurveSurface
is static;
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).
---C++: inline
returns State from TopAbs
is static;
Face(me)
---Purpose: Returns the significant face used to determine
-- the intersection.
--
---C++: inline
---C++: return const &
returns Face from TopoDS
is static;
---------------------- Local Geometry avec courbureS dans une
-- direction et la direction normale
fields
pnt : Pnt from gp;
U : Real from Standard;
V : Real from Standard;
W : Real from Standard;
transition : TransitionOnCurve from IntCurveSurface;
done : Boolean from Standard;
hasapoint : Boolean from Standard;
state : State from TopAbs;
face : Face from TopoDS;
end Intersector3d;

View File

@@ -14,23 +14,20 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <BRepClass3d_Intersector3d.ixx>
#include <IntCurveSurface_IntersectionPoint.hxx>
#include <gp_Lin.hxx>
#include <TopoDS_Face.hxx>
#include <TopAbs.hxx>
#include <IntCurveSurface_HInter.hxx>
#include <BRepAdaptor_HSurface.hxx>
#include <Geom_Line.hxx>
#include <gp_Pnt2d.hxx>
#include <BRepClass3d_Intersector3d.hxx>
#include <BRepClass_FaceClassifier.hxx>
#include <Geom_Line.hxx>
#include <GeomAdaptor_Curve.hxx>
#include <GeomAdaptor_HCurve.hxx>
#include <BRepAdaptor_HSurface.hxx>
#include <gp_Lin.hxx>
#include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx>
#include <IntCurveSurface_HInter.hxx>
#include <IntCurveSurface_IntersectionPoint.hxx>
#include <TopAbs.hxx>
#include <TopoDS_Face.hxx>
//============================================================================
BRepClass3d_Intersector3d::BRepClass3d_Intersector3d()

View File

@@ -0,0 +1,127 @@
// Created on: 1994-04-01
// 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 _BRepClass3d_Intersector3d_HeaderFile
#define _BRepClass3d_Intersector3d_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <gp_Pnt.hxx>
#include <Standard_Real.hxx>
#include <IntCurveSurface_TransitionOnCurve.hxx>
#include <Standard_Boolean.hxx>
#include <TopAbs_State.hxx>
#include <TopoDS_Face.hxx>
class gp_Lin;
class TopoDS_Face;
class gp_Pnt;
class BRepClass3d_Intersector3d
{
public:
DEFINE_STANDARD_ALLOC
//! Empty constructor.
Standard_EXPORT BRepClass3d_Intersector3d();
//! Perform the intersection between the
//! segment L(0) ... L(Prm) and the Shape <Sh>.
//!
//! 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 void Perform (const gp_Lin& L, const Standard_Real Prm, const Standard_Real Tol, const TopoDS_Face& F);
//! True is returned when the intersection have been computed.
Standard_Boolean IsDone() const;
//! True is returned if a point has been found.
Standard_Boolean HasAPoint() const;
//! Returns the U parameter of the intersection point
//! on the surface.
Standard_Real UParameter() const;
//! Returns the V parameter of the intersection point
//! on the surface.
Standard_Real VParameter() const;
//! Returns the parameter of the intersection point
//! on the line.
Standard_Real WParameter() const;
//! Returns the geometric point of the intersection
//! between the line and the surface.
const gp_Pnt& Pnt() const;
//! Returns the transition of the line on the surface.
IntCurveSurface_TransitionOnCurve Transition() const;
//! 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).
TopAbs_State State() const;
//! Returns the significant face used to determine
//! the intersection.
const TopoDS_Face& Face() const;
protected:
private:
gp_Pnt pnt;
Standard_Real U;
Standard_Real V;
Standard_Real W;
IntCurveSurface_TransitionOnCurve transition;
Standard_Boolean done;
Standard_Boolean hasapoint;
TopAbs_State state;
TopoDS_Face face;
};
#include <BRepClass3d_Intersector3d.lxx>
#endif // _BRepClass3d_Intersector3d_HeaderFile

View File

@@ -1,96 +0,0 @@
-- Created on: 1996-07-15
-- Created by: Laurent BUCHARD
-- Copyright (c) 1996-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 SClassifier from BRepClass3d
---Purpose: Provides an algorithm to classify a point in a solid.
uses
Pnt from gp,
Face from TopoDS,
Shape from TopoDS,
State from TopAbs,
SolidExplorer from BRepClass3d
raises
DomainError from Standard
is
Create
---Purpose: Empty constructor.
returns SClassifier from BRepClass3d;
Create(S : in out SolidExplorer from BRepClass3d;
P : Pnt from gp;
Tol : Real from Standard)
---Purpose: Constructor to classify the point P with the
-- tolerance Tol on the solid S.
returns SClassifier from BRepClass3d;
Perform(me : in out;
S : in out SolidExplorer from BRepClass3d;
P : Pnt from gp;
Tol : Real from Standard);
---Purpose: Classify the point P with the
-- tolerance Tol on the solid S.
--
PerformInfinitePoint(me : in out;
S : in out SolidExplorer from BRepClass3d;
Tol : Real from Standard);
---Purpose: Classify an infinite point 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;
ForceIn(me: in out)
is protected;
ForceOut(me: in out)
is protected;
fields
myFace : Face from TopoDS;
myState : Integer from Standard; -- 1: Rejected 2: IsOnFace 3: In 4: Out
end SClassifier;

View File

@@ -16,23 +16,24 @@
// Modified by skv - Thu Sep 4 11:22:05 2003 OCC578
#include <BRepClass3d_SClassifier.ixx>
#include <gp_Pnt.hxx>
#include <gp_Lin.hxx>
#include <gp_Vec.hxx>
#include <BRep_Tool.hxx>
#include <BRepClass3d_Intersector3d.hxx>
#include <TopoDS.hxx>
#include <IntCurvesFace_Intersector.hxx>
// modified by NIZHNY-MKK Mon Jun 21 15:13:40 2004
#include <Precision.hxx>
#include <BRepClass3d_SClassifier.hxx>
#include <BRepClass3d_SolidExplorer.hxx>
#include <BRepTopAdaptor_FClass2d.hxx>
#include <ElCLib.hxx>
#include <Geom_Surface.hxx>
#include <BRep_Tool.hxx>
#include <gp_Lin.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <IntCurvesFace_Intersector.hxx>
#include <math_BullardGenerator.hxx>
#include <BRepTopAdaptor_FClass2d.hxx>
#include <Precision.hxx>
#include <Standard_DomainError.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Face.hxx>
// modified by NIZHNY-MKK Mon Jun 21 15:13:40 2004
static
Standard_Boolean FaceNormal (const TopoDS_Face& aF,
const Standard_Real U,

View File

@@ -0,0 +1,105 @@
// Created on: 1996-07-15
// Created by: Laurent BUCHARD
// Copyright (c) 1996-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 _BRepClass3d_SClassifier_HeaderFile
#define _BRepClass3d_SClassifier_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <TopoDS_Face.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Real.hxx>
#include <Standard_Boolean.hxx>
#include <TopAbs_State.hxx>
class Standard_DomainError;
class BRepClass3d_SolidExplorer;
class gp_Pnt;
class TopoDS_Face;
//! Provides an algorithm to classify a point in a solid.
class BRepClass3d_SClassifier
{
public:
DEFINE_STANDARD_ALLOC
//! Empty constructor.
Standard_EXPORT BRepClass3d_SClassifier();
//! Constructor to classify the point P with the
//! tolerance Tol on the solid S.
Standard_EXPORT BRepClass3d_SClassifier(BRepClass3d_SolidExplorer& S, const gp_Pnt& P, const Standard_Real Tol);
//! Classify the point P with the
//! tolerance Tol on the solid S.
Standard_EXPORT void Perform (BRepClass3d_SolidExplorer& S, const gp_Pnt& P, const Standard_Real Tol);
//! Classify an infinite point with the
//! tolerance Tol on the solid S.
Standard_EXPORT void PerformInfinitePoint (BRepClass3d_SolidExplorer& S, const Standard_Real Tol);
//! Returns True if the classification has been
//! computed by rejection.
//! The State is then OUT.
Standard_EXPORT Standard_Boolean Rejected() const;
//! Returns the result of the classification.
Standard_EXPORT TopAbs_State State() const;
//! Returns True when the point is a point of a face.
Standard_EXPORT Standard_Boolean IsOnAFace() const;
//! 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.
Standard_EXPORT TopoDS_Face Face() const;
protected:
Standard_EXPORT void ForceIn();
Standard_EXPORT void ForceOut();
private:
TopoDS_Face myFace;
Standard_Integer myState;
};
#endif // _BRepClass3d_SClassifier_HeaderFile

View File

@@ -1,80 +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.
class SolidClassifier from BRepClass3d inherits SClassifier from BRepClass3d
---Purpose: Provides an algorithm to classify a point in a solid.
uses
Pnt from gp,
Face from TopoDS,
Shape from TopoDS,
SolidExplorer from BRepClass3d
raises
DomainError from Standard
is
Create
---Purpose : empty constructor
returns SolidClassifier from BRepClass3d;
Load(me:in out; S : Shape from TopoDS)
is static;
Create(S : Shape from TopoDS)
---Purpose: Constructor from a Shape.
returns SolidClassifier from BRepClass3d;
Create(S : Shape from TopoDS;
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 BRepClass3d;
Perform(me: in out;
P : Pnt from gp;
Tol : Real from Standard)
---Purpose: Classify the point P with the
-- tolerance Tol on the solid S.
is static;
PerformInfinitePoint(me: in out;
Tol : Real from Standard)
---Purpose: Classify an infinite point with the
-- tolerance Tol on the solid S.
-- Useful for compute the orientation of a solid.
is static;
Destroy(me:in out)
---C++: alias ~
is static;
fields
aSolidLoaded : Boolean from Standard;
explorer : SolidExplorer from BRepClass3d;
isaholeinspace : Boolean from Standard;
end SolidClassifier;

View File

@@ -57,9 +57,9 @@ static StatistiquesBRepClass3d STAT;
#endif
#include <BRepClass3d_SolidClassifier.ixx>
#include <BRepClass3d_SolidClassifier.hxx>
#include <gp_Pnt.hxx>
#include <Standard_DomainError.hxx>
#include <TopoDS_Shape.hxx>
BRepClass3d_SolidClassifier::BRepClass3d_SolidClassifier()

View File

@@ -0,0 +1,94 @@
// 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 _BRepClass3d_SolidClassifier_HeaderFile
#define _BRepClass3d_SolidClassifier_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <BRepClass3d_SolidExplorer.hxx>
#include <BRepClass3d_SClassifier.hxx>
#include <Standard_Real.hxx>
class Standard_DomainError;
class TopoDS_Shape;
class gp_Pnt;
//! Provides an algorithm to classify a point in a solid.
class BRepClass3d_SolidClassifier : public BRepClass3d_SClassifier
{
public:
DEFINE_STANDARD_ALLOC
//! empty constructor
Standard_EXPORT BRepClass3d_SolidClassifier();
Standard_EXPORT void Load (const TopoDS_Shape& S);
//! Constructor from a Shape.
Standard_EXPORT BRepClass3d_SolidClassifier(const TopoDS_Shape& S);
//! Constructor to classify the point P with the
//! tolerance Tol on the solid S.
Standard_EXPORT BRepClass3d_SolidClassifier(const TopoDS_Shape& S, const gp_Pnt& P, const Standard_Real Tol);
//! Classify the point P with the
//! tolerance Tol on the solid S.
Standard_EXPORT void Perform (const gp_Pnt& P, const Standard_Real Tol);
//! Classify an infinite point with the
//! tolerance Tol on the solid S.
//! Useful for compute the orientation of a solid.
Standard_EXPORT void PerformInfinitePoint (const Standard_Real Tol);
Standard_EXPORT void Destroy();
~BRepClass3d_SolidClassifier()
{
Destroy();
}
protected:
private:
Standard_Boolean aSolidLoaded;
BRepClass3d_SolidExplorer explorer;
Standard_Boolean isaholeinspace;
};
#endif // _BRepClass3d_SolidClassifier_HeaderFile

View File

@@ -1,219 +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.
-- Modified by skv - Thu Sep 4 12:19:22 2003 OCC578
-- Add the method GetFaceSegmentIndex() which is used to obtain the index of
-- the face for which last segment is calculated.
class SolidExplorer from BRepClass3d
---Purpose: Provide an exploration of a BRep Shape for the
-- classification.
uses
Orientation from TopAbs,
Pnt from gp,
Pnt2d from gp,
Lin from gp,
Vec from gp,
Face from TopoDS,
Shell from TopoDS,
Shape from TopoDS,
Explorer from TopExp,
Edge from BRepClass,
Box from Bnd,
State from TopAbs,
Intersector from IntCurvesFace,
MapOfInter from BRepClass3d,
HSurface from BRepAdaptor
is
Create returns SolidExplorer from BRepClass3d;
Create (Oth: SolidExplorer from BRepClass3d)
---Purpose: Raise if called.
returns SolidExplorer from BRepClass3d;
Create (S : Shape from TopoDS) returns SolidExplorer from BRepClass3d;
Delete(me:out) is virtual;
---C++: alias "Standard_EXPORT virtual ~BRepClass3d_SolidExplorer(){Destroy() ; }"
InitShape(me : in out; S : Shape from TopoDS) is static ;
Reject(me; P : Pnt from gp) returns Boolean is virtual ;
---Purpose: Should return True if P outside of bounding vol. of the shape
FindAPointInTheFace(myclass; F: Face from TopoDS;
P: out Pnt from gp;
Param: out Real from Standard)
---Purpose : compute a point P in the face F. Param is a Real in
-- ]0,1[ and is used to initialise the algorithm. For
-- different values , different points are returned.
returns Boolean from Standard;
FindAPointInTheFace(myclass; F: Face from TopoDS;
P: out Pnt from gp;
u,v: out Real from Standard;
Param: out Real from Standard)
returns Boolean from Standard;
FindAPointInTheFace(myclass; F: Face from TopoDS;
P: out Pnt from gp;
u,v: out Real from Standard;
Param: out Real from Standard;
theVecD1U, theVecD1V: out Vec from gp)
returns Boolean from Standard;
FindAPointInTheFace(myclass; F: Face from TopoDS;
P: out Pnt from gp;
u,v: out Real from Standard)
returns Boolean from Standard;
FindAPointInTheFace(myclass; F: Face from TopoDS;
P: out Pnt from gp)
returns Boolean from Standard;
FindAPointInTheFace(myclass; F: Face from TopoDS;
u,v: out Real from Standard)
returns Boolean from Standard;
-----------------------------------------------------------------------
PointInTheFace(me; F: Face from TopoDS;
P: out Pnt from gp;
u,v: out Real from Standard;
Param: out Real from Standard;
Index: out Integer from Standard)
returns Boolean from Standard is static ;
PointInTheFace(me; F: Face from TopoDS;
P: out Pnt from gp;
u,v: out Real from Standard;
Param: out Real from Standard;
Index: out Integer from Standard;
surf: HSurface from BRepAdaptor;
u1,v1,u2,v2: Real from Standard)
returns Boolean from Standard is static;
PointInTheFace(me; F: Face from TopoDS;
P: out Pnt from gp;
u,v: out Real from Standard;
Param: out Real from Standard;
Index: out Integer from Standard;
surf: HSurface from BRepAdaptor;
u1,v1,u2,v2: Real from Standard;
theVecD1U, theVecD1V: out Vec from gp)
returns Boolean from Standard is static ;
---Purpose: <Index> gives point index to search from and returns
-- point index of succeseful search
InitShell(me: in out) is static ;
---Purpose: Starts an exploration of the shells.
MoreShell(me) returns Boolean from Standard is static ;
---Purpose: Returns True if there is a current shell.
NextShell(me: in out) is static ;
---Purpose: Sets the explorer to the next shell.
CurrentShell(me) returns Shell from TopoDS is static ;
---Purpose: Returns the current shell.
RejectShell(me; L: Lin from gp) returns Boolean from Standard is virtual;
---Purpose: Returns True if the Shell is rejected.
InitFace(me: in out) is static ;
---Purpose: Starts an exploration of the faces of the current shell.
MoreFace(me) returns Boolean from Standard is static ;
---Purpose: Returns True if current face in current shell.
NextFace(me: in out) is static ;
---Purpose: Sets the explorer to the next Face of the current shell.
CurrentFace(me) returns Face from TopoDS is static ;
---Purpose: Returns the current face.
RejectFace(me; L: Lin from gp) returns Boolean from Standard is virtual;
---Purpose: returns True if the face is rejected.
----------------------------------------------------------------------
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.
--
--modified by NIZNHY-PKV Thu Nov 14 12:20:17 2002 f
returns Integer from Standard
--modified by NIZNHY-PKV Thu Nov 14 12:20:21 2002 t
is static;
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.
--
--modified by NIZNHY-PKV Thu Nov 14 12:20:17 2002 f
returns Integer from Standard
--modified by NIZNHY-PKV Thu Nov 14 12:20:21 2002 t
is static;
-- Modified by skv - Thu Sep 4 12:19:22 2003 OCC578 Begin
GetFaceSegmentIndex(me)
---Purpose: Returns the index of face for which
-- last segment is calculated.
returns Integer from Standard
is static;
-- Modified by skv - Thu Sep 4 12:19:23 2003 OCC578 End
--------------------------------------------------------------------
--- Dump method
DumpSegment(me; P : Pnt from gp; L : Lin from gp;
Par : Real from Standard; S : State from TopAbs) is virtual;
Box(me)
---C++: return const &
returns Box from Bnd
is static;
Intersector(me; F : Face from TopoDS)
---C++: return &
returns Intersector from IntCurvesFace is static;
Destroy(me: in out)
--C++: alias ~
is static;
fields
myBox : Box from Bnd;
myShape : Shape from TopoDS;
myReject : Boolean from Standard;
myFirstFace : Integer from Standard;
myParamOnEdge : Real from Standard;
myShellExplorer : Explorer from TopExp;
myFaceExplorer : Explorer from TopExp;
myMapOfInter : MapOfInter from BRepClass3d;
end SolidExplorer;

View File

@@ -24,46 +24,47 @@
#define REJECTION 1
//-- To printf on NT
#include <stdio.h>
#include <BRepClass3d_SolidExplorer.ixx>
#include <gp.hxx>
#include <TopoDS.hxx>
#include <BRepAdaptor_Curve2d.hxx>
#include <BRepTools.hxx>
#include <Geom2d_Curve.hxx>
#include <gp_Vec2d.hxx>
#include <GeomAbs_Shape.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRepClass_FacePassiveClassifier.hxx>
#include <TopAbs_Orientation.hxx>
#include <TopExp_Explorer.hxx>
#include <BRepClass_Edge.hxx>
#include <Bnd_Box.hxx>
#include <BRepBndLib.hxx>
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve2d.hxx>
#include <BRepAdaptor_HSurface.hxx>
#include <ElCLib.hxx>
#include <BRepAdaptor_Surface.hxx>
#include <BRepBndLib.hxx>
#include <BRepClass3d_DataMapIteratorOfMapOfInter.hxx>
#include <Precision.hxx>
//OCC454(apo)->
#include <Extrema_ExtPS.hxx>
#include <BRep_Tool.hxx>
#include <BRepClass3d_SolidExplorer.hxx>
#include <BRepClass_Edge.hxx>
#include <BRepClass_FaceClassifier.hxx>
#include <BRepClass_FacePassiveClassifier.hxx>
#include <BRepTools.hxx>
#include <BRepTopAdaptor_FClass2d.hxx>
#include <ElCLib.hxx>
#include <Extrema_ExtPS.hxx>
#include <Geom2d_Curve.hxx>
#include <GeomAbs_Shape.hxx>
#include <gp.hxx>
#include <gp_Lin.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <gp_Vec2d.hxx>
#include <IntCurvesFace_Intersector.hxx>
#include <Precision.hxx>
#include <TopAbs_Orientation.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Face.hxx>
#include <TopoDS_Shape.hxx>
#include <TopoDS_Shell.hxx>
#include <stdio.h>
//OCC454(apo)->
//<-OCC454(apo)
#include <BRepTopAdaptor_FClass2d.hxx>
//=======================================================================
//function : FindAPointInTheFace
//purpose : Compute a point P in the face F. Param is a Real in
// ]0,1[ and is used to initialise the algorithm. For
// different values , different points are returned.
//=======================================================================
Standard_Boolean BRepClass3d_SolidExplorer::FindAPointInTheFace
(const TopoDS_Face& _face,
gp_Pnt& APoint_,

View File

@@ -0,0 +1,178 @@
// 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 _BRepClass3d_SolidExplorer_HeaderFile
#define _BRepClass3d_SolidExplorer_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Bnd_Box.hxx>
#include <TopoDS_Shape.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Real.hxx>
#include <TopExp_Explorer.hxx>
#include <BRepClass3d_MapOfInter.hxx>
#include <TopAbs_State.hxx>
class TopoDS_Shape;
class gp_Pnt;
class TopoDS_Face;
class gp_Vec;
class BRepAdaptor_HSurface;
class TopoDS_Shell;
class gp_Lin;
class Bnd_Box;
class IntCurvesFace_Intersector;
//! Provide an exploration of a BRep Shape for the
//! classification.
class BRepClass3d_SolidExplorer
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BRepClass3d_SolidExplorer();
//! Raise if called.
Standard_EXPORT BRepClass3d_SolidExplorer(const BRepClass3d_SolidExplorer& Oth);
Standard_EXPORT BRepClass3d_SolidExplorer(const TopoDS_Shape& S);
Standard_EXPORT virtual void Delete();
Standard_EXPORT virtual ~BRepClass3d_SolidExplorer(){Destroy() ; }
Standard_EXPORT void InitShape (const TopoDS_Shape& S);
//! Should return True if P outside of bounding vol. of the shape
Standard_EXPORT virtual Standard_Boolean Reject (const gp_Pnt& P) const;
//! compute a point P in the face F. Param is a Real in
//! ]0,1[ and is used to initialise the algorithm. For
//! different values , different points are returned.
Standard_EXPORT static Standard_Boolean FindAPointInTheFace (const TopoDS_Face& F, gp_Pnt& P, Standard_Real& Param);
Standard_EXPORT static Standard_Boolean FindAPointInTheFace (const TopoDS_Face& F, gp_Pnt& P, Standard_Real& u, Standard_Real& v, Standard_Real& Param);
Standard_EXPORT static Standard_Boolean FindAPointInTheFace (const TopoDS_Face& F, gp_Pnt& P, Standard_Real& u, Standard_Real& v, Standard_Real& Param, gp_Vec& theVecD1U, gp_Vec& theVecD1V);
Standard_EXPORT static Standard_Boolean FindAPointInTheFace (const TopoDS_Face& F, gp_Pnt& P, Standard_Real& u, Standard_Real& v);
Standard_EXPORT static Standard_Boolean FindAPointInTheFace (const TopoDS_Face& F, gp_Pnt& P);
Standard_EXPORT static Standard_Boolean FindAPointInTheFace (const TopoDS_Face& F, Standard_Real& u, Standard_Real& v);
Standard_EXPORT Standard_Boolean PointInTheFace (const TopoDS_Face& F, gp_Pnt& P, Standard_Real& u, Standard_Real& v, Standard_Real& Param, Standard_Integer& Index) const;
Standard_EXPORT Standard_Boolean PointInTheFace (const TopoDS_Face& F, gp_Pnt& P, Standard_Real& u, Standard_Real& v, Standard_Real& Param, Standard_Integer& Index, const Handle(BRepAdaptor_HSurface)& surf, const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2) const;
//! <Index> gives point index to search from and returns
//! point index of succeseful search
Standard_EXPORT Standard_Boolean PointInTheFace (const TopoDS_Face& F, gp_Pnt& P, Standard_Real& u, Standard_Real& v, Standard_Real& Param, Standard_Integer& Index, const Handle(BRepAdaptor_HSurface)& surf, const Standard_Real u1, const Standard_Real v1, const Standard_Real u2, const Standard_Real v2, gp_Vec& theVecD1U, gp_Vec& theVecD1V) const;
//! Starts an exploration of the shells.
Standard_EXPORT void InitShell();
//! Returns True if there is a current shell.
Standard_EXPORT Standard_Boolean MoreShell() const;
//! Sets the explorer to the next shell.
Standard_EXPORT void NextShell();
//! Returns the current shell.
Standard_EXPORT TopoDS_Shell CurrentShell() const;
//! Returns True if the Shell is rejected.
Standard_EXPORT virtual Standard_Boolean RejectShell (const gp_Lin& L) const;
//! Starts an exploration of the faces of the current shell.
Standard_EXPORT void InitFace();
//! Returns True if current face in current shell.
Standard_EXPORT Standard_Boolean MoreFace() const;
//! Sets the explorer to the next Face of the current shell.
Standard_EXPORT void NextFace();
//! Returns the current face.
Standard_EXPORT TopoDS_Face CurrentFace() const;
//! returns True if the face is rejected.
Standard_EXPORT virtual Standard_Boolean RejectFace (const gp_Lin& L) const;
//! Returns in <L>, <Par> a segment having at least
//! one intersection with the shape boundary to
//! compute intersections.
Standard_EXPORT Standard_Integer Segment (const gp_Pnt& P, gp_Lin& L, Standard_Real& Par);
//! 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.
Standard_EXPORT Standard_Integer OtherSegment (const gp_Pnt& P, gp_Lin& L, Standard_Real& Par);
//! Returns the index of face for which
//! last segment is calculated.
Standard_EXPORT Standard_Integer GetFaceSegmentIndex() const;
Standard_EXPORT virtual void DumpSegment (const gp_Pnt& P, const gp_Lin& L, const Standard_Real Par, const TopAbs_State S) const;
Standard_EXPORT const Bnd_Box& Box() const;
Standard_EXPORT IntCurvesFace_Intersector& Intersector (const TopoDS_Face& F) const;
Standard_EXPORT void Destroy();
protected:
private:
Bnd_Box myBox;
TopoDS_Shape myShape;
Standard_Boolean myReject;
Standard_Integer myFirstFace;
Standard_Real myParamOnEdge;
TopExp_Explorer myShellExplorer;
TopExp_Explorer myFaceExplorer;
BRepClass3d_MapOfInter myMapOfInter;
};
#endif // _BRepClass3d_SolidExplorer_HeaderFile

View File

@@ -0,0 +1,99 @@
// Created on: 1994-04-18
// 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 _BRepClass3d_SolidPassiveClassifier_HeaderFile
#define _BRepClass3d_SolidPassiveClassifier_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Boolean.hxx>
#include <TopoDS_Face.hxx>
#include <gp_Lin.hxx>
#include <Standard_Real.hxx>
#include <TopAbs_State.hxx>
#include <BRepClass3d_Intersector3d.hxx>
#include <TopAbs_Orientation.hxx>
class Standard_DomainError;
class BRepClass3d_Intersector3d;
class gp_Lin;
class TopoDS_Face;
class BRepClass3d_SolidPassiveClassifier
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT BRepClass3d_SolidPassiveClassifier();
Standard_EXPORT void Reset (const gp_Lin& L, const Standard_Real P, const Standard_Real Tol);
Standard_EXPORT void Compare (const TopoDS_Face& F, const TopAbs_Orientation Or);
Standard_Real Parameter() const;
Standard_EXPORT Standard_Boolean HasIntersection() const;
BRepClass3d_Intersector3d& Intersector();
TopAbs_State State() const;
protected:
private:
Standard_Boolean isSet;
TopoDS_Face myFace;
gp_Lin myLin;
Standard_Real myParam;
Standard_Real myTolerance;
TopAbs_State myState;
Standard_Boolean hasIntersect;
BRepClass3d_Intersector3d myIntersector;
};
#define TheIntersector BRepClass3d_Intersector3d
#define TheIntersector_hxx <BRepClass3d_Intersector3d.hxx>
#define TopClass_Classifier3d BRepClass3d_SolidPassiveClassifier
#define TopClass_Classifier3d_hxx <BRepClass3d_SolidPassiveClassifier.hxx>
#include <TopClass_Classifier3d.lxx>
#undef TheIntersector
#undef TheIntersector_hxx
#undef TopClass_Classifier3d
#undef TopClass_Classifier3d_hxx
#endif // _BRepClass3d_SolidPassiveClassifier_HeaderFile

View File

@@ -0,0 +1,30 @@
// Created on: 1994-04-18
// 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.
#include <BRepClass3d_SolidPassiveClassifier.hxx>
#include <Standard_DomainError.hxx>
#include <BRepClass3d_Intersector3d.hxx>
#include <gp_Lin.hxx>
#include <TopoDS_Face.hxx>
#define TheIntersector BRepClass3d_Intersector3d
#define TheIntersector_hxx <BRepClass3d_Intersector3d.hxx>
#define TopClass_Classifier3d BRepClass3d_SolidPassiveClassifier
#define TopClass_Classifier3d_hxx <BRepClass3d_SolidPassiveClassifier.hxx>
#include <TopClass_Classifier3d.gxx>

View File

@@ -1,2 +1,15 @@
BRepClass3d_MapOfInter.hxx
BRepClass3d.cxx
BRepClass3d.hxx
BRepClass3d_DataMapIteratorOfMapOfInter.hxx
BRepClass3d_Intersector3d.cxx
BRepClass3d_Intersector3d.hxx
BRepClass3d_Intersector3d.lxx
BRepClass3d_MapOfInter.hxx
BRepClass3d_SClassifier.cxx
BRepClass3d_SClassifier.hxx
BRepClass3d_SolidClassifier.cxx
BRepClass3d_SolidClassifier.hxx
BRepClass3d_SolidExplorer.cxx
BRepClass3d_SolidExplorer.hxx
BRepClass3d_SolidPassiveClassifier.hxx
BRepClass3d_SolidPassiveClassifier_0.cxx