}
-void VISU::CutLines_i::SameAs(const CutLines_i* theOrigin){
- VISU::ScalarMap_i::SameAs(theOrigin);
-}
-
/*! Copy map to /a myMapCurvesInverted.
* \param theCurves - map
*/
explicit
CutLines_i(Result_i* theResult,
SALOMEDS::SObject_ptr theSObject);
- virtual void SameAs(const CutLines_i* theOrigin);
virtual ~CutLines_i();
virtual VISU::VISUType GetType() { return VISU::TCUTLINES;};
}
-void VISU::CutPlanes_i::SameAs(const CutPlanes_i* theOrigin){
- VISU::ScalarMap_i::SameAs(theOrigin);
-}
-
-
VISU::Storable* VISU::CutPlanes_i::Create(const char* theMeshName, VISU::Entity theEntity,
const char* theFieldName, int theIteration)
{
explicit
CutPlanes_i(Result_i* theResult,
SALOMEDS::SObject_ptr theSObject);
- virtual void SameAs(const CutPlanes_i* theOrigin);
virtual ~CutPlanes_i();
virtual VISU::VISUType GetType() { return VISU::TCUTPLANES;};
}
-void VISU::DeformedShape_i::SameAs(const DeformedShape_i* theOrigin)
+void VISU::DeformedShape_i::SameAs(const Prs3d_i* theOrigin)
{
- DeformedShape_i* aDefShape = const_cast<DeformedShape_i*>(theOrigin);
VISU::ScalarMap_i::SameAs(theOrigin);
- SetColor(aDefShape->GetColor());
- ShowColored(aDefShape->IsColored());
+ if (const DeformedShape_i* aConstDefShape = dynamic_cast<const DeformedShape_i*>(theOrigin)) {
+ DeformedShape_i* aDefShape = const_cast<DeformedShape_i*>(aConstDefShape);
+ SetColor(aDefShape->GetColor());
+ ShowColored(aDefShape->IsColored());
+ }
}
explicit
DeformedShape_i(Result_i* theResult,
SALOMEDS::SObject_ptr theSObject);
- virtual void SameAs(const DeformedShape_i* theOrigin);
+ virtual void SameAs(const Prs3d_i* theOrigin);
virtual ~DeformedShape_i();
virtual VISU::VISUType GetType() { return VISU::TDEFORMEDSHAPE;};
}
-void VISU::IsoSurfaces_i::SameAs(const IsoSurfaces_i* theOrigin) {
- VISU::ScalarMap_i::SameAs(theOrigin);
-}
-
-
VISU::Storable* VISU::IsoSurfaces_i::Create(const char* theMeshName, VISU::Entity theEntity,
const char* theFieldName, int theIteration)
{
explicit
IsoSurfaces_i(Result_i* theResult,
SALOMEDS::SObject_ptr theSObject);
- virtual void SameAs(const IsoSurfaces_i* theOrigin);
virtual ~IsoSurfaces_i();
virtual VISU::VISUType GetType() { return VISU::TISOSURFACE;};
}
-void VISU::Mesh_i::SameAs (const Mesh_i* theOrigin)
+void VISU::Mesh_i::SameAs (const Prs3d_i* theOrigin)
{
return; // "SameAs" command for mesh is not valid in current architecture
}
explicit
Mesh_i(Result_i* theResult,
SALOMEDS::SObject_ptr theSObject);
- virtual void SameAs(const Mesh_i* theOrigin);
+ virtual void SameAs(const Prs3d_i* theOrigin);
virtual ~Mesh_i();
virtual void RemoveFromStudy();
{
}
-void VISU::Plot3D_i::SameAs (const Plot3D_i* theOrigin)
-{
- VISU::ScalarMap_i::SameAs(theOrigin);
-}
-
VISU::Storable* VISU::Plot3D_i::Create (const char* theMeshName, VISU::Entity theEntity,
const char* theFieldName, int theIteration)
{
explicit
Plot3D_i (Result_i* theResult, SALOMEDS::SObject_ptr theSObject);
- virtual void SameAs (const Plot3D_i* theOrigin);
virtual ~Plot3D_i();
virtual VISU::VISUType GetType() { return VISU::TPLOT3D; };
}
-void VISU::ScalarMap_i::SameAs(const ScalarMap_i* theOrigin)
+void VISU::ScalarMap_i::SameAs(const Prs3d_i* theOrigin)
{
- ScalarMap_i* aScalarMap = const_cast<ScalarMap_i*>(theOrigin);
DoHook();
- VISU::Prs3d_i::SameAs(aScalarMap);
+ VISU::Prs3d_i::SameAs(theOrigin);
+
+ const ScalarMap_i* aConstScalarMap = dynamic_cast<const ScalarMap_i*>(theOrigin);
+ if (!aConstScalarMap) return;
+
+ ScalarMap_i* aScalarMap = const_cast<ScalarMap_i*>(aConstScalarMap);
myField = aScalarMap->GetField();
myMeshName = myField->myMeshName;
myEntity = myField->myEntity;
explicit
ScalarMap_i(Result_i* theResult,
SALOMEDS::SObject_ptr theSObject);
- virtual void SameAs(const ScalarMap_i* theOrigin);
+ virtual void SameAs(const Prs3d_i* theOrigin);
virtual ~ScalarMap_i();
virtual void RemoveFromStudy();
const std::string& GetMeshName() const { return myMeshName;}
VISU::Entity GetEntity() const { return VISU::Entity(myEntity);}
const string& GetFieldName() const { return myFieldName;}
- int GetIteration() const { return myIteration;}
+ //int GetIteration() const { return myIteration;}
virtual void ToStream(std::ostringstream& theStr);
}
-void VISU::StreamLines_i::SameAs(const StreamLines_i* theOrigin) {
- StreamLines_i* aStreamLines = const_cast<StreamLines_i*>(theOrigin);
+void VISU::StreamLines_i::SameAs(const Prs3d_i* theOrigin)
+{
VISU::DeformedShape_i::SameAs(theOrigin);
- SetSource(aStreamLines->GetSource());
+
+ if (const StreamLines_i* aConstStreamLines = dynamic_cast<const StreamLines_i*>(theOrigin)) {
+ StreamLines_i* aStreamLines = const_cast<StreamLines_i*>(aConstStreamLines);
+ SetSource(aStreamLines->GetSource());
+ }
}
explicit
StreamLines_i(Result_i* theResult,
SALOMEDS::SObject_ptr theSObject);
- virtual void SameAs(const StreamLines_i* theOriginal);
+ virtual void SameAs(const Prs3d_i* theOriginal);
virtual ~StreamLines_i();
virtual VISU::VISUType GetType() { return VISU::TSTREAMLINES;}
}
-void VISU::Vectors_i::SameAs(const VISU::Vectors_i* theOrigin) {
- Vectors_i* aVectors = const_cast<Vectors_i*>(theOrigin);
+void VISU::Vectors_i::SameAs(const VISU::Prs3d_i* theOrigin)
+{
VISU::DeformedShape_i::SameAs(theOrigin);
- SetLineWidth(aVectors->GetLineWidth());
+ if (const VISU::Vectors_i* aConstVec = dynamic_cast<const VISU::Vectors_i*>(theOrigin)) {
+ VISU::Vectors_i* aVectors = const_cast<VISU::Vectors_i*>(aConstVec);
+ SetLineWidth(aVectors->GetLineWidth());
+ }
}
explicit
Vectors_i(Result_i* theResult,
SALOMEDS::SObject_ptr theSObject);
- virtual void SameAs(const Vectors_i* theOrigin);
+ virtual void SameAs(const Prs3d_i* theOrigin);
virtual ~Vectors_i();
virtual VISU::VISUType GetType() { return VISU::TVECTORS;};