1
0
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:
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,187 +0,0 @@
-- Created on: 1996-03-05
-- Created by: Joelle CHAUVET
-- 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: Wed Jan 15 09:45:42 1997
-- by: Joelle CHAUVET
-- G1135 : Approximation with criterion
-- class Criterion and enumeration CriterionType
-- G1134 : Approximation with regular cuttings
-- enumeration CriterionRepartition
package AdvApp2Var
---Purpose: This package provides algorithms to approximate a
-- function of 2 variables that can be multidimensional;
-- the result is a BSpline function with the required continuity
-- Warning: only one 3D BSpline for the moment
--
uses
gp,
Geom,
GeomAbs,
TColStd,
TColgp,
TColGeom,
AdvApprox,
Standard
is
enumeration CriterionType is
---Purpose: influency of the criterion on cutting process
Absolute,
---Purpose: cutting when criterion is not satisfied
-- desactivation of the compute of the error max
Relative
---Purpose: cutting when error max is not good or if error
-- max is good and criterion is not satisfied
end CriterionType;
enumeration CriterionRepartition is
---Purpose: way of cutting process
Regular,
---Purpose: all new cutting points at each step of cutting
-- process : (a+i(b-a)/N)i at step N,
-- (a+i(b-a)/(N+1))i at step N+1,...
-- where (a,b) is the global interval
Incremental
---Purpose: add one new cutting point at each step
-- of cutting process
end CriterionRepartition;
--
--
-- public classes
--
--
class ApproxAFunc2Var from AdvApp2Var ;
imported EvaluatorFunc2Var ;
deferred class Criterion from AdvApp2Var ;
--
--
-- private classes for Data
--
--
-- Basic Data
class Context from AdvApp2Var;
class Node from AdvApp2Var;
class Iso from AdvApp2Var;
class Patch from AdvApp2Var;
imported Strip;
---Purpose :
-- set of constraints along a same type of Iso on the same level
--
--
-- Structured Data
imported SequenceOfNode;
imported SequenceOfPatch;
imported SequenceOfStrip;
--
--
-- Final Data
class Network from AdvApp2Var;
-- contains all the result patches and the associated parameters U and V
--
class Framework from AdvApp2Var;
-- contains all the constraints (Nodes and Isos)
--
end AdvApp2Var;

View File

