Cancel
Showing results for 
Search instead for 
Did you mean: 

Node Selection in 2nd order elements

Creator
Creator

Hi Experts,

 

How can I select the nodes on a face without selecting the mid nodes in a second order mesh?

3 REPLIES

Re: Node Selection in 2nd order elements

Legend
Legend

Hi Bhargava,

 

Here is an API that creates group with only corner nodes.

 

First select nodes (including midside nodes) and then you will see that a group is created with only corner nodes. You can adjust the macro to create a group with midside nodes. 

 

'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
'Written by Seif Eddine Naffoussi
'Create Node Group without considering midside nodes.
'+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Sub Main

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

Dim ListNode As Set
Set ListNode=App.feSet

Dim MidSideNodeList As Set
Set MidSideNodeList=App.feSet

rc = ListNode.Select(FT_NODE,True,"\\\Select Nodes///")
If rc=2 Then End

Dim Nd As femap.Node
Set Nd=App.feNode

                    Dim Gr1 As Group
                    Set Gr1=App.feGroup
                    Dim Gr1ID As Long
                    Gr1ID = App.Info_MaxID(FT_GROUP)+1
                    Gr1.ID = Gr1ID
                    App.Info_ActiveID(FT_GROUP) = Gr1ID

                    Dim Gr2 As Group
                    Set Gr2=App.feGroup
                    Dim Gr2ID As Long
                    Gr2ID = App.Info_MaxID(FT_GROUP)+1
                    Gr2.ID = Gr2ID
                    App.Info_ActiveID(FT_GROUP) = Gr2ID

Dim i As Long

For i=0 To ListNode.Count-1
        Nd.Get(ListNode.Next)
            If Nd.IsMidsideNode(0)  Then
                MidSideNodeList.Add( Nd.ID )
            Else
                Gr2.Add( FT_NODE, Nd.ID )
                Gr2.title = "Corner Nodes"
            End If
Next

                'Gr1.SetAdd( FT_NODE, MidSideNodeList.ID )
                'Gr1.title = "Midside Nodes"
                'Gr1.Put(Gr1ID)
                Gr2.Put(Gr2ID)

End Sub

 

Seifeddine Naffoussi

Re: Node Selection in 2nd order elements

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

Dear Seif,

The API is running OK, I have tested in the creation of dependent nodes of an RBE2 element based in a 3-D Solid mesh of high-order CHEXA 20-nodes elements and group creation of corner-nodes only is correct, midside nodes are discharged, thanks for your generous contribution to the FEMAP Community!.

Best regards,

Blas.

Blas Molero Hidalgo, Ingeniero Industrial, Director
IBERISA • 48004 BILBAO (SPAIN)
WEB: http://www.iberisa.com
Blog Femap-NX Nastran: http://iberisa.wordpress.com/

Re: Node Selection in 2nd order elements

Creator
Creator

I think this should do the job. I haven't tried it out yet but I am sure the code looks good to work! Thank you so much!