while ( itMeshElems->more() ) {
const SMDS_MeshElement* aMeshElem = itMeshElems->next();
- SMDS_ElemIteratorPtr itElemNodes = aMeshElem->nodesIterator();
+ SMDS_NodeIteratorPtr itElemNodes = aMeshElem->nodeIterator();
while ( itElemNodes->more() ) {
- const SMDS_MeshNode* aMeshNode =
- static_cast<const SMDS_MeshNode*>( itElemNodes->next() );
+ const SMDS_MeshNode* aMeshNode = itElemNodes->next();
int aNodeID = aMeshNode->GetID();
TNodesMap::iterator anIter = nodesMap.find(aNodeID);
if ( anIter == nodesMap.end() ) {
// filling the elements types
SMDSAbs_ElementType aType = aMeshElem->GetType();
bool isPoly = aMeshElem->IsPoly();
-
myPreviewData->elementTypes[i].SMDS_ElementType = (SMESH::ElementType) aType;
- myPreviewData->elementTypes[i].isPoly = isPoly;
+ myPreviewData->elementTypes[i].isPoly = isPoly;
myPreviewData->elementTypes[i].nbNodesInElement = aMeshElem->NbNodes();
i++;
-
}
myPreviewData->nodesXYZ.length( j );
for( int i = 0; aConnIter != aNodesConnectivity.end(); aConnIter++, i++ )
myPreviewData->elementConnectivities[i] = *aConnIter;
}
-
return myPreviewData._retn();
+
SMESH_CATCH( SMESH::throwCorbaException );
return 0;
}
//=======================================================================
/*
* Returns description of an error/warning occured during the last operation
+ * WARNING: ComputeError.code >= 100 and no corresponding enum in IDL API
*/
//=======================================================================
//=============================================================================
/*!
- *
+ * \brief Fuse neighbour triangles into quadrangles.
*/
//=============================================================================
//=============================================================================
/*!
- *
+ * \brief Fuse neighbour triangles into quadrangles.
*/
//=============================================================================
//=============================================================================
/*!
- *
+ * \brief Split quadrangles into triangles.
*/
//=============================================================================
return 0;
}
-
//=============================================================================
/*!
- *
+ * \brief Split quadrangles into triangles.
*/
//=============================================================================
+
CORBA::Boolean SMESH_MeshEditor_i::QuadToTriObject (SMESH::SMESH_IDSource_ptr theObject,
SMESH::NumericalFunctor_ptr Criterion)
throw (SALOME::SALOME_Exception)
return 0;
}
+//================================================================================
+/*!
+ * \brief Split each of quadrangles into 4 triangles.
+ * \param [in] theObject - theQuads Container of quadrangles to split.
+ */
+//================================================================================
+
+void SMESH_MeshEditor_i::QuadTo4Tri (SMESH::SMESH_IDSource_ptr theObject)
+ throw (SALOME::SALOME_Exception)
+{
+ SMESH_TRY;
+ initData();
+
+ TIDSortedElemSet faces;
+ if ( !idSourceToSet( theObject, getMeshDS(), faces, SMDSAbs_Face, /*emptyIfIsMesh=*/true ) &&
+ faces.empty() )
+ THROW_SALOME_CORBA_EXCEPTION("No faces given", SALOME::BAD_PARAM);
+
+ getEditor().QuadTo4Tri( faces );
+ TPythonDump() << this << ".QuadTo4Tri( " << theObject << " )";
+
+ SMESH_CATCH( SMESH::throwCorbaException );
+}
//=============================================================================
/*!
- *
+ * \brief Split quadrangles into triangles.
*/
//=============================================================================
+
CORBA::Boolean SMESH_MeshEditor_i::SplitQuad (const SMESH::long_array & IDsOfElements,
CORBA::Boolean Diag13)
throw (SALOME::SALOME_Exception)
return 0;
}
-
//=============================================================================
/*!
- *
+ * \brief Split quadrangles into triangles.
*/
//=============================================================================
+
CORBA::Boolean SMESH_MeshEditor_i::SplitQuadObject (SMESH::SMESH_IDSource_ptr theObject,
CORBA::Boolean Diag13)
throw (SALOME::SALOME_Exception)
//=============================================================================
/*!
- * BestSplit
+ * Find better splitting of the given quadrangle.
+ * \param IDOfQuad ID of the quadrangle to be splitted.
+ * \param Criterion A criterion to choose a diagonal for splitting.
+ * \return 1 if 1-3 diagonal is better, 2 if 2-4
+ * diagonal is better, 0 if error occurs.
*/
//=============================================================================
return 0;
}
-
//=============================================================================
/*!
*
return 0;
}
-
//=============================================================================
/*!
*