mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00:49 +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,5 @@
|
||||
TopTrans_Array2OfOrientation.hxx
|
||||
TopTrans_CurveTransition.cxx
|
||||
TopTrans_CurveTransition.hxx
|
||||
TopTrans_SurfaceTransition.cxx
|
||||
TopTrans_SurfaceTransition.hxx
|
||||
|
@@ -1,70 +0,0 @@
|
||||
-- Created on: 1991-10-28
|
||||
-- Created by: Remi LEQUETTE
|
||||
-- Copyright (c) 1991-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 TopTrans
|
||||
|
||||
---Purpose: This package provides algorithms to compute
|
||||
-- complex transitions. A transition is the status of
|
||||
-- geometry near the boundary of a Shape. An example
|
||||
-- is the intersection of a curve and a surface
|
||||
-- enclosing a solid , the transition tells if the
|
||||
-- parts of the curve just before and just after the
|
||||
-- intersection are inside, outside or on the
|
||||
-- boundary of the solid.
|
||||
--
|
||||
-- The difficulty with transitions arise when dealing
|
||||
-- with trimmed geometries like edges and faces. When
|
||||
-- the geometric intersections are inside the trimmed
|
||||
-- geometry the transition is usually computed by the
|
||||
-- intersection algorithms as the trimming can be
|
||||
-- safely ignored. If the intersection falls on the
|
||||
-- trimming boundaries one must consider the
|
||||
-- neighbouring entities. Consider as an example the
|
||||
-- intersection of a curve and a solid, if the
|
||||
-- intersection falls on an edge of the solid it does
|
||||
-- not falls inside the two faces adjacent to the
|
||||
-- edge, a complex transition occurs.
|
||||
--
|
||||
-- This package provides two classes :
|
||||
--
|
||||
-- * CurveTransition is used to compute complex
|
||||
-- transitions with an other curve.
|
||||
--
|
||||
-- * SurfaceTransition is used to compute complex
|
||||
-- transitions in 3D space.
|
||||
--
|
||||
-- The curves and surfaces are given by a first or
|
||||
-- second order approximation around the intersection
|
||||
-- point. For a curve, the tangent vector or the
|
||||
-- osculating circle. For a surface the normal vector
|
||||
-- or the osculating quadric.
|
||||
|
||||
uses
|
||||
Standard,
|
||||
TCollection,
|
||||
TColStd,
|
||||
gp,
|
||||
TopAbs
|
||||
|
||||
is
|
||||
|
||||
imported Array2OfOrientation;
|
||||
|
||||
class CurveTransition;
|
||||
|
||||
class SurfaceTransition;
|
||||
|
||||
end TopTrans;
|
@@ -1,133 +0,0 @@
|
||||
-- Created on: 1992-01-30
|
||||
-- Created by: Didier PIFFAULT
|
||||
-- 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.
|
||||
|
||||
class CurveTransition from TopTrans
|
||||
|
||||
---Purpose: This algorithm is used to compute the transition
|
||||
-- of a Curve intersecting a curvilinear boundary.
|
||||
--
|
||||
-- The geometric elements are described locally at
|
||||
-- the intersection point by a second order
|
||||
-- development.
|
||||
--
|
||||
-- The curve is described by the intersection point,
|
||||
-- the tangent vector and the curvature.
|
||||
--
|
||||
-- The boundary is described by a set of curve
|
||||
-- elements, a curve element is either :
|
||||
--
|
||||
-- - A curve.
|
||||
--
|
||||
-- - A curve and an orientation called a half-curve,
|
||||
-- the boundary of the curve is before or after the
|
||||
-- intersection point depending on the orientation.
|
||||
--
|
||||
|
||||
uses
|
||||
|
||||
Boolean from Standard,
|
||||
Real from Standard,
|
||||
|
||||
Pnt from gp,
|
||||
Dir from gp,
|
||||
|
||||
State from TopAbs,
|
||||
Orientation from TopAbs
|
||||
|
||||
is
|
||||
|
||||
Create returns CurveTransition from TopTrans;
|
||||
---Purpose: Create an empty Curve Transition.
|
||||
|
||||
|
||||
Reset( me : in out;
|
||||
Tgt : in Dir from gp; -- Tangent at this point
|
||||
Norm : in Dir from gp; -- Normal vector at this point
|
||||
Curv : in Real from Standard);-- Curvature at this point
|
||||
---Purpose: Initialize a Transition with the local description
|
||||
-- of a Curve.
|
||||
|
||||
Reset( me : in out;
|
||||
Tgt : in Dir from gp); -- Tangent at this point
|
||||
---Purpose: Initialize a Transition with the local description
|
||||
-- of a straigth line.
|
||||
|
||||
Compare(me : in out;
|
||||
Tole : in Real from Standard; -- Cosine tolerance
|
||||
Tang : in Dir from gp; -- Tangent on curve for this point
|
||||
Norm : in Dir from gp; -- Normal vector at this point
|
||||
Curv : in Real from Standard; -- Curvature at this point
|
||||
S : in Orientation from TopAbs; -- transition locale
|
||||
Or : in Orientation from TopAbs);-- orientation de la tangente
|
||||
---Purpose: Add a curve element to the boundary. If Or is
|
||||
-- REVERSED the curve is before the intersection,
|
||||
-- else if Or is FORWARD the curv is after the
|
||||
-- intersection and if Or is INTERNAL the
|
||||
-- intersection is in the middle of the curv.
|
||||
|
||||
StateBefore(me) returns State from TopAbs;
|
||||
---Purpose: returns the state of the curve before the
|
||||
-- intersection, this is the position relative to the
|
||||
-- boundary of a point very close to the intersection
|
||||
-- on the negative side of the tangent.
|
||||
|
||||
StateAfter(me) returns State from TopAbs;
|
||||
---Purpose: returns the state of the curve after the
|
||||
-- intersection, this is the position relative to the
|
||||
-- boundary of a point very close to the intersection
|
||||
-- on the positive side of the tangent.
|
||||
|
||||
|
||||
---Implementation functions :
|
||||
|
||||
IsBefore( me;
|
||||
Tole : in Real from Standard;
|
||||
Angl : in Real from Standard;
|
||||
Nor1 : in Dir from gp;
|
||||
Cur1 : in Real from Standard;
|
||||
Nor2 : in Dir from gp;
|
||||
Cur2 : in Real from Standard)
|
||||
returns Boolean from Standard is private;
|
||||
---Purpose: Compare two curvature and return true if N1,C1 is
|
||||
-- before N2,C2 in the edge orientation
|
||||
|
||||
Compare(me;
|
||||
Ang1 : in Real from Standard;
|
||||
Ang2 : in Real from Standard;
|
||||
Tole : in Real from Standard)
|
||||
returns Integer from Standard is private;
|
||||
---Purpose: Compare two angles at tolerance Tole
|
||||
|
||||
|
||||
fields
|
||||
|
||||
myTgt : Dir from gp; -- Tangent at this point
|
||||
myNorm : Dir from gp; -- Normal vector at this point
|
||||
myCurv : Real; -- Curvature at this point
|
||||
|
||||
Init : Boolean;
|
||||
|
||||
TgtFirst : Dir from gp; -- Elements to determine the state
|
||||
NormFirst : Dir from gp; --
|
||||
CurvFirst : Real; -- before the intersection
|
||||
TranFirst : Orientation from TopAbs;
|
||||
|
||||
TgtLast : Dir from gp; -- Elements to determine the state
|
||||
NormLast : Dir from gp; --
|
||||
CurvLast : Real; -- After the intersection
|
||||
TranLast : Orientation from TopAbs;
|
||||
|
||||
end CurveTransition;
|
@@ -14,8 +14,10 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <TopTrans_CurveTransition.ixx>
|
||||
|
||||
#include <gp_Dir.hxx>
|
||||
#include <TopAbs.hxx>
|
||||
#include <TopTrans_CurveTransition.hxx>
|
||||
|
||||
#define GREATER 1
|
||||
#define SAME 0
|
||||
|
130
src/TopTrans/TopTrans_CurveTransition.hxx
Normal file
130
src/TopTrans/TopTrans_CurveTransition.hxx
Normal file
@@ -0,0 +1,130 @@
|
||||
// Created on: 1992-01-30
|
||||
// Created by: Didier PIFFAULT
|
||||
// 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.
|
||||
|
||||
#ifndef _TopTrans_CurveTransition_HeaderFile
|
||||
#define _TopTrans_CurveTransition_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <gp_Dir.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <TopAbs_Orientation.hxx>
|
||||
#include <TopAbs_State.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
class gp_Dir;
|
||||
|
||||
|
||||
//! This algorithm is used to compute the transition
|
||||
//! of a Curve intersecting a curvilinear boundary.
|
||||
//!
|
||||
//! The geometric elements are described locally at
|
||||
//! the intersection point by a second order
|
||||
//! development.
|
||||
//!
|
||||
//! The curve is described by the intersection point,
|
||||
//! the tangent vector and the curvature.
|
||||
//!
|
||||
//! The boundary is described by a set of curve
|
||||
//! elements, a curve element is either :
|
||||
//!
|
||||
//! - A curve.
|
||||
//!
|
||||
//! - A curve and an orientation called a half-curve,
|
||||
//! the boundary of the curve is before or after the
|
||||
//! intersection point depending on the orientation.
|
||||
class TopTrans_CurveTransition
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Create an empty Curve Transition.
|
||||
Standard_EXPORT TopTrans_CurveTransition();
|
||||
|
||||
//! Initialize a Transition with the local description
|
||||
//! of a Curve.
|
||||
Standard_EXPORT void Reset (const gp_Dir& Tgt, const gp_Dir& Norm, const Standard_Real Curv);
|
||||
|
||||
//! Initialize a Transition with the local description
|
||||
//! of a straigth line.
|
||||
Standard_EXPORT void Reset (const gp_Dir& Tgt);
|
||||
|
||||
//! Add a curve element to the boundary. If Or is
|
||||
//! REVERSED the curve is before the intersection,
|
||||
//! else if Or is FORWARD the curv is after the
|
||||
//! intersection and if Or is INTERNAL the
|
||||
//! intersection is in the middle of the curv.
|
||||
Standard_EXPORT void Compare (const Standard_Real Tole, const gp_Dir& Tang, const gp_Dir& Norm, const Standard_Real Curv, const TopAbs_Orientation S, const TopAbs_Orientation Or);
|
||||
|
||||
//! returns the state of the curve before the
|
||||
//! intersection, this is the position relative to the
|
||||
//! boundary of a point very close to the intersection
|
||||
//! on the negative side of the tangent.
|
||||
Standard_EXPORT TopAbs_State StateBefore() const;
|
||||
|
||||
//! returns the state of the curve after the
|
||||
//! intersection, this is the position relative to the
|
||||
//! boundary of a point very close to the intersection
|
||||
//! on the positive side of the tangent.
|
||||
Standard_EXPORT TopAbs_State StateAfter() const;
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
//! Compare two curvature and return true if N1,C1 is
|
||||
//! before N2,C2 in the edge orientation
|
||||
Standard_EXPORT Standard_Boolean IsBefore (const Standard_Real Tole, const Standard_Real Angl, const gp_Dir& Nor1, const Standard_Real Cur1, const gp_Dir& Nor2, const Standard_Real Cur2) const;
|
||||
|
||||
//! Compare two angles at tolerance Tole
|
||||
Standard_EXPORT Standard_Integer Compare (const Standard_Real Ang1, const Standard_Real Ang2, const Standard_Real Tole) const;
|
||||
|
||||
|
||||
gp_Dir myTgt;
|
||||
gp_Dir myNorm;
|
||||
Standard_Real myCurv;
|
||||
Standard_Boolean Init;
|
||||
gp_Dir TgtFirst;
|
||||
gp_Dir NormFirst;
|
||||
Standard_Real CurvFirst;
|
||||
TopAbs_Orientation TranFirst;
|
||||
gp_Dir TgtLast;
|
||||
gp_Dir NormLast;
|
||||
Standard_Real CurvLast;
|
||||
TopAbs_Orientation TranLast;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _TopTrans_CurveTransition_HeaderFile
|
@@ -1,156 +0,0 @@
|
||||
-- Created on: 1992-01-30
|
||||
-- Created by: Didier PIFFAULT
|
||||
-- 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.
|
||||
|
||||
-- xpu:4/3/97 implementation
|
||||
|
||||
|
||||
class SurfaceTransition from TopTrans
|
||||
|
||||
---Purpose: This algorithm is used to compute the transition
|
||||
-- of a 3D surface intersecting a topological surfacic
|
||||
-- boundary on a 3D curve ( intersection curve ).
|
||||
-- The boundary is described by a set of faces
|
||||
-- each face is described by
|
||||
-- - its support surface,
|
||||
-- - an orientation defining its matter side.
|
||||
-- The geometric elements are described locally at the
|
||||
-- intersection point by a second order development.
|
||||
-- A surface is described by the normal vector, the
|
||||
-- principal directions and the principal curvatures.
|
||||
-- A curve is described by the tangent, the normal
|
||||
-- and the curvature.
|
||||
-- The algorithm keeps track of the two faces elements
|
||||
-- closest to the part of the curve "before" and "after"
|
||||
-- the intersection, these two elements are updated
|
||||
-- for each new face.
|
||||
-- The position of the curve can be computed when at
|
||||
-- least one surface element has been given, this
|
||||
-- position is "In","Out" or "On" for the part of the
|
||||
-- curve "Before" or "After" the intersection.
|
||||
|
||||
uses
|
||||
Pnt from gp,
|
||||
Dir from gp,
|
||||
State from TopAbs,
|
||||
Orientation from TopAbs,
|
||||
Array2OfReal from TColStd,
|
||||
Array2OfOrientation from TopTrans
|
||||
is
|
||||
|
||||
Create returns SurfaceTransition from TopTrans;
|
||||
---Purpose: Create an empty Surface Transition.
|
||||
|
||||
Reset ( me : in out;
|
||||
Tgt : Dir from gp; -- curve tangent at this point
|
||||
Norm : Dir from gp; -- surface normal at this point
|
||||
MaxD, MinD : Dir from gp; -- surface principal directions at this point
|
||||
MaxCurv, MinCurv : in Real ); -- curvatures on surface at this point
|
||||
---Purpose: Initialize a Surface Transition with the local
|
||||
-- description of the intersection curve and of the
|
||||
-- reference surface.
|
||||
-- PREQUESITORY : Norm oriented OUTSIDE "geometric matter"
|
||||
|
||||
Reset ( me : in out;
|
||||
Tgt : Dir from gp;
|
||||
Norm : Dir from gp );
|
||||
---Purpose: Initialize a Surface Transition with the local
|
||||
-- description of a straight line.
|
||||
|
||||
Compare(me : in out;
|
||||
Tole : Real; -- Cosine tolerance
|
||||
Norm : Dir from gp; -- surface normal oriented at this point
|
||||
MaxD, MinD : Dir from gp; -- surface principal directions at this point
|
||||
MaxCurv, MinCurv : in Real; -- curvatures on surface at this point
|
||||
S : Orientation from TopAbs;
|
||||
O : Orientation from TopAbs );
|
||||
---Purpose: Add a face element to the boundary.
|
||||
--
|
||||
-- - S defines topological orientation for the face :
|
||||
-- S FORWARD means: along the intersection curve on the
|
||||
-- reference surface, transition states while crossing
|
||||
-- the face are OUT,IN.
|
||||
-- S REVERSED means states are IN,OUT.
|
||||
-- S INTERNAL means states are IN,IN.
|
||||
--
|
||||
-- - O defines curve's position on face :
|
||||
-- O FORWARD means the face is before the intersection
|
||||
-- O REVERSED means the face is AFTER
|
||||
-- O INTERNAL means the curve intersection is in the face.
|
||||
-- PREQUESITORY : Norm oriented OUTSIDE "geometric matter"
|
||||
|
||||
Compare(me : in out;
|
||||
Tole : Real;
|
||||
Norm : Dir from gp;
|
||||
S : Orientation from TopAbs;
|
||||
O : Orientation from TopAbs);
|
||||
---Purpose: Add a plane or a cylindric face to the boundary.
|
||||
|
||||
StateBefore(me) returns State from TopAbs;
|
||||
---Purpose: Returns the state of the reference surface before
|
||||
-- the interference, this is the position relative to
|
||||
-- the surface of a point very close to the intersection
|
||||
-- on the negative side of the tangent.
|
||||
|
||||
StateAfter(me) returns State from TopAbs;
|
||||
---Purpose: Returns the state of the reference surface after
|
||||
-- interference, this is the position relative to the
|
||||
-- surface of a point very close to the intersection
|
||||
-- on the positive side of the tangent.
|
||||
|
||||
--
|
||||
-- Private :
|
||||
--
|
||||
|
||||
UpdateReference(me : in out;
|
||||
Tole : Real;
|
||||
isInfRef : Boolean;
|
||||
CosInf, CosSup : in out Real;
|
||||
Tran : Orientation from TopAbs;
|
||||
TranRef : in out Orientation from TopAbs) is private;
|
||||
|
||||
ComputeCos(me;
|
||||
Tole : Real; -- cosinus tolerance
|
||||
Norm : Dir from gp; -- face normal
|
||||
O : Orientation from TopAbs; -- intersection position on face
|
||||
isleft : out Boolean) returns Real is private;
|
||||
|
||||
GetBefore(myclass;
|
||||
Tran : Orientation from TopAbs)
|
||||
returns State from TopAbs;
|
||||
|
||||
GetAfter(myclass;
|
||||
Tran : Orientation from TopAbs)
|
||||
returns State from TopAbs;
|
||||
|
||||
fields
|
||||
|
||||
-- local reference input data :
|
||||
myTgt : Dir from gp; -- intersection curve tangent
|
||||
myNorm : Dir from gp; -- reference surface normal
|
||||
beafter : Dir from gp; -- direction (Before, After) on reference surface.
|
||||
myCurvRef : Real; -- for the reference surface
|
||||
|
||||
-- local data for boundary faces :
|
||||
myAng : Array2OfReal from TColStd;
|
||||
myCurv : Array2OfReal from TColStd;
|
||||
myOri : Array2OfOrientation from TopTrans;
|
||||
|
||||
-- flag for touch case (eap Mar 25 2002)
|
||||
myTouchFlag : Boolean from Standard;
|
||||
|
||||
end SurfaceTransition;
|
||||
|
||||
|
@@ -15,13 +15,13 @@
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
// Modified: eap Mar 25 2002 (occ102,occ227), touch case
|
||||
#include <TopTrans_SurfaceTransition.ixx>
|
||||
|
||||
#include <gp_Dir.hxx>
|
||||
#include <TopAbs.hxx>
|
||||
#include <TopAbs_State.hxx>
|
||||
#include <TopAbs_Orientation.hxx>
|
||||
#include <Precision.hxx>
|
||||
#include <TopAbs.hxx>
|
||||
#include <TopAbs_Orientation.hxx>
|
||||
#include <TopAbs_State.hxx>
|
||||
#include <TopTrans_SurfaceTransition.hxx>
|
||||
|
||||
#define Msr Standard_Real
|
||||
#define Msi Standard_Integer
|
||||
|
145
src/TopTrans/TopTrans_SurfaceTransition.hxx
Normal file
145
src/TopTrans/TopTrans_SurfaceTransition.hxx
Normal file
@@ -0,0 +1,145 @@
|
||||
// Created on: 1992-01-30
|
||||
// Created by: Didier PIFFAULT
|
||||
// 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.
|
||||
|
||||
#ifndef _TopTrans_SurfaceTransition_HeaderFile
|
||||
#define _TopTrans_SurfaceTransition_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <gp_Dir.hxx>
|
||||
#include <Standard_Real.hxx>
|
||||
#include <TColStd_Array2OfReal.hxx>
|
||||
#include <TopTrans_Array2OfOrientation.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <TopAbs_Orientation.hxx>
|
||||
#include <TopAbs_State.hxx>
|
||||
class gp_Dir;
|
||||
|
||||
|
||||
//! This algorithm is used to compute the transition
|
||||
//! of a 3D surface intersecting a topological surfacic
|
||||
//! boundary on a 3D curve ( intersection curve ).
|
||||
//! The boundary is described by a set of faces
|
||||
//! each face is described by
|
||||
//! - its support surface,
|
||||
//! - an orientation defining its matter side.
|
||||
//! The geometric elements are described locally at the
|
||||
//! intersection point by a second order development.
|
||||
//! A surface is described by the normal vector, the
|
||||
//! principal directions and the principal curvatures.
|
||||
//! A curve is described by the tangent, the normal
|
||||
//! and the curvature.
|
||||
//! The algorithm keeps track of the two faces elements
|
||||
//! closest to the part of the curve "before" and "after"
|
||||
//! the intersection, these two elements are updated
|
||||
//! for each new face.
|
||||
//! The position of the curve can be computed when at
|
||||
//! least one surface element has been given, this
|
||||
//! position is "In","Out" or "On" for the part of the
|
||||
//! curve "Before" or "After" the intersection.
|
||||
class TopTrans_SurfaceTransition
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Create an empty Surface Transition.
|
||||
Standard_EXPORT TopTrans_SurfaceTransition();
|
||||
|
||||
//! Initialize a Surface Transition with the local
|
||||
//! description of the intersection curve and of the
|
||||
//! reference surface.
|
||||
//! PREQUESITORY : Norm oriented OUTSIDE "geometric matter"
|
||||
Standard_EXPORT void Reset (const gp_Dir& Tgt, const gp_Dir& Norm, const gp_Dir& MaxD, const gp_Dir& MinD, const Standard_Real MaxCurv, const Standard_Real MinCurv);
|
||||
|
||||
//! Initialize a Surface Transition with the local
|
||||
//! description of a straight line.
|
||||
Standard_EXPORT void Reset (const gp_Dir& Tgt, const gp_Dir& Norm);
|
||||
|
||||
//! Add a face element to the boundary.
|
||||
//!
|
||||
//! - S defines topological orientation for the face :
|
||||
//! S FORWARD means: along the intersection curve on the
|
||||
//! reference surface, transition states while crossing
|
||||
//! the face are OUT,IN.
|
||||
//! S REVERSED means states are IN,OUT.
|
||||
//! S INTERNAL means states are IN,IN.
|
||||
//!
|
||||
//! - O defines curve's position on face :
|
||||
//! O FORWARD means the face is before the intersection
|
||||
//! O REVERSED means the face is AFTER
|
||||
//! O INTERNAL means the curve intersection is in the face.
|
||||
//! PREQUESITORY : Norm oriented OUTSIDE "geometric matter"
|
||||
Standard_EXPORT void Compare (const Standard_Real Tole, const gp_Dir& Norm, const gp_Dir& MaxD, const gp_Dir& MinD, const Standard_Real MaxCurv, const Standard_Real MinCurv, const TopAbs_Orientation S, const TopAbs_Orientation O);
|
||||
|
||||
//! Add a plane or a cylindric face to the boundary.
|
||||
Standard_EXPORT void Compare (const Standard_Real Tole, const gp_Dir& Norm, const TopAbs_Orientation S, const TopAbs_Orientation O);
|
||||
|
||||
//! Returns the state of the reference surface before
|
||||
//! the interference, this is the position relative to
|
||||
//! the surface of a point very close to the intersection
|
||||
//! on the negative side of the tangent.
|
||||
Standard_EXPORT TopAbs_State StateBefore() const;
|
||||
|
||||
//! Returns the state of the reference surface after
|
||||
//! interference, this is the position relative to the
|
||||
//! surface of a point very close to the intersection
|
||||
//! on the positive side of the tangent.
|
||||
Standard_EXPORT TopAbs_State StateAfter() const;
|
||||
|
||||
Standard_EXPORT static TopAbs_State GetBefore (const TopAbs_Orientation Tran);
|
||||
|
||||
Standard_EXPORT static TopAbs_State GetAfter (const TopAbs_Orientation Tran);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_EXPORT void UpdateReference (const Standard_Real Tole, const Standard_Boolean isInfRef, Standard_Real& CosInf, Standard_Real& CosSup, const TopAbs_Orientation Tran, TopAbs_Orientation& TranRef);
|
||||
|
||||
Standard_EXPORT Standard_Real ComputeCos (const Standard_Real Tole, const gp_Dir& Norm, const TopAbs_Orientation O, Standard_Boolean& isleft) const;
|
||||
|
||||
|
||||
gp_Dir myTgt;
|
||||
gp_Dir myNorm;
|
||||
gp_Dir beafter;
|
||||
Standard_Real myCurvRef;
|
||||
TColStd_Array2OfReal myAng;
|
||||
TColStd_Array2OfReal myCurv;
|
||||
TopTrans_Array2OfOrientation myOri;
|
||||
Standard_Boolean myTouchFlag;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _TopTrans_SurfaceTransition_HeaderFile
|
Reference in New Issue
Block a user