-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_Gen_i.cxx
// Author : Paul RASCLE, EDF
aStudyBuilder->CommitCommand();
if ( !aSO->_is_nil() ) {
// Update Python script
- TPythonDump() << aSO << " = smeshgen.CreateMeshesFromUNV('" << theFileName << "')";
+ TPythonDump() << aSO << " = smeshgen.CreateMeshesFromUNV(r'" << theFileName << "')";
}
}
}
// Update Python script
- aPythonDump << "], status) = " << this << ".CreateMeshesFromMED('" << theFileName << "')";
+ aPythonDump << "], status) = " << this << ".CreateMeshesFromMED(r'" << theFileName << "')";
}
// Dump creation of groups
for ( int i = 0; i < aResult->length(); ++i )
aStudyBuilder->CommitCommand();
if ( !aSO->_is_nil() ) {
// Update Python script
- TPythonDump() << aSO << " = " << this << ".CreateMeshesFromSTL('" << theFileName << "')";
+ TPythonDump() << aSO << " = " << this << ".CreateMeshesFromSTL(r'" << theFileName << "')";
}
}
if (theMergeNodesAndElements) {
// merge nodes
- set<const SMDS_MeshNode*> aMeshNodes; // no input nodes
+ TIDSortedNodeSet aMeshNodes; // no input nodes
SMESH_MeshEditor::TListOfListOfNodes aGroupsOfNodes;
aNewEditor.FindCoincidentNodes( aMeshNodes, theMergeTolerance, aGroupsOfNodes );
aNewEditor.MergeNodes( aGroupsOfNodes );
aDataset->WriteOnDisk( anAutoColor );
aDataset->CloseOnDisk();
+ // issue 0020693. Store _isModified flag
+ int isModified = myImpl->GetImpl().GetIsModified();
+ aSize[ 0 ] = 1;
+ aDataset = new HDFdataset( "_isModified", aTopGroup, HDF_INT32, aSize, 1 );
+ aDataset->CreateOnDisk();
+ aDataset->WriteOnDisk( &isModified );
+ aDataset->CloseOnDisk();
+
// write reference on a shape if exists
SALOMEDS::SObject_var myRef;
bool shapeRefFound = false;
if ( nbNodes == 0 ) continue;
int aShapeID = (*itSubM).first;
+ if ( aShapeID < 1 || aShapeID > mySMESHDSMesh->MaxShapeIndex() )
+ continue;
int aShapeType = mySMESHDSMesh->IndexToShape( aShapeID ).ShapeType();
// write only SMDS_FacePosition and SMDS_EdgePosition
switch ( aShapeType ) {
}
PositionCreator() {
myFuncTable.resize( (size_t) TopAbs_SHAPE, & PositionCreator::defaultPosition );
- myFuncTable[ TopAbs_FACE ] = & PositionCreator::facePosition;
- myFuncTable[ TopAbs_EDGE ] = & PositionCreator::edgePosition;
+ myFuncTable[ TopAbs_SOLID ] = & PositionCreator::volumePosition;
+ myFuncTable[ TopAbs_FACE ] = & PositionCreator::facePosition;
+ myFuncTable[ TopAbs_EDGE ] = & PositionCreator::edgePosition;
myFuncTable[ TopAbs_VERTEX ] = & PositionCreator::vertexPosition;
}
private:
SMDS_PositionPtr edgePosition() const { return SMDS_PositionPtr( new SMDS_EdgePosition ); }
SMDS_PositionPtr facePosition() const { return SMDS_PositionPtr( new SMDS_FacePosition ); }
+ SMDS_PositionPtr volumePosition() const { return SMDS_PositionPtr( new SMDS_SpacePosition ); }
SMDS_PositionPtr vertexPosition() const { return SMDS_PositionPtr( new SMDS_VertexPosition); }
SMDS_PositionPtr defaultPosition() const { return SMDS_SpacePosition::originSpacePosition(); }
typedef SMDS_PositionPtr (PositionCreator:: * FmakePos)() const;
}
}
}
+
+ // issue 0020693. Restore _isModified flag
+ if( aTopGroup->ExistInternalObject( "_isModified" ) )
+ {
+ aDataset = new HDFdataset( "_isModified", aTopGroup );
+ aDataset->OpenOnDisk();
+ size = aDataset->GetSize();
+ int* isModified = new int[ size ];
+ aDataset->ReadFromDisk( isModified );
+ aDataset->CloseOnDisk();
+ myNewMeshImpl->GetImpl().SetIsModified( bool(*isModified));
+ }
}
}
}