]> SALOME platform Git repositories - modules/geom.git/blobdiff - src/GEOMImpl/GEOMImpl_FillingDriver.cxx
Salome HOME
0021684: EDF 2221 : Display the arguments and the name of the operations
[modules/geom.git] / src / GEOMImpl / GEOMImpl_FillingDriver.cxx
index 1907c7e539f0188b48d104541fb746a51d96bbc2..77d2295402d02a4dba492833a25b08077627a424 100644 (file)
@@ -386,44 +386,47 @@ Standard_Integer GEOMImpl_FillingDriver::Execute(TFunction_Logbook& log) const
   return 1;
 }
 
-
-//=======================================================================
-//function :  GEOMImpl_FillingDriver_Type_
-//purpose  :
-//=======================================================================
-Standard_EXPORT Handle_Standard_Type& GEOMImpl_FillingDriver_Type_()
+//================================================================================
+/*!
+ * \brief Returns a name of creation operation and names and values of creation parameters
+ */
+//================================================================================
+
+bool GEOMImpl_FillingDriver::
+GetCreationInformation(std::string&             theOperationName,
+                       std::vector<GEOM_Param>& theParams)
 {
-  static Handle_Standard_Type aType1 = STANDARD_TYPE(TFunction_Driver);
-  if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TFunction_Driver);
-  static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared);
-  if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared);
-  static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient);
-  if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient);
-
-  static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL};
-  static Handle_Standard_Type _aType = new Standard_Type("GEOMImpl_FillingDriver",
-                                                         sizeof(GEOMImpl_FillingDriver),
-                                                         1,
-                                                         (Standard_Address)_Ancestors,
-                                                         (Standard_Address)NULL);
-
-  return _aType;
-}
-
-//=======================================================================
-//function : DownCast
-//purpose  :
-//=======================================================================
-const Handle(GEOMImpl_FillingDriver) Handle(GEOMImpl_FillingDriver)::DownCast
-                                 (const Handle(Standard_Transient)& AnObject)
-{
-  Handle(GEOMImpl_FillingDriver) _anOtherObject;
-
-  if (!AnObject.IsNull()) {
-     if (AnObject->IsKind(STANDARD_TYPE(GEOMImpl_FillingDriver))) {
-       _anOtherObject = Handle(GEOMImpl_FillingDriver)((Handle(GEOMImpl_FillingDriver)&)AnObject);
-     }
+  if (Label().IsNull()) return 0;
+  Handle(GEOM_Function) function = GEOM_Function::GetFunction(Label());
+
+  GEOMImpl_IFilling aCI( function );
+  Standard_Integer aType = function->GetType();
+
+  theOperationName = "FILLING";
+
+  switch ( aType ) {
+  case BASIC_FILLING:
+  {
+    AddParam( theParams, "Input compound", aCI.GetShape() );
+    AddParam( theParams, "Method", aCI.GetMethod() );
+    const char* method[3] =
+      { "Standard", "Use edges orientation", "Correct edges orientation" };
+    if ( 0 <= aCI.GetMethod() && aCI.GetMethod() < 3 )
+      theParams[1] << " = " << method[ aCI.GetMethod() ];
+    AddParam( theParams, "Min deg", aCI.GetMinDeg() );
+    AddParam( theParams, "Max deg", aCI.GetMaxDeg() );
+    AddParam( theParams, "Nb. Iter", aCI.GetNbIter() );
+    AddParam( theParams, "Tol. 2D", aCI.GetTol2D() );
+    AddParam( theParams, "Tol. 3D", aCI.GetTol3D() );
+    AddParam( theParams, "Approximation", aCI.GetApprox() );
+    break;
+  }
+  default:
+    return false;
   }
 
-  return _anOtherObject;
+  return true;
 }
+
+IMPLEMENT_STANDARD_HANDLE (GEOMImpl_FillingDriver,GEOM_BaseDriver);
+IMPLEMENT_STANDARD_RTTIEXT (GEOMImpl_FillingDriver,GEOM_BaseDriver);