@@ -1,426 +0,0 @@
-- Created on: 1996-02-14
-- Created by: Joelle CHAUVET
-- 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: Wed Jan 15 09:45:42 1997
-- by: Joelle CHAUVET
-- G1135 : Constructor with criterion
-- G1135 : Private methods 'Init','InitGrid','Perform','ConvertBS',
-- 'ComputePatches','ComputeConstraints',
-- Compute3DErrors','ComputeCritError'
-- G1135 : Fields 'myConditions','myResults','myConstraints',
-- G1134 : Option 0 for myPrecisionCode
class ApproxAFunc2Var from AdvApp2Var
---Purpose: Perform the approximation of <Func> F(U,V)
-- Arguments are :
-- Num1DSS, Num2DSS, Num3DSS :The numbers of 1,2,3 dimensional subspaces
-- OneDTol, TwoDTol, ThreeDTol: The tolerance of approximation in each
-- subspaces
-- OneDTolFr, TwoDTolFr, ThreeDTolFr: The tolerance of approximation on
-- the boundarys in each subspaces
-- [FirstInU, LastInU]: The Bounds in U of the Approximation
-- [FirstInV, LastInV]: The Bounds in V of the Approximation
-- FavorIso : Give preference to extract u-iso or v-iso on F(U,V)
-- This can be usefull to optimize the <Func> methode
-- ContInU, ContInV : Continuity waiting in u and v
-- PrecisCode : Precision on approximation's error mesurement
-- 1 : Fast computation and average precision
-- 2 : Average computation and good precision
-- 3 : Slow computation and very good precision
-- MaxDegInU : Maximum u-degree waiting in U
-- MaxDegInV : Maximum u-degree waiting in V
-- Warning:
-- MaxDegInU (resp. MaxDegInV) must be >= 2*iu (resp. iv) + 1,
-- where iu (resp. iv) = 0 if ContInU (resp. ContInV) = GeomAbs_C0,
-- = 1 if = GeomAbs_C1,
-- = 2 if = GeomAbs_C2.
-- MaxPatch : Maximun number of Patch waiting
-- number of Patch is number of u span * number of v span
-- Func : The external method to evaluate F(U,V)
-- Crit : To (re)defined condition of convergence
-- UChoice, VChoice : To define the way in U (or V) Knot insertion
-- Warning:
-- for the moment, the result is a 3D Surface
-- so Num1DSS and Num2DSS must be equals to 0
-- and Num3DSS must be equal to 1.
-- Warning:
-- the Function of type EvaluatorFunc2Var from Approx
-- must be a subclass of AdvApp2Var_EvaluatorFunc2Var
--
-- the result should be formatted in the following way :
-- <--Num1DSS--> <--2 * Num2DSS--> <--3 * Num3DSS-->
-- R[0,0] .... R[Num1DSS,0]..... R[Dimension-1,0] for the 1st parameter
-- R[0,i] .... R[Num1DSS,i]..... R[Dimension-1,i] for the ith parameter
-- R[0,N-1] .... R[Num1DSS,N-1].... R[Dimension-1,N-1] for the Nth parameter
--
-- the order in which each Subspace appears should be consistent
-- with the tolerances given in the create function and the
-- results will be given in that order as well that is :
-- Surface(n) will correspond to the nth entry described by Num3DSS
uses Array1OfInteger from TColStd,
HArray1OfInteger from TColStd,
Array1OfReal from TColStd,
Array1OfPnt2d from TColgp,
Array1OfPnt from TColgp,
HArray1OfReal from TColStd,
HArray1OfPnt2d from TColgp,
HArray1OfPnt from TColgp,
HArray2OfInteger from TColStd,
HArray2OfReal from TColStd,
HArray2OfPnt2d from TColgp,
HArray2OfPnt from TColgp,
HArray1OfSurface from TColGeom,
BSplineSurface from Geom,
Pnt from gp,
Pnt2d from gp,
Shape from GeomAbs,
IsoType from GeomAbs,
EvaluatorFunc2Var from AdvApp2Var,
Criterion from AdvApp2Var,
Context from AdvApp2Var,
Network from AdvApp2Var,
Framework from AdvApp2Var,
Cutting from AdvApprox
raises
OutOfRange from Standard,
ConstructionError from Standard
is
Create(Num1DSS : Integer ;
Num2DSS : Integer ;
Num3DSS : Integer ;
OneDTol : HArray1OfReal from TColStd ;
TwoDTol : HArray1OfReal from TColStd ;
ThreeDTol : HArray1OfReal from TColStd ;
OneDTolFr : HArray2OfReal from TColStd ;
TwoDTolFr : HArray2OfReal from TColStd ;
ThreeDTolFr: HArray2OfReal from TColStd ;
FirstInU : Real ;
LastInU : Real ;
FirstInV : Real ;
LastInV : Real ;
FavorIso : IsoType from GeomAbs ;
ContInU : Shape from GeomAbs ;
ContInV : Shape from GeomAbs ;
PrecisCode : Integer ;
MaxDegInU : Integer ;
MaxDegInV : Integer ;
MaxPatch : Integer ;
Func : EvaluatorFunc2Var from AdvApp2Var;
UChoice : in out Cutting from AdvApprox;
VChoice : in out Cutting from AdvApprox)
returns ApproxAFunc2Var from AdvApp2Var
raises ConstructionError;
Create(Num1DSS : Integer ;
Num2DSS : Integer ;
Num3DSS : Integer ;
OneDTol : HArray1OfReal from TColStd ;
TwoDTol : HArray1OfReal from TColStd ;
ThreeDTol : HArray1OfReal from TColStd ;
OneDTolFr : HArray2OfReal from TColStd ;
TwoDTolFr : HArray2OfReal from TColStd ;
ThreeDTolFr: HArray2OfReal from TColStd ;
FirstInU : Real ;
LastInU : Real ;
FirstInV : Real ;
LastInV : Real ;
FavorIso : IsoType from GeomAbs ;
ContInU : Shape from GeomAbs ;
ContInV : Shape from GeomAbs ;
PrecisCode : Integer ;
MaxDegInU : Integer ;
MaxDegInV : Integer ;
MaxPatch : Integer ;
Func : EvaluatorFunc2Var from AdvApp2Var;
Crit : Criterion from AdvApp2Var;
UChoice : in out Cutting from AdvApprox;
VChoice : in out Cutting from AdvApprox)
returns ApproxAFunc2Var from AdvApp2Var
raises ConstructionError;
Init(me : in out)
is private;
---Purpose: Initialisation of the approximation ; used by Create
InitGrid(me : in out; NbInt : Integer)
is private;
---Purpose: Initialisation of the approximation with a grid of regular cuttings ;
-- used by Init and Perform
Perform(me : in out; UChoice, VChoice : Cutting from AdvApprox;
Func : EvaluatorFunc2Var from AdvApp2Var)
is private;
---Purpose: Computation of the approximation result ; used by Create
Perform(me : in out; UChoice, VChoice : Cutting from AdvApprox;
Func : EvaluatorFunc2Var from AdvApp2Var;
Crit : Criterion from AdvApp2Var)
is private;
---Purpose: Computation of the approximation result ; used by Create
ComputePatches(me : in out; UChoice, VChoice : Cutting from AdvApprox;
Func : EvaluatorFunc2Var from AdvApp2Var)
is private;
---Purpose: Computation of the polynomial approximations ; used by Perform
ComputePatches(me : in out; UChoice, VChoice : Cutting from AdvApprox;
Func : EvaluatorFunc2Var from AdvApp2Var;
Crit : Criterion from AdvApp2Var)
is private;
---Purpose: Computation of the polynomial approximations ; used by Perform
ComputeConstraints(me : in out; UChoice, VChoice : Cutting from AdvApprox;
Func : EvaluatorFunc2Var from AdvApp2Var)
is private;
---Purpose: Approximation of the constraints ; used by ComputePatches
ComputeConstraints(me : in out; UChoice, VChoice : Cutting from AdvApprox;
Func : EvaluatorFunc2Var from AdvApp2Var;
Crit : Criterion from AdvApp2Var)
is private;
---Purpose: Approximation of the constraints ; used by ComputePatches
Compute3DErrors(me : in out)
is private;
---Purpose: Computation of the 3D errors on the approximation result ; used by Perform
ComputeCritError(me : in out)
is private;
---Purpose: Computation of the max value of the criterion on the approximation result ;
-- used by Perform
ConvertBS(me : in out)
is private;
---Purpose: Conversion of the approximation result in BSpline; used by Create
IsDone(me)
---C++: inline
returns Boolean;
---Purpose: True if the approximation succeeded within the imposed
-- tolerances and the wished continuities
--
HasResult(me)
---C++: inline
returns Boolean;
---Purpose: True if the approximation did come out with a result that
-- is not NECESSARELY within the required tolerance or a result
-- that is not recognized with the wished continuities
--
Surface (me; Index : Integer)
---Purpose: returns the BSplineSurface of range Index
---Warning:
-- Index must be equal to 1.
---C++: inline
returns BSplineSurface from Geom;
UDegree(me) returns Integer ;
---C++: inline
VDegree(me) returns Integer ;
---C++: inline
NumSubSpaces(me; Dimension : Integer) returns Integer;
---C++: inline
---Warning:
-- Dimension must be equal to 1, 2 or 3.
MaxError (me; Dimension : Integer) returns HArray1OfReal from TColStd ;
---Purpose: returns the errors max
---Warning:
-- Dimension must be equal to 3.
AverageError(me; Dimension : Integer) returns HArray1OfReal from TColStd ;
---Purpose: returns the average errors
---Warning:
-- Dimension must be equal to 3.
UFrontError(me; Dimension : Integer) returns HArray1OfReal from TColStd ;
---Purpose: returns the errors max on UFrontiers
-- Warning:
-- Dimension must be equal to 3.
VFrontError(me; Dimension : Integer) returns HArray1OfReal from TColStd ;
---Purpose: returns the errors max on VFrontiers
-- Warning:
-- Dimension must be equal to 3.
MaxError (me; Dimension : Integer ; Index : Integer) returns Real ;
---Purpose: returns the error max of the BSplineSurface of range Index
---Warning:
-- Dimension must be equal to 3, Index must be equal to 1.
AverageError(me; Dimension : Integer; Index : Integer) returns Real ;
---Purpose: returns the average error of the BSplineSurface of range Index
---Warning:
-- Dimension must be equal to 3, Index must be equal to 1.
UFrontError(me; Dimension : Integer; Index : Integer) returns Real ;
---Purpose: returns the error max of the BSplineSurface of range Index on a UFrontier
---Warning:
-- Dimension must be equal to 3, Index must be equal to 1.
VFrontError(me; Dimension : Integer; Index : Integer) returns Real ;
---Purpose: returns the error max of the BSplineSurface of range Index on a VFrontier
---Warning:
-- Dimension must be equal to 3, Index must be equal to 1.
CritError(me; Dimension : Integer; Index : Integer) returns Real ;
-- Computation of the max value of the criterion on the BSplineSurface of range Index
---Warning:
-- Dimension must be equal to 3, Index must be equal to 1.
Dump(me ; o : in out OStream);
---Purpose: Prints on the stream o informations on the current state
-- of the object.
--
fields
--
-- Input fields
--
myNumSubSpaces : Integer[3] ;
-- Number of subspaces [0] = number of 1 dimensional subspaces
-- [1] = number of 2 dimensional subspaces
-- [2] = number of 3 dimensional subspaces
---Warning:
-- for the moment, the result is a 3D Surface so
-- myNumSubSpaces[0] = Num1DSS = 0,
-- myNumSubSpaces[1] = Num2DSS = 0,
-- myNumSubSpaces[2] = Num3DSS = 1.
--
my1DTolerances : HArray1OfReal from TColStd ;
-- unused for the moment
my2DTolerances : HArray1OfReal from TColStd ;
-- unused for the moment
my3DTolerances : HArray1OfReal from TColStd ;
-- one tolerance per subspace
my1DTolOnFront : HArray2OfReal from TColStd ;
-- unused for the moment
my2DTolOnFront : HArray2OfReal from TColStd ;
-- unused for the moment
my3DTolOnFront : HArray2OfReal from TColStd ;
-- 4 tolerances per subspace,
-- one for each frontier U=U0, U=U1, V=V0, V=V1
myFirstParInU : Real ;
-- U0 : first U parameter for the approximation
myLastParInU : Real ;
-- U1 : last U parameter for the approximation
myFirstParInV : Real ;
-- V0 : first V parameter for the approximation
myLastParInV : Real ;
-- V1 : last V parameter for the approximation
--
--
myFavoriteIso : IsoType from GeomAbs ;
myContInU : Shape from GeomAbs ;
myContInV : Shape from GeomAbs ;
-- continuity requested for the approximation
---Warning:
-- The evaluator of the function to approximate must
-- provide the derivatives up to the requested order
--
myPrecisionCode : Integer ;
myMaxDegInU : Integer ;
-- maximum U-degree for the approximation
myMaxDegInV : Integer ;
-- maximum V-degree for the approximation
---Warning:
-- Because of the unstable evaluation after degree 14
-- there are limited to 14
myMaxPatches : Integer ;
-- maximum of patches allowed
--
--
myConditions : Context from AdvApp2Var;
myResult : Network from AdvApp2Var;
myConstraints : Framework from AdvApp2Var;
--
--
-- Output fields
--
myDone : Boolean ;
-- tells if the approximation succeeded within the requested
-- tolerances and continuities.
--
myHasResult : Boolean ;
-- tells if the approximation returned a result although
-- it might not be within the requested tolerances or
-- the BSpline result surface has not the wished continuities.
-- In those cases myDone will be false.
--
--
mySurfaces : HArray1OfSurface from TColGeom;
-- one surface per subspace
--
myDegreeInU : Integer ;
myDegreeInV : Integer ;
--
-- The Errors
-- 1DErrors and 2DErrors are unused for the moment
--
my1DMaxError : HArray1OfReal from TColStd ;
my1DAverageError : HArray1OfReal from TColStd ;
my1DUFrontError : HArray1OfReal from TColStd ;
my1DVFrontError : HArray1OfReal from TColStd ;
my2DMaxError : HArray1OfReal from TColStd ;
my2DAverageError : HArray1OfReal from TColStd ;
my2DUFrontError : HArray1OfReal from TColStd ;
my2DVFrontError : HArray1OfReal from TColStd ;
-- each array contains one error
my3DMaxError : HArray1OfReal from TColStd ;
my3DAverageError : HArray1OfReal from TColStd ;
my3DUFrontError : HArray1OfReal from TColStd ;
my3DVFrontError : HArray1OfReal from TColStd ;
myCriterionError : Real from Standard ;
end ApproxAFunc2Var ;

View File

