Personal tools
You are here: Home Forum Use How to create a "standalone" group?

How to create a "standalone" group?

Up to Use
  • How to create a "standalone" group?

    Posted by BGU at June 11. 2007
    I'll be glad if anybody can help me.

    I'm trying to create a group of nodes in a python script.
    I know the node-IDs and their coordinates and now i want to group them. The salome GUI allows me to
    do so by: create group -> then activate "standalone group" and add nodes.

    Is there a possibility to do exactly the same in a python script?

    Thank you very much
    Benjamin
    • Re: How to create a "standalone" group?

      Posted by Grigory Zhivotovsky at June 13. 2007

      Hi, Benjamin
      use “dump study” to create python script and then correct it manually.

       

      In particular creation of group can be done with

       

      my_node = Mesh_1.GetMesh().CreateGroup( SMESH.NODE, 'my_node' )

       

      my_node.Add( [ ID1, ID2, …, IDn] )

       

      where ID1, ID2, …, IDn are nodes Ids to be added into group.
      Best Regards,

      Grigory


      • Re: How to create a "standalone" group?

        Posted by BGU at June 13. 2007
        Thank you very much,
        that was exactly what I'm looking for.

        Thanks
        Benjamin
Powered by Ploneboard
Document Actions