Menu

Executive Programs

Workshops

Projects

Blogs

Careers

Placements

Student Reviews


For Business


More

Academic Training

Informative Articles

Find Jobs

We are Hiring!


All Courses

Choose a category

Loading...

All Courses

All Courses

logo

Loading...
Executive Programs
Workshops
For Business

Success Stories

Placements

Student Reviews

More

Projects

Blogs

Academic Training

Find Jobs

Informative Articles

We're Hiring!

phone+91 9342691281Log in
  1. Home/
  2. Tribhuvankumar Pandit/
  3. Week - 5 - Checking and correcting the Normals

Week - 5 - Checking and correcting the Normals

Aim- Write a code to display normal as explained in class. Create a widget containing two buttons for “reverse normals” and “normal off”. Also assign these procedures to keyboard buttons of your choice. check the null case also. Code and Explanation- Codes  Explanation *clearmarkall 1 #It will clear all the previously…

    • Tribhuvankumar Pandit

      updated on 05 Aug 2023

    Aim-

    • Write a code to display normal as explained in class.
    • Create a widget containing two buttons for “reverse normals” and “normal off”.
    • Also assign these procedures to keyboard buttons of your choice.
    • check the null case also.

    Code and Explanation-

    Codes  Explanation
    *clearmarkall 1 #It will clear all the previously selected elements
    *setnormalsdisyplaytype 1 # It will display the normals in colour.
    *createmark elements 1 "displayed" # It will display the all the displayed element.
    *normalsdisplay elements 1  #It will turns on the display of element normal.
    *clearmarkall 1  
    *createmarkpanel elements 1 " Select elements to reverse" #It will create a panel to select the element and stored it. 
    *normalreverse elements 1  #This will reverse the normal of elements which you have selected
    *createmark elements 1 "displayed"  
    *normalsdisplay elements 1 

    CREATING Widget

    #setting a window


    set a .window
    catch {destroy $a}
    toplevel $a -class TopLevel

    #managing window size and name

    wm title $a "Normals"
    wm geometry $a 250x70+100+500
    wm resizable $a 0 0
    wm deiconify $a

    #assigning buttons

    button $a.01 -text " Reverse Normals" -command {*createmark elements 1 "displayed" ; *normalsreverse elements 1} ;
    place $a.01 -x 20 -y 20 -width 100 -height 30

    button $a.02 -text " Normals Off" -command {*createmark elements 1 "displayed" ; *normalsoff} ;
    place $a.02 -x 130 -y 20 -width 100 -height 30.

    Procedure-

    • *setnormalsdisplaytpeis used to display the type of visualization whether with direction of normal (0) or color(1)
    • Then the elements displayed in were selected using *createmarkcommand.
    • Normals were displayed for the selected element with color representation using*normalsdisplay elems. 
    • Functions were created for the reversing the normals and select the elements  using proc and these functions are called by assigning the respective buttons. 
    • To reverse the normals of the selected elements *normalsreverse command is used.
    • hm_framework is used to create a separate tab.

    Output-

    1. Shortcut key select shift + ~.

    2. Now after running widget code.

    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.

    Please  login to add a comment

    Other comments...

    No comments yet!
    Be the first to add a comment

    Read more Projects by Tribhuvankumar Pandit (53)

    Week - 6 - Creating the GUI for final checks

    Objective:

    Aim-    To create a GUI for all the final checks. Objective- Create buttons to delete displayed geometric entities (be careful about advanced remesh). Create buttons to delete empty entities. Create button to re-order and re-number entities by name. Create a master button in red that will execute all above scripts in proper…

    calendar

    09 Sep 2023 05:14 AM IST

      Read more

      Week - 5 - Checking and correcting the Normals

      Objective:

      Aim- Write a code to display normal as explained in class. Create a widget containing two buttons for “reverse normals” and “normal off”. Also assign these procedures to keyboard buttons of your choice. check the null case also. Code and Explanation- Codes  Explanation *clearmarkall 1 #It will clear all the previously…

      calendar

      05 Aug 2023 04:38 AM IST

        Read more

        Assignment 7-Side Pole Crash Simulation Challenge

        Objective:

          Aim-Side Pole Crash Simulation of Dodge Neon BIW using RADIOSS solver and Preprocessing using HyperMesh / HyperCrash. Objective- To perform a crash analysis on the left side of a Dodge Neon BIW, also known as a side crash. The analysis is to be carried on the deformation and the forces created as a result of the crash…

        calendar

        09 Jan 2023 06:57 AM IST

        • HTML
        • RADIOSS
        Read more

        Assignment 6-Frontal Crash Simulation Challenge

        Objective:

        Aim- Frontal crash analysis, deck setup using hyper mesh and hyper crash. Objective- To check the unit system and either follow [Mg mm s] or [Kg mm ms]. To create the appropriate interface, friction 0.2 and recommended parameters. To make sure of no penetrations and intersections. To correct rigid bodies if any issues.…

        calendar

        28 Dec 2022 08:08 AM IST

        • RADIOSS
        Read more

        Schedule a counselling session

        Please enter your name
        Please enter a valid email
        Please enter a valid number

        Related Courses

        coursecard

        Design loads considered on bridges

        Recently launched

        10 Hours of Content

        coursecard

        Design of Steel Superstructure in Bridges

        Recently launched

        16 Hours of Content

        coursecard

        Design for Manufacturability (DFM)

        Recently launched

        11 Hours of Content

        coursecard

        CATIA for Medical Product Design

        Recently launched

        5 Hours of Content

        coursecardcoursetype

        Accelerated Career Program in Embedded Systems (On-Campus) Courseware Partner: IT-ITes SSC nasscom

        Recently launched

        0 Hours of Content

        Schedule a counselling session

        Please enter your name
        Please enter a valid email
        Please enter a valid number

                    Do You Want To Showcase Your Technical Skills?
                    Sign-Up for our projects.