@@ -0,0 +1,251 @@
// Created on: 1996-02-14
// Created by: Joelle CHAUVET
// 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 _AdvApp2Var_ApproxAFunc2Var_HeaderFile
#define _AdvApp2Var_ApproxAFunc2Var_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Integer.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <TColStd_HArray2OfReal.hxx>
#include <Standard_Real.hxx>
#include <GeomAbs_IsoType.hxx>
#include <GeomAbs_Shape.hxx>
#include <AdvApp2Var_Context.hxx>
#include <AdvApp2Var_Network.hxx>
#include <AdvApp2Var_Framework.hxx>
#include <Standard_Boolean.hxx>
#include <TColGeom_HArray1OfSurface.hxx>
#include <AdvApp2Var_EvaluatorFunc2Var.hxx>
#include <Standard_OStream.hxx>
class Standard_OutOfRange;
class Standard_ConstructionError;
class AdvApprox_Cutting;
class AdvApp2Var_Criterion;
class Geom_BSplineSurface;
//! Perform the approximation of <Func> F(U,V)
//! Arguments are :
//! Num1DSS, Num2DSS, Num3DSS :The numbers of 1,2,3 dimensional subspaces
//! OneDTol, TwoDTol, ThreeDTol: The tolerance of approximation in each
//! subspaces
//! OneDTolFr, TwoDTolFr, ThreeDTolFr: The tolerance of approximation on
//! the boundarys in each subspaces
//! [FirstInU, LastInU]: The Bounds in U of the Approximation
//! [FirstInV, LastInV]: The Bounds in V of the Approximation
//! FavorIso : Give preference to extract u-iso or v-iso on F(U,V)
//! This can be usefull to optimize the <Func> methode
//! ContInU, ContInV : Continuity waiting in u and v
//! PrecisCode : Precision on approximation's error mesurement
//! 1 : Fast computation and average precision
//! 2 : Average computation and good precision
//! 3 : Slow computation and very good precision
//! MaxDegInU : Maximum u-degree waiting in U
//! MaxDegInV : Maximum u-degree waiting in V
//! Warning:
//! MaxDegInU (resp. MaxDegInV) must be >= 2*iu (resp. iv) + 1,
//! where iu (resp. iv) = 0 if ContInU (resp. ContInV) = GeomAbs_C0,
//! = 1 if = GeomAbs_C1,
//! = 2 if = GeomAbs_C2.
//! MaxPatch : Maximun number of Patch waiting
//! number of Patch is number of u span * number of v span
//! Func : The external method to evaluate F(U,V)
//! Crit : To (re)defined condition of convergence
//! UChoice, VChoice : To define the way in U (or V) Knot insertion
//! Warning:
//! for the moment, the result is a 3D Surface
//! so Num1DSS and Num2DSS must be equals to 0
//! and Num3DSS must be equal to 1.
//! Warning:
//! the Function of type EvaluatorFunc2Var from Approx
//! must be a subclass of AdvApp2Var_EvaluatorFunc2Var
//!
//! the result should be formatted in the following way :
//! <--Num1DSS--> <--2 * Num2DSS--> <--3 * Num3DSS-->
//! R[0,0] .... R[Num1DSS,0]..... R[Dimension-1,0] for the 1st parameter
//! R[0,i] .... R[Num1DSS,i]..... R[Dimension-1,i] for the ith parameter
//! R[0,N-1] .... R[Num1DSS,N-1].... R[Dimension-1,N-1] for the Nth parameter
//!
//! the order in which each Subspace appears should be consistent
//! with the tolerances given in the create function and the
//! results will be given in that order as well that is :
//! Surface(n) will correspond to the nth entry described by Num3DSS
class AdvApp2Var_ApproxAFunc2Var
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT AdvApp2Var_ApproxAFunc2Var(const Standard_Integer Num1DSS, const Standard_Integer Num2DSS, const Standard_Integer Num3DSS, const Handle(TColStd_HArray1OfReal)& OneDTol, const Handle(TColStd_HArray1OfReal)& TwoDTol, const Handle(TColStd_HArray1OfReal)& ThreeDTol, const Handle(TColStd_HArray2OfReal)& OneDTolFr, const Handle(TColStd_HArray2OfReal)& TwoDTolFr, const Handle(TColStd_HArray2OfReal)& ThreeDTolFr, const Standard_Real FirstInU, const Standard_Real LastInU, const Standard_Real FirstInV, const Standard_Real LastInV, const GeomAbs_IsoType FavorIso, const GeomAbs_Shape ContInU, const GeomAbs_Shape ContInV, const Standard_Integer PrecisCode, const Standard_Integer MaxDegInU, const Standard_Integer MaxDegInV, const Standard_Integer MaxPatch, const AdvApp2Var_EvaluatorFunc2Var& Func, AdvApprox_Cutting& UChoice, AdvApprox_Cutting& VChoice);
Standard_EXPORT AdvApp2Var_ApproxAFunc2Var(const Standard_Integer Num1DSS, const Standard_Integer Num2DSS, const Standard_Integer Num3DSS, const Handle(TColStd_HArray1OfReal)& OneDTol, const Handle(TColStd_HArray1OfReal)& TwoDTol, const Handle(TColStd_HArray1OfReal)& ThreeDTol, const Handle(TColStd_HArray2OfReal)& OneDTolFr, const Handle(TColStd_HArray2OfReal)& TwoDTolFr, const Handle(TColStd_HArray2OfReal)& ThreeDTolFr, const Standard_Real FirstInU, const Standard_Real LastInU, const Standard_Real FirstInV, const Standard_Real LastInV, const GeomAbs_IsoType FavorIso, const GeomAbs_Shape ContInU, const GeomAbs_Shape ContInV, const Standard_Integer PrecisCode, const Standard_Integer MaxDegInU, const Standard_Integer MaxDegInV, const Standard_Integer MaxPatch, const AdvApp2Var_EvaluatorFunc2Var& Func, const AdvApp2Var_Criterion& Crit, AdvApprox_Cutting& UChoice, AdvApprox_Cutting& VChoice);
//! True if the approximation succeeded within the imposed
//! tolerances and the wished continuities
Standard_Boolean IsDone() const;
//! True if the approximation did come out with a result that
//! is not NECESSARELY within the required tolerance or a result
//! that is not recognized with the wished continuities
Standard_Boolean HasResult() const;
//! returns the BSplineSurface of range Index
Handle(Geom_BSplineSurface) Surface (const Standard_Integer Index) const;
Standard_Integer UDegree() const;
Standard_Integer VDegree() const;
Standard_Integer NumSubSpaces (const Standard_Integer Dimension) const;
//! returns the errors max
Standard_EXPORT Handle(TColStd_HArray1OfReal) MaxError (const Standard_Integer Dimension) const;
//! returns the average errors
Standard_EXPORT Handle(TColStd_HArray1OfReal) AverageError (const Standard_Integer Dimension) const;
//! returns the errors max on UFrontiers
//! Warning:
//! Dimension must be equal to 3.
Standard_EXPORT Handle(TColStd_HArray1OfReal) UFrontError (const Standard_Integer Dimension) const;
//! returns the errors max on VFrontiers
//! Warning:
//! Dimension must be equal to 3.
Standard_EXPORT Handle(TColStd_HArray1OfReal) VFrontError (const Standard_Integer Dimension) const;
//! returns the error max of the BSplineSurface of range Index
Standard_EXPORT Standard_Real MaxError (const Standard_Integer Dimension, const Standard_Integer Index) const;
//! returns the average error of the BSplineSurface of range Index
Standard_EXPORT Standard_Real AverageError (const Standard_Integer Dimension, const Standard_Integer Index) const;
//! returns the error max of the BSplineSurface of range Index on a UFrontier
Standard_EXPORT Standard_Real UFrontError (const Standard_Integer Dimension, const Standard_Integer Index) const;
//! returns the error max of the BSplineSurface of range Index on a VFrontier
Standard_EXPORT Standard_Real VFrontError (const Standard_Integer Dimension, const Standard_Integer Index) const;
Standard_EXPORT Standard_Real CritError (const Standard_Integer Dimension, const Standard_Integer Index) const;
//! Prints on the stream o informations on the current state
//! of the object.
Standard_EXPORT void Dump (Standard_OStream& o) const;
protected:
private:
//! Initialisation of the approximation ; used by Create
Standard_EXPORT void Init();
//! Initialisation of the approximation with a grid of regular cuttings ;
//! used by Init and Perform
Standard_EXPORT void InitGrid (const Standard_Integer NbInt);
//! Computation of the approximation result ; used by Create
Standard_EXPORT void Perform (const AdvApprox_Cutting& UChoice, const AdvApprox_Cutting& VChoice, const AdvApp2Var_EvaluatorFunc2Var& Func);
//! Computation of the approximation result ; used by Create
Standard_EXPORT void Perform (const AdvApprox_Cutting& UChoice, const AdvApprox_Cutting& VChoice, const AdvApp2Var_EvaluatorFunc2Var& Func, const AdvApp2Var_Criterion& Crit);
//! Computation of the polynomial approximations ; used by Perform
Standard_EXPORT void ComputePatches (const AdvApprox_Cutting& UChoice, const AdvApprox_Cutting& VChoice, const AdvApp2Var_EvaluatorFunc2Var& Func);
//! Computation of the polynomial approximations ; used by Perform
Standard_EXPORT void ComputePatches (const AdvApprox_Cutting& UChoice, const AdvApprox_Cutting& VChoice, const AdvApp2Var_EvaluatorFunc2Var& Func, const AdvApp2Var_Criterion& Crit);
//! Approximation of the constraints ; used by ComputePatches
Standard_EXPORT void ComputeConstraints (const AdvApprox_Cutting& UChoice, const AdvApprox_Cutting& VChoice, const AdvApp2Var_EvaluatorFunc2Var& Func);
//! Approximation of the constraints ; used by ComputePatches
Standard_EXPORT void ComputeConstraints (const AdvApprox_Cutting& UChoice, const AdvApprox_Cutting& VChoice, const AdvApp2Var_EvaluatorFunc2Var& Func, const AdvApp2Var_Criterion& Crit);
//! Computation of the 3D errors on the approximation result ; used by Perform
Standard_EXPORT void Compute3DErrors();
//! Computation of the max value of the criterion on the approximation result ;
//! used by Perform
Standard_EXPORT void ComputeCritError();
//! Conversion of the approximation result in BSpline; used by Create
Standard_EXPORT void ConvertBS();
Standard_Integer myNumSubSpaces[3];
Handle(TColStd_HArray1OfReal) my1DTolerances;
Handle(TColStd_HArray1OfReal) my2DTolerances;
Handle(TColStd_HArray1OfReal) my3DTolerances;
Handle(TColStd_HArray2OfReal) my1DTolOnFront;
Handle(TColStd_HArray2OfReal) my2DTolOnFront;
Handle(TColStd_HArray2OfReal) my3DTolOnFront;
Standard_Real myFirstParInU;
Standard_Real myLastParInU;
Standard_Real myFirstParInV;
Standard_Real myLastParInV;
GeomAbs_IsoType myFavoriteIso;
GeomAbs_Shape myContInU;
GeomAbs_Shape myContInV;
Standard_Integer myPrecisionCode;
Standard_Integer myMaxDegInU;
Standard_Integer myMaxDegInV;
Standard_Integer myMaxPatches;
AdvApp2Var_Context myConditions;
AdvApp2Var_Network myResult;
AdvApp2Var_Framework myConstraints;
Standard_Boolean myDone;
Standard_Boolean myHasResult;
Handle(TColGeom_HArray1OfSurface) mySurfaces;
Standard_Integer myDegreeInU;
Standard_Integer myDegreeInV;
Handle(TColStd_HArray1OfReal) my1DMaxError;
Handle(TColStd_HArray1OfReal) my1DAverageError;
Handle(TColStd_HArray1OfReal) my1DUFrontError;
Handle(TColStd_HArray1OfReal) my1DVFrontError;
Handle(TColStd_HArray1OfReal) my2DMaxError;
Handle(TColStd_HArray1OfReal) my2DAverageError;
Handle(TColStd_HArray1OfReal) my2DUFrontError;
Handle(TColStd_HArray1OfReal) my2DVFrontError;
Handle(TColStd_HArray1OfReal) my3DMaxError;
Handle(TColStd_HArray1OfReal) my3DAverageError;
Handle(TColStd_HArray1OfReal) my3DUFrontError;
Handle(TColStd_HArray1OfReal) my3DVFrontError;
Standard_Real myCriterionError;
};
#include <AdvApp2Var_ApproxAFunc2Var.lxx>
#endif // _AdvApp2Var_ApproxAFunc2Var_HeaderFile

