File tree Expand file tree Collapse file tree
kratos.gid/apps/Structural/write Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -292,9 +292,18 @@ proc ::Structural::write::writeHinges { } {
292292 foreach geom_line [GiD_EntitiesGroups get $group lines] {
293293 # ask the mesh for the linear elements of this line
294294 # check https://gidsimulation.atlassian.net/wiki/spaces/GCM/pages/2385543949/Geometry
295- set linear_elements [lindex [GiD_Geometry get line $geom_line mesh] 4]
296- set first [::tcl::mathfunc::min {*}$linear_elements ]
297- set end [::tcl::mathfunc::max {*}$linear_elements ]
295+ # set linear_elements [lindex [GiD_Geometry get line $geom_line mesh] 4]
296+ # set first [::tcl::mathfunc::min {*}$linear_elements]
297+ # set end [::tcl::mathfunc::max {*}$linear_elements]
298+
299+ lassign [lrange [GiD_Geometry line $geom_line ] 2 3] first_point end_point
300+ set first [GiD_Geometry get point $first_point node]
301+ set end [GiD_Geometry get point $end_point node]
302+ if {$first eq " " || $end eq " " } {
303+ W " Error: Line $geom_line has no nodes. Please make sure the mesh is attached to the geometry."
304+ continue
305+ }
306+
298307 if {[llength $first_list ] > 0} {
299308 set value [join $first_list ,]
300309 write::WriteString [format " $id_f \[ %d\] (%s)" $first [llength $first_list ] $value ]
You can’t perform that action at this time.
0 commit comments