Personal tools
You are here: Home Forum Use Selecting nodes / elements in Salome 3.2.2

Selecting nodes / elements in Salome 3.2.2

Up to Use
  • Selecting nodes / elements in Salome 3.2.2

    Posted by JMB at December 21. 2006
    Hello,

    I created a hexahedral mesh by revolution of a quadrilateral 2D mesh.  The 2D mesh was created in the XY plane.  By revolving it around the Y axis I obtained a 3D mesh.  Now I would like to select all elements that fall inside a certain diameter and call it a group - "steel".  How do I select them?  Since there is no geometry associated with the mesh, I am unable to use any filters, or associated to geometry.  All elements outside this cylindrical region are to grouped as "nylon".  Any ideas on how to do this in Salome 3.2.2

    Thanks
    JMB
    • Re: Selecting nodes / elements in Salome 3.2.2

      Posted by Christophe Bourcier at December 21. 2006
      Hi

      You can create the corrsponding cylinder in GEOM, and then in SMESH create a group of volume using the filter "belong to cylinder".

      Christophe
      • Re: Selecting nodes / elements in Salome 3.2.2

        Posted by JMB at December 21. 2006
        Christophe Bourcier wrote:
        Hi

        You can create the corresponding cylinder in GEOM, and then in SMESH create a group of volume using the filter "belong to cylinder".

        Christophe



        Hello Cristophe Bourcier,

        Thank you for your reply.  That is exactly, what I tried.  But when I close the filter and click on "Add" no elements show up in the filter window.  Note that when I created the 2D or 3D mesh there was no cylinder.  The mesh is a revolution of 2D elements based on a 2D rectangular area alone.  Are you saying that creating a solid cylinder subsequent to the 3D mesh will still work?  Are you sure?  It does not seem to, at least for me.

        JMB


      • Re: Selecting nodes / elements in Salome 3.2.2

        Posted by JMB at December 21. 2006
        Christophe Bourcier wrote:
        Hi

        You can create the corrsponding cylinder in GEOM, and then in SMESH create a group of volume using the filter "belong to cylinder".

        Christophe

        Hello Cristophe,

        I have even tried "Lying on Geom" and every combination of choices and buttons there are in the 2 menus.  My impression is the "Standalone group" or the "Group on Geometry" only selects nodes/lines/faces/volumes mesh entities when they were created on existing geometry.  It does not seem possible to select any of the 4 if a geometry has been created after the mesh was created.  I could be wrong, but I have tried this numerous times and seems to work no other way.  Could there be a bug?

        JMB
        • Re: Selecting nodes / elements in Salome 3.2.2

          Posted by Christophe Bourcier at December 21. 2006
          "Belong to cylinder" should allow you to set a cylinder not related to your piece, but unfortunately this filter is not available on "group of volumes".

          So the only way is to make a partition of your piece with the cylinder, to create the corresponding group in GEOM and then select it in SMESH.
          • Re: Selecting nodes / elements in Salome 3.2.2

            Posted by JMB at December 22. 2006
            Christophe Bourcier wrote:
            "Belong to cylinder" should allow you to set a cylinder not related to your piece, but unfortunately this filter is not available on "group of volumes".

            So the only way is to make a partition of your piece with the cylinder, to create the corresponding group in GEOM and then select it in SMESH.


            Hello Christophe Boucier,

            Thank you for your reply and clarification.  Is "Belong to Cylinder" on "Group of Volumes" going to be programmed into the next version?  I regard this to be an important requirement for the following reasons:

            If I want to create a geometry that is cylindrical and want a structured mesh, yet separated into specific regions, I am not able to do so meeting the two important criteria described below.

            I am attaching the scripts I am using to illustrate my point.  I am trying to model a bushing consisting of a metal inner rod and an outer nylon bushing.  Which is why I divided the 2D area into two faces.  The I meshed the two 2D areas to give a 2D mesh.  I could have (and have) tried 3D meshing by using partitioned volumes, etc. but I could not find a way for my needs.  Here is why:

            A) One important reason why I chose this method is, to obtain nodes that fall exactly in the center line as well as exactly on the parting line between the steel rod and the nylon.  When I revolve this 2D mesh I obtain a nice 3D mesh.

            B) Second important reason I chose this method is, I need nodes at the exact centerline of the bushing in order to apply a torque on the rod.

            I strongly urge the developers to enhance the next version of Salome:
            1. To provide a means of selecting nodes/elements/geometry in several flexible ways.
            2. To select entities by circular region (pick by describing a circle, to infinite depth, not just the surface entities)

            Any other method of meshing I tried did not give me meshes satisfying these 2 above requirements.  If you run these scripts you will understand what I am intending to do.  Unless you know of a different approach to the problem, that I am blind to.  I appreciate your insight and help very much.  Please let me know what you think.

            Regards
            JMB

            ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
            ### This file is generated by SALOME automatically by dump python functionality
            ### of GEOM component

            import geompy
            import math

            def RebuildData(theStudy):
                geompy.init_geom(theStudy)
                global Line_1, Compound_1, Cylinder_1, Vector_1, Vertex_4, Vertex_5, \
                Line_6, Line_7, Vertex_2, Line_4, Line_5, Face_1, Vertex_3, Face_2, \
                Wire_1, Line_2, Wire_2, Line_3, Vertex_1, Vertex_6
                Vertex_1 = geompy.MakeVertex(0, 0, 0)
                Vertex_2 = geompy.MakeVertex(7, 0, 0)
                Vertex_3 = geompy.MakeVertex(25, 0, 0)
                Vertex_4 = geompy.MakeVertex(25, 50, 0)
                Vertex_5 = geompy.MakeVertex(7, 50, 0)
                Vertex_6 = geompy.MakeVertex(0, 50, 0)
                Line_1 = geompy.MakeLineTwoPnt(Vertex_1, Vertex_2)
                Line_2 = geompy.MakeLineTwoPnt(Vertex_2, Vertex_3)
                Line_3 = geompy.MakeLineTwoPnt(Vertex_3, Vertex_4)
                Line_4 = geompy.MakeLineTwoPnt(Vertex_4, Vertex_5)
                Line_5 = geompy.MakeLineTwoPnt(Vertex_5, Vertex_6)
                Line_6 = geompy.MakeLineTwoPnt(Vertex_6, Vertex_1)
                Line_7 = geompy.MakeLineTwoPnt(Vertex_2, Vertex_5)
                Vertex_2 = geompy.GetMainShape(Line_7)
                Vertex_2 = geompy.GetMainShape(Line_7)
                Wire_1 = geompy.MakeWire([Line_1, Line_5, Line_6, Line_7])
                Wire_2 = geompy.MakeWire([Line_2, Line_3, Line_4, Line_7])
                Face_1 = geompy.MakeFaceWires([Wire_1], 1)
                Face_2 = geompy.MakeFaceWires([Wire_2], 1)
                Compound_1 = geompy.MakeCompound([Face_1, Face_2])
                Vector_1 = geompy.MakeVector(Vertex_1, Vertex_6)
                Cylinder_1 = geompy.MakeCylinder(Vertex_1, Vector_1, 7, 50)
                geompy.addToStudy( Vertex_1, "Vertex_1" )
                geompy.addToStudy( Vertex_2, "Vertex_2" )
                geompy.addToStudy( Vertex_3, "Vertex_3" )
                geompy.addToStudy( Vertex_4, "Vertex_4" )
                geompy.addToStudy( Vertex_5, "Vertex_5" )
                geompy.addToStudy( Vertex_6, "Vertex_6" )
                geompy.addToStudy( Line_1, "Line_1" )
                geompy.addToStudy( Line_2, "Line_2" )
                geompy.addToStudy( Line_3, "Line_3" )
                geompy.addToStudy( Line_4, "Line_4" )
                geompy.addToStudy( Line_5, "Line_5" )
                geompy.addToStudy( Line_6, "Line_6" )
                geompy.addToStudy( Line_7, "Line_7" )
                geompy.addToStudy( Wire_1, "Wire_1" )
                geompy.addToStudy( Wire_2, "Wire_2" )
                geompy.addToStudy( Face_1, "Face_1" )
                geompy.addToStudy( Face_2, "Face_2" )
                geompy.addToStudy( Compound_1, "Compound_1" )
                geompy.addToStudy( Vector_1, "Vector_1" )
                geompy.addToStudy( Cylinder_1, "Cylinder_1" )
                pass
            ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
            ### This file is generated by SALOME automatically by dump python functionality of SMESH component

            import salome, SMESH
            import smesh

            ## import GEOM dump file ##
            import string, os, sys, re
            sys.path.insert( 0, os.path.dirname(__file__) )
            exec("from "+re.sub("SMESH$","GEOM",__name__)+" import *";)


            def RebuildData(theStudy):
                aFilterManager = smesh.smesh.CreateFilterManager()
                smesh.smesh.SetCurrentStudy(theStudy)
                import StdMeshers
                import NETGENPlugin
                Mesh_1 = smesh.Mesh(Compound_1)
                Wire_discretisation = Mesh_1.Segment()
                Automatic_length = Wire_discretisation.AutomaticLength(0.23)
                Triangle_Mefisto = Mesh_1.Triangle()
                Length_From_Edges_2D_Hyp_for_Triangulator = Triangle_Mefisto.LengthFromEdges()
                isDone = Mesh_1.Compute()
                if not isDone: print 'Mesh Mesh_1.GetMesh() : computation failed'
                mesh_editor_35 = Mesh_1.GetMesh().GetMeshEditor()
                axis = SMESH.AxisStruct( 0, 0, 0, 0, 40, 0 )
                mesh_editor_35.RotationSweep( [ 361, 298, 235, 151, 88, 173, 393, 330, 267, 204, 120, 362, 299, 236, 152, 89, 174, 394, 331, 268, 205, 121, 363, 300, 237, 153, 90, 175, 395, 332, 269, 206, 122, 364, 301, 238, 154, 91, 176, 396, 333, 270, 207, 123, 365, 302, 239, 92, 177, 397, 334, 271, 208, 124, 366, 303, 240, 93, 178, 398, 335, 272, 209, 125, 367, 304, 241, 94, 179, 399, 336, 273, 210, 126, 368, 305, 242, 95, 180, 400, 337, 274, 211, 127, 369, 306, 243, 96, 181, 401, 338, 275, 212, 128, 370, 307, 244, 97, 402, 339, 276, 213, 129, 371, 308, 245, 182, 98, 403, 340, 277, 214, 130, 372, 309, 246, 183, 99, 404, 341, 278, 215, 131, 373, 310, 247, 184, 100, 155, 405, 342, 279, 216, 132, 374, 311, 248, 185, 101, 406, 343, 280, 217, 133, 375, 312, 249, 186, 102, 407, 344, 281, 218, 134, 156, 376, 313, 250, 187, 103, 408, 345, 282, 219, 135, 157, 377, 314, 251, 188, 104, 409, 346, 283, 220, 136, 158, 378, 315, 252, 189, 105, 410, 347, 284, 221, 137, 159, 379, 316, 253, 190, 106, 411, 348, 285, 222, 138, 160, 380, 317, 254, 191, 107, 412, 349, 286, 223, 139, 161, 381, 318, 255, 192, 108, 413, 350, 287, 224, 140, 162, 382, 319, 256, 193, 109, 79, 414, 351, 288, 225, 141, 163, 383, 320, 257, 194, 110, 415, 352, 289, 226, 142, 164, 384, 321, 258, 195, 111, 416, 353, 290, 227, 143, 80, 165, 385, 322, 259, 196, 112, 417, 354, 291, 228, 144, 81, 166, 386, 323, 260, 197, 113, 418, 355, 292, 229, 145, 82, 167, 387, 324, 261, 198, 114, 419, 356, 293, 230, 146, 83, 168, 388, 325, 262, 199, 115, 420, 357, 294, 231, 147, 84, 169, 389, 326, 263, 200, 116, 421, 358, 295, 232, 148, 85, 170, 390, 327, 264, 201, 117, 422, 359, 296, 233, 149, 86, 171, 391, 328, 265, 202, 118, 360, 297, 234, 150, 87, 172, 392, 329, 266, 203, 119 ], axis, 0.174533, 36, 1e-05 )

                ## set object names 
                isGUIMode = 1
                if isGUIMode and salome.sg.hasDesktop():
                    smesh.SetName(Mesh_1.GetMesh(), 'Mesh_1')
                    smesh.SetName(Wire_discretisation.GetAlgorithm(), 'Wire discretisation')
                    smesh.SetName(Automatic_length, 'Automatic length')
                    smesh.SetName(Triangle_Mefisto.GetAlgorithm(), 'Triangle (Mefisto)')
                    smesh.SetName(Length_From_Edges_2D_Hyp_for_Triangulator, 'Length From Edges (2D Hyp. for Triangulator)')

                    salome.sg.updateObjBrowser(0)

                pass


Powered by Ploneboard
Document Actions