View File

@@ -1,69 +0,0 @@
-- Created on: 1996-04-16
-- Created by: Joelle CHAUVET
-- 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: Mon Dec 9 10:30:56 1996
-- by: Joelle CHAUVET
-- G1135 : Empty constructor
class Context from AdvApp2Var
---Purpose :
-- contains all the parameters for approximation
-- ( tolerancy, computing option, ...)
uses
HArray1OfReal from TColStd,
HArray2OfReal from TColStd
is
Create returns Context;
Create(ifav,iu,iv : Integer; nlimu,nlimv : Integer; iprecis : Integer;
nb1Dss,nb2Dss,nb3Dss : Integer; tol1D,tol2D,tol3D : HArray1OfReal;
tof1D,tof2D,tof3D : HArray2OfReal) returns Context;
TotalDimension(me) returns Integer;
TotalNumberSSP(me) returns Integer;
FavorIso(me) returns Integer;
UOrder(me) returns Integer;
VOrder(me) returns Integer;
ULimit(me) returns Integer;
VLimit(me) returns Integer;
UJacDeg(me) returns Integer;
VJacDeg(me) returns Integer;
UJacMax(me) returns HArray1OfReal;
VJacMax(me) returns HArray1OfReal;
URoots(me) returns HArray1OfReal;
VRoots(me) returns HArray1OfReal;
UGauss(me) returns HArray1OfReal;
VGauss(me) returns HArray1OfReal;
IToler(me) returns HArray1OfReal;
FToler(me) returns HArray2OfReal;
CToler(me) returns HArray2OfReal;
fields
myFav : Integer;
myOrdU, myOrdV : Integer;
myLimU, myLimV : Integer;
myNb1DSS, myNb2DSS, myNb3DSS: Integer;
myNbURoot, myNbVRoot : Integer;
myJDegU, myJDegV : Integer;
myJMaxU, myJMaxV : HArray1OfReal;
myURoots, myVRoots : HArray1OfReal;
myUGauss, myVGauss : HArray1OfReal;
myInternalTol : HArray1OfReal;
myFrontierTol : HArray2OfReal;
myCuttingTol : HArray2OfReal;
end Context;

View File

@@ -14,9 +14,10 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <AdvApp2Var_Context.ixx>
#include <Standard_ConstructionError.hxx>
#include <AdvApp2Var_ApproxF2var.hxx>
#include <AdvApp2Var_Context.hxx>
#include <Standard_ConstructionError.hxx>
// Calculaton of parameters
static Standard_Boolean lesparam(const Standard_Integer iordre,

View File

@@ -0,0 +1,123 @@
// Created on: 1996-04-16
// Created by: Joelle CHAUVET
// 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 _AdvApp2Var_Context_HeaderFile
#define _AdvApp2Var_Context_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Integer.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <TColStd_HArray2OfReal.hxx>
//! contains all the parameters for approximation
//! ( tolerancy, computing option, ...)
class AdvApp2Var_Context
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT AdvApp2Var_Context();
Standard_EXPORT AdvApp2Var_Context(const Standard_Integer ifav, const Standard_Integer iu, const Standard_Integer iv, const Standard_Integer nlimu, const Standard_Integer nlimv, const Standard_Integer iprecis, const Standard_Integer nb1Dss, const Standard_Integer nb2Dss, const Standard_Integer nb3Dss, const Handle(TColStd_HArray1OfReal)& tol1D, const Handle(TColStd_HArray1OfReal)& tol2D, const Handle(TColStd_HArray1OfReal)& tol3D, const Handle(TColStd_HArray2OfReal)& tof1D, const Handle(TColStd_HArray2OfReal)& tof2D, const Handle(TColStd_HArray2OfReal)& tof3D);
Standard_EXPORT Standard_Integer TotalDimension() const;
Standard_EXPORT Standard_Integer TotalNumberSSP() const;
Standard_EXPORT Standard_Integer FavorIso() const;
Standard_EXPORT Standard_Integer UOrder() const;
Standard_EXPORT Standard_Integer VOrder() const;
Standard_EXPORT Standard_Integer ULimit() const;
Standard_EXPORT Standard_Integer VLimit() const;
Standard_EXPORT Standard_Integer UJacDeg() const;
Standard_EXPORT Standard_Integer VJacDeg() const;
Standard_EXPORT Handle(TColStd_HArray1OfReal) UJacMax() const;
Standard_EXPORT Handle(TColStd_HArray1OfReal) VJacMax() const;
Standard_EXPORT Handle(TColStd_HArray1OfReal) URoots() const;
Standard_EXPORT Handle(TColStd_HArray1OfReal) VRoots() const;
Standard_EXPORT Handle(TColStd_HArray1OfReal) UGauss() const;
Standard_EXPORT Handle(TColStd_HArray1OfReal) VGauss() const;
Standard_EXPORT Handle(TColStd_HArray1OfReal) IToler() const;
Standard_EXPORT Handle(TColStd_HArray2OfReal) FToler() const;
Standard_EXPORT Handle(TColStd_HArray2OfReal) CToler() const;
protected:
private:
Standard_Integer myFav;
Standard_Integer myOrdU;
Standard_Integer myOrdV;
Standard_Integer myLimU;
Standard_Integer myLimV;
Standard_Integer myNb1DSS;
Standard_Integer myNb2DSS;
Standard_Integer myNb3DSS;
Standard_Integer myNbURoot;
Standard_Integer myNbVRoot;
Standard_Integer myJDegU;
Standard_Integer myJDegV;
Handle(TColStd_HArray1OfReal) myJMaxU;
Handle(TColStd_HArray1OfReal) myJMaxV;
Handle(TColStd_HArray1OfReal) myURoots;
Handle(TColStd_HArray1OfReal) myVRoots;
Handle(TColStd_HArray1OfReal) myUGauss;
Handle(TColStd_HArray1OfReal) myVGauss;
Handle(TColStd_HArray1OfReal) myInternalTol;
Handle(TColStd_HArray2OfReal) myFrontierTol;
Handle(TColStd_HArray2OfReal) myCuttingTol;
};
#endif // _AdvApp2Var_Context_HeaderFile

View File

@@ -1,48 +0,0 @@
-- Created on: 1997-01-15
-- Created by: Joelle CHAUVET
-- Copyright (c) 1997-1999 Matra Datavision
-- Copyright (c) 1999-2014 OPEN CASCADE SAS
--
-- This file is part of Open CASCADE Technology software library.
--
-- This library is free software; you can redistribute it and/or modify it under
-- the terms of the GNU Lesser General Public License version 2.1 as published
-- by the Free Software Foundation, with special exception defined in the file
-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-- distribution for complete text of the license and disclaimer of any warranty.
--
-- Alternatively, this file may be used under the terms of Open CASCADE
-- commercial license or contractual agreement.
deferred class Criterion from AdvApp2Var
---Purpose:
-- this class contains a given criterion to be satisfied
uses
Patch,Context from AdvApp2Var,
CriterionType,CriterionRepartition from AdvApp2Var
is
Delete(me:out) is virtual;
---C++: alias "Standard_EXPORT virtual ~AdvApp2Var_Criterion(){Delete() ; }"
Value(me; P : in out Patch; C : Context )
is deferred;
IsSatisfied(me; P : Patch ) returns Boolean
is deferred;
MaxValue(me) returns Real;
Type(me) returns CriterionType;
Repartition(me) returns CriterionRepartition;
fields
myMaxValue : Real is protected;
myType : CriterionType is protected;
myRepartition : CriterionRepartition is protected;
end Criterion;

