scripting gridgen: why a connector is not saved??
Hi, I wrote a script with two loop:
for (j..){ for(i...){ gg::conBegin gg::segBegin -type 3D_LINE gg::segAddControlPt "$a $b $c" gg::segAddControlPt "$a $d $c" gg::segEnd set con(0,$j,$i) [gg::conEnd] }} at the first time when j=0, the connectors are saved but at the second one I've got an error message.. ERROR: connector not saved while executing "gg::conEnd" I looked for why there is that error but I didn't find out... Does someone know in which case a connector is not saved?? Thanks for your help A part of my script, if you need to have a look... set Largeur_ss_etran [expr {$Largeur - $Longueur_Etran}]; set dist_entre_brise_H [expr {$Largeur_ss_etran / [expr {$Nbre_Brise_H + 1}] }]; set dist_entre_brise_V [expr {$Largeur_ss_etran / [expr {$Nbre_Brise_V + 1}] }]; if {$Nbre_Brise_V > 0} { set BV 2 } else { set BV 0} set j_limit [expr {$Nbre_Brise_H + [expr {$Nbre_Brise_V + [expr {$Nbre_Brise_E + 2}]}]}]; set i_limit [expr {3+$BV}]; set jh 0; set jv 0; for {set j 0} {$j <= $j_limit} {incr j} { #Coordonnées selon l'axe x set bh [expr {$Longueur_Etran + [expr {$jh * $dist_entre_brise_H}]}]; set bv [expr {$Longueur_Etran + [expr {$jv * $dist_entre_brise_V}]}]; if {$bv == $bh} { set a $bh incr jh; incr jv; } else { if { $bh < $bv} { set a $bh; incr jh; } else { set a $bv; incr jv; }} set c $Demi_Hauteur; #Coordonnées selon l'axe y for {set i 0} {$i<= $i_limit} {incr i} { if {$Nbre_Brise_V != 0} { switch -glob -- $i { 0 {set b -$Profondeur} 1 {set b [expr {-$Profondeur+$Brise_V_y}]} 2 {set b $Largeur_Etran_2} 3 {set b $Largeur_Etran_1} 4 {set b [expr {$Profondeur-$Brise_V_y}]} } switch -glob -- $i { 0 {set d [expr {-$Profondeur+$Brise_V_y}]} 1 {set d $Largeur_Etran_2} 2 {set d $Largeur_Etran_1} 3 {set d [expr {$Profondeur-$Brise_V_y}]} 4 {set d $Profondeur} } } else { set b0; set d 1; } gg::conBegin gg::segBegin -type 3D_LINE gg::segAddControlPt "$a $b $c" gg::segAddControlPt "$a $d $c" gg::segEnd set con(0,$j,$i) [gg::conEnd] } } |
Re: scripting gridgen: why a connector is not save
I think this is best asked in the main forum as this is the STAR-CD one....
|
Re: scripting gridgen: why a connector is not save
Tim,
The first thing that comes to mind is that the connector isn't saved because it duplicates one that already exists. Gridgen won't allow two connectors to be coincident. I briefly looked at your script and didn't see any other obvious source of the problem. But I didn't run the script since it was just a fragment. If this isn't the problem, contact Gridgen Tech Support at support@pointwise.com. |
All times are GMT -4. The time now is 11:29. |