Looping webcut

Looping webcut

Postby Cubit User » Wed Jun 20, 2012 8:37 am

I'd like to have a script that slices my model into a bunch of slices. I'd like the number of slices to be a variable.

Here's the script I thought I could use:

#{ _lam_thick = 5 }
#{ _num_cuts = 19 }
#{ _lam = 1 }
#{ loop ( {_num_cuts} ) }
webcut... distance { _lam_thick * _lam } from...
#{ _lam++ }
#{ endloop }

But Cubit doesn't seem to care for a variable as the loop counter.

This does work:
#{ _lam_thick = 5 }
#{ _lam = 1 }
#{ loop (19) }
webcut... distance { _lam_thick * _lam } from...
#{ _lam++ }
#{ endloop }

Am I missing something about using a variable for the loop counter?

Thanks,
Cubit User
 
Posts: 44
Joined: Wed May 16, 2012 12:42 pm

Re: Looping webcut

Postby csimsoft Moderator » Wed Jun 20, 2012 8:38 am

This should work:

reset
brick x 100
#{ _num_cuts = 19 }
#{ _lam = 1 }
#{ loop(_num_cuts) }
webcut vol all xplane offset {_lam}
#{ _lam++ }
#{ endloop }
csimsoft
csimsoft Moderator
 
Posts: 244
Joined: Tue Feb 14, 2012 5:59 pm
Location: American Fork, UT


Return to Creation and Modification

Who is online

Users browsing this forum: No registered users and 0 guests

cron

Search / Mark

User Control Panel

Login

Who is online

In total there are 0 users online :: 0 registered, 0 hidden and 0 guests (based on users active over the past 5 minutes)
Most users ever online was 58 on Mon Jun 26, 2017 4:19 pm

Users browsing this forum: No registered users and 0 guests