View File

@@ -14,8 +14,10 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <AdvApp2Var_Criterion.ixx>
#include <AdvApp2Var_Context.hxx>
#include <AdvApp2Var_Criterion.hxx>
#include <AdvApp2Var_Patch.hxx>
void AdvApp2Var_Criterion::Delete()
{}

View File

@@ -0,0 +1,80 @@
// Created on: 1997-01-15
// Created by: Joelle CHAUVET
// Copyright (c) 1997-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 _AdvApp2Var_Criterion_HeaderFile
#define _AdvApp2Var_Criterion_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Real.hxx>
#include <AdvApp2Var_CriterionType.hxx>
#include <AdvApp2Var_CriterionRepartition.hxx>
#include <Standard_Boolean.hxx>
class AdvApp2Var_Patch;
class AdvApp2Var_Context;
//! this class contains a given criterion to be satisfied
class AdvApp2Var_Criterion
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT virtual void Delete();
Standard_EXPORT virtual ~AdvApp2Var_Criterion(){Delete() ; }
Standard_EXPORT virtual void Value (AdvApp2Var_Patch& P, const AdvApp2Var_Context& C) const = 0;
Standard_EXPORT virtual Standard_Boolean IsSatisfied (const AdvApp2Var_Patch& P) const = 0;
Standard_EXPORT Standard_Real MaxValue() const;
Standard_EXPORT AdvApp2Var_CriterionType Type() const;
Standard_EXPORT AdvApp2Var_CriterionRepartition Repartition() const;
protected:
Standard_Real myMaxValue;
AdvApp2Var_CriterionType myType;
AdvApp2Var_CriterionRepartition myRepartition;
private:
};
#endif // _AdvApp2Var_Criterion_HeaderFile

View File

@@ -0,0 +1,31 @@
// Created on: 1996-03-05
// Created by: Joelle CHAUVET
// 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 _AdvApp2Var_CriterionRepartition_HeaderFile
#define _AdvApp2Var_CriterionRepartition_HeaderFile
//! way of cutting process//! all new cutting points at each step of cutting
//! process : (a+i(b-a)/N)i at step N,
//! (a+i(b-a)/(N+1))i at step N+1,...
//! where (a,b) is the global interval//! add one new cutting point at each step
//! of cutting process
enum AdvApp2Var_CriterionRepartition
{
AdvApp2Var_Regular,
AdvApp2Var_Incremental
};
#endif // _AdvApp2Var_CriterionRepartition_HeaderFile

View File

@@ -0,0 +1,29 @@
// Created on: 1996-03-05
// Created by: Joelle CHAUVET
// 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 _AdvApp2Var_CriterionType_HeaderFile
#define _AdvApp2Var_CriterionType_HeaderFile
//! influency of the criterion on cutting process//! cutting when criterion is not satisfied
//! desactivation of the compute of the error max//! cutting when error max is not good or if error
//! max is good and criterion is not satisfied
enum AdvApp2Var_CriterionType
{
AdvApp2Var_Absolute,
AdvApp2Var_Relative
};
#endif // _AdvApp2Var_CriterionType_HeaderFile

View File

@@ -1,99 +0,0 @@
-- Created on: 1996-04-10
-- Created by: Joelle CHAUVET
-- 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: Mon Dec 9 10:30:56 1996
-- by: Joelle CHAUVET
-- G1135 : Empty constructor
class Framework from AdvApp2Var
uses
Boolean,Real,NoSuchObject from Standard,
HArray1OfReal from TColStd,
IsoType from GeomAbs,
SequenceOfNode,SequenceOfStrip,Iso,Node from AdvApp2Var
raises NoSuchObject from Standard
is
Create returns Framework;
Create(Frame : SequenceOfNode;
UFrontier, VFrontier : SequenceOfStrip)
returns Framework;
FirstNotApprox(me; IndexIso,IndexStrip : out Integer;
anIso : out Iso)
---Purpose: search the Index of the first Iso not approximated,
-- if all Isos are approximated Standard_False is returned.
returns Boolean;
FirstNode(me; Type : IsoType; IndexIso,IndexStrip : Integer)
returns Integer;
LastNode(me; Type : IsoType; IndexIso,IndexStrip : Integer) returns Integer;
ChangeIso(me: in out; IndexIso,IndexStrip : Integer; anIso : Iso);
Node(me; IndexNode : Integer)
---C++: return const&
---C++: inline
returns Node
raises NoSuchObject from Standard;
Node(me; U,V : Real)
---C++: return const&
returns Node
raises NoSuchObject from Standard;
IsoU(me; U,V0,V1 : Real)
---C++: return const&
returns Iso
raises NoSuchObject from Standard;
IsoV(me; U0,U1,V : Real)
---C++: return const&
returns Iso
raises NoSuchObject from Standard;
ChangeNode(me: in out; IndexNode : Integer)
---C++: return &
---C++: inline
returns Node;
UpdateInU(me: in out; CuttingValue : Real);
UpdateInV(me: in out; CuttingValue : Real);
UEquation(me; IndexIso,IndexStrip : Integer)
---C++: return const &
returns HArray1OfReal;
VEquation(me; IndexIso,IndexStrip : Integer)
---C++: return const &
returns HArray1OfReal;
fields
myNodeConstraints : SequenceOfNode;
myUConstraints : SequenceOfStrip;
myVConstraints : SequenceOfStrip;
end Framework;

View File

@@ -0,0 +1,103 @@
// Created on: 1996-04-10
// Created by: Joelle CHAUVET
// 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 _AdvApp2Var_Framework_HeaderFile
#define _AdvApp2Var_Framework_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <AdvApp2Var_SequenceOfNode.hxx>
#include <AdvApp2Var_SequenceOfStrip.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Integer.hxx>
#include <GeomAbs_IsoType.hxx>
#include <Standard_Real.hxx>
#include <TColStd_HArray1OfReal.hxx>
class Standard_NoSuchObject;
class AdvApp2Var_Iso;
class AdvApp2Var_Node;
class AdvApp2Var_Framework
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT AdvApp2Var_Framework();
Standard_EXPORT AdvApp2Var_Framework(const AdvApp2Var_SequenceOfNode& Frame, const AdvApp2Var_SequenceOfStrip& UFrontier, const AdvApp2Var_SequenceOfStrip& VFrontier);
//! search the Index of the first Iso not approximated,
//! if all Isos are approximated Standard_False is returned.
Standard_EXPORT Standard_Boolean FirstNotApprox (Standard_Integer& IndexIso, Standard_Integer& IndexStrip, AdvApp2Var_Iso& anIso) const;
Standard_EXPORT Standard_Integer FirstNode (const GeomAbs_IsoType Type, const Standard_Integer IndexIso, const Standard_Integer IndexStrip) const;
Standard_EXPORT Standard_Integer LastNode (const GeomAbs_IsoType Type, const Standard_Integer IndexIso, const Standard_Integer IndexStrip) const;
Standard_EXPORT void ChangeIso (const Standard_Integer IndexIso, const Standard_Integer IndexStrip, const AdvApp2Var_Iso& anIso);
const AdvApp2Var_Node& Node (const Standard_Integer IndexNode) const;
Standard_EXPORT const AdvApp2Var_Node& Node (const Standard_Real U, const Standard_Real V) const;
Standard_EXPORT const AdvApp2Var_Iso& IsoU (const Standard_Real U, const Standard_Real V0, const Standard_Real V1) const;
Standard_EXPORT const AdvApp2Var_Iso& IsoV (const Standard_Real U0, const Standard_Real U1, const Standard_Real V) const;
AdvApp2Var_Node& ChangeNode (const Standard_Integer IndexNode);
Standard_EXPORT void UpdateInU (const Standard_Real CuttingValue);
Standard_EXPORT void UpdateInV (const Standard_Real CuttingValue);
Standard_EXPORT const Handle(TColStd_HArray1OfReal)& UEquation (const Standard_Integer IndexIso, const Standard_Integer IndexStrip) const;
Standard_EXPORT const Handle(TColStd_HArray1OfReal)& VEquation (const Standard_Integer IndexIso, const Standard_Integer IndexStrip) const;
protected:
private:
AdvApp2Var_SequenceOfNode myNodeConstraints;
AdvApp2Var_SequenceOfStrip myUConstraints;
AdvApp2Var_SequenceOfStrip myVConstraints;
};
#include <AdvApp2Var_Framework.lxx>
#endif // _AdvApp2Var_Framework_HeaderFile

View File

