CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > Siemens

scripting gridgen: why a connector is not saved??

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 3, 2007, 13:30
Default scripting gridgen: why a connector is not saved??
  #1
Tim
Guest
 
Posts: n/a
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]

} }
  Reply With Quote

Old   July 3, 2007, 15:16
Default Re: scripting gridgen: why a connector is not save
  #2
Ben
Guest
 
Posts: n/a
I think this is best asked in the main forum as this is the STAR-CD one....
  Reply With Quote

Old   July 28, 2007, 17:11
Default Re: scripting gridgen: why a connector is not save
  #3
John Chawner
Guest
 
Posts: n/a
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.
  Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Gridgen- Connector redistribution function sea Pointwise & Gridgen 6 July 11, 2007 20:08
scripting in GridGen Tim Siemens 1 June 30, 2007 14:33
reading saved case and data maxime henno FLUENT 1 June 12, 2007 07:40
Gridgen - Link Database / Connector Nico Pointwise & Gridgen 1 April 21, 2007 14:59
very large saved files jelle Phoenics 4 August 5, 2005 09:49


All times are GMT -4. The time now is 18:35.