in boolean byMesh)
raises ( SALOME::SALOME_Exception );
+ /*!
+ * Sets number of segments per diagonal of boundary box of geometry by which
+ * default segment length of appropriate 1D hypotheses is defined
+ */
+ void SetBoundaryBoxSegmentation( in long theNbSegments );
+
/*!
* Set the object name
*/
MESSAGE("SMESH_Gen::SMESH_Gen");
_localId = 0;
_hypId = 0;
+ _segmentation = 10;
}
//=============================================================================
return myStudyContext;
}
-//=============================================================================
-/*!
- *
- */
-//=============================================================================
-
-void SMESH_Gen::Save(int studyId, const char *aUrlOfFile)
-{
-}
-
-//=============================================================================
-/*!
- *
- */
-//=============================================================================
-
-void SMESH_Gen::Load(int studyId, const char *aUrlOfFile)
-{
-}
-
-//=============================================================================
-/*!
- *
- */
-//=============================================================================
-
-void SMESH_Gen::Close(int studyId)
-{
-}
+// //=============================================================================
+// /*!
+// *
+// */
+// //=============================================================================
+
+// void SMESH_Gen::Save(int studyId, const char *aUrlOfFile)
+// {
+// }
+
+// //=============================================================================
+// /*!
+// *
+// */
+// //=============================================================================
+
+// void SMESH_Gen::Load(int studyId, const char *aUrlOfFile)
+// {
+// }
+
+// //=============================================================================
+// /*!
+// *
+// */
+// //=============================================================================
+
+// void SMESH_Gen::Close(int studyId)
+// {
+// }
//=============================================================================
/*!
// notify on bad state of attached algos, return false
// if Compute() would fail because of some algo bad state
+ /*!
+ * \brief Sets number of segments per diagonal of boundary box of geometry by which
+ * default segment length of appropriate 1D hypotheses is defined
+ */
+ void SetBoundaryBoxSegmentation( int theNbSegments ) { _segmentation = theNbSegments; }
+ int GetBoundaryBoxSegmentation() const { return _segmentation; }
struct TAlgoStateError
{
// inherited methods from SALOMEDS::Driver
- void Save(int studyId, const char *aUrlOfFile);
- void Load(int studyId, const char *aUrlOfFile);
- void Close(int studyId);
- const char *ComponentDataType();
+// void Save(int studyId, const char *aUrlOfFile);
+// void Load(int studyId, const char *aUrlOfFile);
+// void Close(int studyId);
+// const char *ComponentDataType();
- const char *IORToLocalPersistentID(const char *IORString, bool & IsAFile);
- const char *LocalPersistentIDToIOR(const char *aLocalPersistentID);
+// const char *IORToLocalPersistentID(const char *IORString, bool & IsAFile);
+// const char *LocalPersistentIDToIOR(const char *aLocalPersistentID);
int GetANewId();
// hypotheses managing
int _hypId;
+
+ // number of segments per diagonal of boundary box of geometry by which
+ // default segment length of appropriate 1D hypotheses is defined
+ int _segmentation;
};
#endif
SMESH_Mesh_i* meshServant = new SMESH_Mesh_i( GetPOA(), this, GetCurrentStudyID() );
// create a new mesh object
meshServant->SetImpl( myGen.CreateMesh( GetCurrentStudyID(), myIsEmbeddedMode ));
- meshServant->GetImpl().SetNbElementsPerDiagonal( nbElemPerDiagonal );
// activate the CORBA servant of Mesh
SMESH::SMESH_Mesh_var mesh = SMESH::SMESH_Mesh::_narrow( meshServant->_this() );
diagonal = mesh->GetShapeDiagonalSize();
else
diagonal = ::SMESH_Mesh::GetShapeDiagonalSize( shape );
- double elemSize = diagonal / nbElemPerDiagonal;
+ double elemSize = diagonal / myGen.GetBoundaryBoxSegmentation();
if ( elemSize > 0 ) {
// let the temporary hypothesis initialize it's values
if ( hyp->SetParametersByElementSize( elemSize, mesh ))
return SMESH::SMESH_Hypothesis::_nil();
}
+//=============================================================================
+/*!
+ * Sets number of segments per diagonal of boundary box of geometry by which
+ * default segment length of appropriate 1D hypotheses is defined
+ */
+//=============================================================================
+
+void SMESH_Gen_i::SetBoundaryBoxSegmentation( CORBA::Long theNbSegments )
+{
+ myGen.SetBoundaryBoxSegmentation( int( theNbSegments ));
+}
+
//=============================================================================
/*!
* SMESH_Gen_i::CreateMesh
CORBA::Boolean byMesh)
throw ( SALOME::SALOME_Exception );
+ /*!
+ * Sets number of segments per diagonal of boundary box of geometry by which
+ * default segment length of appropriate 1D hypotheses is defined
+ */
+ void SetBoundaryBoxSegmentation( CORBA::Long theNbSegments );
+
// Create empty mesh on a shape
SMESH::SMESH_Mesh_ptr CreateMesh( GEOM::GEOM_Object_ptr theShapeObject )
throw ( SALOME::SALOME_Exception );