All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
Objective: To create a code to show the failed elements based on quality criteria Procedure: 1. create tk gui to get the quality criteria 2. using the criteria get failed elements and add temp node to highlight them verifying Code: # need to add a way to display number of failed elementsset a .windowcatch {destroy $a}toplevel…
dinesh reddy
updated on 23 Mar 2023
Objective: To create a code to show the failed elements based on quality criteria
Procedure:
1. create tk gui to get the quality criteria
2. using the criteria get failed elements and add temp node to highlight them
verifying Code:
# need to add a way to display number of failed elements
set a .window
catch {destroy $a}
toplevel $a -class Toplevel
wm title $a "2D Quality check"
wm geometry $a 300x350+200+300
wm resizable $a 0 0
wm deiconify $a
entry $a.01 -textvariable ::min ; place $a.01 -x 130 -y 10 -width 80 -height 25
button $a.02 -text "Min Length" -command {quality $::min 1} -bg grey -font {time 10}; place $a.02 -x 10 -y 10 -width 100 -height 25
entry $a.03 -textvariable ::max ; place $a.03 -x 130 -y 45 -width 80 -height 25
button $a.04 -text "Max Length" -command {quality $::max 2} -bg grey -font {time 10}; place $a.04 -x 10 -y 45 -width 100 -height 25
entry $a.05 -textvariable ::warp ; place $a.05 -x 130 -y 75 -width 80 -height 25
button $a.06 -text "Warpage" -command {quality $::warp 3} -bg grey -font {time 10}; place $a.06 -x 10 -y 75 -width 100 -height 25
entry $a.07 -textvariable ::asp ; place $a.07 -x 130 -y 105 -width 80 -height 25
button $a.08 -text "Aspect" -command {quality $::asp 4} -bg grey -font {time 10}; place $a.08 -x 10 -y 105 -width 100 -height 25
entry $a.09 -textvariable ::skew ; place $a.09 -x 130 -y 135 -width 80 -height 25
button $a.10 -text "Skew" -command {quality $::skew 5} -bg grey -font {time 10}; place $a.10 -x 10 -y 135 -width 100 -height 25
entry $a.11 -textvariable ::jac ; place $a.11 -x 130 -y 165 -width 80 -height 25
button $a.12 -text "Jacobian" -command {quality $::jac 6} -bg grey -font {time 10}; place $a.12 -x 10 -y 165 -width 100 -height 25
entry $a.13 -textvariable ::minq ; place $a.13 -x 130 -y 195 -width 80 -height 25
button $a.14 -text "Min angle Quad" -command {quality $::minq 7} -bg grey -font {time 10}; place $a.14 -x 10 -y 195 -width 100 -height 25
entry $a.15 -textvariable maxq ; place $a.15 -x 130 -y 225 -width 80 -height 25
button $a.16 -text "Max angle Quad" -command {quality $::maxq 8} -bg grey -font {time 10}; place $a.16 -x 10 -y 225 -width 100 -height 25
entry $a.17 -textvariable ::mint ; place $a.17 -x 130 -y 255 -width 80 -height 25
button $a.18 -text "Min angle tria" -command {quality $::mint 9} -bg grey -font {time 10}; place $a.18 -x 10 -y 255 -width 100 -height 25
entry $a.19 -textvariable ::maxt ; place $a.19 -x 130 -y 285 -width 80 -height 25
button $a.20 -text "Max angle tria" -command {quality $::maxt 10} -bg grey -font {time 10}; place $a.20 -x 10 -y 285 -width 100 -height 25
proc quality {a b} {
*nodecleartempmark
*clearmarkall 1; *clearmarkall 2
*createmark elements 1 "displayed"
switch $b {
1 {*elementtestlength elements 1 $a 2 1 2 0 " 2D Length < "}
2 {*elementtestlength elements 1 $a 2 0 2 0 " 2D Length > "}
3 {*elementtestwarpage elements 1 $a 2 2 0 " 2D Warpage "}
4 {*elementtestaspect elements 1 $a 2 2 0 " 2D Aspect Ratio "}
5 {*elementtestskew elements 1 $a 2 2 0 " 2D Skew "}
6 {*elementtestjacobian elements 1 $a 2 2 0 " 2D Jacobian "}
7 {*elementtestinterangle elements 1 $a 0 2 1 2 0 " 2D Quad Min Angle "}
8 {*elementtestinterangle elements 1 $a 0 2 0 2 0 " 2D Quad Max Angle "}
9 {*elementtestinterangle elements 1 $a 1 2 1 2 0 " 2D Tria Min Angle "}
10 {*elementtestinterangle elements 1 $a 1 2 0 2 0 " 2D Tria Max Angle "}
}
*maskentitymark elements 2 0
*maskreverse elements
*createmark nodes 1 "displayed"
*nodemarkaddtempmark 1
*clearmarkall 1
*createmark elements 1 "displayed"
set ele [hm_marklength elements 1]
*unmaskall2
puts $ele
}
Conclusion: The code is working properly as shown
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Week - 11 - Element quality check
Objective: To create a code to show the failed elements based on quality criteria Procedure: 1. create tk gui to get the quality criteria 2. using the criteria get failed elements and add temp node to highlight them verifying Code: # need to add a way to display number of failed elementsset a .windowcatch {destroy $a}toplevel…
23 Mar 2023 09:06 AM IST
Week - 9 - Reflecting the geometry
Objective: To create a code to reflect elements for similar components and create components for them and properties depending on solver type Procedure: 1. Provide the name for reflected components elements 2. Select source geometry 3. Select reflect to geometry 4. Select fe of components to be reflected 5. get centroid…
22 Mar 2023 03:30 PM IST
Week - 10 - Creating the midline and spot weld
Objective: To create code for creating midline and combine the line. Create spotweld for given set of node Procedure: MIDLINE: 1. Create a set for storing first set of lines 2. Create a set for storing second set of lines 3. creating midline for every pair of lines 4. combining lines to single line Code: *createlistbypathpanel…
18 Mar 2023 05:44 PM IST
Week - 8 - Creating component and property
Objective: To create code to create collector of component and property with thickness given by user and assign it to component based on solver type Procedure: 1. Get the user input of component type and thickness from tk window 2. create a component and property with user given name and assign property to given component…
18 Mar 2023 01:26 PM IST
Related Courses
0 Hours of Content
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.