]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Merge branch 'rnv/unicode'
authorrnv <rnv@opencascade.com>
Wed, 10 Oct 2018 19:53:26 +0000 (22:53 +0300)
committerrnv <rnv@opencascade.com>
Wed, 10 Oct 2018 19:53:26 +0000 (22:53 +0300)
src/GEOMGUI/GeometryGUI.cxx
src/GEOMGUI/GeometryGUI.h
src/GEOMImpl/GEOMImpl_IShapesOperations.cxx
src/GEOMImpl/GEOMImpl_PartitionDriver.cxx

index ffb9262a8eb4cc044cb5688ad1963856ee69f781..7e4acf07f1dc0c5af25eb819176f791c0769bfda 100755 (executable)
@@ -138,8 +138,6 @@ extern "C" {
   }
 }
 
-GeometryGUI::TextureMap GeometryGUI::myTextureMap;
-
 GEOM::GEOM_Gen_var GeometryGUI::myComponentGeom = GEOM::GEOM_Gen::_nil();
 
 GEOM::GEOM_Gen_var GeometryGUI::GetGeomGen()
@@ -2220,25 +2218,20 @@ QString GeometryGUI::engineIOR() const
 Handle(TColStd_HArray1OfByte) GeometryGUI::getTexture (int theId, int& theWidth, int& theHeight)
 {
   theWidth = theHeight = 0;
-
   Handle(TColStd_HArray1OfByte) aTexture;
 
-  aTexture = myTextureMap[ theId ];
-  if ( aTexture.IsNull() ) {
-    GEOM::GEOM_IInsertOperations_var aInsOp = GeometryGUI::GetGeomGen()->GetIInsertOperations();
-    if ( !aInsOp->_is_nil() ) {
-      CORBA::Long aWidth, aHeight;
-      SALOMEDS::TMPFile_var aStream = aInsOp->GetTexture( theId, aWidth, aHeight );
-      if ( aWidth > 0 && aHeight > 0 && aStream->length() > 0 ) {
-        theWidth  = aWidth;
-        theHeight = aHeight;
-
-        aTexture  = new TColStd_HArray1OfByte (1, aStream->length());
-
-        for ( CORBA::ULong i = 0; i < aStream->length(); i++)
-          aTexture->SetValue( i+1, (Standard_Byte)aStream[i] );
-        myTextureMap[ theId ] = aTexture;
-      }
+  GEOM::GEOM_IInsertOperations_var aInsOp = GeometryGUI::GetGeomGen()->GetIInsertOperations();
+  if ( !aInsOp->_is_nil() ) {
+    CORBA::Long aWidth, aHeight;
+    SALOMEDS::TMPFile_var aStream = aInsOp->GetTexture( theId, aWidth, aHeight );
+    if ( aWidth > 0 && aHeight > 0 && aStream->length() > 0 ) {
+      theWidth  = aWidth;
+      theHeight = aHeight;
+
+      aTexture  = new TColStd_HArray1OfByte (1, aStream->length());
+
+      for ( CORBA::ULong i = 0; i < aStream->length(); i++)
+        aTexture->SetValue( i+1, (Standard_Byte)aStream[i] );
     }
   }
   return aTexture;
index 9d6165611624c622f62b18d7098f72e858f06150..fd13d93746c867ccf0c395aa5fdd3b8a7607b36f 100644 (file)
@@ -211,8 +211,6 @@ public:
 
 private:  
 
-  typedef QMap<long, Handle(TColStd_HArray1OfByte)> TextureMap;
-
   typedef QMap<QString, GEOMGUI*> GUIMap;
 
   typedef QPair<QString, QString> PluginAction;
@@ -221,7 +219,6 @@ private:
   QDialog*                     myActiveDialogBox; // active dialog box
   gp_Ax3                       myWorkingPlane;
   //QMap<int,QString>          myRules;           // popup rules
-  static TextureMap            myTextureMap;      // texture map
 
   QMap<int, PluginAction>      myPluginActions;   // plugin actions
   QMap<QString, QString>       myPluginLibs;      // plugin name to plugin client library
index db197be5ce5b3afe906ca442f691599adb43bd1f..75b41d6e77cf20fcefaaefa4206101304b3e444d 100644 (file)
@@ -4794,6 +4794,10 @@ static bool isSameEdge(const TopoDS_Edge& theEdge1, const TopoDS_Edge& theEdge2)
   gp_Pnt P2 = C1->Value(U);     //Compute a point on two thirds of the edge's length
 
   C2 = new Geom_TrimmedCurve(C2, U21, U22);
+  // vsr 04/10/2018: 0023312 - As curve may be periodic, its parameters may be normalized
+  // so, we re-take them from trimmed curve
+  U21 = C2->FirstParameter();
+  U22 = C2->LastParameter();
 
   if(!GeomLib_Tool::Parameter(C2, P1, MAX_TOLERANCE, U) ||  U < U21 || U > U22)
     return false;
index 09ed9bb5d5a4f01b98d9b6bbd9ef12ffdaf87296..c9ef674dbe165651ea985900946ffdc69989575a 100644 (file)
@@ -309,6 +309,11 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(Handle(TFunction_Logbook)& lo
 
     PS.SetLimitMode(aCI.GetKeepNonlimitShapes());
     PS.SetLimit((TopAbs_ShapeEnum)aCI.GetLimit());
+
+    // Set parallel processing mode (default is false)
+    Standard_Boolean bRunParallel = Standard_True;
+    PS.SetRunParallel(bRunParallel);
+
     PS.Perform();
 
     //skl PS.Compute();