@@ -1,92 +0,0 @@
-- Created on: 1996-04-09
-- Created by: Joelle CHAUVET
-- 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 Iso from AdvApp2Var
---Purpose :
-- used to store constraints on a line U = Ui or V = Vj
--
uses
Boolean,Integer,Real from Standard,
HArray1OfReal from TColStd,
HArray2OfReal from TColStd,
HArray1OfPnt from TColgp,
IsoType from GeomAbs,
EvaluatorFunc2Var,Context,Node from AdvApp2Var
is
Create returns Iso;
Create(type : IsoType from GeomAbs; iu, iv : Integer) returns Iso;
Create(type : IsoType from GeomAbs; cte : Real;
Ufirst, Ulast, Vfirst, Vlast : Real;
pos, iu, iv : Integer) returns Iso;
Create(Other : Iso) returns Iso is private;
IsApproximated(me) returns Boolean;
HasResult(me) returns Boolean;
MakeApprox(me: in out; Conditions : Context;
a,b,c,d : Real;
func : EvaluatorFunc2Var;
NodeBegin, NodeEnd : in out Node from AdvApp2Var );
ChangeDomain(me: in out; a,b : Real);
ChangeDomain(me: in out; a,b,c,d : Real);
SetConstante(me: in out; newcte : Real);
SetPosition(me: in out; newpos : Integer);
ResetApprox(me: in out);
OverwriteApprox(me: in out);
Type(me) returns IsoType;
Constante(me) returns Real;
T0(me) returns Real;
T1(me) returns Real;
U0(me) returns Real;
U1(me) returns Real;
V0(me) returns Real;
V1(me) returns Real;
UOrder(me) returns Integer;
VOrder(me) returns Integer;
Position(me) returns Integer;
NbCoeff(me) returns Integer;
Polynom(me)
---C++: return const &
returns HArray1OfReal;
SomTab(me) returns HArray1OfReal;
DifTab(me) returns HArray1OfReal;
MaxErrors(me) returns HArray2OfReal;
MoyErrors(me) returns HArray2OfReal;
fields
myType : IsoType from GeomAbs;
myConstPar : Real;
myU0, myU1 : Real;
myV0, myV1 : Real;
myPosition : Integer;
myExtremOrder : Integer;
myDerivOrder : Integer;
myNbCoeff : Integer;
myApprIsDone : Boolean;
myHasResult : Boolean;
myEquation : HArray1OfReal;
myMaxErrors : HArray2OfReal;
myMoyErrors : HArray2OfReal;
mySomTab : HArray1OfReal;
myDifTab : HArray1OfReal;
end Iso;

View File

@@ -14,20 +14,20 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <AdvApp2Var_Iso.ixx>
#include <TColStd_HArray1OfInteger.hxx>
#include <TColStd_HArray2OfReal.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <gp_Pnt.hxx>
#include <AdvApp2Var_ApproxF2var.hxx>
#include <AdvApp2Var_Context.hxx>
#include <AdvApp2Var_Iso.hxx>
#include <AdvApp2Var_Node.hxx>
#include <gp_Pnt.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <TColStd_HArray2OfReal.hxx>
//=======================================================================
//function : AdvApp2Var_Iso
//purpose :
//=======================================================================
AdvApp2Var_Iso::AdvApp2Var_Iso() :
myType(GeomAbs_IsoU),
myConstPar(0.5),

View File

@@ -0,0 +1,144 @@
// Created on: 1996-04-09
// Created by: Joelle CHAUVET
// 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 _AdvApp2Var_Iso_HeaderFile
#define _AdvApp2Var_Iso_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <GeomAbs_IsoType.hxx>
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <TColStd_HArray2OfReal.hxx>
#include <AdvApp2Var_EvaluatorFunc2Var.hxx>
class AdvApp2Var_Context;
class AdvApp2Var_Node;
//! used to store constraints on a line U = Ui or V = Vj
class AdvApp2Var_Iso
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT AdvApp2Var_Iso();
Standard_EXPORT AdvApp2Var_Iso(const GeomAbs_IsoType type, const Standard_Integer iu, const Standard_Integer iv);
Standard_EXPORT AdvApp2Var_Iso(const GeomAbs_IsoType type, const Standard_Real cte, const Standard_Real Ufirst, const Standard_Real Ulast, const Standard_Real Vfirst, const Standard_Real Vlast, const Standard_Integer pos, const Standard_Integer iu, const Standard_Integer iv);
Standard_EXPORT Standard_Boolean IsApproximated() const;
Standard_EXPORT Standard_Boolean HasResult() const;
Standard_EXPORT void MakeApprox (const AdvApp2Var_Context& Conditions, const Standard_Real a, const Standard_Real b, const Standard_Real c, const Standard_Real d, const AdvApp2Var_EvaluatorFunc2Var& func, AdvApp2Var_Node& NodeBegin, AdvApp2Var_Node& NodeEnd);
Standard_EXPORT void ChangeDomain (const Standard_Real a, const Standard_Real b);
Standard_EXPORT void ChangeDomain (const Standard_Real a, const Standard_Real b, const Standard_Real c, const Standard_Real d);
Standard_EXPORT void SetConstante (const Standard_Real newcte);
Standard_EXPORT void SetPosition (const Standard_Integer newpos);
Standard_EXPORT void ResetApprox();
Standard_EXPORT void OverwriteApprox();
Standard_EXPORT GeomAbs_IsoType Type() const;
Standard_EXPORT Standard_Real Constante() const;
Standard_EXPORT Standard_Real T0() const;
Standard_EXPORT Standard_Real T1() const;
Standard_EXPORT Standard_Real U0() const;
Standard_EXPORT Standard_Real U1() const;
Standard_EXPORT Standard_Real V0() const;
Standard_EXPORT Standard_Real V1() const;
Standard_EXPORT Standard_Integer UOrder() const;
Standard_EXPORT Standard_Integer VOrder() const;
Standard_EXPORT Standard_Integer Position() const;
Standard_EXPORT Standard_Integer NbCoeff() const;
Standard_EXPORT const Handle(TColStd_HArray1OfReal)& Polynom() const;
Standard_EXPORT Handle(TColStd_HArray1OfReal) SomTab() const;
Standard_EXPORT Handle(TColStd_HArray1OfReal) DifTab() const;
Standard_EXPORT Handle(TColStd_HArray2OfReal) MaxErrors() const;
Standard_EXPORT Handle(TColStd_HArray2OfReal) MoyErrors() const;
protected:
private:
Standard_EXPORT AdvApp2Var_Iso(const AdvApp2Var_Iso& Other);
GeomAbs_IsoType myType;
Standard_Real myConstPar;
Standard_Real myU0;
Standard_Real myU1;
Standard_Real myV0;
Standard_Real myV1;
Standard_Integer myPosition;
Standard_Integer myExtremOrder;
Standard_Integer myDerivOrder;
Standard_Integer myNbCoeff;
Standard_Boolean myApprIsDone;
Standard_Boolean myHasResult;
Handle(TColStd_HArray1OfReal) myEquation;
Handle(TColStd_HArray2OfReal) myMaxErrors;
Handle(TColStd_HArray2OfReal) myMoyErrors;
Handle(TColStd_HArray1OfReal) mySomTab;
Handle(TColStd_HArray1OfReal) myDifTab;
};
#endif // _AdvApp2Var_Iso_HeaderFile

View File

@@ -1,67 +0,0 @@
-- Created on: 1996-04-10
-- Created by: Joelle CHAUVET
-- 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: Mon Dec 9 10:30:56 1996
-- by: Joelle CHAUVET
-- G1135 : Empty constructor
class Network from AdvApp2Var
uses
Boolean,Integer,Real from Standard,
SequenceOfReal,HArray1OfReal from TColStd,
IsoType from GeomAbs,
Patch, SequenceOfPatch, Framework from AdvApp2Var
raises NoSuchObject from Standard
is
Create returns Network;
Create(Net : SequenceOfPatch; TheU,TheV : SequenceOfReal) returns Network;
FirstNotApprox(me; Index : out Integer)
---Purpose: search the Index of the first Patch not approximated,
-- if all Patches are approximated Standard_False is returned
returns Boolean;
ChangePatch(me: in out; Index : Integer)
---C++: alias operator()
---C++: return &
---C++: inline
returns Patch;
UpdateInU(me: in out; CuttingValue : Real);
UpdateInV(me: in out; CuttingValue : Real);
SameDegree(me : in out; iu, iv : Integer; ncfu, ncfv : out Integer);
NbPatch(me) returns Integer;
NbPatchInU(me) returns Integer;
NbPatchInV(me) returns Integer;
UParameter(me; Index : Integer) returns Real;
VParameter(me; Index : Integer) returns Real;
Patch(me; UIndex, VIndex : Integer)
---C++: alias operator()
---C++: return const &
---C++: inline
returns Patch;
fields
myNet : SequenceOfPatch;
myUParameters : SequenceOfReal;
myVParameters : SequenceOfReal;
end Network;

View File

