1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40: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:
abv
2015-07-12 07:42:38 +03:00
parent 543a996496
commit 42cf5bc1ca
15354 changed files with 623957 additions and 509844 deletions

7
src/LocalAnalysis/FILES Normal file
View File

@@ -0,0 +1,7 @@
LocalAnalysis.cxx
LocalAnalysis.hxx
LocalAnalysis_CurveContinuity.cxx
LocalAnalysis_CurveContinuity.hxx
LocalAnalysis_StatusErrorType.hxx
LocalAnalysis_SurfaceContinuity.cxx
LocalAnalysis_SurfaceContinuity.hxx

View File

@@ -1,87 +0,0 @@
-- Created on: 1996-07-24
-- Created by: Herve LOUESSARD
-- 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.
package LocalAnalysis
---Purpose:
-- This package gives tools to check the local continuity
-- between two points situated on two curves or two surfaces.
uses
Standard,
StdFail,
LProp,
GeomAbs,
Geom,
Geom2d,
GeomLProp,
gp
is
-- enumeration used to describe the status error
enumeration StatusErrorType is NullFirstDerivative, NullSecondDerivative,
TangentNotDefined,NormalNotDefined,
CurvatureNotDefined
end StatusErrorType;
class SurfaceContinuity;
class CurveContinuity;
---Purpose:
-- This class compute
-- s and gives tools to check the local
-- continuity between two points situated on 2 curves)
Dump( surfconti : SurfaceContinuity from LocalAnalysis;
o: in out OStream);
---Purpose:
-- This fonction gives informations about a variable CurveContinuity
Dump( curvconti : CurveContinuity from LocalAnalysis;
o: in out OStream);
---Purpose:
-- This fonction gives informations about a variable SurfaceContinuity
end LocalAnalysis;

View File

