]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
export preselected_id to client duc/Viewerunique V9_13_0b1
authorDUC ANH HOANG <dh77501n@dsp1043837>
Thu, 6 Jun 2024 14:02:11 +0000 (16:02 +0200)
committerDUC ANH HOANG <dh77501n@dsp1043837>
Thu, 6 Jun 2024 14:02:11 +0000 (16:02 +0200)
src/Plugins/CADRepresentation/cadRepresentations/CADRepresentations/CADRepresentation.xml
src/Plugins/CADRepresentation/cadRepresentations/CADRepresentations/vtkCADMapper.cxx
src/Plugins/CADRepresentation/cadRepresentations/CADRepresentations/vtkCADMapper.h
src/Plugins/CADRepresentation/cadRepresentations/CADRepresentations/vtkCADRepresentation.cxx
src/Plugins/CADRepresentation/cadRepresentations/CADRepresentations/vtkCADRepresentation.h

index b79338f243bd84e915d7f0ae7219adecbd787114..a56389f036cae270fae7a09a777407b1a3dc9bfc 100644 (file)
            Enable or disable the Group Mode.
         </Documentation>
       </IntVectorProperty>
+      <IntVectorProperty name="PreSelectedID"
+                         command="GetPreselectedId"
+                         information_only="1"
+                         number_of_elements="0">
+        <Documentation>
+          PreSelected solid ID
+        </Documentation>
+      </IntVectorProperty>
       <Property command="Reset" name="Reset"/>
       <Property command="BeginSelect" name="BeginSelect"/>
       <Property command="EndSelect" name="EndSelect"/>
index 636eded9ef4564c60c785b7d05993640f74b8979..2c56d8feefa8949a2119ba2f92a92e03b0d60979 100644 (file)
@@ -450,3 +450,10 @@ void vtkCADMapper::AddCellIdsToSelectionPrimitives(vtkPolyData* poly, const char
     this->ForceUpdate();
   }
 }
+
+//----------------------------------------------------------------------------
+
+vtkIdType vtkCADMapper::GetPreselectedId()
+{
+  return this->PreselectedCellId;
+}
index b819c48fac72e40740b3d09d129eed1a1ae2c956..6459a909a72ca694c1c7682b1b0adfe5fc952762 100644 (file)
@@ -103,6 +103,11 @@ public:
    */
   void ResetSelection();
 
+  /**
+   * Get PreSelected Id
+   */
+  vtkIdType GetPreselectedId();
+
 protected:
   vtkCADMapper() = default;
   ~vtkCADMapper() = default;
@@ -131,6 +136,11 @@ private:
   void AddCellIdsToSelectionPrimitives(vtkPolyData* poly, const char* arrayName,
     unsigned int processId, unsigned int compositeIndex, vtkIdType selectedId) override;
 
+  /**
+   * Get Selected Id list
+   */
+  //vtkIdType GetSelectedId();
+
   /**
    * Initialise the primitive colors using color array stored in the input polydata.
    * Also initialize the opacity values (depending on current mode).
index 656535b294b1ccd8376af85e2c7c7c0bf0525f7c..a39ae6a3ec1c38e45d2bff8658ceb1d0f448b0d3 100644 (file)
@@ -281,3 +281,9 @@ void vtkCADRepresentation::SetArrayIdNames(const char* pointArray, const char* c
   mapper->SetPointIdArrayName(pointArray ? pointArray : "vtkOriginalPointIds");
   mapper->SetCellIdArrayName(cellArray ? cellArray : "vtkOriginalCellIds");
 }
+
+//----------------------------------------------------------------------------
+vtkIdType vtkCADRepresentation::GetPreselectedId()
+{
+  return this->Mapper->GetPreselectedId();
+}
\ No newline at end of file
index 6f7211133e9d68f7738e0316c6840f857d3864bb..928b9bb29de7892b2c46a5a571c02e23bdbe397b 100644 (file)
@@ -100,6 +100,13 @@ public:
   //void AddShape(vtkIdType groupId, vtkIdType cellId);
 
   void SetArrayIdNames(const char* pointArray, const char* cellArray) override;
+
+  /**
+   * Get PreSelected Id
+   */
+
+  vtkIdType GetPreselectedId();
+
 protected:
   vtkCADRepresentation();
   ~vtkCADRepresentation() = default;