From: jfa Date: Fri, 3 Feb 2006 12:56:46 +0000 (+0000) Subject: Fix some problems. X-Git-Tag: mergeto_trunk_07Feb06~13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2004b837c714f99a964a9f686a5a39a6d3a8be69;p=modules%2Fvisu.git Fix some problems. --- diff --git a/src/VISU_I/VISU_CutLines_i.hh b/src/VISU_I/VISU_CutLines_i.hh index cdc7184a..7acb62a7 100644 --- a/src/VISU_I/VISU_CutLines_i.hh +++ b/src/VISU_I/VISU_CutLines_i.hh @@ -38,7 +38,10 @@ namespace VISU{ static int myNbPresent; CutLines_i(); CutLines_i(const CutLines_i&); + public: + typedef ScalarMap_i TSuperClass; + explicit CutLines_i(Result_i* theResult, bool theAddToStudy); diff --git a/src/VISU_I/VISU_CutPlanes_i.hh b/src/VISU_I/VISU_CutPlanes_i.hh index 66c2d913..1ade4906 100644 --- a/src/VISU_I/VISU_CutPlanes_i.hh +++ b/src/VISU_I/VISU_CutPlanes_i.hh @@ -38,7 +38,10 @@ namespace VISU{ static int myNbPresent; CutPlanes_i(); CutPlanes_i(const CutPlanes_i&); + public: + typedef ScalarMap_i TSuperClass; + explicit CutPlanes_i(Result_i* theResult, bool theAddToStudy); diff --git a/src/VISU_I/VISU_DeformedShape_i.hh b/src/VISU_I/VISU_DeformedShape_i.hh index e6fccb44..814438d6 100644 --- a/src/VISU_I/VISU_DeformedShape_i.hh +++ b/src/VISU_I/VISU_DeformedShape_i.hh @@ -38,7 +38,10 @@ namespace VISU{ static int myNbPresent; DeformedShape_i(); DeformedShape_i(const DeformedShape_i&); + public: + typedef ScalarMap_i TSuperClass; + explicit DeformedShape_i(Result_i* theResult, bool theAddToStudy); diff --git a/src/VISU_I/VISU_IsoSurfaces_i.hh b/src/VISU_I/VISU_IsoSurfaces_i.hh index 94e09915..b10ef520 100644 --- a/src/VISU_I/VISU_IsoSurfaces_i.hh +++ b/src/VISU_I/VISU_IsoSurfaces_i.hh @@ -38,7 +38,10 @@ namespace VISU{ static int myNbPresent; IsoSurfaces_i(); IsoSurfaces_i(const IsoSurfaces_i&); + public: + typedef ScalarMap_i TSuperClass; + explicit IsoSurfaces_i(Result_i* theResult, bool theAddToStudy); diff --git a/src/VISU_I/VISU_Plot3D_i.hh b/src/VISU_I/VISU_Plot3D_i.hh index a20df363..d612af1e 100644 --- a/src/VISU_I/VISU_Plot3D_i.hh +++ b/src/VISU_I/VISU_Plot3D_i.hh @@ -34,6 +34,8 @@ namespace VISU { Plot3D_i(const Plot3D_i&); public: + typedef ScalarMap_i TSuperClass; + explicit Plot3D_i (Result_i* theResult, bool theAddToStudy = true); explicit diff --git a/src/VISU_I/VISU_Prs3d_i.cc b/src/VISU_I/VISU_Prs3d_i.cc index 32338e4d..beaa4b68 100644 --- a/src/VISU_I/VISU_Prs3d_i.cc +++ b/src/VISU_I/VISU_Prs3d_i.cc @@ -167,6 +167,22 @@ VISU::Prs3d_i //---------------------------------------------------------------------------- +void +VISU::Prs3d_i +::CheckDataSet() +{ + vtkMapper *aMapper = myPipeLine->GetMapper(); + vtkDataSet *aDataSet = aMapper->GetInput(); + if (!aDataSet) + throw std::runtime_error("There is no input data !!!"); + aDataSet->Update(); + static float eps = VTK_LARGE_FLOAT * 0.1 ; + if (!aDataSet->GetNumberOfCells()) + throw std::runtime_error("There are no visible elements"); + if (aDataSet->GetLength() > eps) + throw std::runtime_error("Diagonal of the actor is too large !!!"); +} + void VISU::Prs3d_i ::RemoveFromStudy() @@ -232,6 +248,8 @@ VISU::Prs3d_i } Update(); + CheckDataSet(); + theActor->SetPrs3d(this); theActor->SetShrinkFactor(); theActor->SetPosition(myOffset); @@ -287,6 +305,7 @@ VISU::Prs3d_i { if(MYDEBUG) MESSAGE("Prs3d_i::UpdateActors - this = "<