#--------------------------------------------------
# Version: 1.2
# Author: Rajasekaran Natarajan, Kawasaki, Japan.
# www.oocities.org/rajsekarann/
# rajasekaran.natarajan <at> gmail.com
#--------------------------------------------------



# Purpose: to trim the surface with many lines.
    #select surface <enter> select lines <enter>
*clearmark lines 1
*clearmark surfaces 1

*createmarkpanel surfaces 1 "Select the surface"
set surfT [hm_getmark surfaces 1]
*createmarkpanel lines 1 "Select the lines"
set lineList [hm_getmark lines 1]
#*createmark lines 1 


if { ([llength $surfT] == 0) } {
        hm_errormessage "No Lines were selected: terminating."
        } else {
               
            foreach j $surfT {
             
                     if { ([llength $lineList] == 0) } {

                             hm_errormessage "No Lines were selected: terminating."

                             # Otherwise...
                             } else {

                                 foreach i $lineList {

                                             *createmark lines 2 $i
                                     *createmark surfaces 1  $surfT
                                     *surfacemarkclipwithlines 1 2 0.1
                                 }

                    }
            }

                }