File tree Expand file tree Collapse file tree
kratos.gid/apps/CDEM/examples Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,20 +18,28 @@ proc ::CDEM::examples::BulkGroup {args} {
1818 GidUtils::UpdateWindow GROUPS
1919 GidUtils::UpdateWindow LAYER
2020 GiD_Process 'Zoom Frame
21+
22+ spdAux::RequestRefresh
2123}
2224
2325proc ::CDEM::examples::CreateAndAssignBondedGroups { } {
26+
2427 # Prepare the variables
2528 set entity surface
2629 set condition_id " DEM-Cohesive2D"
2730 if {$::Model::SpatialDimension eq " 3D" } {
2831 set entity volume
2932 set condition_id " DEM-Cohesive"
3033 }
34+ set group_base Bonded_domain_groups
3135 # Locate the condition
3236 set DEMConditions [spdAux::getRoute " DEMConditions" ]
3337 set cohesive_cond " $DEMConditions /condition\[ @n='$condition_id '\] "
3438
39+ # Clear previous assignations
40+ if {[GiD_Groups exists $group_base ]} {GiD_Groups delete $group_base }
41+ gid_groups_conds::delete " $cohesive_cond /group"
42+
3543 # Get the list of entities (surfaces/volumes)
3644 set entity_list [GiD_Geometry -v2 list $entity ]
3745 # Foreach entity, create subgroup and assign it to the condition
@@ -40,7 +48,7 @@ proc ::CDEM::examples::CreateAndAssignBondedGroups { } {
4048 # Get the entity id
4149 set entity_id [objarray get $entity_list $i ]
4250 # Create the subgroup
43- set group_id " Bonded_domain_groups //SG$entity_id "
51+ set group_id " $group_base //SG$entity_id "
4452 GiD_Groups create $group_id
4553 # Assign entity to subgroup
4654 GiD_EntitiesGroups assign $group_id volumes $entity_id
You can’t perform that action at this time.
0 commit comments