creating mesh between 2 mesh components using tcl script

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

Altair_forum.jpg.c2c4d1e8559c794f77306ebd30821a24.jpg

 

Hi all,

 

I have 2 mesh components..yellow and green

considering yellow comp size...giving some tolerance of at least 2 elements size of green one...want to delete some portion from green as shown...

then create mesh between these two comp...shape can be tri or quad or mixed.

This is shell mesh...

element size of both are different...

no surface available for this 2

 

I want to automate these things...

1 .  Delete some portion from green...considering size of yellow

 2.  Create mesh between yellow and green keeping connectivity in mind..

 

please help me out...

if any one have any idea...

 

 

Thanks & Regards,

PD

 

 

Answers

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

    That takes 5' to do in interactive session Hypmermesh.

    Why you need script for this?

  • Pandurang
    Pandurang Altair Community Member
    edited February 2018

    Hi,

     

    Actually i am writing script to create weld between 2 comps. so as per requirement there should be quad elements around weld...so here i m creating weld with quad around it.

    now i want to connect these quad with green comp mesh( this mesh could  be tri or quad or mixed) by deleting some portion from it..

     

    how can i do that manually.

    Please can u give me steps for this...

    i will get some idea...

     

     

    Thanks 

    PD

     

     

      

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

    Share your HM model?

  • Pandurang
    Pandurang Altair Community Member
    edited February 2018

    i can't share...against  company policy:(/emoticons/default_sad.png' srcset='/emoticons/sad@2x.png 2x' title=':(' width='20' />

     

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

    Hi,

     

    how can i do that manually.

    Please can u give me steps for this...

    i will get some idea...

     

     

     

    In general, if you don't know how to do that manually, you CAN not write your script.

     

  • Pandurang
    Pandurang Altair Community Member
    edited February 2018

    Yes

    you are absolutely right...

     

    What should i do now??

     

    Thanks & Regards,

    PD

  • tinh
    tinh Altair Community Member
    edited February 2018

    Hi,

     

    Actually i am writing script to create weld between 2 comps. so as per requirement there should be quad elements around weld...so here i m creating weld with quad around it.

    now i want to connect these quad with green comp mesh( this mesh could  be tri or quad or mixed) by deleting some portion from it..

     

    how can i do that manually.

    Please can u give me steps for this...

    i will get some idea...

     

     

    Thanks 

    PD

     

     

      

     

    Many types of weld can be done by hm connector. Don't you use it instead of writing it your self?

  • Pandurang
    Pandurang Altair Community Member
    edited February 2018

     

    Many types of weld can be done by hm connector. Don't you use it instead of writing it your self?

     

    Hi Tinh,

     

    want to connect tetra meshed and shell meshed(could be tri or quad) comps with quad mesh.

     if tri on shell meshed comps ..i have to delete them at vicinity of weld...create quad at deleted portion....then have to renumber these one near by layer of quad at weld in series...and also nodes on weld....

     

    things i automated till now as per my logic:

    1. projected duplicate nodes from tetra meshed comp on shell meshed...perpendecular

    2. then by drag->nodes planer to shell meshed comps... consider i created yellow meshed(ref attachment)

     

    now i want to delete some portion of shell meshed comps( green in attachment)

    then connect yellow with green......

     

    manually this takes much time to work out...

    so want to automate this...

     

    Regards,

    PD

     

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

    Yes

    you are absolutely right...

     

    What should i do now??

     

    Thanks & Regards,

    PD

     

    https://www2.gdtech.eu/wp/2018/02/fill-gap-two-shell-meshes/

  • Pandurang
    Pandurang Altair Community Member
    edited February 2018

     

    Hi,

     

    I went through that link but i have query....

    1. no lines in model so how can i create surface by Lines as shown in model...

    2. do i have to create lines as well for this or any other option??

    3. how to ensure same node on existing meshes

    all other things i understood......

     

     

    Regards,

    PD

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

    Of course, you have to create lines before making surface.

  • Pandurang
    Pandurang Altair Community Member
    edited February 2018

    ok

     

    Thank you:)/emoticons/default_smile.png' srcset='/emoticons/smile@2x.png 2x' title=':)' width='20' />

  • Pandurang
    Pandurang Altair Community Member
    edited February 2018

    Tinh and Dai,

     

    is there any way to automate this? ----->>  https://www2.gdtech.eu/wp/2018/02/fill-gap-two-shell-meshes/

     

    Regards,

    PD

     

  • tinh
    tinh Altair Community Member
    edited March 2018

    Yes, certainly

    But it's very time consuming

     

  • Pandurang
    Pandurang Altair Community Member
    edited March 2018

    Yes, certainly

    But it's very time consuming

     

    Hi Tinh

     

    Please give some direction...so that i can work on that

     

    Regards,

    PD

  • tinh
    tinh Altair Community Member
    edited March 2018

    Hi, try this work

    1) select elems on the yellow patch

    2) find free edges (or loop) of (1)

    3) get nodes list of loop (2) with order , we will use 2d>ruled command to create mesh, so nodes must be input with correct order

    4) get loops of green comp

    5) search for the closest loop in (4), means the inside loop closed to yellow patch

    6) get nodes list of loop (5) with order

    7) first node of nodes list (3) must be closed to first node of nodes list (6), if not -> ruled mesh may be failed

    8) search the closest node in nodes list (6) to the first node of (3), turn around order of nodes in list (6) to obey (7)

    9) make ruled mesh

    10) equivalence the created mesh

  • Pandurang
    Pandurang Altair Community Member
    edited March 2018

    Hi, try this work

    1) select elems on the yellow patch

    2) find free edges (or loop) of (1)

    3) get nodes list of loop (2) with order , we will use 2d>ruled command to create mesh, so nodes must be input with correct order

    4) get loops of green comp

    5) search for the closest loop in (4), means the inside loop closed to yellow patch

    6) get nodes list of loop (5) with order

    7) first node of nodes list (3) must be closed to first node of nodes list (6), if not -> ruled mesh may be failed

    8) search the closest node in nodes list (6) to the first node of (3), turn around order of nodes in list (6) to obey (7)

    9) make ruled mesh

    10) equivalence the created mesh

    thanks for reply.

    3.  how to get nodelist in order?

    8. ??

    also please suggest some API...

     

    Regards,

    PD

  • tinh
    tinh Altair Community Member
    edited March 2018
  • Pandurang
    Pandurang Altair Community Member
    edited March 2018
  • Pandurang
    Pandurang Altair Community Member
    edited March 2018

    Hi Tinh,

     

    it worked....but still getting some gap...

     

    see attachment...

    any workaround.

     

    regards,

    PD

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

     

     

  • tinh
    tinh Altair Community Member
    edited March 2018

    Please make ruled mesh for remained gap, 2 node lists include first and end nodes of (3) and (6)

     

  • Pandurang
    Pandurang Altair Community Member
    edited March 2018

    Please make ruled mesh for remained gap, 2 node lists include first and end nodes of (3) and (6)

     

    Yes I have done that...

    I have one query ...

    When i find loops...I get ordered list

    But if I find edges...I didn't get same

    Why so?

     

    Thanks once again..

     

    Regards

    PD

  • tinh
    tinh Altair Community Member
    edited March 2018

    :rolleyes:I don't know such detail, but loops are very different from edges, in your simple case above, they look similar

  • sanket_patil
    sanket_patil Altair Community Member
    edited February 2019

    @tinh @Pandurang How to search closet node ?

    Hi, try this work

    1) select elems on the yellow patch

    2) find free edges (or loop) of (1)

    3) get nodes list of loop (2) with order , we will use 2d>ruled command to create mesh, so nodes must be input with correct order

    4) get loops of green comp

    5) search for the closest loop in (4), means the inside loop closed to yellow patch

    6) get nodes list of loop (5) with order

    7) first node of nodes list (3) must be closed to first node of nodes list (6), if not -> ruled mesh may be failed

    8) search the closest node in nodes list (6) to the first node of (3), turn around order of nodes in list (6) to obey (7)

    9) make ruled mesh

    10) equivalence the created mesh

  • tinh
    tinh Altair Community Member
    edited February 2019

    Hi

    Use hm_getclosestnode

  • sanket_patil
    sanket_patil Altair Community Member
    edited February 2019

    @tinh Hi,

     

    I tried but im not able to search it. will you please tell me with example that how to search it in loop?

     

    Thanks,

    Sanket

  • tinh
    tinh Altair Community Member
    edited February 2019

    How did you try it?

  • sanket_patil
    sanket_patil Altair Community Member
    edited February 2019

    @tinh

    I executed first 4 steps correctly. Now i have nodes of free edges of two different components. After that i m confused now how to match closest nodes of two components.

     

    Regards,

    Sanket

  • tinh
    tinh Altair Community Member
    edited February 2019

    Or try hm_measureshortestdistance?