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 gui for deleting and final checks Procedure: creation of window and buttons for specific operations Deleting geometry, empty components, properties and elements Renumberring set gui .windowcatch {destroy $gui}toplevel $gui -class Toplevelwm title $gui "Checks"wm geometry $gui 300x300+600+500wm resizable…
dinesh reddy
updated on 15 Mar 2023
Objective:
To create gui for deleting and final checks
Procedure:
creation of window and buttons for specific operations
Deleting geometry, empty components, properties and elements
Renumberring
set gui .window
catch {destroy $gui}
toplevel $gui -class Toplevel
wm title $gui "Checks"
wm geometry $gui 300x300+600+500
wm resizable $gui 0 0
wm deiconify $gui
proc delete {a} {
*createmark $a 1 "displayed"
if {[llength [hm_getmark $a 1]] != 0} {*deletemark $a 1}
}
proc deleteemp {a} {
*EntityPreviewEmpty $a 1
if {[llength [hm_getmark $a 1]] != 0} {*deletemark $a 1}
}
proc deleteunu {a} {
*EntityPreviewUnused $a 1
if {[llength [hm_getmark $a 1]] != 0} {*deletemark $a 1}
}
proc reorder {a} {
*createmark components 1 "all"
if {[llength [hm_getmark components 1]] != 0} {*collectormarkmove components 1 1 1}
*createmark properties 1 "all"
if {[llength [hm_getmark properties 1]] != 0} {*collectormarkmove properties 1 1 1}
*createmark materials 1 "all"
if {[llength [hm_getmark materials 1]] != 0} {*collectormarkmove materials 1 1 1}
}
proc renumber {a} {
*renumbersolveridall 2 2 0 0 0 0 0
}
proc master {a} {
*createmark surfaces 1 "all"
if {[llength [hm_getmark surfaces 1]] != 0} {*deletemark surfaces 1}
*createmark solids 1 "all"
if {[llength [hm_getmark solids 1]] != 0} {*deletemark solids 1}
*createmark points 1 "all"
if {[llength [hm_getmark points 1]] != 0} {*deletemark points 1}
*createmark lines 1 "all"
if {[llength [hm_getmark lines 1]] != 0} {*deletemark lines 1}
*EntityPreviewEmpty components 1
if {[llength [hm_getmark components 1]] != 0} {*deletemark components 1}
*EntityPreviewUnused properties 1
if {[llength [hm_getmark properties 1]] != 0} {*deletemark properties 1}
*EntityPreviewUnused materials 1
if {[llength [hm_getmark materials 1]] != 0} {*deletemark materials 1}
*createmark components 1 "all"
if {[llength [hm_getmark components 1]] != 0} {*collectormarkmove components 1 1 1}
*createmark properties 1 "all"
if {[llength [hm_getmark properties 1]] != 0} {*collectormarkmove properties 1 1 1}
*createmark materials 1 "all"
if {[llength [hm_getmark materials 1]] != 0} {*collectormarkmove materials 1 1 1}
*renumbersolveridall 2 2 0 0 0 0 0
}
button $gui.01 -text "Delete points" -command {delete points} -font {time 10}; place $gui.01 -x 50 -y 5
button $gui.02 -text "Delete lines" -command {delete lines} -font {time 10}; place $gui.02 -x 150 -y 5
button $gui.03 -text "Delete surfaces" -command {delete surfaces} -font {time 10}; place $gui.03 -x 40 -y 35
button $gui.04 -text "Delete solids" -command {delete solids} -font {time 10}; place $gui.04 -x 150 -y 35
button $gui.05 -text "Delete Empty Components" -command {deleteemp components} -font {time 10}; place $gui.05 -x 50 -y 65
button $gui.06 -text "Delete unused Prop" -command {deleteunu properties} -font {time 10}; place $gui.06 -x 30 -y 95
button $gui.07 -text "Delete unused mat" -command {deleteunu materials} -font {time 10}; place $gui.07 -x 175 -y 95
button $gui.08 -text "Reorder" -command {reorder all} -font {time 10}; place $gui.08 -x 50 -y 125
button $gui.09 -text "Renumber" -command {renumber all} -font {time 10}; place $gui.09 -x 150 -y 125
button $gui.10 -text "master" -command {master all} -bg red -font {time 10 bold}; place $gui.10 -x 100 -y 175
Conclusion:
the code can be more refined using procedures for procedures
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.