Boolean operations. Creating general surfaces

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

Hello all. I have a question. Is it possible to create with .tcl commands general surfaces, but for all solids.
It is very tedious to constantly perform repeated commands. And script could solve this problem.
<?xml version="1.0" encoding="UTF-8"?>image.thumb.png.05ee365e9bf00a1ab7686f40d2a02f28.png

For example this detail:
image.png.7cededa96b3614668cc1f6f85561d6a7.png

This surfaces were made by next commands:
 

 add_button 'Make boolean surfaces' {  *createmark solids 1 1 *createmark solids 2 5 *boolean_merge_solids 1 2 14 2  *createmark solids 1 1 *createmark solids 2 5 *boolean_merge_solids 1 2 14 2  *createmark solids 1 2 *createmark solids 2 1 *boolean_merge_solids 1 2 14 2  *createmark solids 1 3 *createmark solids 2 1 *boolean_merge_solids 1 2 14 2  *createmark solids 1 4 *createmark solids 2 1 *boolean_merge_solids 1 2 14 2  *createmark solids 1 5 *createmark solids 2 1 *boolean_merge_solids 1 2 14 2  *createmark solids 1 2 *createmark solids 2 2 *boolean_merge_solids 1 2 14 2  *createmark solids 1 2 *createmark solids 2 3 *boolean_merge_solids 1 2 14 2  *createmark solids 1 2 *createmark solids 2 4 *boolean_merge_solids 1 2 14 2  *createmark solids 1 2 *createmark solids 2 5 *boolean_merge_solids 1 2 14 2  *createmark solids 1 3 *createmark solids 2 1 *boolean_merge_solids 1 2 14 2  *createmark solids 1 3 *createmark solids 2 2 *boolean_merge_solids 1 2 14 2}

But if we have about 100+ solids and more?
How to solve this question\problem?
Thanks!

Answers

  • vipin_22401
    vipin_22401 Altair Community Member
    edited March 2019

    Hi

    Try simple loops like this. 

     

    for {set i 1} {$i<6} {incr i} {
    for {set j [expr $i+1]} {$j<6} {incr j} {
    *createmark solids 1 $i
    *createmark solids 2 $j
    *boolean_merge_solids 1 2 14 2
    }
    }

  • AlexanderP
    AlexanderP Altair Community Member
    edited March 2019

    Hi

    Try simple loops like this. 

     

    for {set i 1} {$i<6} {incr i} {
    for {set j [expr $i+1]} {$j<6} {incr j} {
    *createmark solids 1 $i
    *createmark solids 2 $j
    *boolean_merge_solids 1 2 14 2
    }
    }

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