Skip to content

Commit 4de81cc

Browse files
applications can set the default mesh type for it's models
1 parent 188b033 commit 4de81cc

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

kratos.gid/scripts/Applications.tcl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,20 @@ proc apps::ActivateApp_do {app} {
333333
set app_minimum_gid_version [dict get [$app getProperty requirements] minimum_gid_version]
334334
if {[GiDVersionCmp $app_minimum_gid_version] < 0} {W "Caution. Minimum GiD version is $app_minimum_gid_version"}
335335
}
336+
337+
# If mesh_type is not defined, do not touch it
338+
if {[dict exists [$app getProperty requirements] mesh_type]} {
339+
set mesh_type [dict get [$app getProperty requirements] mesh_type]
340+
# If its quadratic, warn user and set it
341+
if {$mesh_type eq "quadratic"} {
342+
GiD_Set Model(QuadraticType) 1
343+
::GidUtils::SetWarnLine "Setting mesh mode: $mesh_type"
344+
} else {
345+
# If it's set to anything else, set it to linear
346+
GiD_Set Model(QuadraticType) 0
347+
::GidUtils::SetWarnLine "Setting mesh mode: linear"
348+
}
349+
}
336350
if {[write::isBooleanTrue [$app getPermission import_files]]} { Kratos::LoadImportFiles }
337351
if {[write::isBooleanTrue [$app getPermission wizard]]} { Kratos::LoadWizardFiles }
338352
if {[$app getProperty start_script] ne ""} {eval [$app getProperty start_script] $app}

0 commit comments

Comments
 (0)