@@ -18,17 +18,16 @@
// by: Joelle CHAUVET
// G1135 : empty constructor
#include <AdvApp2Var_Network.ixx>
#include <AdvApp2Var_Network.hxx>
#include <AdvApp2Var_Patch.hxx>
#include <AdvApp2Var_SequenceOfPatch.hxx>
#include <Standard_NoSuchObject.hxx>
#include <TColStd_SequenceOfReal.hxx>
//==========================================================================================
//function : AdvApp2Var_Network
//purpose :
//==========================================================================================
AdvApp2Var_Network::AdvApp2Var_Network()
{
}

View File

@@ -0,0 +1,104 @@
// Created on: 1996-04-10
// Created by: Joelle CHAUVET
// 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 _AdvApp2Var_Network_HeaderFile
#define _AdvApp2Var_Network_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <AdvApp2Var_SequenceOfPatch.hxx>
#include <TColStd_SequenceOfReal.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Real.hxx>
class Standard_NoSuchObject;
class AdvApp2Var_Patch;
class AdvApp2Var_Network
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT AdvApp2Var_Network();
Standard_EXPORT AdvApp2Var_Network(const AdvApp2Var_SequenceOfPatch& Net, const TColStd_SequenceOfReal& TheU, const TColStd_SequenceOfReal& TheV);
//! search the Index of the first Patch not approximated,
//! if all Patches are approximated Standard_False is returned
Standard_EXPORT Standard_Boolean FirstNotApprox (Standard_Integer& Index) const;
AdvApp2Var_Patch& ChangePatch (const Standard_Integer Index);
AdvApp2Var_Patch& operator() (const Standard_Integer Index)
{
return ChangePatch(Index);
}
Standard_EXPORT void UpdateInU (const Standard_Real CuttingValue);
Standard_EXPORT void UpdateInV (const Standard_Real CuttingValue);
Standard_EXPORT void SameDegree (const Standard_Integer iu, const Standard_Integer iv, Standard_Integer& ncfu, Standard_Integer& ncfv);
Standard_EXPORT Standard_Integer NbPatch() const;
Standard_EXPORT Standard_Integer NbPatchInU() const;
Standard_EXPORT Standard_Integer NbPatchInV() const;
Standard_EXPORT Standard_Real UParameter (const Standard_Integer Index) const;
Standard_EXPORT Standard_Real VParameter (const Standard_Integer Index) const;
const AdvApp2Var_Patch& Patch (const Standard_Integer UIndex, const Standard_Integer VIndex) const;
const AdvApp2Var_Patch& operator() (const Standard_Integer UIndex, const Standard_Integer VIndex) const
{
return Patch(UIndex,VIndex);
}
protected:
private:
AdvApp2Var_SequenceOfPatch myNet;
TColStd_SequenceOfReal myUParameters;
TColStd_SequenceOfReal myVParameters;
};
#include <AdvApp2Var_Network.lxx>
#endif // _AdvApp2Var_Network_HeaderFile

View File

@@ -1,57 +0,0 @@
-- Created on: 1996-04-09
-- Created by: Joelle CHAUVET
-- 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 Node from AdvApp2Var
---Purpose :
-- used to store constraints on a (Ui,Vj) point
--
uses
XY,Pnt from gp,
HArray2OfPnt from TColgp,
HArray2OfReal from TColStd
is
Create returns Node;
Create(iu,iv : Integer) returns Node;
Create(UV : XY from gp; iu,iv : Integer) returns Node;
Create(Other : Node) returns Node is private;
Coord(me) returns XY from gp;
SetCoord(me : in out; x1,x2 : Real);
UOrder(me) returns Integer;
VOrder(me) returns Integer;
SetPoint(me : in out; iu,iv : Integer; Cte : Pnt from gp);
Point(me; iu,iv : Integer) returns Pnt from gp;
SetError(me : in out; iu,iv : Integer; error : Real);
Error(me; iu,iv : Integer) returns Real;
fields
myCoord : XY from gp;
myOrdInU, myOrdInV : Integer;
myTruePoints : HArray2OfPnt from TColgp;
myErrors : HArray2OfReal from TColStd;
end Node;

View File

@@ -14,16 +14,17 @@
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#include <AdvApp2Var_Node.ixx>
#include <AdvApp2Var_Node.hxx>
#include <gp_Pnt.hxx>
#include <gp_XY.hxx>
#include <TColgp_HArray2OfPnt.hxx>
#include <TColStd_HArray2OfReal.hxx>
//=======================================================================
//function : AdvApp2Var_Node
//purpose :
//=======================================================================
AdvApp2Var_Node::AdvApp2Var_Node() :
myOrdInU(2),
myOrdInV(2)

View File

@@ -0,0 +1,94 @@
// Created on: 1996-04-09
// Created by: Joelle CHAUVET
// 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 _AdvApp2Var_Node_HeaderFile
#define _AdvApp2Var_Node_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <gp_XY.hxx>
#include <Standard_Integer.hxx>
#include <TColgp_HArray2OfPnt.hxx>
#include <TColStd_HArray2OfReal.hxx>
#include <Standard_Real.hxx>
class gp_XY;
class gp_Pnt;
//! used to store constraints on a (Ui,Vj) point
class AdvApp2Var_Node
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT AdvApp2Var_Node();
Standard_EXPORT AdvApp2Var_Node(const Standard_Integer iu, const Standard_Integer iv);
Standard_EXPORT AdvApp2Var_Node(const gp_XY& UV, const Standard_Integer iu, const Standard_Integer iv);
Standard_EXPORT gp_XY Coord() const;
Standard_EXPORT void SetCoord (const Standard_Real x1, const Standard_Real x2);
Standard_EXPORT Standard_Integer UOrder() const;
Standard_EXPORT Standard_Integer VOrder() const;
Standard_EXPORT void SetPoint (const Standard_Integer iu, const Standard_Integer iv, const gp_Pnt& Cte);
Standard_EXPORT gp_Pnt Point (const Standard_Integer iu, const Standard_Integer iv) const;
Standard_EXPORT void SetError (const Standard_Integer iu, const Standard_Integer iv, const Standard_Real error);
Standard_EXPORT Standard_Real Error (const Standard_Integer iu, const Standard_Integer iv) const;
protected:
private:
Standard_EXPORT AdvApp2Var_Node(const AdvApp2Var_Node& Other);
gp_XY myCoord;
Standard_Integer myOrdInU;
Standard_Integer myOrdInV;
Handle(TColgp_HArray2OfPnt) myTruePoints;
Handle(TColStd_HArray2OfReal) myErrors;
};
#endif // _AdvApp2Var_Node_HeaderFile

View File

@@ -1,112 +0,0 @@
-- Created on: 1996-04-10
-- Created by: Joelle CHAUVET
-- 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: Wed Jan 15 09:45:42 1997
-- by: Joelle CHAUVET
-- G1135 : Methods CutSense with criterion, Coefficients,
-- CritValue, SetCritValue,
-- Field 'myCritValue'
class Patch from AdvApp2Var
---Purpose :
-- used to store results on a domain [Ui,Ui+1]x[Vj,Vj+1]
--
uses
Boolean,Integer,Real from Standard,
HArray1OfReal,HArray2OfReal from TColStd,
HArray2OfPnt from TColgp,
EvaluatorFunc2Var,Context,Framework,Criterion from AdvApp2Var
is
Create returns Patch;
Create(U0,U1,V0,V1 : Real; iu,iv : Integer) returns Patch;
Create(P : Patch) returns Patch is private;
IsDiscretised(me) returns Boolean;
Discretise(me: in out; Conditions : Context;
Constraints: Framework;
func : EvaluatorFunc2Var);
IsApproximated(me) returns Boolean;
HasResult(me) returns Boolean;
MakeApprox(me: in out; Conditions : Context;
Constraints: Framework;
NumDec : Integer);
AddConstraints(me: in out; Conditions : Context;
Constraints: Framework);
AddErrors(me: in out; Constraints: Framework);
ChangeDomain(me: in out; a,b,c,d : Real);
ResetApprox(me: in out);
OverwriteApprox(me: in out);
U0(me) returns Real;
U1(me) returns Real;
V0(me) returns Real;
V1(me) returns Real;
UOrder(me) returns Integer;
VOrder(me) returns Integer;
CutSense(me) returns Integer;
CutSense(me; Crit : Criterion; NumDec : Integer) returns Integer;
NbCoeffInU(me) returns Integer;
NbCoeffInV(me) returns Integer;
ChangeNbCoeff(me: in out; NbCoeffU, NbCoeffV : Integer);
Poles(me; SSPIndex : Integer; Conditions : Context) returns HArray2OfPnt;
Coefficients(me; SSPIndex : Integer; Conditions : Context) returns HArray1OfReal;
MaxErrors(me) returns HArray1OfReal;
AverageErrors(me) returns HArray1OfReal;
IsoErrors(me) returns HArray2OfReal;
CritValue(me) returns Real;
SetCritValue(me: in out; dist : Real);
fields
myU0, myU1 : Real;
myV0, myV1 : Real;
myOrdInU : Integer;
myOrdInV : Integer;
myNbCoeffInU : Integer;
myNbCoeffInV : Integer;
myApprIsDone : Boolean;
myHasResult : Boolean;
myEquation : HArray1OfReal;
myMaxErrors : HArray1OfReal;
myMoyErrors : HArray1OfReal;
myIsoErrors : HArray2OfReal;
myCutSense : Integer;
myDiscIsDone : Boolean;
mySosoTab : HArray1OfReal;
myDisoTab : HArray1OfReal;
mySodiTab : HArray1OfReal;
myDidiTab : HArray1OfReal;
myCritValue : Real;
end Patch;

