shells on interior solid faces

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Hi, can anyone tell me how to create shells on all solid faces including interior ones? There used to be a plugin to be downloaded for that purpose. Is that still the case and where would I find that? Thanks in advance.

Tagged:

Answers

  • Sanjay Nainani_20973
    Sanjay Nainani_20973 New Altair Community Member
    edited February 2018

    Hello,

     

    To extract shells from 3D solid elements go to 'Tools>>Faces'. Here select the component and click 'find faces'. This will extract the 2D elements and place them in a new component.

     

    Thankyou

  • Q.Nguyen-Dai
    Q.Nguyen-Dai Altair Community Member
    edited February 2018

    Hello,

     

    To extract shells from 3D solid elements go to 'Tools>>Faces'. Here select the component and click 'find faces'. This will extract the 2D elements and place them in a new component.

     

    Thankyou

     

    Your method does NOT create interior solid faces.

  • Sanjay Nainani_20973
    Sanjay Nainani_20973 New Altair Community Member
    edited February 2018

    yes it does. you need to select 'elements' from the drop down.

     

    <?xml version="1.0" encoding="UTF-8"?>image.thumb.png.f0ce3ada57c9d614a403d5573b57e83a.png

     

     

    Please refer the attached example:

    This is a hollow cube tetra meshed.

    <?xml version="1.0" encoding="UTF-8"?>image.thumb.png.57ce1a600ebb2eb1e07222ffb14063d6.png

     

     

    when you use the suggested option it will extract 2D shell elements as shown below.

    <?xml version="1.0" encoding="UTF-8"?>image.thumb.png.5ad12608789bae49b9358b828bba4f20.png

     

    Thankyou 

  • tinh
    tinh Altair Community Member
    edited February 2018

    Mr Q.NGUYEN-DAI wants to say about interior faces, not boundary faces

    I have a templex to generate it, tcl can do also but may be slow. I will share later

    Ansa has this function but hm not yet

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2018

    2 clicks in ANSA.

  • tinh
    tinh Altair Community Member
    edited August 2018

    Hi,

    a script to create interior faces is like this:

    You can save it to a file, then bind it with a user defined toolbar button, then just 1-click to get faces, not 2 !

     proc ::p_CreateInteriorFaces args {     if {[string match -nocase display* $args]} {       *createmark elems 1 displayed     } else { 	  *createmarkpanel elems 1 'Select 3d elems:'     }     if {[hm_marklength elems 1]==0} return 	*createmark elems 2 'by config' tetra4 	*markintersection elems 2 elems 1 	set Buf *ELEMENT_SHELL\n 	set i 0 	set ElemList {} 	if {[hm_marklength elems 2]} { 		eval lappend ElemList [hm_getmark elems 2] 		set ElemNodes [join [hm_getvalue elems mark=2 dataname=nodes]] 		foreach {n1 n2 n3 n4} $ElemNodes { 			append Buf '[incr i],CompId,$n1,$n2,$n3\n' 			append Buf '[incr i],CompId,$n1,$n2,$n4\n' 			append Buf '[incr i],CompId,$n2,$n3,$n4\n' 			append Buf '[incr i],CompId,$n3,$n1,$n4\n' 		} 	} 	*createmark elems 2 'by config' penta6 	*markintersection elems 2 elems 1 	if {[hm_marklength elems 2]} { 		eval lappend ElemList [hm_getmark elems 2] 		set ElemNodes [join [hm_getvalue elems mark=2 dataname=nodes]] 		foreach {n1 n2 n3 n4 n5 n6} $ElemNodes { 			append Buf '[incr i],CompId,$n1,$n2,$n3\n' 			append Buf '[incr i],CompId,$n4,$n5,$n6\n' 			append Buf '[incr i],CompId,$n1,$n2,$n5,$n4\n' 			append Buf '[incr i],CompId,$n2,$n3,$n6,$n5\n' 			append Buf '[incr i],CompId,$n3,$n1,$n4,$n6\n' 		} 	} 	*createmark elems 2 'by config' hex8 	*markintersection elems 2 elems 1 	if {[hm_marklength elems 2]} { 		eval lappend ElemList [hm_getmark elems 2] 		set ElemNodes [join [hm_getvalue elems mark=2 dataname=nodes]] 		foreach {n1 n2 n3 n4 n5 n6 n7 n8} $ElemNodes { 			append Buf '[incr i],CompId,$n1,$n2,$n3,$n4\n' 			append Buf '[incr i],CompId,$n5,$n6,$n7,$n8\n' 			append Buf '[incr i],CompId,$n1,$n2,$n6,$n5\n' 			append Buf '[incr i],CompId,$n2,$n3,$n7,$n6\n' 			append Buf '[incr i],CompId,$n3,$n4,$n8,$n7\n' 			append Buf '[incr i],CompId,$n4,$n1,$n5,$n8\n' 		} 	} 	if {$i} { 		eval *createmark elems 1 $ElemList 		*findfaces elems 1 		if {[hm_entityinfo exist comps ^interior_faces -byname]} { 			*createmark elems 1 'by comp name' ^interior_faces 			if {[hm_marklength elems 1]} {*deletemark elems 1} 		} else { 			*collectorcreateonly comps ^interior_faces '' 4 		} 		set Buf [string map [list CompId [hm_getentityvalue comps ^interior_faces id 0 -byname]] $Buf] 		set fpt [open interior_faces.k w] 		puts $fpt $Buf 		close $fpt 		*createstringarray 2 'LsDyna ' 'Keyword971 ' 		*feinputwithdata2 '#ls-dyna\\dynakey' interior_faces.k 0 0 0 0 0 1 2 1 0 		*createmark elems 1 'by comp name' ^interior_faces 		*createmark elems 2 		*elementtestduplicates elems 1 2 2 		if {[hm_marklength elems 2]} {*deletemark elems 2} 		*createmark elems 1 'by comp name' ^interior_faces ^faces 		*createmark elems 2 		*elementtestconnectivity elems 1 2 2 		if {[hm_marklength elems 2]} {*deletemark elems 2} 		*facesdelete 	} 	*clearmarkall 1; *clearmarkall 2 } #example: create interior faces for displayed 3d elems ::p_CreateInteriorFaces displayed

     

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2018

    You can save it to a file, then bind it with a user defined toolbar button, then just 1-click to get faces, not 2 !

    it was metaphor:D/emoticons/default_biggrin.png' srcset='/emoticons/biggrin@2x.png 2x' title=':D' width='20' /> i have been using BETA CAE for a long time, i really like it.=) But in my new job i have HW products.)

    But i will test your script later=)

    thanks.)

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2018

    hello, @tinh!

    i have added your tool to user botton 

    but i didn't choose elements. is it normaly?

    and i want to ask you.

    how to move this tools to user botton. it will be conveniently to work.)

    when i work with mesh it's uncomfortable to switch between geom/2dmesh/tools.

    thanks.

    <?xml version="1.0" encoding="UTF-8"?>image.thumb.png.11fa7eeacbffd3f12cb9dfee0d822f99.png<?xml version="1.0" encoding="UTF-8"?>image.thumb.png.8f710d0f51b38b8fb2bf03067d451dcc.png<?xml version="1.0" encoding="UTF-8"?>image.thumb.png.4a13b1f0618cf45ee9b2a51d446af2a4.png

    <?xml version="1.0" encoding="UTF-8"?>image.png

  • tinh
    tinh Altair Community Member
    edited August 2018

    Hi

    Please remove 'displayed' at the last line. Then it will prompt you to select elems

     #example: create interior faces for  3d elems by user selection ::p_CreateInteriorFaces
  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2018

    ok) i'll try.

  • tinh
    tinh Altair Community Member
    edited August 2018

    And to add the panels to user button,

     set command for the button as

    hm_pushpanel 'panel name'

     

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2018

    And to add the panels to user button,

     set command for the button as

    hm_pushpanel 'panel name'

     

    Wow!

    i'll try! it will be useful to me!

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2018

    what did i do wrong?

    *createbutton(5,'organize',4,1,5,GREEN,hm_pushpanel 'Organize Entities')

     

    <?xml version="1.0" encoding="UTF-8"?>image.thumb.png.e04610b87262f728e628340b776ff127.png

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2018

    don't give solution!

    i will try by myself!

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2018

    i can add only tool from tcl scripts box.

    but i can not add toolbox that contain all tools.

    example.

    i have added midmesh.tcl

    but has added only midmesh create tool.

    i haven't got editor and rebuild tool.=(

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited September 2018

     

    Hi 

     

    3D---> detach all elements (not detach from, simply detach) ---> take faces for detached elements, now give equivalence to all detached elements (shift +F3), now F10 ---> 2D --> Duplicates--> save failed

     

    Create new collector in model browser --> organize all the saved elements in the new collector by using 'retrieve elements'

     

     

  • tinh
    tinh Altair Community Member
    edited September 2018

    I have thought about this panel from HM13 but that version does not detach all.

    Don't realize that new version has it. cheers!

  • Robin Nguyen
    Robin Nguyen New Altair Community Member
    edited October 2019

    Hi,

    a script to create interior faces is like this:

    You can save it to a file, then bind it with a user defined toolbar button, then just 1-click to get faces, not 2 !

      proc ::p_CreateInteriorFaces args {     if {[string match -nocase display* $args]} {       *createmark elems 1 displayed     } else { 	  *createmarkpanel elems 1 'Select 3d elems:'     }     if {[hm_marklength elems 1]==0} return 	*createmark elems 2 'by config' tetra4 	*markintersection elems 2 elems 1 	set Buf *ELEMENT_SHELL\n 	set i 0 	set ElemList {} 	if {[hm_marklength elems 2]} { 		eval lappend ElemList [hm_getmark elems 2] 		set ElemNodes [join [hm_getvalue elems mark=2 dataname=nodes]] 		foreach {n1 n2 n3 n4} $ElemNodes { 			append Buf '[incr i],CompId,$n1,$n2,$n3\n' 			append Buf '[incr i],CompId,$n1,$n2,$n4\n' 			append Buf '[incr i],CompId,$n2,$n3,$n4\n' 			append Buf '[incr i],CompId,$n3,$n1,$n4\n' 		} 	} 	*createmark elems 2 'by config' penta6 	*markintersection elems 2 elems 1 	if {[hm_marklength elems 2]} { 		eval lappend ElemList [hm_getmark elems 2] 		set ElemNodes [join [hm_getvalue elems mark=2 dataname=nodes]] 		foreach {n1 n2 n3 n4 n5 n6} $ElemNodes { 			append Buf '[incr i],CompId,$n1,$n2,$n3\n' 			append Buf '[incr i],CompId,$n4,$n5,$n6\n' 			append Buf '[incr i],CompId,$n1,$n2,$n5,$n4\n' 			append Buf '[incr i],CompId,$n2,$n3,$n6,$n5\n' 			append Buf '[incr i],CompId,$n3,$n1,$n4,$n6\n' 		} 	} 	*createmark elems 2 'by config' hex8 	*markintersection elems 2 elems 1 	if {[hm_marklength elems 2]} { 		eval lappend ElemList [hm_getmark elems 2] 		set ElemNodes [join [hm_getvalue elems mark=2 dataname=nodes]] 		foreach {n1 n2 n3 n4 n5 n6 n7 n8} $ElemNodes { 			append Buf '[incr i],CompId,$n1,$n2,$n3,$n4\n' 			append Buf '[incr i],CompId,$n5,$n6,$n7,$n8\n' 			append Buf '[incr i],CompId,$n1,$n2,$n6,$n5\n' 			append Buf '[incr i],CompId,$n2,$n3,$n7,$n6\n' 			append Buf '[incr i],CompId,$n3,$n4,$n8,$n7\n' 			append Buf '[incr i],CompId,$n4,$n1,$n5,$n8\n' 		} 	} 	if {$i} { 		eval *createmark elems 1 $ElemList 		*findfaces elems 1 		if {[hm_entityinfo exist comps ^interior_faces -byname]} { 			*createmark elems 1 'by comp name' ^interior_faces 			if {[hm_marklength elems 1]} {*deletemark elems 1} 		} else { 			*collectorcreateonly comps ^interior_faces '' 4 		} 		set Buf [string map [list CompId [hm_getentityvalue comps ^interior_faces id 0 -byname]] $Buf] 		set fpt [open interior_faces.k w] 		puts $fpt $Buf 		close $fpt 		*createstringarray 2 'LsDyna ' 'Keyword971 ' 		*feinputwithdata2 '#ls-dyna\\dynakey' interior_faces.k 0 0 0 0 0 1 2 1 0 		*createmark elems 1 'by comp name' ^interior_faces 		*createmark elems 2 		*elementtestduplicates elems 1 2 2 		if {[hm_marklength elems 2]} {*deletemark elems 2} 		*createmark elems 1 'by comp name' ^interior_faces ^faces 		*createmark elems 2 		*elementtestconnectivity elems 1 2 2 		if {[hm_marklength elems 2]} {*deletemark elems 2} 		*facesdelete 	} 	*clearmarkall 1; *clearmarkall 2 } #example: create interior faces for displayed 3d elems ::p_CreateInteriorFaces displayed

     

    Hi,

    I am a new user in Hypermesh, and trying to learn how to extract shell from solid face. 

    When I tried to add new user toolbar in Hypermesh 2019, there is no choice of 'options' in toolbars. Could you please help me to address this problem and show me a better way to extract the shell from solid face in Hypermesh?

    Many thanks!