Fix approach to storage of NoteBook variables.
Before the fix: names of variables are stored in PythonDump commands
and nothing is stored in the Study.
Problem: after variable removal, the PythonDump script becomes invalid.
Fix: names of variables are stored in the Study, PythonDump commands
store indices of variables within "StringAttribute".
class SMESH_Gen_i {
...
- void UpdateParameters(/*CORBA::Object_ptr theObject,*/ const char* theParameters);
+ void UpdateParameters(CORBA::Object_ptr theObject, const char* theParameters);
+ const std::vector< int >& GetLastParamIndices() const;
+ std::vector< std::string > GetAllParameters(const std::string& theObjectEntry) const;
Fix a problem with visualisation of 'left_translated' mesh.
SMDS_Mesh::SMDS_Mesh()
{ ...
- points->SetNumberOfPoints(SMDS_Mesh::chunkSize);
+ points->SetNumberOfPoints(0);
and 13_projection_3d.py scripts from CEA test base
fix the regression on test_Prism3D_Improved.py (imps9/K2)
+ // not add not quadrilateral FACE as we can't compute it
+ // else if ( !quadAlgo->CheckNbEdges( theMesh, face ))
+ // // not add not quadrilateral FACE as it can be a prism side
+ // // else if ( myHelper->Count( face, TopAbs_EDGE, /*ignoreSame=*/false ) != 4 )
+ // {
+ // notQuadFaces.push_back( face );
+ // }
and 13_projection_3d.py scripts from CEA test base
When projecting quadratic 1D mesh to a 'vertical' composite side, fix
node location before creating a quadratic segment in order to have a
valid position (U and shape) of medium node.
+ // The above formular gives too short segments when Lmax/Lmin is too high
+ // because by this formular the largest segment is only 8 times longer than the
+ // shortest one ( 2/Pi * atan(x/5) varies within [0,1] ). So a new formular is:
+ // f(x) = 1 + (x/7 * 2/Pi * atan(x/5))
Make a script valid even if some involved object are not published:
eliminate SetName() and object removal from the scrip
SMESH_2smeshpy::
ConvertScript(const TCollection_AsciiString& theScript,
Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod,
Resource_DataMapOfAsciiStringAsciiString& theObjectNames,
+ std::set< TCollection_AsciiString >& theRemovedObjIDs,
SALOMEDS::Study_ptr& theStudy,
const bool theHistoricalDump);
+// bool isDegenTria( const SMDS_MeshNode * nn[3] )
+// {
+ // It was an attemp to fix a problem of a zero area face whose all nodes
+ // are on one staight EDGE. But omitting this face makes a hole in the mesh :(
+ // if ( !isDegen && allNodesAreOld )
+ // isDegen = isDegenTria( nn );
Let the helper set nodes on shape to avoid the pb with a medium nodes
set by mistake to EDGE instead of FACE.
The case is a triangle whose 3 nodes are on the same EDGE. The worst
is that in this case the medium node which is logically on FACE falls
to a straight EDGE, as the triangle is of zero area.
Avoid returning EDGE position for 2 nodes on the same EDGE, while the
medium node should be on FACE. The case is a triangle whose 3 nodes are on
the same EDGE. The worst is that in this case the medium node which
is logically on FACE falls to a straight EDGE, as the triangle is of
zero area (thanks to MEFISTO)
std::pair<int, TopAbs_ShapeEnum> GetMediumPos(const SMDS_MeshNode* n1,
const SMDS_MeshNode* n2,
+ const bool useCurSubShape=false);