Menu
Logged-In As
ACCOUNTNot Logged In
Implement script to create a planetary gearBRL-CAD
Status: ClosedTime to complete:
100 hrs
Mentors: Kesha Shah, Harmanpreet
This is a follow-on task to https://www.google-melange.com/gci/task/view/google/gci2014/6464160023969792 to get credit for the scripting effort.
Submit your script(s) with comments embedded that explain the logic. Also provide simple instructions on how to use/run the script, any tools or libraries required, and any limits one might encounter.
References:- https://www.google-melange.com/gci/task/view/google/gci2014/6464160023969792
Uploaded Work
File name/URL | File size | Date submitted | |
---|---|---|---|
circle_skript.py | 1.9 KB | January 08 2015 09:44 UTC | |
tooths_sсript_new.py | 1.1 KB | January 08 2015 11:17 UTC | |
work script.png | 423.0 KB | January 08 2015 11:23 UTC | |
Gear.zip | 1.5 KB | January 10 2015 08:07 UTC |
I would like to work on this task.
This task has been assigned to Raptor. You have 100 hours to complete this task, good luck!
The first version of the script was flawed because it was necessary to enter data in mged. The second version does everything itself ) I run a script on a linux system :
chmod u+x script path
./skript
Should be python3.4 interpreter in the standard way . On windows , simply run the script with the mouse , it must be started.
Example of the work script can be seen in the picture
The work on this task is ready to be reviewed.
If youreplace thewindowsin the scriptpathon the respective
One of the mentors has sent this task back for more work. Talk to the mentor(s) assigned to this task to satisfy the requirements needed to complete this task, submit your work again and mark the task as complete once you re-submit your work.
Raptor, this looks great, but you left off adding some comments to explain what the logic is doing and why (and summary / details that might not be obvious with the logic itself).
Webase radius, enter internal or externalradius: Outer ismore than usual,the innersmallertheradius forservingtop.Deltatheseradiiwillbe the length ofthe tooth(the median of the triangle).
Then,the number of teeth, dividing 360by the number ofdegreeswe findrequired foreach tooth, half of this degreeisprojectingtooth.
Loopingprocess ofaddingdegreeswe getthe coordinates((sin * angle) * R =x, (cos * angle) * P= y, Z -set)
Createarb6.
What is yournickname inirc,andwhen you get there?
sin_angle and cos_angle not *
The work on this task is ready to be reviewed.
One of the mentors has sent this task back for more work. Talk to the mentor(s) assigned to this task to satisfy the requirements needed to complete this task, submit your work again and mark the task as complete once you re-submit your work.
Hehe, Raptor, I meant comments *in* the code. Code // comments. So when someone reads these scripts in 5 years, they won't have to decipher every line to guess what your intentions were and what it's actually doing. Upload new versions of circle_skript.py and tooths_script_new.py that have comments embedded. Make sense?
The work on this task is ready to be reviewed.
Raptor, the comments you added to tooth_script.py were vary vague and in many instances merely repeat what the code already says. Comments should say what the code does NOT say, like summarizing that you're getting inputs from the user in the first half and iterating around in circles like an hour glass in the for r in range loop.
Adding comments is about summarizing and explaining why .. NOT what. The comments you added are almost entirely stating what.
Please try one more time. I suggest not putting comments at the end of lines. Put them on lines by themselves before sets of lines that you will talk about. For example:
# read specifications from the user that will define the shape of
# this gear. the resulting shape looks sort of like a tooth gear.
for r in range(n): ...
Here's a better example of good commenting. Note all of the # lines throughout. They say what the code does not. Summarizing and explaining why.
https://sourceforge.net/p/brlcad/code/HEAD/tree/brlcad/trunk/bench/run.sh
Congratulations, this task has been completed successfully.
accidentally closed. *sigh* If you're inclined to add proper comments, please e-mail them to contest at brlcad dot org.
Thank you, I'll post) will spread in the irc chat or mail
I redid the comments in the script - https://mega.co.nz/#!GAUH1QZD!wvanPjtAmKpfyxw4CghiOojy72Y2L9-b1jqYw8vm7k