View File

@@ -22,28 +22,28 @@
// by: Joelle CHAUVET / Jean-Marc LACHAUME
// Initialisation de myCritValue pour OSF
#include <AdvApp2Var_Patch.ixx>
#include <AdvApp2Var_Node.hxx>
#include <AdvApp2Var_ApproxF2var.hxx>
#include <AdvApp2Var_Context.hxx>
#include <AdvApp2Var_Criterion.hxx>
#include <AdvApp2Var_Framework.hxx>
#include <AdvApp2Var_Iso.hxx>
#include <AdvApp2Var_MathBase.hxx>
#include <AdvApp2Var_Node.hxx>
#include <AdvApp2Var_Patch.hxx>
#include <Convert_GridPolynomialToPoles.hxx>
#include <gp_Pnt.hxx>
#include <TColgp_HArray2OfPnt.hxx>
#include <Standard_ConstructionError.hxx>
#include <TColgp_Array2OfPnt.hxx>
#include <TColgp_HArray2OfPnt.hxx>
#include <TColStd_Array2OfReal.hxx>
#include <TColStd_HArray1OfInteger.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <TColStd_HArray2OfReal.hxx>
#include <TColStd_Array2OfReal.hxx>
#include <Convert_GridPolynomialToPoles.hxx>
#include <Standard_ConstructionError.hxx>
#include <AdvApp2Var_ApproxF2var.hxx>
#include <AdvApp2Var_MathBase.hxx>
//============================================================================
//function : AdvApp2Var_Patch
//purpose :
//============================================================================
AdvApp2Var_Patch::AdvApp2Var_Patch() :
myU0(0.),
myU1(1.),

View File

@@ -0,0 +1,151 @@
// Created on: 1996-04-10
// Created by: Joelle CHAUVET
// 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 _AdvApp2Var_Patch_HeaderFile
#define _AdvApp2Var_Patch_HeaderFile
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Handle.hxx>
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
#include <Standard_Boolean.hxx>
#include <TColStd_HArray1OfReal.hxx>
#include <TColStd_HArray2OfReal.hxx>
#include <AdvApp2Var_EvaluatorFunc2Var.hxx>
#include <TColgp_HArray2OfPnt.hxx>
class AdvApp2Var_Context;
class AdvApp2Var_Framework;
class AdvApp2Var_Criterion;
//! used to store results on a domain [Ui,Ui+1]x[Vj,Vj+1]
class AdvApp2Var_Patch
{
public:
DEFINE_STANDARD_ALLOC
Standard_EXPORT AdvApp2Var_Patch();
Standard_EXPORT AdvApp2Var_Patch(const Standard_Real U0, const Standard_Real U1, const Standard_Real V0, const Standard_Real V1, const Standard_Integer iu, const Standard_Integer iv);
Standard_EXPORT Standard_Boolean IsDiscretised() const;
Standard_EXPORT void Discretise (const AdvApp2Var_Context& Conditions, const AdvApp2Var_Framework& Constraints, const AdvApp2Var_EvaluatorFunc2Var& func);
Standard_EXPORT Standard_Boolean IsApproximated() const;
Standard_EXPORT Standard_Boolean HasResult() const;
Standard_EXPORT void MakeApprox (const AdvApp2Var_Context& Conditions, const AdvApp2Var_Framework& Constraints, const Standard_Integer NumDec);
Standard_EXPORT void AddConstraints (const AdvApp2Var_Context& Conditions, const AdvApp2Var_Framework& Constraints);
Standard_EXPORT void AddErrors (const AdvApp2Var_Framework& Constraints);
Standard_EXPORT void ChangeDomain (const Standard_Real a, const Standard_Real b, const Standard_Real c, const Standard_Real d);
Standard_EXPORT void ResetApprox();
Standard_EXPORT void OverwriteApprox();
Standard_EXPORT Standard_Real U0() const;
Standard_EXPORT Standard_Real U1() const;
Standard_EXPORT Standard_Real V0() const;
Standard_EXPORT Standard_Real V1() const;
Standard_EXPORT Standard_Integer UOrder() const;
Standard_EXPORT Standard_Integer VOrder() const;
Standard_EXPORT Standard_Integer CutSense() const;
Standard_EXPORT Standard_Integer CutSense (const AdvApp2Var_Criterion& Crit, const Standard_Integer NumDec) const;
Standard_EXPORT Standard_Integer NbCoeffInU() const;
Standard_EXPORT Standard_Integer NbCoeffInV() const;
Standard_EXPORT void ChangeNbCoeff (const Standard_Integer NbCoeffU, const Standard_Integer NbCoeffV);
Standard_EXPORT Handle(TColgp_HArray2OfPnt) Poles (const Standard_Integer SSPIndex, const AdvApp2Var_Context& Conditions) const;
Standard_EXPORT Handle(TColStd_HArray1OfReal) Coefficients (const Standard_Integer SSPIndex, const AdvApp2Var_Context& Conditions) const;
Standard_EXPORT Handle(TColStd_HArray1OfReal) MaxErrors() const;
Standard_EXPORT Handle(TColStd_HArray1OfReal) AverageErrors() const;
Standard_EXPORT Handle(TColStd_HArray2OfReal) IsoErrors() const;
Standard_EXPORT Standard_Real CritValue() const;
Standard_EXPORT void SetCritValue (const Standard_Real dist);
protected:
private:
Standard_EXPORT AdvApp2Var_Patch(const AdvApp2Var_Patch& P);
Standard_Real myU0;
Standard_Real myU1;
Standard_Real myV0;
Standard_Real myV1;
Standard_Integer myOrdInU;
Standard_Integer myOrdInV;
Standard_Integer myNbCoeffInU;
Standard_Integer myNbCoeffInV;
Standard_Boolean myApprIsDone;
Standard_Boolean myHasResult;
Handle(TColStd_HArray1OfReal) myEquation;
Handle(TColStd_HArray1OfReal) myMaxErrors;
Handle(TColStd_HArray1OfReal) myMoyErrors;
Handle(TColStd_HArray2OfReal) myIsoErrors;
Standard_Integer myCutSense;
Standard_Boolean myDiscIsDone;
Handle(TColStd_HArray1OfReal) mySosoTab;
Handle(TColStd_HArray1OfReal) myDisoTab;
Handle(TColStd_HArray1OfReal) mySodiTab;
Handle(TColStd_HArray1OfReal) myDidiTab;
Standard_Real myCritValue;
};
#endif // _AdvApp2Var_Patch_HeaderFile

View File

@@ -1,3 +1,14 @@
AdvApp2Var_ApproxAFunc2Var.cxx
AdvApp2Var_ApproxAFunc2Var.hxx
AdvApp2Var_ApproxAFunc2Var.lxx
AdvApp2Var_ApproxF2var.cxx
AdvApp2Var_ApproxF2var.hxx
AdvApp2Var_Context.cxx
AdvApp2Var_Context.hxx
AdvApp2Var_Criterion.cxx
AdvApp2Var_Criterion.hxx
AdvApp2Var_CriterionRepartition.hxx
AdvApp2Var_CriterionType.hxx
AdvApp2Var_Data.hxx
AdvApp2Var_Data_0.cxx
AdvApp2Var_Data_1.cxx
@@ -7,17 +18,27 @@ AdvApp2Var_Data_4.cxx
AdvApp2Var_Data_5.cxx
AdvApp2Var_Data_6.cxx
AdvApp2Var_Data_7.cxx
AdvApp2Var_EvaluatorFunc2Var.hxx
AdvApp2Var_ApproxF2var.hxx
AdvApp2Var_ApproxF2var.cxx
AdvApp2Var_Data_f2c.hxx
AdvApp2Var_MathBase.hxx
AdvApp2Var_EvaluatorFunc2Var.hxx
AdvApp2Var_Framework.cxx
AdvApp2Var_Framework.hxx
AdvApp2Var_Framework.lxx
AdvApp2Var_Iso.cxx
AdvApp2Var_Iso.hxx
AdvApp2Var_MathBase.cxx
AdvApp2Var_MathBase.hxx
AdvApp2Var_MathBase_mathinit.cxx
AdvApp2Var_SysBase.hxx
AdvApp2Var_SysBase.cxx
AdvApp2Var_SysBase_baseinit.cxx
AdvApp2Var_Strip.hxx
AdvApp2Var_Network.cxx
AdvApp2Var_Network.hxx
AdvApp2Var_Network.lxx
AdvApp2Var_Node.cxx
AdvApp2Var_Node.hxx
AdvApp2Var_Patch.cxx
AdvApp2Var_Patch.hxx
AdvApp2Var_SequenceOfNode.hxx
AdvApp2Var_SequenceOfPatch.hxx
AdvApp2Var_SequenceOfStrip.hxx
AdvApp2Var_Strip.hxx
AdvApp2Var_SysBase.cxx
AdvApp2Var_SysBase.hxx
AdvApp2Var_SysBase_baseinit.cxx