@@ -14,14 +14,13 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include<LocalAnalysis.ixx>
#include<LocalAnalysis_SurfaceContinuity.hxx>
#include<LocalAnalysis_CurveContinuity.hxx>
#include <LocalAnalysis.hxx>
#include <LocalAnalysis_CurveContinuity.hxx>
#include <LocalAnalysis_SurfaceContinuity.hxx>
/*********************************************************************************/
/*********************************************************************************/
void LocalAnalysis::Dump(const LocalAnalysis_SurfaceContinuity& surfconti, Standard_OStream& o)
{ if (!surfconti.IsDone())
{ o<<"Problem in the computation "<<endl;

View File

@@ -0,0 +1,78 @@
// Created on: 1996-07-24
// Created by: Herve LOUESSARD
// 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 _LocalAnalysis_HeaderFile
#define _LocalAnalysis_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_OStream.hxx>
class LocalAnalysis_SurfaceContinuity;
class LocalAnalysis_CurveContinuity;
class LocalAnalysis_SurfaceContinuity;
class LocalAnalysis_CurveContinuity;
//! This package gives tools to check the local continuity
//! between two points situated on two curves or two surfaces.
class LocalAnalysis
{
public:
DEFINE_STANDARD_ALLOC
//! This class compute
//! s and gives tools to check the local
//! continuity between two points situated on 2 curves)
//!
//! This fonction gives informations about a variable CurveContinuity
Standard_EXPORT static void Dump (const LocalAnalysis_SurfaceContinuity& surfconti, Standard_OStream& o);
//! This fonction gives informations about a variable SurfaceContinuity
Standard_EXPORT static void Dump (const LocalAnalysis_CurveContinuity& curvconti, Standard_OStream& o);
protected:
private:
friend class LocalAnalysis_SurfaceContinuity;
friend class LocalAnalysis_CurveContinuity;
};
#endif // _LocalAnalysis_HeaderFile

View File

@@ -1,324 +0,0 @@
-- Created on: 1996-08-09
-- Created by: Herve LOUESSARD
-- 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 CurveContinuity from LocalAnalysis
---Purpose:
-- This class gives tools to check local continuity C0
-- C1 C2 G1 G2 between two points situated on two curves
uses
Shape from GeomAbs,
Boolean, Integer, Real from Standard,
Curve from Geom,
CLProps from GeomLProp,
StatusErrorType from LocalAnalysis
raises
NotDone from StdFail
is
Create( Curv1: Curve from Geom; u1: Real from Standard;
Curv2: Curve from Geom; u2: Real from Standard;
Order: Shape from GeomAbs;
EpsNul: Real from Standard= 0.001;
EpsC0 : Real from Standard= 0.001;
EpsC1 : Real from Standard= 0.001;
EpsC2 : Real from Standard= 0.001;
EpsG1 : Real from Standard= 0.001;
EpsG2 : Real from Standard= 0.001;
Percent :Real from Standard= 0.01;
Maxlen: Real from Standard =10000)
---Purpose:
--
-- -u1 is the parameter of the point on Curv1
-- -u2 is the parameter of the point on Curv2
-- -Order is the required continuity:
-- GeomAbs_C0 GeomAbs_C1 GeomAbs_C2
-- GeomAbs_G1 GeomAbs_G2
--
-- -EpsNul is used to detect a a vector with nul
-- magnitude (in mm)
--
-- -EpsC0 is used for C0 continuity to confuse two
-- points (in mm)
--
-- -EpsC1 is an angular tolerance in radians used
-- for C1 continuity to compare the angle between
-- the first derivatives
--
-- -EpsC2 is an angular tolerance in radians used
-- for C2 continuity to compare the angle between
-- the second derivatives
--
-- -EpsG1 is an angular tolerance in radians used
-- for G1 continuity to compare the angle between
-- the tangents
--
-- -EpsG2 is an angular tolerance in radians used
-- for G2 continuity to compare the angle between
-- the normals
--
-- - percent : percentage of curvature variation (unitless)
-- used for G2 continuity
--
-- - Maxlen is the maximum length of Curv1 or Curv2 in
-- meters used to detect nul curvature (in mm)
--
--
--
--
-- the constructor computes the quantities which are
-- necessary to check the continuity in the following cases:
--
-- case C0
-- --------
-- - the distance between P1 and P2 with P1=Curv1 (u1) and
-- P2=Curv2(u2)
--
-- case C1
-- -------
--
-- - the angle between the first derivatives
-- dCurv1(u1) dCurv2(u2)
-- -------- and ---------
-- du du
--
-- - the ratio between the magnitudes of the first
-- derivatives
--
-- the angle value is between 0 and PI/2
--
-- case C2
-- -------
-- - the angle between the second derivatives
-- 2 2
-- d Curv1(u1) d Curv2(u2)
-- ---------- ----------
-- 2 2
-- du du
--
-- the angle value is between 0 and PI/2
--
-- - the ratio between the magnitudes of the second
-- derivatives
--
-- case G1
-- -------
-- the angle between the tangents at each point
--
-- the angle value is between 0 and PI/2
--
-- case G2
-- -------
-- -the angle between the normals at each point
--
-- the angle value is between 0 and PI/2
--
-- - the relative variation of curvature:
-- |curvat1-curvat2|
-- ------------------
-- 1/2
-- (curvat1*curvat2)
--
-- where curvat1 is the curvature at the first point
-- and curvat2 the curvature at the second point
--
returns CurveContinuity from LocalAnalysis;
IsDone(me) returns Boolean from Standard;
-- returns true if there is no problem in the constructor
--
StatusError(me) returns StatusErrorType from LocalAnalysis;
-- returns the error status:
-- NullFirstDerivative : one (or both) first derivative is null
-- NullSecondDerivative: one (or both) second derivative is null
-- TangentNotDefined: one (or both) tangent is undefined
-- NormalNotDefined: one (or both) normal is undefined
ContinuityStatus (me) returns Shape from GeomAbs raises NotDone ;
-- returns the continuity required in the constructor
-- The following functions return the quantities
-- which are necessary to check continuity
C0Value(me) returns Real from Standard raises NotDone ;
-- returns the distance between P1 and P2 with P1=Curv1 (u1) and
-- P2=Curv2(u2)
C1Angle(me) returns Real from Standard raises NotDone ;
-- returns the angle between the first derivatives :
-- dCurv1(u1) dCurv2(u2)
-- -------- and ---------
-- du du
--
-- the angle value is 0 and PI/2
C1Ratio(me) returns Real from Standard raises NotDone ;
-- returns the ratio between the magnitudes of the first
-- derivatives dCurv1(u1) dCurv2(u2)
-- -------- and ---------
-- du du
C2Angle(me) returns Real from Standard raises NotDone ;
-- returns the angle between the second derivatives
-- 2 2
-- d Curv1(u1) d Curv2(u2)
-- ---------- and ----------
-- 2 2
-- du du
--
-- the angle value is between 0 and PI/2
C2Ratio(me) returns Real from Standard raises NotDone;
-- returns the ratio between the magnitudes of the second
-- derivatives 2 2
-- d Curv1(u1) d Curv2(u2)
-- ---------- and ----------
-- 2 2
-- du du
G1Angle(me) returns Real from Standard raises NotDone ;
-- returns the angle between the tangents at each point
-- the angle value is between 0 and PI/2
G2Angle(me) returns Real from Standard raises NotDone ;
-- returns the angle between the normals at each point
-- the angle value is between 0 and PI/2
G2CurvatureVariation(me) returns Real from Standard raises NotDone;
-- returns the relative variation of curvature
-- the following functions check the local continuity and return
-- true if the required continuity is satisfied :
IsC0(me) returns Boolean from Standard
raises NotDone;
-- returns true if the local continuity is C0 that is :
-- C0Value(me) < EpsC0
IsC1(me) returns Boolean from Standard
raises NotDone ;
-- returns true if the local continuity is C1 that is :
-- C0Value(me) < EpsC0
-- C1Angle(me) < EpsC1
IsC2(me) returns Boolean from Standard
raises NotDone;
-- returns true if the local continuity is C2 that is :
-- C0Value(me) < EpsC0 ,
-- C1Angle(me) < EpsC1
-- C2Angle (me) < EpsC2 and
-- C2Ratio is the square of C1Ratio up to a tolerance
IsG1(me) returns Boolean from Standard
raises NotDone;
-- returns true is the local continuity is G1 that is
-- C0Value(me) < EpsC0 and
-- G1Angle(me)< EpsG1
IsG2(me) returns Boolean from Standard
raises NotDone;
-- returns true if the local continuity is G2 that is
-- C0Value(me) < EpsC0,
-- G1Angle(me) < EpsG1
-- G2Angle(me) < EpsG2
-- G2CurvatureVariation < percent
-- The following function are private and used in the constructor
--
CurvC0(me:in out; Curv1, Curv2 : out CLProps from GeomLProp)is private;
CurvC1(me:in out; Curv1, Curv2 : out CLProps from GeomLProp ) is private;
CurvC2(me :in out ; Curv1, Curv2 : out CLProps from GeomLProp)is private;
CurvG1(me:in out; Curv1, Curv2 :out CLProps from GeomLProp ) is private ;
CurvG2(me:in out; Curv1, Curv2 :out CLProps from GeomLProp)is private ;
fields
myContC0 : Real from Standard;
myContC1 : Real from Standard;
myContC2 : Real from Standard;
myContG1 : Real from Standard;
myContG2 : Real from Standard;
myCourbC1 : Real from Standard;
myCourbC2 : Real from Standard;
myG2Variation : Real from Standard;
myLambda1 : Real from Standard;
myLambda2 : Real from Standard;
myTypeCont : Shape from GeomAbs;
myepsnul : Real from Standard;
myepsC0 : Real from Standard;
myepsC1 : Real from Standard;
myepsC2 : Real from Standard;
myepsG1 : Real from Standard;
myepsG2 : Real from Standard;
myMaxLon : Real from Standard;
myperce : Real from Standard;
myIsDone : Boolean from Standard;
myErrorStatus : StatusErrorType from LocalAnalysis ;
end CurveContinuity;

View File

@@ -12,16 +12,17 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <LocalAnalysis_CurveContinuity.ixx>
#include <LocalAnalysis_StatusErrorType.hxx>
#include <Geom_Curve.hxx>
#include <GeomLProp_CLProps.hxx>
#include <gp.hxx>
#include <gp_Dir.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <gp_Dir.hxx>
#include <LocalAnalysis_CurveContinuity.hxx>
#include <LocalAnalysis_StatusErrorType.hxx>
#include <StdFail_NotDone.hxx>
/***********************************************************************/
void LocalAnalysis_CurveContinuity::CurvC0( GeomLProp_CLProps& Curv1,
GeomLProp_CLProps& Curv2)

View File

@@ -0,0 +1,221 @@
// Created on: 1996-08-09
// Created by: Herve LOUESSARD
// 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 _LocalAnalysis_CurveContinuity_HeaderFile
#define _LocalAnalysis_CurveContinuity_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Real.hxx>
#include <GeomAbs_Shape.hxx>
#include <Standard_Boolean.hxx>
#include <LocalAnalysis_StatusErrorType.hxx>
class StdFail_NotDone;
class Geom_Curve;
class GeomLProp_CLProps;
//! This class gives tools to check local continuity C0
//! C1 C2 G1 G2 between two points situated on two curves
class LocalAnalysis_CurveContinuity
{
public:
DEFINE_STANDARD_ALLOC
//! -u1 is the parameter of the point on Curv1
//! -u2 is the parameter of the point on Curv2
//! -Order is the required continuity:
//! GeomAbs_C0 GeomAbs_C1 GeomAbs_C2
//! GeomAbs_G1 GeomAbs_G2
//!
//! -EpsNul is used to detect a a vector with nul
//! magnitude (in mm)
//!
//! -EpsC0 is used for C0 continuity to confuse two
//! points (in mm)
//!
//! -EpsC1 is an angular tolerance in radians used
//! for C1 continuity to compare the angle between
//! the first derivatives
//!
//! -EpsC2 is an angular tolerance in radians used
//! for C2 continuity to compare the angle between
//! the second derivatives
//!
//! -EpsG1 is an angular tolerance in radians used
//! for G1 continuity to compare the angle between
//! the tangents
//!
//! -EpsG2 is an angular tolerance in radians used
//! for G2 continuity to compare the angle between
//! the normals
//!
//! - percent : percentage of curvature variation (unitless)
//! used for G2 continuity
//!
//! - Maxlen is the maximum length of Curv1 or Curv2 in
//! meters used to detect nul curvature (in mm)
//!
//! the constructor computes the quantities which are
//! necessary to check the continuity in the following cases:
//!
//! case C0
//! --------
//! - the distance between P1 and P2 with P1=Curv1 (u1) and
//! P2=Curv2(u2)
//!
//! case C1
//! -------
//!
//! - the angle between the first derivatives
//! dCurv1(u1) dCurv2(u2)
//! -------- and ---------
//! du du
//!
//! - the ratio between the magnitudes of the first
//! derivatives
//!
//! the angle value is between 0 and PI/2
//!
//! case C2
//! -------
//! - the angle between the second derivatives
//! 2 2
//! d Curv1(u1) d Curv2(u2)
//! ---------- ----------
//! 2 2
//! du du
//!
//! the angle value is between 0 and PI/2
//!
//! - the ratio between the magnitudes of the second
//! derivatives
//!
//! case G1
//! -------
//! the angle between the tangents at each point
//!
//! the angle value is between 0 and PI/2
//!
//! case G2
//! -------
//! -the angle between the normals at each point
//!
//! the angle value is between 0 and PI/2
//!
//! - the relative variation of curvature:
//! |curvat1-curvat2|
//! ------------------
//! 1/2
//! (curvat1*curvat2)
//!
//! where curvat1 is the curvature at the first point
//! and curvat2 the curvature at the second point
Standard_EXPORT LocalAnalysis_CurveContinuity(const Handle(Geom_Curve)& Curv1, const Standard_Real u1, const Handle(Geom_Curve)& Curv2, const Standard_Real u2, const GeomAbs_Shape Order, const Standard_Real EpsNul = 0.001, const Standard_Real EpsC0 = 0.001, const Standard_Real EpsC1 = 0.001, const Standard_Real EpsC2 = 0.001, const Standard_Real EpsG1 = 0.001, const Standard_Real EpsG2 = 0.001, const Standard_Real Percent = 0.01, const Standard_Real Maxlen = 10000);
Standard_EXPORT Standard_Boolean IsDone() const;
Standard_EXPORT LocalAnalysis_StatusErrorType StatusError() const;
Standard_EXPORT GeomAbs_Shape ContinuityStatus() const;
Standard_EXPORT Standard_Real C0Value() const;
Standard_EXPORT Standard_Real C1Angle() const;
Standard_EXPORT Standard_Real C1Ratio() const;
Standard_EXPORT Standard_Real C2Angle() const;
Standard_EXPORT Standard_Real C2Ratio() const;
Standard_EXPORT Standard_Real G1Angle() const;
Standard_EXPORT Standard_Real G2Angle() const;
Standard_EXPORT Standard_Real G2CurvatureVariation() const;
Standard_EXPORT Standard_Boolean IsC0() const;
Standard_EXPORT Standard_Boolean IsC1() const;
Standard_EXPORT Standard_Boolean IsC2() const;
Standard_EXPORT Standard_Boolean IsG1() const;
Standard_EXPORT Standard_Boolean IsG2() const;
protected:
private:
Standard_EXPORT void CurvC0 (GeomLProp_CLProps& Curv1, GeomLProp_CLProps& Curv2);
Standard_EXPORT void CurvC1 (GeomLProp_CLProps& Curv1, GeomLProp_CLProps& Curv2);
Standard_EXPORT void CurvC2 (GeomLProp_CLProps& Curv1, GeomLProp_CLProps& Curv2);
Standard_EXPORT void CurvG1 (GeomLProp_CLProps& Curv1, GeomLProp_CLProps& Curv2);
Standard_EXPORT void CurvG2 (GeomLProp_CLProps& Curv1, GeomLProp_CLProps& Curv2);
Standard_Real myContC0;
Standard_Real myContC1;
Standard_Real myContC2;
Standard_Real myContG1;
Standard_Real myContG2;
Standard_Real myCourbC1;
Standard_Real myCourbC2;
Standard_Real myG2Variation;
Standard_Real myLambda1;
Standard_Real myLambda2;
GeomAbs_Shape myTypeCont;
Standard_Real myepsnul;
Standard_Real myepsC0;
Standard_Real myepsC1;
Standard_Real myepsC2;
Standard_Real myepsG1;
Standard_Real myepsG2;
Standard_Real myMaxLon;
Standard_Real myperce;
Standard_Boolean myIsDone;
LocalAnalysis_StatusErrorType myErrorStatus;
};
#endif // _LocalAnalysis_CurveContinuity_HeaderFile

View File

@@ -0,0 +1,30 @@
// Created on: 1996-07-24
// Created by: Herve LOUESSARD
// 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 _LocalAnalysis_StatusErrorType_HeaderFile
#define _LocalAnalysis_StatusErrorType_HeaderFile
enum LocalAnalysis_StatusErrorType
{
LocalAnalysis_NullFirstDerivative,
LocalAnalysis_NullSecondDerivative,
LocalAnalysis_TangentNotDefined,
LocalAnalysis_NormalNotDefined,
LocalAnalysis_CurvatureNotDefined
};
#endif // _LocalAnalysis_StatusErrorType_HeaderFile

View File

@@ -1,375 +0,0 @@
-- Created on: 1996-08-09
-- Created by: Herve LOUESSARD
-- 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.
--modified by Jerome LEMONIER
--Wed Aug 13 10:46
--New constructor and new method ComputeAnalysis
class SurfaceContinuity from LocalAnalysis
---Purpose:
-- This class gives tools to check local continuity C0
-- C1 C2 G1 G2 between two points situated on two surfaces
uses
Shape from GeomAbs,
Boolean, Integer, Real from Standard,
Surface from Geom,
SLProps from GeomLProp,
Curve from Geom,
Curve from Geom2d,
StatusErrorType from LocalAnalysis
raises
NotDone from StdFail
is
Create( Surf1: Surface from Geom; u1, v1: Real from Standard;
Surf2: Surface from Geom; u2, v2: Real from Standard;
Order: Shape from GeomAbs;
EpsNul: Real from Standard= 0.001;
EpsC0 : Real from Standard= 0.001;
EpsC1 : Real from Standard= 0.001;
EpsC2 : Real from Standard= 0.001;
EpsG1 : Real from Standard= 0.001;
Percent :Real from Standard= 0.01;
Maxlen: Real from Standard =10000)
---Purpose:
-- -u1,v1 are the parameters of the point on Surf1
-- -u2,v2 are the parameters of the point on Surf2
-- -Order is the required continuity:
-- GeomAbs_C0 GeomAbs_C1 GeomAbs_C2
-- GeomAbs_G1 GeomAbs_G2
--
-- -EpsNul is used to detect a a vector with nul
-- magnitude
--
-- -EpsC0 is used for C0 continuity to confuse two
-- points (in mm)
--
-- -EpsC1 is an angular tolerance in radians used
-- for C1 continuity to compare the angle between
-- the first derivatives
--
-- -EpsC2 is an angular tolerance in radians used
-- for C2 continuity to compare the angle between
-- the second derivatives
--
-- -EpsG1 is an angular tolerance in radians used
-- for G1 continuity to compare the angle between
-- the normals
--
--
-- -Percent : percentage of curvature variation (unitless)
-- used for G2 continuity
--
-- - Maxlen is the maximum length of Surf1 or Surf2 in
-- meters used to detect null curvature (in mm)
--
--
--
-- the constructor computes the quantities which are
-- necessary to check the continuity in the following cases:
--
-- case C0
-- --------
-- - the distance between P1 and P2 with P1=Surf (u1,v1) and
-- P2=Surfv2(u2,v2)
--
--
-- case C1
-- -------
--
-- - the angle between the first derivatives in u :
--
-- dSurf1(u1,v1) dSurf2(u2,v2)
-- ----------- and ---------
-- du du
--
-- the angle value is between 0 and PI/2
--
-- - the angle between the first derivatives in v :
--
-- dSurf1(u1,v1) dSurf2(u2,v2)
-- -------- and ---------
-- dv dv
--
-- - the ratio between the magnitudes of the first derivatives in u
-- - the ratio between the magnitudes of the first derivatives in v
--
-- the angle value is between 0 and pi/2
--
-- case C2
-- -------
-- - the angle between the second derivatives in u
-- 2 2
-- d Surf1(u1,v1) d Surf2(u2,v2)
-- ---------- ----------
-- 2 2
-- d u d u
--
-- - the ratio between the magnitudes of the second derivatives in u
-- - the ratio between the magnitudes of the second derivatives in v
--
-- the angle value is between 0 and PI/2
--
-- case G1
-- -------
-- -the angle between the normals at each point
-- the angle value is between 0 and PI/2
--
-- case G2
-- -------
-- - the maximum normal curvature gap between the two
-- points
--
returns SurfaceContinuity from LocalAnalysis;
Create( curv1: Curve from Geom2d; curv2 : Curve from Geom2d;
U: Real from Standard;Surf1: Surface from Geom ;
Surf2: Surface from Geom;
Order: Shape from GeomAbs;
EpsNul: Real from Standard= 0.001;
EpsC0 : Real from Standard= 0.001;
EpsC1 : Real from Standard= 0.001;
EpsC2 : Real from Standard= 0.001;
EpsG1 : Real from Standard= 0.001;
Percent :Real from Standard= 0.01;
Maxlen: Real from Standard =10000)
-- - the first point is located by surf1(curv1(U))
-- - the second point is located by surf2(curv2(U))
--
-- - Order is the required continuity:
-- GeomAbs_C0 GeomAbs_C1 GeomAbs_C2
-- GeomAbs_G1 GeomAbs_G2
--
-- (see the above constructor for the tolerances)
returns SurfaceContinuity from LocalAnalysis;
Create( EpsNul: Real from Standard= 0.001;
EpsC0 : Real from Standard= 0.001;
EpsC1 : Real from Standard= 0.001;
EpsC2 : Real from Standard= 0.001;
EpsG1 : Real from Standard= 0.001;
Percent :Real from Standard= 0.01;
Maxlen: Real from Standard =10000)
returns SurfaceContinuity from LocalAnalysis;
---Purpose:
-- This constructor is used when we want to compute many analysis.
-- After we use the method ComputeAnalysis
ComputeAnalysis( me:in out; Surf1, Surf2: in out SLProps from GeomLProp;
Order: Shape from GeomAbs);
-- This method computes the analysis for two SLProps which contains
-- the properties of the two surfaces and the two points
-- Order is the required continuity:
-- GeomAbs_C0 GeomAbs_C1 GeomAbs_C2
-- GeomAbs_G1 GeomAbs_G2
IsDone(me) returns Boolean from Standard;
-- returns true if there is no problem in the constructor
ContinuityStatus(me) returns Shape from GeomAbs raises NotDone ;
-- returns the continuity required in the constructor
StatusError(me) returns StatusErrorType from LocalAnalysis;
-- returns the status of error :
-- NullFirstDerivative : one of the first derivatives is null
-- NullSecondDerivative: one of the second derivatives is null
-- NormalNotDefined: one (or both) normal is undefined
-- CurvatureNotDefined: one of the mean curvatures is undefined
-- The following functions return the quantities
-- which are necessary to check continuity
C0Value(me) returns Real from Standard raises NotDone ;
-- returns the distance between P1 and P2 with P1=Surf (u1,v1) and
-- P2=Surfv2(u2,v2)
C1UAngle(me) returns Real from Standard raises NotDone ;
-- returns the angle between the first derivatives in u :
--
-- dSurf1(u1,v1) dSurf2(u2,v2)
-- -------- and ---------
-- du du
--
-- the angle value is between 0 and PI/2
C1URatio (me) returns Real from Standard raises NotDone ;
-- returns the ratio between the magnitudes of the first
-- derivatives in u
--
--
C1VAngle(me) returns Real from Standard raises NotDone ;
-- returns the angle between the first derivatives in v:
--
-- dSurf1(u1,v1) dSurf2(u2,v2)
-- -------- and ---------
-- dv dv
--
-- the angle value is between 0 and PI/2
C1VRatio(me) returns Real from Standard raises NotDone ;
-- returns the ratio between the magnitudes of the first
-- derivatives in v
C2UAngle(me) returns Real from Standard raises NotDone ;
-- returns the angle between the second derivatives in u
-- 2 2
-- d Surf1(u1,v1) d Surf2(u2,v2)
-- ---------- and ----------
-- 2 2
-- du du
C2URatio(me) returns Real from Standard raises NotDone ;
-- returns the ratio between the magnitudes of the second
-- derivatives in u
C2VAngle(me) returns Real from Standard raises NotDone ;
-- returns the angle between the second derivatives in v
-- 2 2
-- d Surf1(u1,v1) d Surf2(u2,v2)
-- ---------- and ----------
-- 2 2
-- dv dv
--
-- the angle value is between 0 and PI/2
--
C2VRatio(me) returns Real from Standard raises NotDone ;
-- returns the ratio between the magnitudes of the first
-- derivatives in v
G1Angle(me) returns Real from Standard raises NotDone ;
--returns the angle between the normals at the two points
--
-- the angle value is between 0 and PI/2
G2CurvatureGap (me) returns Real from Standard raises NotDone ;
-- returns the maximum normal curvature gap
-- the following functions check the local continuity and return
-- true if the required continuity is satisfied :
IsC0(me) returns Boolean from Standard
raises NotDone ;
-- returns true if the local continuity is C0 that is :
-- ContC0(me) < EpsC0
IsC1(me) returns Boolean from Standard
raises NotDone ;
-- returns true if the local continuity is C1 that is :
-- C0Value (me) < EpsC0 ,
-- C1UAngle (me) < EpsC1
-- C1VAngle (me) < EpsC1
IsC2(me) returns Boolean from Standard
raises NotDone ;
-- returns true if the local continuity is C2 that is :
-- C0Value (me) < EpsC0,
-- C1UAngle(me) < EpsC1
-- C1VAngle(me) < EpsC1
-- C2UAngle(me) < EpsC2
-- C2VAngle(me) < EpsC2
-- C2URatio(me) is the square of C1URatio up to a tolerance
-- C2VRatio(me) is the square of C1VRatio up to a tolerance
--
IsG1(me) returns Boolean from Standard
raises NotDone ;
-- returns true is the local continuity is G1 that is
-- C0Value(me) < EpsC0
-- G1Angle(me) < EpsG1
--
IsG2(me) returns Boolean from Standard
raises NotDone ;
-- returns true is the local continuity is G2
-- The following function are private and used in the constructor
SurfC0(me:in out; Surf1, Surf2: SLProps from GeomLProp) is private ;
SurfC1(me:in out; Surf1, Surf2:in out SLProps from GeomLProp)is private ;
SurfC2(me:in out; Surf1, Surf2:in out SLProps from GeomLProp)is private;
SurfG1(me:in out; Surf1, Surf2:in out SLProps from GeomLProp) is private;
SurfG2(me:in out; Surf1, Surf2:in out SLProps from GeomLProp) is private;
fields
myContC0 : Real from Standard;
myContC1U : Real from Standard;
myContC1V : Real from Standard;
myContC2U : Real from Standard;
myContC2V : Real from Standard;
myContG1 : Real from Standard;
myLambda1U : Real from Standard;
myLambda2U : Real from Standard;
myLambda1V : Real from Standard;
myLambda2V : Real from Standard;
myETA1 : Real from Standard;
myETA2 : Real from Standard;
myETA : Real from Standard;
myZETA1 : Real from Standard;
myZETA2 : Real from Standard;
myZETA : Real from Standard;
myAlpha : Real from Standard;
myTypeCont : Shape from GeomAbs;
myepsC0 : Real from Standard;
myepsnul : Real from Standard;
myepsC1 : Real from Standard;
myepsC2 : Real from Standard;
myepsG1 : Real from Standard;
myperce : Real from Standard;
mymaxlen : Real from Standard;
myGap : Real from Standard;
myIsDone : Boolean from Standard;
myErrorStatus : StatusErrorType from LocalAnalysis;
end SurfaceContinuity;

View File

@@ -14,20 +14,20 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <LocalAnalysis_SurfaceContinuity.ixx>
#include <Geom2d_Curve.hxx>
#include <Geom_Surface.hxx>
#include <GeomLProp_SLProps.hxx>
#include <gp.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <gp_Dir.hxx>
#include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx>
#include <Geom_Surface.hxx>
#include <Geom2d_Curve.hxx>
#include <gp_Vec.hxx>
#include <LocalAnalysis_SurfaceContinuity.hxx>
#include <StdFail_NotDone.hxx>
/*********************************************************************************/
/*********************************************************************************/
void LocalAnalysis_SurfaceContinuity::SurfC0 (const GeomLProp_SLProps& Surf1,
const GeomLProp_SLProps& Surf2
)

View File

@@ -0,0 +1,238 @@
// Created on: 1996-08-09
// Created by: Herve LOUESSARD
// 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 _LocalAnalysis_SurfaceContinuity_HeaderFile
#define _LocalAnalysis_SurfaceContinuity_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Real.hxx>
#include <GeomAbs_Shape.hxx>
#include <Standard_Boolean.hxx>
#include <LocalAnalysis_StatusErrorType.hxx>
class StdFail_NotDone;
class Geom_Surface;
class Geom2d_Curve;
class GeomLProp_SLProps;
//! This class gives tools to check local continuity C0
//! C1 C2 G1 G2 between two points situated on two surfaces
class LocalAnalysis_SurfaceContinuity
{
public:
DEFINE_STANDARD_ALLOC
//! -u1,v1 are the parameters of the point on Surf1
//! -u2,v2 are the parameters of the point on Surf2
//! -Order is the required continuity:
//! GeomAbs_C0 GeomAbs_C1 GeomAbs_C2
//! GeomAbs_G1 GeomAbs_G2
//!
//! -EpsNul is used to detect a a vector with nul
//! magnitude
//!
//! -EpsC0 is used for C0 continuity to confuse two
//! points (in mm)
//!
//! -EpsC1 is an angular tolerance in radians used
//! for C1 continuity to compare the angle between
//! the first derivatives
//!
//! -EpsC2 is an angular tolerance in radians used
//! for C2 continuity to compare the angle between
//! the second derivatives
//!
//! -EpsG1 is an angular tolerance in radians used
//! for G1 continuity to compare the angle between
//! the normals
//!
//! -Percent : percentage of curvature variation (unitless)
//! used for G2 continuity
//!
//! - Maxlen is the maximum length of Surf1 or Surf2 in
//! meters used to detect null curvature (in mm)
//!
//! the constructor computes the quantities which are
//! necessary to check the continuity in the following cases:
//!
//! case C0
//! --------
//! - the distance between P1 and P2 with P1=Surf (u1,v1) and
//! P2=Surfv2(u2,v2)
//!
//! case C1
//! -------
//!
//! - the angle between the first derivatives in u :
//!
//! dSurf1(u1,v1) dSurf2(u2,v2)
//! ----------- and ---------
//! du du
//!
//! the angle value is between 0 and PI/2
//!
//! - the angle between the first derivatives in v :
//!
//! dSurf1(u1,v1) dSurf2(u2,v2)
//! -------- and ---------
//! dv dv
//!
//! - the ratio between the magnitudes of the first derivatives in u
//! - the ratio between the magnitudes of the first derivatives in v
//!
//! the angle value is between 0 and pi/2
//!
//! case C2
//! -------
//! - the angle between the second derivatives in u
//! 2 2
//! d Surf1(u1,v1) d Surf2(u2,v2)
//! ---------- ----------
//! 2 2
//! d u d u
//!
//! - the ratio between the magnitudes of the second derivatives in u
//! - the ratio between the magnitudes of the second derivatives in v
//!
//! the angle value is between 0 and PI/2
//!
//! case G1
//! -------
//! -the angle between the normals at each point
//! the angle value is between 0 and PI/2
//!
//! case G2
//! -------
//! - the maximum normal curvature gap between the two
//! points
Standard_EXPORT LocalAnalysis_SurfaceContinuity(const Handle(Geom_Surface)& Surf1, const Standard_Real u1, const Standard_Real v1, const Handle(Geom_Surface)& Surf2, const Standard_Real u2, const Standard_Real v2, const GeomAbs_Shape Order, const Standard_Real EpsNul = 0.001, const Standard_Real EpsC0 = 0.001, const Standard_Real EpsC1 = 0.001, const Standard_Real EpsC2 = 0.001, const Standard_Real EpsG1 = 0.001, const Standard_Real Percent = 0.01, const Standard_Real Maxlen = 10000);
Standard_EXPORT LocalAnalysis_SurfaceContinuity(const Handle(Geom2d_Curve)& curv1, const Handle(Geom2d_Curve)& curv2, const Standard_Real U, const Handle(Geom_Surface)& Surf1, const Handle(Geom_Surface)& Surf2, const GeomAbs_Shape Order, const Standard_Real EpsNul = 0.001, const Standard_Real EpsC0 = 0.001, const Standard_Real EpsC1 = 0.001, const Standard_Real EpsC2 = 0.001, const Standard_Real EpsG1 = 0.001, const Standard_Real Percent = 0.01, const Standard_Real Maxlen = 10000);
//! This constructor is used when we want to compute many analysis.
//! After we use the method ComputeAnalysis
Standard_EXPORT LocalAnalysis_SurfaceContinuity(const Standard_Real EpsNul = 0.001, const Standard_Real EpsC0 = 0.001, const Standard_Real EpsC1 = 0.001, const Standard_Real EpsC2 = 0.001, const Standard_Real EpsG1 = 0.001, const Standard_Real Percent = 0.01, const Standard_Real Maxlen = 10000);
Standard_EXPORT void ComputeAnalysis (GeomLProp_SLProps& Surf1, GeomLProp_SLProps& Surf2, const GeomAbs_Shape Order);
Standard_EXPORT Standard_Boolean IsDone() const;
Standard_EXPORT GeomAbs_Shape ContinuityStatus() const;
Standard_EXPORT LocalAnalysis_StatusErrorType StatusError() const;
Standard_EXPORT Standard_Real C0Value() const;
Standard_EXPORT Standard_Real C1UAngle() const;
Standard_EXPORT Standard_Real C1URatio() const;
Standard_EXPORT Standard_Real C1VAngle() const;
Standard_EXPORT Standard_Real C1VRatio() const;
Standard_EXPORT Standard_Real C2UAngle() const;
Standard_EXPORT Standard_Real C2URatio() const;
Standard_EXPORT Standard_Real C2VAngle() const;
Standard_EXPORT Standard_Real C2VRatio() const;
Standard_EXPORT Standard_Real G1Angle() const;
Standard_EXPORT Standard_Real G2CurvatureGap() const;
Standard_EXPORT Standard_Boolean IsC0() const;
Standard_EXPORT Standard_Boolean IsC1() const;
Standard_EXPORT Standard_Boolean IsC2() const;
Standard_EXPORT Standard_Boolean IsG1() const;
Standard_EXPORT Standard_Boolean IsG2() const;
protected:
private:
Standard_EXPORT void SurfC0 (const GeomLProp_SLProps& Surf1, const GeomLProp_SLProps& Surf2);
Standard_EXPORT void SurfC1 (GeomLProp_SLProps& Surf1, GeomLProp_SLProps& Surf2);
Standard_EXPORT void SurfC2 (GeomLProp_SLProps& Surf1, GeomLProp_SLProps& Surf2);
Standard_EXPORT void SurfG1 (GeomLProp_SLProps& Surf1, GeomLProp_SLProps& Surf2);
Standard_EXPORT void SurfG2 (GeomLProp_SLProps& Surf1, GeomLProp_SLProps& Surf2);
Standard_Real myContC0;
Standard_Real myContC1U;
Standard_Real myContC1V;
Standard_Real myContC2U;
Standard_Real myContC2V;
Standard_Real myContG1;
Standard_Real myLambda1U;
Standard_Real myLambda2U;
Standard_Real myLambda1V;
Standard_Real myLambda2V;
Standard_Real myETA1;
Standard_Real myETA2;
Standard_Real myETA;
Standard_Real myZETA1;
Standard_Real myZETA2;
Standard_Real myZETA;
Standard_Real myAlpha;
GeomAbs_Shape myTypeCont;
Standard_Real myepsC0;
Standard_Real myepsnul;
Standard_Real myepsC1;
Standard_Real myepsC2;
Standard_Real myepsG1;
Standard_Real myperce;
Standard_Real mymaxlen;
Standard_Real myGap;
Standard_Boolean myIsDone;
LocalAnalysis_StatusErrorType myErrorStatus;
};
#endif // _LocalAnalysis_SurfaceContinuity_HeaderFile