mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0022312: Translation of french commentaries in OCCT files
This commit is contained in:
@@ -2,18 +2,6 @@
|
||||
// Created: Wed Jul 3 15:34:08 1996
|
||||
// Author: Joelle CHAUVET
|
||||
// <jct@sgi38>
|
||||
// Modified: Wed Jan 15 10:04:41 1997
|
||||
// by: Joelle CHAUVET
|
||||
// G1135 : Constructor with criterion
|
||||
// Private methods 'Init','InitGrid','Perform','ConvertBS',
|
||||
// 'ComputePatches','ComputeConstraints',
|
||||
// 'Compute3DErrors','ComputeCritError'
|
||||
// Public method 'CritError'
|
||||
// Fields 'myConditions','myResults','myConstraints'
|
||||
// Modified: Fri Oct 3 14:58:05 1997
|
||||
// by: Joelle CHAUVET
|
||||
// GeomConvert_CompBezierSurfacesToBSplineSurface est remplace par
|
||||
// Convert_GridPolynomialToPoles dans ConvertBS
|
||||
|
||||
#include <AdvApp2Var_ApproxAFunc2Var.hxx>
|
||||
#include <AdvApp2Var_EvaluatorFunc2Var.hxx>
|
||||
@@ -291,7 +279,7 @@ void AdvApp2Var_ApproxAFunc2Var::InitGrid(const Standard_Integer NbInt)
|
||||
|
||||
AdvApp2Var_Framework Constraints(Bag,UStrip,VStrip);
|
||||
|
||||
// decoupes regulieres si NbInt>1
|
||||
// regular cutting if NbInt>1
|
||||
Standard_Real deltu = (myLastParInU-myFirstParInU)/NbInt,
|
||||
deltv = (myLastParInV-myFirstParInV)/NbInt;
|
||||
for (iint=1;iint<=NbInt-1;iint++) {
|
||||
@@ -350,10 +338,10 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice
|
||||
|
||||
while (myResult.FirstNotApprox(FirstNA)) {
|
||||
|
||||
// completude de l'ensemble des contraintes
|
||||
// complete the set of constraints
|
||||
ComputeConstraints(UChoice, VChoice, Func);
|
||||
|
||||
// discretisation des contraintes relatives au carreau
|
||||
// discretization of constraints relative to the square
|
||||
myResult(FirstNA).Discretise(myConditions,myConstraints,Func);
|
||||
if ( ! myResult(FirstNA).IsDiscretised() ) {
|
||||
myHasResult = myDone = Standard_False;
|
||||
@@ -361,8 +349,8 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice
|
||||
("AdvApp2Var_ApproxAFunc2Var : Surface Discretisation Error");
|
||||
}
|
||||
|
||||
// calcul du nombre et du type de decoupes autorisees
|
||||
// en fonction du nombre de carreaux max et de la validite des decoupes suiv.
|
||||
// calculate the number and the type of autorized cuts
|
||||
// depending on the max number of squares and the validity of next cuts.
|
||||
NbU = myResult.NbPatchInU();
|
||||
NbV = myResult.NbPatchInV();
|
||||
NbPatch = NbU*NbV;
|
||||
@@ -385,13 +373,13 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice
|
||||
if ( Umore && Vmore ) NumDec=5;
|
||||
}
|
||||
|
||||
// approximation du carreau
|
||||
// approximation of the square
|
||||
myResult(FirstNA).MakeApprox(myConditions,myConstraints,NumDec);
|
||||
|
||||
if ( ! myResult(FirstNA).IsApproximated() ) {
|
||||
switch (myResult(FirstNA).CutSense()) {
|
||||
case 0 :
|
||||
// On ne peut plus decouper : on garde le resultat
|
||||
// It is not possible to cut : the result is preserved
|
||||
if ( myResult(FirstNA).HasResult()) {
|
||||
myResult(FirstNA).OverwriteApprox();
|
||||
}
|
||||
@@ -402,17 +390,17 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice
|
||||
}
|
||||
break;
|
||||
case 1 :
|
||||
// Il faut decouper en U
|
||||
// It is necessary to cut in U
|
||||
myResult.UpdateInU(Udec);
|
||||
myConstraints.UpdateInU(Udec);
|
||||
break;
|
||||
case 2 :
|
||||
// Il faut decouper en V
|
||||
// It is necessary to cut in V
|
||||
myResult.UpdateInV(Vdec);
|
||||
myConstraints.UpdateInV(Vdec);
|
||||
break;
|
||||
case 3 :
|
||||
// Il faut decouper en U et en V
|
||||
// It is necesary to cut in U and V
|
||||
myResult.UpdateInU(Udec);
|
||||
myConstraints.UpdateInU(Udec);
|
||||
myResult.UpdateInV(Vdec);
|
||||
@@ -444,14 +432,14 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice
|
||||
|
||||
while (myResult.FirstNotApprox(FirstNA)) {
|
||||
|
||||
// completude de l'ensemble des contraintes
|
||||
// complete the set of constraints
|
||||
ComputeConstraints(UChoice, VChoice, Func, Crit);
|
||||
if (decision>0) {
|
||||
m0 = m1;
|
||||
m1 = 0.;
|
||||
}
|
||||
|
||||
// discretisation des contraintes relatives au carreau
|
||||
// discretize the constraints relative to the square
|
||||
myResult(FirstNA).Discretise(myConditions,myConstraints,Func);
|
||||
if ( ! myResult(FirstNA).IsDiscretised() ) {
|
||||
myHasResult = myDone = Standard_False;
|
||||
@@ -459,8 +447,8 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice
|
||||
("AdvApp2Var_ApproxAFunc2Var : Surface Discretisation Error");
|
||||
}
|
||||
|
||||
// calcul du nombre et du type de decoupes autorisees
|
||||
// en fonction du nombre de carreaux max et de la validite des decoupes suiv.
|
||||
// calculate the number and type of autorized cuts
|
||||
// depending on the max number of squares and the validity of next cuts
|
||||
NbU = myResult.NbPatchInU();
|
||||
NbV = myResult.NbPatchInV();
|
||||
NbPatch = NbU*NbV;
|
||||
@@ -484,7 +472,7 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice
|
||||
if ( Umore && Vmore ) NumDec=5;
|
||||
}
|
||||
|
||||
// approximation du carreau
|
||||
// approximation of the square
|
||||
if ( CritAbs ) {
|
||||
myResult(FirstNA).MakeApprox(myConditions,myConstraints,0);
|
||||
}
|
||||
@@ -493,13 +481,13 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice
|
||||
}
|
||||
if (NumDec>=3) NumDec = NumDec - 2;
|
||||
|
||||
// evaluation du critere sur le carreau
|
||||
// evaluation of the criterion on the square
|
||||
if ( myResult(FirstNA).HasResult() ) {
|
||||
Crit.Value(myResult(FirstNA),myConditions);
|
||||
CritValue = myResult(FirstNA).CritValue();
|
||||
if (m1<CritValue) m1 = CritValue;
|
||||
}
|
||||
// doit-on decouper ?
|
||||
// is it necessary to cut ?
|
||||
decision = myResult(FirstNA).CutSense(Crit,NumDec);
|
||||
Standard_Boolean Regular = (Crit.Repartition() == AdvApp2Var_Regular);
|
||||
// Standard_Boolean Regular = Standard_True;
|
||||
@@ -510,7 +498,7 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice
|
||||
else {
|
||||
switch (decision) {
|
||||
case 0 :
|
||||
// On ne peut plus decouper : on garde le resultat
|
||||
// Impossible to cut : the result is preserved
|
||||
if ( myResult(FirstNA).HasResult() ) {
|
||||
myResult(FirstNA).OverwriteApprox();
|
||||
}
|
||||
@@ -521,17 +509,17 @@ void AdvApp2Var_ApproxAFunc2Var::ComputePatches(const AdvApprox_Cutting& UChoice
|
||||
}
|
||||
break;
|
||||
case 1 :
|
||||
// Il faut decouper en U
|
||||
// It is necessary to cut in U
|
||||
myResult.UpdateInU(Udec);
|
||||
myConstraints.UpdateInU(Udec);
|
||||
break;
|
||||
case 2 :
|
||||
// Il faut decouper en V
|
||||
// It is necessary to cut in V
|
||||
myResult.UpdateInV(Vdec);
|
||||
myConstraints.UpdateInV(Vdec);
|
||||
break;
|
||||
case 3 :
|
||||
// Il faut decouper en U et en V
|
||||
// It is necessary to cut in U and V
|
||||
myResult.UpdateInU(Udec);
|
||||
myConstraints.UpdateInU(Udec);
|
||||
myResult.UpdateInV(Vdec);
|
||||
@@ -565,7 +553,7 @@ void AdvApp2Var_ApproxAFunc2Var::ComputeConstraints(const AdvApprox_Cutting& UCh
|
||||
|
||||
while ( myConstraints.FirstNotApprox(ind1, ind2, Is) ) {
|
||||
|
||||
// approximation de l'iso et calcul des contraintes aux extremites
|
||||
// approximation of iso and calculation of constraints at extremities
|
||||
indN1 = myConstraints.FirstNode(Is.Type(),ind1,ind2);
|
||||
N1 = myConstraints.Node(indN1);
|
||||
indN2 = myConstraints.LastNode(Is.Type(),ind1,ind2);
|
||||
@@ -577,14 +565,14 @@ void AdvApp2Var_ApproxAFunc2Var::ComputeConstraints(const AdvApprox_Cutting& UCh
|
||||
Func, N1 , N2);
|
||||
|
||||
if (Is.IsApproximated()) {
|
||||
// L'iso est approchee a la tolerance voulue
|
||||
// iso is approached at the required tolerance
|
||||
myConstraints.ChangeIso(ind1,ind2,Is);
|
||||
myConstraints.ChangeNode(indN1) = N1;
|
||||
myConstraints.ChangeNode(indN2) = N2;
|
||||
}
|
||||
|
||||
else {
|
||||
// Pas d'approximation satisfaisante
|
||||
// Approximation is not satisfactory
|
||||
NbU = myResult.NbPatchInU();
|
||||
NbV = myResult.NbPatchInV();
|
||||
if (Is.Type()==GeomAbs_IsoV) {
|
||||
@@ -597,7 +585,7 @@ void AdvApp2Var_ApproxAFunc2Var::ComputeConstraints(const AdvApprox_Cutting& UCh
|
||||
}
|
||||
|
||||
if (NbPatch<=myMaxPatches && more) {
|
||||
// On peut decouper l'iso
|
||||
// It is possible to cut iso
|
||||
if (Is.Type()==GeomAbs_IsoV) {
|
||||
myResult.UpdateInU(dec);
|
||||
myConstraints.UpdateInU(dec);
|
||||
@@ -609,7 +597,7 @@ void AdvApp2Var_ApproxAFunc2Var::ComputeConstraints(const AdvApprox_Cutting& UCh
|
||||
}
|
||||
|
||||
else {
|
||||
// On ne peut plus decouper : on garde le resultat
|
||||
// It is not possible to cut : the result is preserved
|
||||
if (Is.HasResult()) {
|
||||
Is.OverwriteApprox();
|
||||
myConstraints.ChangeIso(ind1,ind2,Is);
|
||||
@@ -647,7 +635,7 @@ void AdvApp2Var_ApproxAFunc2Var::ComputeConstraints(const AdvApprox_Cutting& UCh
|
||||
|
||||
while ( myConstraints.FirstNotApprox(ind1, ind2, Is) ) {
|
||||
|
||||
// approximation de l'iso et calcul des contraintes aux extremites
|
||||
// approximation of the iso and calculation of constraints at the extremities
|
||||
indN1 = myConstraints.FirstNode(Is.Type(),ind1,ind2);
|
||||
N1 = myConstraints.Node(indN1);
|
||||
indN2 = myConstraints.LastNode(Is.Type(),ind1,ind2);
|
||||
@@ -659,14 +647,14 @@ void AdvApp2Var_ApproxAFunc2Var::ComputeConstraints(const AdvApprox_Cutting& UCh
|
||||
Func, N1 , N2);
|
||||
|
||||
if (Is.IsApproximated()) {
|
||||
// L'iso est approchee a la tolerance voulue
|
||||
// iso is approached at the required tolerance
|
||||
myConstraints.ChangeIso(ind1,ind2,Is);
|
||||
myConstraints.ChangeNode(indN1) = N1;
|
||||
myConstraints.ChangeNode(indN2) = N2;
|
||||
}
|
||||
|
||||
else {
|
||||
// Pas d'approximation satisfaisante
|
||||
// Approximation is not satisfactory
|
||||
NbU = myResult.NbPatchInU();
|
||||
NbV = myResult.NbPatchInV();
|
||||
if (Is.Type()==GeomAbs_IsoV) {
|
||||
@@ -678,11 +666,11 @@ void AdvApp2Var_ApproxAFunc2Var::ComputeConstraints(const AdvApprox_Cutting& UCh
|
||||
more = VChoice.Value(Is.T0(),Is.T1(),dec);
|
||||
}
|
||||
|
||||
// Pour forcer l'Overwrite si le critere est Absolu
|
||||
// To force Overwrite if the criterion is Absolute
|
||||
more = more && (CritRel);
|
||||
|
||||
if (NbPatch<=myMaxPatches && more) {
|
||||
// On peut decouper l'iso
|
||||
// It is possible to cut iso
|
||||
if (Is.Type()==GeomAbs_IsoV) {
|
||||
myResult.UpdateInU(dec);
|
||||
myConstraints.UpdateInU(dec);
|
||||
@@ -694,7 +682,7 @@ void AdvApp2Var_ApproxAFunc2Var::ComputeConstraints(const AdvApprox_Cutting& UCh
|
||||
}
|
||||
|
||||
else {
|
||||
// On ne peut plus decouper : on garde le resultat
|
||||
// It is not possible to cut: the result is preserved
|
||||
if (Is.HasResult()) {
|
||||
Is.OverwriteApprox();
|
||||
myConstraints.ChangeIso(ind1,ind2,Is);
|
||||
@@ -790,14 +778,14 @@ void AdvApp2Var_ApproxAFunc2Var::ComputeCritError()
|
||||
|
||||
void AdvApp2Var_ApproxAFunc2Var::ConvertBS()
|
||||
{
|
||||
// Homogeneisation des degres
|
||||
// Homogeneization of degrees
|
||||
Standard_Integer iu = myConditions.UOrder(), iv = myConditions.VOrder();
|
||||
Standard_Integer ncfu = myConditions.ULimit(), ncfv = myConditions.VLimit();
|
||||
myResult.SameDegree(iu,iv,ncfu,ncfv);
|
||||
myDegreeInU = ncfu - 1;
|
||||
myDegreeInV = ncfv - 1;
|
||||
|
||||
// Calcul des surfaces resultats
|
||||
// Calculate resulting surfaces
|
||||
mySurfaces = new ( TColGeom_HArray1OfSurface) (1, myNumSubSpaces[2]);
|
||||
|
||||
Standard_Integer j;
|
||||
@@ -807,7 +795,7 @@ void AdvApp2Var_ApproxAFunc2Var::ConvertBS()
|
||||
TColStd_Array1OfReal VKnots (1, myResult.NbPatchInV()+1);
|
||||
for (j=1; j<=VKnots.Length(); j++) { VKnots.SetValue(j, myResult.VParameter(j)); }
|
||||
|
||||
// Preparation des donnees pour la conversion grille de polynomes --> poles
|
||||
// Prepare data for conversion grid of polynoms --> poles
|
||||
Handle(TColStd_HArray1OfReal) Uint1 =
|
||||
new (TColStd_HArray1OfReal) (1,2);
|
||||
Uint1->SetValue(1, -1);
|
||||
@@ -835,7 +823,7 @@ void AdvApp2Var_ApproxAFunc2Var::ConvertBS()
|
||||
Standard_Integer SSP, i;
|
||||
for (SSP=1; SSP <= myNumSubSpaces[2]; SSP++) {
|
||||
|
||||
// Creation de la grille de polynomes
|
||||
// Creation of the grid of polynoms
|
||||
Standard_Integer n=0,icf=1,ieq;
|
||||
for (j=1; j<=myResult.NbPatchInV(); j++) {
|
||||
for (i=1; i<=myResult.NbPatchInU(); i++) {
|
||||
@@ -850,13 +838,13 @@ void AdvApp2Var_ApproxAFunc2Var::ConvertBS()
|
||||
}
|
||||
}
|
||||
|
||||
// Conversion en poles
|
||||
// Conversion into poles
|
||||
Convert_GridPolynomialToPoles CvP (myResult.NbPatchInU(),myResult.NbPatchInV(),
|
||||
iu,iv,myMaxDegInU,myMaxDegInV,NbCoeff,
|
||||
Poly,Uint1,Vint1,Uint2,Vint2);
|
||||
if ( !CvP.IsDone() ) { myDone = Standard_False; }
|
||||
|
||||
// Conversion en BSpline
|
||||
// Conversion into BSpline
|
||||
mySurfaces->ChangeValue(SSP) = new (Geom_BSplineSurface)
|
||||
( CvP.Poles()->Array2(),
|
||||
CvP.UKnots()->Array1(), CvP.VKnots()->Array1(),
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -2,50 +2,44 @@
|
||||
// Created: Tue Jul 2 10:31:42 1996
|
||||
// Author: Joelle CHAUVET
|
||||
// <jct@sgi38>
|
||||
// Modified: Mon Dec 9 11:39:13 1996
|
||||
// by: Joelle CHAUVET
|
||||
// G1135 : empty constructor
|
||||
// G1134 : option 0 for precision code
|
||||
// by PMN
|
||||
// PRO9093 on remplace MA1NPB par une gestion contextuelle
|
||||
// pour determiner le degree de Jacobbi.
|
||||
|
||||
|
||||
#include <AdvApp2Var_Context.ixx>
|
||||
#include <Standard_ConstructionError.hxx>
|
||||
#include <AdvApp2Var_ApproxF2var.hxx>
|
||||
|
||||
// Calcul des parametres
|
||||
// Calculaton of parameters
|
||||
static Standard_Boolean lesparam(const Standard_Integer iordre,
|
||||
const Standard_Integer ncflim,
|
||||
const Standard_Integer icodeo,
|
||||
Standard_Integer& nbpnts,
|
||||
Standard_Integer& ndgjac)
|
||||
{
|
||||
// degree de jacobi
|
||||
ndgjac = ncflim; // il toujours garder un coeff en reserve
|
||||
// jacobi degree
|
||||
ndgjac = ncflim; // it always keeps a reserve coefficient
|
||||
if (icodeo< 0) return Standard_False;
|
||||
if (icodeo > 0) {
|
||||
ndgjac += (9 - (iordre+1)); //iordre decale les frequences vers le haut
|
||||
ndgjac += (9 - (iordre+1)); //iordre rescales the frequences upwards
|
||||
ndgjac += (icodeo-1)*10;
|
||||
}
|
||||
// ---> Nbre mini de points necessaires.
|
||||
// ---> Min Number of required pointss.
|
||||
if (ndgjac < 8) { nbpnts = 8; }
|
||||
else if (ndgjac < 10) { nbpnts = 10; }
|
||||
// else if (ndgjac < 15) { nbpnt = 15; } Bug Nombre impairs
|
||||
// else if (ndgjac < 15) { nbpnt = 15; } Bug Uneven number
|
||||
else if (ndgjac < 20) { nbpnts = 20;}
|
||||
// else if (ndgjac < 25) { nbpnt = 25; } Bug Nombre impairs
|
||||
// else if (ndgjac < 25) { nbpnt = 25; } Bug Uneven number
|
||||
else if (ndgjac < 30) { nbpnts = 30;}
|
||||
else if (ndgjac < 40) { nbpnts = 40;}
|
||||
else if (ndgjac < 50) { nbpnts = 50;}
|
||||
// else if (*ndgjac < 61) { nbpnt = 61;} Bug Nombre impairs
|
||||
// else if (*ndgjac < 61) { nbpnt = 61;} Bug Uneven number
|
||||
else {
|
||||
nbpnts = 50;
|
||||
#if DEB
|
||||
cout << "F(U, V) : Pas assez de point de discretisation" << endl;
|
||||
cout << "F(U, V) : Not enough points of discretization" << endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
// Si contraintes aux bords, cela fait 2 points de plus
|
||||
// If constraints are on borders, this adds 2 points
|
||||
if (iordre>-1) { nbpnts += 2;}
|
||||
|
||||
return Standard_True;
|
||||
|
@@ -103,26 +103,26 @@ void AdvApp2Var_Iso::MakeApprox(const AdvApp2Var_Context& Conditions,
|
||||
AdvApp2Var_Node& NodeBegin,
|
||||
AdvApp2Var_Node& NodeEnd)
|
||||
{
|
||||
// les valeurs fixes
|
||||
// fixed values
|
||||
Standard_Integer NBCRMX=1, NBCRBE;
|
||||
// les donnees stockees dans le Context
|
||||
// data stored in the Context
|
||||
Standard_Integer NDIMEN, NBSESP, NDIMSE;
|
||||
NDIMEN = Conditions.TotalDimension();
|
||||
NBSESP = Conditions.TotalNumberSSP();
|
||||
// Attention : ne marche que pour le 3D
|
||||
// Attention : works only in 3D
|
||||
NDIMSE = 3;
|
||||
// le domaine de la grille
|
||||
// the domain of the grid
|
||||
Standard_Real UVFONC[4];
|
||||
UVFONC[0] = U0;
|
||||
UVFONC[1] = U1;
|
||||
UVFONC[2] = V0;
|
||||
UVFONC[3] = V1;
|
||||
|
||||
// les donnees relatives a l'iso a approcher
|
||||
// data related to the processed iso
|
||||
Standard_Integer IORDRE = myExtremOrder, IDERIV = myDerivOrder;
|
||||
Standard_Real TCONST = myConstPar;
|
||||
|
||||
// les donnees relatives au type de l'iso
|
||||
// data related to the type of the iso
|
||||
Standard_Integer ISOFAV,NBROOT,NDGJAC,NCFLIM;
|
||||
Standard_Real TABDEC[2];
|
||||
Handle (TColStd_HArray1OfReal) HUROOT = Conditions.URoots();
|
||||
@@ -162,7 +162,7 @@ void AdvApp2Var_Iso::MakeApprox(const AdvApp2Var_Context& Conditions,
|
||||
//#endif
|
||||
}
|
||||
|
||||
// les donnees relatives a la position de l'iso (frontiere ou ligne de decoupe)
|
||||
// data relative to the position of iso (front or cut line)
|
||||
Handle (TColStd_HArray1OfReal) HEPSAPR = new TColStd_HArray1OfReal(1,NBSESP);
|
||||
Standard_Integer iesp;
|
||||
switch(myPosition) {
|
||||
@@ -195,7 +195,7 @@ void AdvApp2Var_Iso::MakeApprox(const AdvApp2Var_Context& Conditions,
|
||||
Standard_Real *EPSAPR
|
||||
= (Standard_Real *) &HEPSAPR ->ChangeArray1()(HEPSAPR ->Lower());
|
||||
|
||||
// les tableaux des approximations
|
||||
// the tables of approximations
|
||||
Standard_Integer SZCRB = NDIMEN*NCFLIM;
|
||||
Handle (TColStd_HArray1OfReal) HCOURBE =
|
||||
new TColStd_HArray1OfReal(1,SZCRB*(IDERIV+1));
|
||||
@@ -233,13 +233,13 @@ void AdvApp2Var_Iso::MakeApprox(const AdvApp2Var_Context& Conditions,
|
||||
(HERRMOY ->LowerRow(),HERRMOY ->LowerCol());
|
||||
Standard_Real *EMYAPP = new Standard_Real[NBSESP];
|
||||
//
|
||||
// les approximations
|
||||
// the approximations
|
||||
//
|
||||
Standard_Integer IERCOD=0, NCOEFF=0;
|
||||
Standard_Integer iapp,ncfapp,ierapp;
|
||||
// Standard_Integer id,ic,ideb;
|
||||
for (iapp=0;iapp<=IDERIV;iapp++) {
|
||||
// approximation de la derivee d'ordre iapp
|
||||
// approximation of the derivative of order iapp
|
||||
ncfapp = 0;
|
||||
ierapp = 0;
|
||||
// GCC 3.0 would not accept this line without the void
|
||||
@@ -271,7 +271,7 @@ void AdvApp2Var_Iso::MakeApprox(const AdvApp2Var_Context& Conditions,
|
||||
EMXAPP,
|
||||
EMYAPP,
|
||||
&ierapp);
|
||||
// gestion des erreurs et du nombre de coeff.
|
||||
// error and coefficient management.
|
||||
if (ierapp>0) {
|
||||
myApprIsDone = Standard_False;
|
||||
myHasResult = Standard_False;
|
||||
@@ -279,7 +279,7 @@ void AdvApp2Var_Iso::MakeApprox(const AdvApp2Var_Context& Conditions,
|
||||
}
|
||||
if (NCOEFF<=ncfapp) NCOEFF=ncfapp;
|
||||
if (ierapp==-1) IERCOD = -1;
|
||||
// recuperation des contraintes d'ordre 0 a IORDRE aux extremites
|
||||
// return constraints of order 0 to IORDRE of extremities
|
||||
Standard_Integer ider, jpos=HCONTR1->Lower();
|
||||
for (ider=0; ider<=IORDRE;ider++) {
|
||||
gp_Pnt pt(HCONTR1->Value(jpos),
|
||||
@@ -306,25 +306,25 @@ void AdvApp2Var_Iso::MakeApprox(const AdvApp2Var_Context& Conditions,
|
||||
}
|
||||
jpos+=3;
|
||||
}
|
||||
// recuperation des erreurs
|
||||
// return errors
|
||||
for (iesp=1; iesp<=NBSESP;iesp++) {
|
||||
HERRMAX->SetValue(iesp,iapp+1,EMXAPP[iesp-1]);
|
||||
HERRMOY->SetValue(iesp,iapp+1,EMYAPP[iesp-1]);
|
||||
}
|
||||
// passage a l'approximation d'ordre superieur
|
||||
// passage to the approximation of higher order
|
||||
CRBAPP += SZCRB;
|
||||
SOMAPP += SZTAB;
|
||||
DIFAPP += SZTAB;
|
||||
}
|
||||
|
||||
// gestion des resultats
|
||||
// management of results
|
||||
if (IERCOD == 0) {
|
||||
// toutes les approx. sont bonnes
|
||||
// all approximations are correct
|
||||
myApprIsDone = Standard_True;
|
||||
myHasResult = Standard_True;
|
||||
}
|
||||
else if (IERCOD == -1) {
|
||||
// une approx. au moins n'est pas bonne
|
||||
// at least one approximation is not correct
|
||||
myApprIsDone = Standard_False;
|
||||
myHasResult = Standard_True;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -96,15 +96,15 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
|
||||
const AdvApp2Var_EvaluatorFunc2Var& Func)
|
||||
{
|
||||
|
||||
// les donnees stockees dans le Context
|
||||
// data stored in the Context
|
||||
Standard_Integer NDIMEN, NBSESP, NDIMSE, ISOFAV;
|
||||
NDIMEN = Conditions.TotalDimension();
|
||||
NBSESP = Conditions.TotalNumberSSP();
|
||||
// Attention : ne marche que pour le 3D
|
||||
// Attention : works only for 3D
|
||||
NDIMSE = 3;
|
||||
ISOFAV = Conditions.FavorIso();
|
||||
|
||||
// les donnees relatives au patch a discretiser
|
||||
// data related to the patch to be discretized
|
||||
Standard_Integer NBPNTU, NBPNTV;
|
||||
Standard_Integer IORDRU = myOrdInU, IORDRV = myOrdInV;
|
||||
Handle (TColStd_HArray1OfReal) HUROOT = Conditions.URoots();
|
||||
@@ -118,8 +118,8 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
|
||||
NBPNTV = (Conditions.VRoots())->Length();
|
||||
if (myOrdInV>-1) NBPNTV -= 2;
|
||||
|
||||
// les donnees stockees dans le Framework Constraints cad Noeuds et Isos
|
||||
// C1, C2, C3 et C4 sont dimensionnes en FORTRAN a (NDIMEN,IORDRU+2,IORDRV+2)
|
||||
// data stored in the Framework Constraints cad Nodes and Isos
|
||||
// C1, C2, C3 and C4 are dimensionnes in FORTRAN with (NDIMEN,IORDRU+2,IORDRV+2)
|
||||
Standard_Integer SIZE=NDIMEN*(IORDRU+2)*(IORDRV+2);
|
||||
Handle (TColStd_HArray1OfReal) HCOINS =
|
||||
new TColStd_HArray1OfReal(1,SIZE*4);
|
||||
@@ -130,10 +130,10 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
|
||||
|
||||
for (iu=0;iu<=myOrdInU;iu++) {
|
||||
for (iv=0;iv<=myOrdInV;iv++) {
|
||||
// facteur de normalisation
|
||||
// factor of normalization
|
||||
rho = pow(du,iu)*pow(dv,iv);
|
||||
|
||||
// F(U0,V0) et ses derivees normalisees sur (-1,1)
|
||||
// F(U0,V0) and its derivatives normalized on (-1,1)
|
||||
valnorm = rho * ((Constraints.Node(myU0,myV0)).Point(iu,iv)).X();
|
||||
HCOINS->SetValue( 1+NDIMEN*iu+NDIMEN*(IORDRU+2)*iv , valnorm );
|
||||
valnorm = rho * ((Constraints.Node(myU0,myV0)).Point(iu,iv)).Y();
|
||||
@@ -141,7 +141,7 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
|
||||
valnorm = rho * ((Constraints.Node(myU0,myV0)).Point(iu,iv)).Z();
|
||||
HCOINS->SetValue( 3+NDIMEN*iu+NDIMEN*(IORDRU+2)*iv, valnorm );
|
||||
|
||||
// F(U1,V0) et ses derivees normalisees sur (-1,1)
|
||||
// F(U1,V0) and its derivatives normalized on (-1,1)
|
||||
valnorm = rho * ((Constraints.Node(myU1,myV0)).Point(iu,iv)).X();
|
||||
HCOINS->SetValue( SIZE+1+NDIMEN*iu+NDIMEN*(IORDRU+2)*iv, valnorm );
|
||||
valnorm = rho * ((Constraints.Node(myU1,myV0)).Point(iu,iv)).Y();
|
||||
@@ -149,7 +149,7 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
|
||||
valnorm = rho * ((Constraints.Node(myU1,myV0)).Point(iu,iv)).Z();
|
||||
HCOINS->SetValue( SIZE+3+NDIMEN*iu+NDIMEN*(IORDRU+2)*iv, valnorm );
|
||||
|
||||
// F(U0,V1) et ses derivees normalisees sur (-1,1)
|
||||
// F(U0,V1) and its derivatives normalized on (-1,1)
|
||||
valnorm = rho * ((Constraints.Node(myU0,myV1)).Point(iu,iv)).X();
|
||||
HCOINS->SetValue( 2*SIZE+1+NDIMEN*iu+NDIMEN*(IORDRU+2)*iv, valnorm );
|
||||
valnorm = rho * ((Constraints.Node(myU0,myV1)).Point(iu,iv)).Y();
|
||||
@@ -157,7 +157,7 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
|
||||
valnorm = rho * ((Constraints.Node(myU0,myV1)).Point(iu,iv)).Z();
|
||||
HCOINS->SetValue( 2*SIZE+3+NDIMEN*iu+NDIMEN*(IORDRU+2)*iv, valnorm );
|
||||
|
||||
// F(U1,V1) et ses derivees normalisees sur (-1,1)
|
||||
// F(U1,V1) and its derivatives normalized on (-1,1)
|
||||
valnorm = rho * ((Constraints.Node(myU1,myV1)).Point(iu,iv)).X();
|
||||
HCOINS->SetValue( 3*SIZE+1+NDIMEN*iu+NDIMEN*(IORDRU+2)*iv, valnorm );
|
||||
valnorm = rho * ((Constraints.Node(myU1,myV1)).Point(iu,iv)).Y();
|
||||
@@ -172,8 +172,8 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
|
||||
Standard_Real *C3 = C2 + SIZE;
|
||||
Standard_Real *C4 = C3 + SIZE;
|
||||
|
||||
// tableaux SomTab et Diftab de discretisation des isos U=U0 et U=U1
|
||||
// SU0, SU1, DU0 et DU1 sont dimensionnes en FORTRAN a
|
||||
// tables SomTab and Diftab of discretization of isos U=U0 and U=U1
|
||||
// SU0, SU1, DU0 and DU1 are dimensioned in FORTRAN to
|
||||
// (1+NBPNTV/2)*NDIMEN*(IORDRU+1)
|
||||
|
||||
SIZE = (1+NBPNTV/2)*NDIMEN;
|
||||
@@ -198,7 +198,7 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
|
||||
HDU1 ->ChangeArray1() =
|
||||
( (Constraints.IsoU(myU1,myV0,myV1)).DifTab() ) ->Array1();
|
||||
|
||||
// normalisation
|
||||
// normalization
|
||||
Standard_Integer ideb1,ideb2,ideb3,ideb4,jj;
|
||||
for (iu=1;iu<=IORDRU;iu++) {
|
||||
rho = pow(du,iu);
|
||||
@@ -223,8 +223,8 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
|
||||
Standard_Real *DU1 =
|
||||
(Standard_Real *) &HDU1 ->ChangeArray1()(HDU1 ->Lower());
|
||||
|
||||
// tableaux SomTab et Diftab de discretisation des isos V=V0 et V=V1
|
||||
// SU0, SU1, DU0 et DU1 sont dimensionnes en FORTRAN a
|
||||
// tables SomTab and Diftab of discretization of isos V=V0 and V=V1
|
||||
// SU0, SU1, DU0 and DU1 are dimensioned in FORTRAN at
|
||||
// (1+NBPNTU/2)*NDIMEN*(IORDRV+1)
|
||||
|
||||
SIZE = (1+NBPNTU/2)*NDIMEN;
|
||||
@@ -273,7 +273,7 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
|
||||
Standard_Real *DV1 =
|
||||
(Standard_Real *) &HDV1 ->ChangeArray1()(HDV1 ->Lower());
|
||||
|
||||
// SOSOTB et DIDITB sont dimensionnes en FORTRAN a
|
||||
// SOSOTB and DIDITB are dimensioned in FORTRAN at
|
||||
// (0:NBPNTU/2,0:NBPNTV/2,NDIMEN)
|
||||
|
||||
SIZE=(1+NBPNTU/2)*(1+NBPNTV/2)*NDIMEN;
|
||||
@@ -289,7 +289,7 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
|
||||
(Standard_Real *) &HDIDI ->ChangeArray1()(HDIDI ->Lower());
|
||||
HDIDI->Init(0.);
|
||||
|
||||
// SODITB et DISOTB sont dimensionnes en FORTRAN a
|
||||
// SODITB and DISOTB are dimensioned in FORTRAN at
|
||||
// (1:NBPNTU/2,1:NBPNTV/2,NDIMEN)
|
||||
|
||||
SIZE=(NBPNTU/2)*(NBPNTV/2)*NDIMEN;
|
||||
@@ -307,12 +307,12 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
|
||||
|
||||
Standard_Integer IERCOD=0;
|
||||
|
||||
// discretisation des polynomes d'interpolation
|
||||
// discretization of polynoms of interpolation
|
||||
AdvApp2Var_ApproxF2var::mma2cdi_(&NDIMEN,&NBPNTU,UROOT,&NBPNTV,VROOT,&IORDRU,&IORDRV,
|
||||
C1,C2,C3,C4,SU0,SU1,DU0,DU1,SV0,SV1,DV0,DV1,
|
||||
SOSOTB,SODITB,DISOTB,DIDITB,&IERCOD);
|
||||
|
||||
// discretisation du carreau
|
||||
// discretization of the square
|
||||
Standard_Real UDBFN[2],VDBFN[2];
|
||||
UDBFN[0] = myU0;
|
||||
UDBFN[1] = myU1;
|
||||
@@ -350,7 +350,7 @@ void AdvApp2Var_Patch::Discretise(const AdvApp2Var_Context& Conditions,
|
||||
TAB,
|
||||
&IERCOD);
|
||||
|
||||
// on stocke les resultats
|
||||
// the results are stored
|
||||
if (IERCOD == 0) {
|
||||
myDiscIsDone = Standard_True;
|
||||
mySosoTab = HSOSO;
|
||||
@@ -391,24 +391,24 @@ Standard_Boolean AdvApp2Var_Patch::IsApproximated() const
|
||||
void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
|
||||
const AdvApp2Var_Framework& Constraints)
|
||||
{
|
||||
// les donnees stockees dans le Context
|
||||
// data stored in the Context
|
||||
Standard_Integer NDIMEN, NBSESP, NDIMSE;
|
||||
Standard_Integer IERCOD, NCFLMU, NCFLMV, NDegU, NDegV;
|
||||
NDIMEN = Conditions.TotalDimension();
|
||||
NBSESP = Conditions.TotalNumberSSP();
|
||||
// Attention : ne marche que pour le 3D
|
||||
// Attention : works only for 3D
|
||||
NDIMSE = 3;
|
||||
NCFLMU = Conditions.ULimit();
|
||||
NCFLMV = Conditions.VLimit();
|
||||
NDegU = NCFLMU - 1;
|
||||
NDegV = NCFLMV - 1;
|
||||
|
||||
// les donnees relatives au patch a approcher
|
||||
// data relative to the patch
|
||||
Standard_Integer IORDRU = myOrdInU, IORDRV = myOrdInV;
|
||||
Standard_Real *PATCAN =
|
||||
(Standard_Real *) &myEquation ->ChangeArray1()(myEquation ->Lower());
|
||||
|
||||
// les courbes d'approximation des Isos U
|
||||
// curves of approximation of Isos U
|
||||
Standard_Integer SIZE = NCFLMV*NDIMEN;
|
||||
Handle (TColStd_HArray1OfReal) HIsoU0
|
||||
= new TColStd_HArray1OfReal(1,SIZE*(IORDRU+1));
|
||||
@@ -434,7 +434,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
|
||||
(Standard_Integer *) &HCFU1 ->ChangeArray1()(HCFU1 ->Lower());
|
||||
HCFU1->Init( (Constraints.IsoU(myU1,myV0,myV1)).NbCoeff() );
|
||||
|
||||
// normalisation des Isos U
|
||||
// normalization of Isos U
|
||||
Standard_Integer iu,iv;
|
||||
Standard_Real du=(myU1-myU0)/2,dv=(myV1-myV0)/2,rho,valnorm;
|
||||
Standard_Integer ideb0,ideb1,jj;
|
||||
@@ -449,7 +449,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
|
||||
}
|
||||
}
|
||||
|
||||
// les courbes d'approximation des Isos V
|
||||
// curves of approximation of Isos V
|
||||
SIZE = NCFLMU*NDIMEN;
|
||||
Handle (TColStd_HArray1OfReal) HIsoV0
|
||||
= new TColStd_HArray1OfReal(1,SIZE*(IORDRV+1));
|
||||
@@ -475,7 +475,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
|
||||
(Standard_Integer *) &HCFV1 ->ChangeArray1()(HCFV1 ->Lower());
|
||||
HCFV1->Init( (Constraints.IsoV(myU0,myU1,myV1)).NbCoeff() );
|
||||
|
||||
// normalisation des Isos V
|
||||
// normalization of Isos V
|
||||
for (iv=1;iv<=IORDRV;iv++) {
|
||||
rho = pow(dv,iv);
|
||||
ideb0 = HIsoV0->Lower() + iv*SIZE -1;
|
||||
@@ -486,7 +486,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
|
||||
}
|
||||
}
|
||||
|
||||
// ajout des contraintes a V constant
|
||||
// add constraints to constant V
|
||||
Handle (TColStd_HArray1OfReal) HHERMV
|
||||
= new TColStd_HArray1OfReal(1,(2*IORDRV+2)*(2*IORDRV+2));
|
||||
Standard_Real *HermV =
|
||||
@@ -510,7 +510,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
|
||||
PATCAN);
|
||||
}
|
||||
|
||||
// ajout des contraintes a U constant
|
||||
// add constraints to constant U
|
||||
Handle (TColStd_HArray1OfReal) HHERMU
|
||||
= new TColStd_HArray1OfReal(1,(2*IORDRU+2)*(2*IORDRU+2));
|
||||
Standard_Real *HermU =
|
||||
@@ -525,7 +525,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
|
||||
NCFU0,IsoU0,NCFU1,IsoU1,HermU,PATCAN);
|
||||
}
|
||||
|
||||
// ajout des contraintes de coins
|
||||
// add constraints at the corners
|
||||
Standard_Integer ideb;
|
||||
SIZE=NDIMEN*(IORDRU+2)*(IORDRV+2);
|
||||
Handle (TColStd_HArray1OfReal) HCOINS =
|
||||
@@ -535,7 +535,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
|
||||
for (iv=0;iv<=myOrdInV;iv++) {
|
||||
rho = pow(du,iu)*pow(dv,iv);
|
||||
|
||||
// -F(U0,V0) et ses derivees normalisees sur (-1,1)
|
||||
// -F(U0,V0) and its derivatives normalized on (-1,1)
|
||||
ideb = HCOINS->Lower() + NDIMEN*iu+NDIMEN*(IORDRU+2)*iv - 1;
|
||||
valnorm = -rho * ((Constraints.Node(myU0,myV0)).Point(iu,iv)).X();
|
||||
HCOINS->SetValue( 1+ideb , valnorm );
|
||||
@@ -544,7 +544,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
|
||||
valnorm = -rho * ((Constraints.Node(myU0,myV0)).Point(iu,iv)).Z();
|
||||
HCOINS->SetValue( 3+ideb , valnorm );
|
||||
|
||||
// -F(U1,V0) et ses derivees normalisees sur (-1,1)
|
||||
// -F(U1,V0) and its derivatives normalized on (-1,1)
|
||||
ideb += SIZE;
|
||||
valnorm = -rho * ((Constraints.Node(myU1,myV0)).Point(iu,iv)).X();
|
||||
HCOINS->SetValue( 1+ideb , valnorm );
|
||||
@@ -553,7 +553,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
|
||||
valnorm = -rho * ((Constraints.Node(myU1,myV0)).Point(iu,iv)).Z();
|
||||
HCOINS->SetValue( 3+ideb , valnorm );
|
||||
|
||||
// -F(U0,V1) et ses derivees normalisees sur (-1,1)
|
||||
// -F(U0,V1) and its derivatives normalized on (-1,1)
|
||||
ideb += SIZE;
|
||||
valnorm = -rho * ((Constraints.Node(myU0,myV1)).Point(iu,iv)).X();
|
||||
HCOINS->SetValue( 1+ideb , valnorm );
|
||||
@@ -562,7 +562,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
|
||||
valnorm = -rho * ((Constraints.Node(myU0,myV1)).Point(iu,iv)).Z();
|
||||
HCOINS->SetValue( 3+ideb , valnorm );
|
||||
|
||||
// -F(U1,V1) et ses derivees normalisees sur (-1,1)
|
||||
// -F(U1,V1) and its derivatives normalized on (-1,1)
|
||||
ideb += SIZE;
|
||||
valnorm = -rho * ((Constraints.Node(myU1,myV1)).Point(iu,iv)).X();
|
||||
HCOINS->SetValue( 1+ideb , valnorm );
|
||||
@@ -573,7 +573,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
|
||||
}
|
||||
}
|
||||
|
||||
// tableaux necessaires pour le FORTRAN
|
||||
// tables required for FORTRAN
|
||||
Standard_Integer IORDMX = Max(IORDRU,IORDRV);
|
||||
Handle (TColStd_HArray1OfReal) HEXTR =
|
||||
new TColStd_HArray1OfReal(1,2*IORDMX+2);
|
||||
@@ -587,7 +587,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
|
||||
Standard_Integer idim,ncf0,ncf1,iun=1;
|
||||
Standard_Real *Is;
|
||||
|
||||
// ajout des extremites des isos U
|
||||
// add extremities of isos U
|
||||
for (iu=1;iu<=IORDRU+1;iu++) {
|
||||
ncf0 = HCFU0->Value(HCFU0->Lower()+iu-1);
|
||||
ncf1 = HCFU1->Value(HCFU1->Lower()+iu-1);
|
||||
@@ -609,7 +609,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
|
||||
}
|
||||
}
|
||||
|
||||
// ajout des extremites des isos V
|
||||
// add extremities of isos V
|
||||
for (iv=1;iv<=IORDRV+1;iv++) {
|
||||
ncf0 = HCFV0->Value(HCFV0->Lower()+iv-1);
|
||||
ncf1 = HCFV1->Value(HCFV1->Lower()+iv-1);
|
||||
@@ -631,7 +631,7 @@ void AdvApp2Var_Patch::AddConstraints(const AdvApp2Var_Context& Conditions,
|
||||
}
|
||||
}
|
||||
|
||||
// ajout du tout a PATCAN
|
||||
// add all to PATCAN
|
||||
Standard_Real *C1 =
|
||||
(Standard_Real *) &HCOINS ->ChangeArray1()(HCOINS ->Lower());
|
||||
Standard_Real *C2 = C1 + SIZE;
|
||||
@@ -660,7 +660,7 @@ void AdvApp2Var_Patch::AddErrors(const AdvApp2Var_Framework& Constraints)
|
||||
hmax[3] = 1.75;
|
||||
|
||||
for (iesp=1;iesp<=NBSESP;iesp++) {
|
||||
// erreur max dans le sous-espace iesp
|
||||
// error max in sub-space iesp
|
||||
errU=0.;
|
||||
for (iv=1;iv<=myOrdInV+1;iv++) {
|
||||
error = ((Constraints.IsoV(myU0,myU1,myV0)).MaxErrors())->Value(iesp,iv);
|
||||
@@ -678,7 +678,7 @@ void AdvApp2Var_Patch::AddErrors(const AdvApp2Var_Framework& Constraints)
|
||||
myMaxErrors->ChangeValue(iesp) +=
|
||||
errU * hmax[myOrdInV+1] + errV * hmax[myOrdInU+1];
|
||||
|
||||
// erreur moyenne dans le sous-espace iesp
|
||||
// average error in sub-space iesp
|
||||
errU=0.;
|
||||
for (iv=1;iv<=myOrdInV+1;iv++) {
|
||||
error = ((Constraints.IsoV(myU0,myU1,myV0)).MoyErrors())->Value(iesp,iv);
|
||||
@@ -699,7 +699,7 @@ void AdvApp2Var_Patch::AddErrors(const AdvApp2Var_Framework& Constraints)
|
||||
+ errV*hmax[myOrdInU+1] * errV*hmax[myOrdInU+1];
|
||||
myMoyErrors->SetValue(iesp,Sqrt(error));
|
||||
|
||||
// erreurs maxi aux iso-frontieres
|
||||
// max errors at iso-borders
|
||||
Handle (TColStd_HArray2OfReal) HERISO
|
||||
= new TColStd_HArray2OfReal(1,NBSESP,1,4);
|
||||
HERISO->SetValue(iesp,1,
|
||||
@@ -711,7 +711,7 @@ void AdvApp2Var_Patch::AddErrors(const AdvApp2Var_Framework& Constraints)
|
||||
HERISO->SetValue(iesp,4,
|
||||
((Constraints.IsoU(myU1,myV0,myV1)).MaxErrors())->Value(iesp,1));
|
||||
|
||||
// calcul des erreurs max aux coins
|
||||
// calculate max errors at the corners
|
||||
Standard_Real emax1=0.,emax2=0.,emax3=0.,emax4=0.,err1,err2,err3,err4;
|
||||
for (iu=0;iu<=myOrdInU;iu++) {
|
||||
for (iv=0;iv<=myOrdInV;iv++) {
|
||||
@@ -726,13 +726,13 @@ void AdvApp2Var_Patch::AddErrors(const AdvApp2Var_Framework& Constraints)
|
||||
}
|
||||
}
|
||||
|
||||
// calcul des erreurs max sur les bords
|
||||
// calculate max errors on borders
|
||||
err1 = Max(emax1,emax2);
|
||||
err2 = Max(emax3,emax4);
|
||||
err3 = Max(emax1,emax3);
|
||||
err4 = Max(emax2,emax4);
|
||||
|
||||
// calcul des erreurs finales sur les isos internes
|
||||
// calculate final errors on internal isos
|
||||
if ( (Constraints.IsoV(myU0,myU1,myV0)).Position() == 0 ) {
|
||||
HERISO ->ChangeValue(iesp,1) += err1*hmax[myOrdInU+1];
|
||||
}
|
||||
@@ -759,7 +759,7 @@ void AdvApp2Var_Patch::MakeApprox(const AdvApp2Var_Context& Conditions,
|
||||
const Standard_Integer NumDec)
|
||||
{
|
||||
|
||||
// les donnees stockees dans le Context
|
||||
// data stored in the Context
|
||||
Standard_Integer NDIMEN, NBSESP, NDIMSE;
|
||||
Standard_Integer NBPNTU, NBPNTV, NCFLMU, NCFLMV, NDJACU, NDJACV;
|
||||
Standard_Integer NDegU, NDegV, NJacU, NJacV;
|
||||
@@ -779,11 +779,11 @@ void AdvApp2Var_Patch::MakeApprox(const AdvApp2Var_Context& Conditions,
|
||||
NJacU = NDJACU + 1;
|
||||
NJacV = NDJACV + 1;
|
||||
|
||||
// les donnees relatives au patch a approcher
|
||||
// data relative to the processed patch
|
||||
Standard_Integer IORDRU = myOrdInU, IORDRV = myOrdInV,
|
||||
NDMINU = 1, NDMINV = 1, NCOEFU, NCOEFV;
|
||||
// NDMINU et NDMINV dependent du nb de coeff des isos voisines
|
||||
// et de l'ordre de continuite souhaite
|
||||
// NDMINU and NDMINV depend on the nb of coeff of neighboring isos
|
||||
// and of the required order of continuity
|
||||
NDMINU = Max(1,2*IORDRU+1);
|
||||
NCOEFU = (Constraints.IsoV(myU0,myU1,myV0)).NbCoeff()-1;
|
||||
NDMINU = Max(NDMINU,NCOEFU);
|
||||
@@ -796,7 +796,7 @@ void AdvApp2Var_Patch::MakeApprox(const AdvApp2Var_Context& Conditions,
|
||||
NCOEFV = (Constraints.IsoU(myU1,myV0,myV1)).NbCoeff()-1;
|
||||
NDMINV = Max(NDMINV,NCOEFV);
|
||||
|
||||
// les tableaux des approximations
|
||||
// tables of approximations
|
||||
Handle (TColStd_HArray1OfReal) HEPSAPR =
|
||||
new TColStd_HArray1OfReal(1,NBSESP);
|
||||
Handle (TColStd_HArray1OfReal) HEPSFRO =
|
||||
@@ -842,7 +842,7 @@ void AdvApp2Var_Patch::MakeApprox(const AdvApp2Var_Context& Conditions,
|
||||
Standard_Real *ERRMOY =
|
||||
(Standard_Real *) &HERRMOY ->ChangeArray1()(HERRMOY ->Lower());
|
||||
|
||||
// les tableaux de discretisation du carreau
|
||||
// tables of discretization of the square
|
||||
Standard_Real *SOSOTB =
|
||||
(Standard_Real *) &mySosoTab ->ChangeArray1()(mySosoTab ->Lower());
|
||||
Standard_Real *DISOTB =
|
||||
@@ -884,7 +884,7 @@ void AdvApp2Var_Patch::MakeApprox(const AdvApp2Var_Context& Conditions,
|
||||
&ITYDEC,
|
||||
&IERCOD);
|
||||
|
||||
// les resultats
|
||||
// results
|
||||
myCutSense = ITYDEC;
|
||||
if (ITYDEC == 0 && IERCOD<=0) {
|
||||
myHasResult = Standard_True;
|
||||
@@ -894,7 +894,7 @@ void AdvApp2Var_Patch::MakeApprox(const AdvApp2Var_Context& Conditions,
|
||||
myMaxErrors = HERRMAX;
|
||||
myMoyErrors = HERRMOY;
|
||||
|
||||
// Passage en canonique sur [-1,1]
|
||||
// Passage to canonic on [-1,1]
|
||||
AdvApp2Var_MathBase::mmfmca9_(&NJacU,&NJacV,&NDIMEN,&myNbCoeffInU,&myNbCoeffInV,
|
||||
&NDIMEN,PATJAC,PATJAC);
|
||||
AdvApp2Var_ApproxF2var::mma2can_(&NCFLMU,&NCFLMV,&NDIMEN,
|
||||
@@ -907,11 +907,11 @@ void AdvApp2Var_Patch::MakeApprox(const AdvApp2Var_Context& Conditions,
|
||||
}
|
||||
myEquation = HPCAN;
|
||||
|
||||
// Ajout des contraintes et des erreurs
|
||||
// Add constraints and errors
|
||||
AddConstraints(Conditions,Constraints);
|
||||
AddErrors(Constraints);
|
||||
|
||||
// Reduction des degres si possible
|
||||
// Reduction of degrees if possible
|
||||
PATCAN = (Standard_Real *)
|
||||
&myEquation->ChangeArray1()(myEquation ->Lower());
|
||||
|
||||
@@ -969,7 +969,7 @@ void AdvApp2Var_Patch::ChangeDomain(const Standard_Real a,
|
||||
|
||||
//============================================================================
|
||||
//function : ResetApprox
|
||||
//purpose : permet d'effacer un resultat lorsqu'il faut decouper
|
||||
//purpose : allows removing a result when it is necessary to cut
|
||||
//============================================================================
|
||||
|
||||
void AdvApp2Var_Patch::ResetApprox()
|
||||
@@ -980,8 +980,7 @@ void AdvApp2Var_Patch::ResetApprox()
|
||||
|
||||
//============================================================================
|
||||
//function : OverwriteApprox
|
||||
//purpose : permet de conserver un resultat
|
||||
// meme si la precision n'est pas satisfaite
|
||||
//purpose : allows preserving a result even if the precision is not satisfactory
|
||||
//============================================================================
|
||||
|
||||
void AdvApp2Var_Patch::OverwriteApprox()
|
||||
@@ -1052,9 +1051,9 @@ Standard_Integer AdvApp2Var_Patch::VOrder() const
|
||||
|
||||
|
||||
//============================================================================
|
||||
//function : CutSense sans Critere
|
||||
//purpose : 0 : OK; 1 : decoupe necessaire en U;
|
||||
// 2 : dec. nec. en V; 3 : dec. nec. en U et en V
|
||||
//function : CutSense without Critere
|
||||
//purpose : 0 : OK; 1 : required cut by U;
|
||||
// 2 : required cut by V; 3 : required cut by U and by V
|
||||
//============================================================================
|
||||
|
||||
Standard_Integer AdvApp2Var_Patch::CutSense() const
|
||||
@@ -1064,9 +1063,9 @@ Standard_Integer AdvApp2Var_Patch::CutSense() const
|
||||
|
||||
|
||||
//============================================================================
|
||||
//function : CutSense avec critere
|
||||
//purpose : 0 : OK; 1 : decoupe necessaire en U;
|
||||
// 2 : dec. nec. en V; 3 : dec. nec. en U et en V
|
||||
//function : CutSense with critere
|
||||
//purpose : 0 : OK; 1 : required cut by U;
|
||||
// 2 : required cut by V; 3 : required cut by U and by V
|
||||
//============================================================================
|
||||
|
||||
Standard_Integer AdvApp2Var_Patch::CutSense(const AdvApp2Var_Criterion& Crit,
|
||||
@@ -1109,7 +1108,7 @@ Standard_Integer AdvApp2Var_Patch::NbCoeffInV() const
|
||||
|
||||
//============================================================================
|
||||
//function : ChangeNbCoeff
|
||||
//purpose : permet d'augmenter le nombre de coeff (cf Network)
|
||||
//purpose : allows increasing the nb of coeff (cf Network)
|
||||
//============================================================================
|
||||
|
||||
void AdvApp2Var_Patch::ChangeNbCoeff(const Standard_Integer NbCoeffU,
|
||||
@@ -1121,7 +1120,7 @@ void AdvApp2Var_Patch::ChangeNbCoeff(const Standard_Integer NbCoeffU,
|
||||
|
||||
//============================================================================
|
||||
//function : MaxErrors
|
||||
//purpose : retourne les erreurs max de l'approximation polynomiale
|
||||
//purpose : returns max errors of polynomial approximation
|
||||
//============================================================================
|
||||
|
||||
Handle(TColStd_HArray1OfReal)
|
||||
@@ -1132,7 +1131,7 @@ AdvApp2Var_Patch::MaxErrors() const
|
||||
|
||||
//============================================================================
|
||||
//function : AverageErrors
|
||||
//purpose : retourne les erreurs moyennes de l'approximation polynomiale
|
||||
//purpose : returns average errors of polynomial approximation
|
||||
//============================================================================
|
||||
|
||||
Handle(TColStd_HArray1OfReal)
|
||||
@@ -1143,7 +1142,7 @@ AdvApp2Var_Patch::AverageErrors() const
|
||||
|
||||
//============================================================================
|
||||
//function : IsoErrors
|
||||
//purpose : retourne les erreurs max sur les frontieres de l'approx. polyn.
|
||||
//purpose : returns max errors on borders of polynomial approximation
|
||||
//============================================================================
|
||||
|
||||
Handle(TColStd_HArray2OfReal)
|
||||
@@ -1154,7 +1153,7 @@ AdvApp2Var_Patch::IsoErrors() const
|
||||
|
||||
//============================================================================
|
||||
//function : Poles
|
||||
//purpose : retourne les poles de l'approximation polynomiale
|
||||
//purpose : returns poles of the polynomial approximation
|
||||
//============================================================================
|
||||
|
||||
Handle(TColgp_HArray2OfPnt)
|
||||
@@ -1195,7 +1194,7 @@ AdvApp2Var_Patch::Poles(const Standard_Integer SSPIndex,
|
||||
|
||||
//============================================================================
|
||||
//function : Coefficients
|
||||
//purpose : retourne les coeff. de l'equation de l'approximation polynomiale
|
||||
//purpose : returns coeff. of the equation of polynomial approximation
|
||||
//============================================================================
|
||||
|
||||
Handle(TColStd_HArray1OfReal)
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user