Method to create a set of lines,surfaces or points

Benevant
Benevant Altair Community Member
edited October 2020 in Community Q&A

Hello all,

is there a way to create sets contain lines, surfaces or points. 
My aim is the call those sets or lists in a tcl script. 

thanks in advance 

Tagged:

Welcome!

It looks like you're new here. Sign in or register to get started.

Answers

  • QuyNguyenDai
    QuyNguyenDai Altair Community Member
    edited August 2020

    I don't think there are such type of set. If you work from Tcl script, you can keep your lines, surfaces, points ID in LIST variable.

    Here's an example:

     set myLines [list 1 2 3] set myPoints [list 10 11 12] set mySurfaces [list 30 31 32]  # Mesure shortest distance from surface 30 to set of lines *createmark surfs 1 [lindex $mySurfaces 0] *createmark lines 1 $myLines hm_measureshortestdistance surfs 1 0 lines 1 0 5

     

  • Benevant
    Benevant Altair Community Member
    edited August 2020

    Hello /profile/43398-qnguyen-dai/?do=hovercard&referrer=https%253A%252F%252Fforum.altair.com%252Ftopic%252F40605-method-to-create-a-set-of-linessurfaces-or-points%252F%253Ftab%253Dcomments' href='<___base_url___>/profile/43398-qnguyen-dai/' style='background-color:transparent;color:inherit;' title='Go to Q.Nguyen-Dai's profile' rel=''>Q.Nguyen-Da

    The below script is crashing hypermesh.
     

    set elem_size 0.25
    set count 2
    #create sets of lines-- each sets is for each solid map
    for {set a 1} {$a<$count+1} {incr a} {
        *createmarkpanel lines 1 'Select lines'
        set lines$a [hm_getmark lines 1]
        *clearmark lines 1
    }

    for { set a 1}  {$a < $count+1} {incr a} {
        
        *createmark elems 1 'by sets' 'set$a'
        set source_elems [hm_getmark elems 1]
        set along_line lines$a 

        *solidmap_begin 0
        *solidmap_prepare_usrdataptr 'SOURCE' 24
        *createmark elements 1 $source_elems
        *solid_prepare_entitylst elements 0
        *solidmap_prepare_usrdataptr 'DEST' 0
        *solidmap_prepare_usrdataptr 'ALONG' 2
        *createmark lines 1 $along_line
        *solid_prepare_entitylst lines 0
        *solidmap_end 8322 $elem_size 0 0

    }
     

    I was trying to loop the line drag for 3D modelling. The panel is displayed below.

     

    image.png.794b208bbf326266337619236aed9a28.png/uploads/monthly_2020_08/image.png.794b208bbf326266337619236aed9a28.png' />

    The varying inputs are elems to drag and along geom.

    Would you check the above script and give some suggestions.

    Thanks 

  • QuyNguyenDai
    QuyNguyenDai Altair Community Member
    edited August 2020

    I can not see the error message?

     

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.