Cancel
Showing results for 
Search instead for 
Did you mean: 

surfaces already meshed

Legend
Legend

Hello,

 

I would like to know if there is anyway to select the ID o the surfaces that are already meshed. I would like to make a group of it. 

3 REPLIES

Re: surfaces already meshed

Siemens Phenom Siemens Phenom
Siemens Phenom

There is no direct call to select all the meshed surfaces, but a fairly simple bit of code can get it for you. Here is some code that adds all of the meshed surfaces into a Set... it doesn't do anything with the set, but I think you will get the idea....

 

Sub Main
    Dim App As femap.model
    Set App = feFemap()

    Dim e As femap.Elem
    Set e = App.feElem
    Dim s As femap.Set
    Set s = App.feSet

    While e.Next() = FE_OK
        Select Case e.topology
        Case FTO_TRIA3, FTO_TRIA6, FTO_QUAD4, FTO_QUAD8
            s.Add(e.geomID)
        End Select
    Wend

End Sub

Re: surfaces already meshed

Phenom
Phenom

In addition to George's code... if you would like to highlight and/or subsequently use the set, then you could add (after Wend):

 

 

rc = App.feViewShow( FT_SURFACE, s.ID )
   ' Highlights the set of meshed surfaces.
rc = s.Select(FT_SURACE,False, "PRESS OK to ensure this list can be retrived using Previous." )

   ' This line opens the entity selection dialog with all the meshed surfaces already listed.

   ' If you press OK nothing happens, but then the list of surfaces is available for a subsequent

   ' command where you can use the Previous button on the entity selection dialog to select

   ' all the meshed surfaces in the set.   Clunky, but functional.

Re: surfaces already meshed

Legend
Legend

Thank you for the answers. The codes are enough for I wanted. I though there was an option already in FEMAP or included in custom tools.

 

Thanks