Challenge

Week - 5 - Checking and correcting the Normals

Objective:

Creating automation for element normals.

Code to display normals:

*clearmarkall 1
*setnormalsdisplaytype 1
*createmark elements 1 "displayed"
*normalsdisplay elements 1
*clearmarkall 1
*createmarkpanel elements 1 "select the elements you want reverse normals for"
*normalsreverse elements 1
*createmark elements 1 "displayed"
*normalsdisplay elements 1
*normalsoff

Code to check the null case:

*clearmarkall 1
*createmark elements 1 "displayed"
hm_marklength elements 1
if {[hm_marklength elements] !=0} {}
*setnormalsdisplaytype 1
*createmark elements 1 "displayed"
*normalsdisplay elements 1
*clearmarkall 1
*createmarkpanel elements 1 "select the elements you want reverse normals for"
*normalsreverse elements 1
*createmark elements 1 "displayed"
*normalsdisplay elements 1
*normalsoff

I have assigned the keyboard buttons saperately for reverse normals and normal off.

I have attached the files for reference.

Conclusion:

We can able to automate for checking and to do normal correction in just a click of a button.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.