* \return MEDCouplingUMesh * - A new object instance holding the copy of \a this (deep for connectivity, shallow for coordiantes)
* \sa MEDCouplingUMesh::deepCpy
*/
-MEDCouplingPointSet *MEDCouplingUMesh::deepCpyConnectivityOnly() const
+MEDCouplingUMesh *MEDCouplingUMesh::deepCpyConnectivityOnly() const
{
checkConnectivityFullyDefined();
MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> ret=clone(false);
return true;
}
-MEDCouplingPointSet *MEDCouplingUMesh::mergeMyselfWithOnSameCoords(const MEDCouplingPointSet *other) const
+MEDCouplingUMesh *MEDCouplingUMesh::mergeMyselfWithOnSameCoords(const MEDCouplingPointSet *other) const
{
if(!other)
throw INTERP_KERNEL::Exception("MEDCouplingUMesh::mergeMyselfWithOnSameCoords : input other is null !");
* \warning This method modifies can generate an unstructured mesh whose cells are not sorted by geometric type order.
* In view of the MED file writing, a renumbering of cells of returned unstructured mesh (using MEDCouplingUMesh::sortCellsInMEDFileFrmt) should be necessary.
*/
-MEDCouplingPointSet *MEDCouplingUMesh::buildPartOfMySelf2(int start, int end, int step, bool keepCoords) const
+MEDCouplingUMesh *MEDCouplingUMesh::buildPartOfMySelf2(int start, int end, int step, bool keepCoords) const
{
if(getMeshDimension()!=-1)
- return MEDCouplingPointSet::buildPartOfMySelf2(start,end,step,keepCoords);
+ return static_cast<MEDCouplingUMesh *>(MEDCouplingPointSet::buildPartOfMySelf2(start,end,step,keepCoords));
else
{
int newNbOfCells=DataArray::GetNumberOfItemGivenBESRelative(start,end,step,"MEDCouplingUMesh::buildPartOfMySelf2 for -1 dimension mesh ");
* \param [in] keepCoords - if \c true, the result mesh shares the node coordinates
* array of \a this mesh, else "free" nodes are removed from the result mesh
* by calling zipCoords().
- * \return MEDCouplingPointSet * - a new instance of MEDCouplingUMesh. The caller is
+ * \return MEDCouplingUMesh * - a new instance of MEDCouplingUMesh. The caller is
* to delete this mesh using decrRef() as it is no more needed.
* \throw If the coordinates array is not set.
* \throw If the nodal connectivity of cells is not defined.
* \ref py_mcumesh_buildPartOfMySelf "Here is a Python example".
* \endif
*/
-MEDCouplingPointSet *MEDCouplingUMesh::buildPartOfMySelf(const int *begin, const int *end, bool keepCoords) const
+MEDCouplingUMesh *MEDCouplingUMesh::buildPartOfMySelf(const int *begin, const int *end, bool keepCoords) const
{
if(getMeshDimension()!=-1)
- return MEDCouplingPointSet::buildPartOfMySelf(begin,end,keepCoords);
+ return static_cast<MEDCouplingUMesh *>(MEDCouplingPointSet::buildPartOfMySelf(begin,end,keepCoords));
else
{
if(end-begin!=1)
* \param [in] fullyIn - if \c true, then cells whose all nodes are in the
* array \a begin are added, else cells whose any node is in the
* array \a begin are added.
- * \return MEDCouplingPointSet * - new instance of MEDCouplingUMesh. The caller is
+ * \return MEDCouplingUMesh * - new instance of MEDCouplingUMesh. The caller is
* to delete this mesh using decrRef() as it is no more needed.
* \throw If the coordinates array is not set.
* \throw If the nodal connectivity of cells is not defined.
* \ref py_mcumesh_buildFacePartOfMySelfNode "Here is a Python example".
* \endif
*/
-MEDCouplingPointSet *MEDCouplingUMesh::buildFacePartOfMySelfNode(const int *begin, const int *end, bool fullyIn) const
+MEDCouplingUMesh *MEDCouplingUMesh::buildFacePartOfMySelfNode(const int *begin, const int *end, bool fullyIn) const
{
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> desc,descIndx,revDesc,revDescIndx;
desc=DataArrayInt::New(); descIndx=DataArrayInt::New(); revDesc=DataArrayInt::New(); revDescIndx=DataArrayInt::New();
MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> subMesh=buildDescendingConnectivity(desc,descIndx,revDesc,revDescIndx);
desc=0; descIndx=0; revDesc=0; revDescIndx=0;
- return subMesh->buildPartOfMySelfNode(begin,end,fullyIn);
+ return static_cast<MEDCouplingUMesh*>(subMesh->buildPartOfMySelfNode(begin,end,fullyIn));
}
/*!
* \param [in] keepCoords - if \c true, the result mesh shares the node coordinates
* array of \a this mesh, else "free" nodes are removed from the result mesh
* by calling zipCoords().
- * \return MEDCouplingPointSet * - a new instance of MEDCouplingUMesh. The caller is
+ * \return MEDCouplingUMesh * - a new instance of MEDCouplingUMesh. The caller is
* to delete this mesh using decrRef() as it is no more needed.
* \throw If the coordinates array is not set.
* \throw If the nodal connectivity of cells is not defined.
* \ref py_mcumesh_buildBoundaryMesh "Here is a Python example".
* \endif
*/
-MEDCouplingPointSet *MEDCouplingUMesh::buildBoundaryMesh(bool keepCoords) const
+MEDCouplingUMesh *MEDCouplingUMesh::buildBoundaryMesh(bool keepCoords) const
{
DataArrayInt *desc=DataArrayInt::New();
DataArrayInt *descIndx=DataArrayInt::New();
if(revDescIndxC[i+1]-revDescIndxC[i]==1)
boundaryCells.push_back(i);
revDescIndx->decrRef();
- MEDCouplingPointSet *ret=meshDM1->buildPartOfMySelf(&boundaryCells[0],&boundaryCells[0]+boundaryCells.size(),keepCoords);
+ MEDCouplingUMesh *ret=meshDM1->buildPartOfMySelf(&boundaryCells[0],&boundaryCells[0]+boundaryCells.size(),keepCoords);
return ret;
}
* This is the low algorithm of MEDCouplingUMesh::buildPartOfMySelf2.
* CellIds are given using range specified by a start an end and step.
*/
-MEDCouplingPointSet *MEDCouplingUMesh::buildPartOfMySelfKeepCoords2(int start, int end, int step) const
+MEDCouplingUMesh *MEDCouplingUMesh::buildPartOfMySelfKeepCoords2(int start, int end, int step) const
{
checkFullyDefined();
int ncell=getNumberOfCells();
* Keeps from \a this only cells which constituing point id are in the ids specified by [ \a begin,\a end ).
* The return newly allocated mesh will share the same coordinates as \a this.
*/
-MEDCouplingPointSet *MEDCouplingUMesh::buildPartOfMySelfKeepCoords(const int *begin, const int *end) const
+MEDCouplingUMesh *MEDCouplingUMesh::buildPartOfMySelfKeepCoords(const int *begin, const int *end) const
{
checkConnectivityFullyDefined();
int ncell=getNumberOfCells();
* This method is \b NOT const because it can modify \a this.
* \a this is expected to be an unstructured mesh with meshDim==2 and spaceDim==3. If not an exception will be thrown.
* \param mesh1D is an unstructured mesh with MeshDim==1 and spaceDim==3. If not an exception will be thrown.
- * \param policy specifies the type of extrusion chosen. \b 0 for translation (most simple),
- * \b 1 for translation and rotation around point of 'mesh1D'.
+ * \param policy specifies the type of extrusion chosen:
+ * - \b 0 for translation only (most simple): the cells of the 1D mesh represent the vectors along which the 2D mesh
+ * will be repeated to build each level
+ * - \b 1 for translation and rotation: the translation is done as above. For each level, an arc of circle is fitted on
+ * the 3 preceding points of the 1D mesh. The center of the arc is the center of rotation for each level, the rotation is done
+ * along an axis normal to the plane containing the arc, and finally the angle of rotation is defined by the first two points on the
+ * arc.
* \return an unstructured mesh with meshDim==3 and spaceDim==3. The returned mesh has the same coords than \a this.
*/
MEDCouplingUMesh *MEDCouplingUMesh::buildExtrudedMesh(const MEDCouplingUMesh *mesh1D, int policy)