From 2f2a48ac533202bc8715491f6d06ad0bda6fce17 Mon Sep 17 00:00:00 2001 From: deseilligny Date: Thu, 20 May 2021 12:23:35 +0200 Subject: [PATCH] Bug altisol corrected --- include/general/exemple_basculement.h | 2 ++ src/uti_phgrm/Apero/Basculement.cpp | 2 ++ src/uti_phgrm/Apero/cPose.cpp | 17 ++++++++++++----- src/uti_phgrm/CPP_Apero.cpp | 4 +++- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/include/general/exemple_basculement.h b/include/general/exemple_basculement.h index 1bac7945fc..3e2b0e3ac3 100644 --- a/include/general/exemple_basculement.h +++ b/include/general/exemple_basculement.h @@ -55,6 +55,8 @@ class cL2EqObsBascult; /* */ /*****************************************************************************/ +extern bool DEBUG_GCP_BASCULE; + class cSolBasculeRig : public cTransfo3D { public : diff --git a/src/uti_phgrm/Apero/Basculement.cpp b/src/uti_phgrm/Apero/Basculement.cpp index 0b98704832..403b5eabf0 100644 --- a/src/uti_phgrm/Apero/Basculement.cpp +++ b/src/uti_phgrm/Apero/Basculement.cpp @@ -1309,9 +1309,11 @@ void cAppliApero::BasculePlan //--------------------------------------------- + void cAppliApero::Bascule(const cBasculeOrientation & aBO,bool CalledAfter) { + if (CalledAfter != aBO.AfterCompens().Val()) return; // cElRegex aSelectorEstim(aBO.PatternNameEstim().Val(),10); cSetName * aSelectorEstim = mICNM->KeyOrPatSelector(aBO.PatternNameEstim().Val()); diff --git a/src/uti_phgrm/Apero/cPose.cpp b/src/uti_phgrm/Apero/cPose.cpp index 132035dd24..b96c23964a 100644 --- a/src/uti_phgrm/Apero/cPose.cpp +++ b/src/uti_phgrm/Apero/cPose.cpp @@ -1551,7 +1551,10 @@ void cPoseCam::PCSetCurRot(const ElRotation3D & aRot) void cPoseCam::SetBascRig(const cSolBasculeRig & aSBR) { - PCSetCurRot(aSBR.TransformOriC2M(CurRot())); + + // Correc MPD 20/05/21 : put PCSetCurRot after aP = aSBR(aP); + // else the bascule on the point is done twice and altisol is bad ... + // PCSetCurRot(aSBR.TransformOriC2M(CurRot())); Pt3dr aP; if (mSomPM) @@ -1565,13 +1568,17 @@ void cPoseCam::SetBascRig(const cSolBasculeRig & aSBR) if (mProfondeur == PROF_UNDEF()) { std::cout << "Warn : NoProfInBasc For camera =" << mName << "\n"; + PCSetCurRot(aSBR.TransformOriC2M(CurRot())); + return; // ELISE_ASSERT( false,"No Profondeur in cPoseCam::SetBascRig"); - return ; } - - aP = aCS->ImEtProf2Terrain(aCS->Sz()/2.0,mProfondeur); - aP = aSBR(aP); + else + { + aP = aCS->ImEtProf2Terrain(aCS->Sz()/2.0,mProfondeur); + aP = aSBR(aP); + } } + PCSetCurRot(aSBR.TransformOriC2M(CurRot())); diff --git a/src/uti_phgrm/CPP_Apero.cpp b/src/uti_phgrm/CPP_Apero.cpp index 1c786137d8..1b6f00b117 100644 --- a/src/uti_phgrm/CPP_Apero.cpp +++ b/src/uti_phgrm/CPP_Apero.cpp @@ -56,8 +56,9 @@ void Apero_Banniere() extern const char * theNameVar_ParamApero[]; + int Apero_main(int argc,char ** argv) -{ +{ MMD_InitArgcArgv(argc,argv); AddEntryStringifie @@ -91,6 +92,7 @@ int Apero_main(int argc,char ** argv) L2SYM = aP2.mObj->AllMatSym().Val(); cAppliApero anAppli (aP2); + if (anAppli.ModeMaping()) { anAppli.DoMaping(argc,argv);