All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
Objective: Create code to display free edges, t edges and temp nodes for equivalence Procedure: 1. Create procedures for Free edges and t edges with possible null conditions 2. create procedure for deleting edges 3. create gui for buttons to display edges and remove edges Code: proc freeedges {} {*nodecleartempmark…
dinesh reddy
updated on 18 Mar 2023
Objective: Create code to display free edges, t edges and temp nodes for equivalence
Procedure:
1. Create procedures for Free edges and t edges with possible null conditions
2. create procedure for deleting edges
3. create gui for buttons to display edges and remove edges
Code:
proc freeedges {} {
*nodecleartempmark
*setdisplayattributes 4 1
*createmark elements 1 "displayed"
*equivalence elements 1 1 3 0 0
*createmark nodes 1 "retrieve"
*nodemarkaddtempmark 1
*createmark components 1 "^edges" "Free_Edges" "T_Edges"
if {[hm_marklength components 1] != 0} {*deletemark components 1;\
*createmark elements 1 "displayed"; *findedges1 elements 1 0 0 0 30} else {*createmark elements 1 "displayed"; *findedges1 elements 1 0 0 0 30}
*clearmarkall 1; *createmark components 1 "^edges"
if {[hm_marklength components 1] !=0} {*setvalue components name=^edges name=Free_Edges;\
*createmark components 1 "Free_Edges";*setvalue comps mark=1 color=#FF0000;*setcomponentdisplayattributes "Free_Edges" 2 1} else {puts "No Free Edges"}
}
proc tedges {} {
*createmark components 1 "^edges"
if {[hm_marklength components 1] != 0} {*deletemark components 1;\
*createmark elements 1 "displayed"; *findedges1 elements 1 1 0 0 30} else {*createmark elements 1 "displayed"; *findedges1 elements 1 1 0 0 30}
*clearmarkall 1; *createmark components 1 "^edges"
if {[hm_marklength components 1] !=0} {*setvalue components name=^edges name=T_Edges;\
*createmark components 1 "T_Edges";*setvalue comps mark=1 color=#00B0F0;*setcomponentdisplayattributes "T_Edges" 2 1} else {puts "No Free Edges"}
}
proc del_comp {a} {
*clearmarkall 1
*createmark components 1 $a
if {[hm_marklength components 1]!=0} {*deletemark components 1}
}
proc del_edges {} {
del_comp "Free_Edges"
del_comp "Free_Edges1"
del_comp "T_Edges"
del_comp "T_Edges1"
del_comp "^edges"
*nodecleartempmark
*setdisplayattributes 2 1
}
set edg .window
catch {destroy $edg}
toplevel $edg -class Toplevel
wm title $edg "Edges"
wm geometry $edg 200x200+500+500
wm resizable $edg 0 0
wm deiconify $edg
button $edg.01 -text "Edges" -command {freeedges;tedges} -font {time 10}; place $edg.01 -x 15 -y 15 -width 50
button $edg.02 -text "Delete Edges" -command {del_edges} -font {time 10}; place $edg.02 -x 75 -y 15 -width 100
Using edges
Deleting edges:
Conclusion:
Code is deployed successfully
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
127 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.