Jdi na navigaci předmětu

OpenSCAD: Homework Summer 2014/2015

Varování:

This is not the current assignment.

Your task is to develop parametric model of storage box. The box’s base is rectangle with rounded corners. Box contains bottom part and top lid.

Ground Area

pudoris

Used arguments: x and y are inner dimensions, rad is also inner radius of rounded corners. The box won’t be rendered in case of value of x or y ⇐ 0. The box will have 90˚ angle of inner corners in case of value of rad ⇐ 0. In case of it wont fit into corner with desire radius rad, the radius will be lowered to the smallest acceptable value.

wall_thick

roh
roh bad
roh bad2

When rad ⇐ 0:

roh90
roh90 bad

Used arguments: wall_thick is thickness of wall. It must be same in every spot of the wall including corners. The box shall not be rendered when the value is ⇐ 0.

Side view

bokorys vrsek
bokorys spodek

Used arguments: z1 and z2 are heights of each parts including platform. wall_thick is same as Ground area, but it behaves different in corners, see the picture. In case of value z1 or z2wall_thick (wall_thick + lock_z for z1, see below) it will render only box’s height botom/top and the connecting mechanism.

Detail of connection

lock

Used arguments: wall_thick is same as above. lock_z if height of teeth, watchout for different relation between z1 and z2. reserve is value between box parts. For all values < 0 the reserve and the lock_z will be set to 0. In case reserve > wall_thick, teeth of mechanism will not be rendered . * is not argument but it describes that both arguments a re identical.

Interafce

module box(x=30, y=30, z1=10, z2=5, rad=15, wall_thick=2, lock_z=2, reserve=1.5, to_print=true, print_space=5)

Earlier undefined arguments affects place of the box in space

In case of to_print is false, the box must be placed to XY surface, the bottom of box must be at z=0 and centered so Z axix would go right through the middle of box. The lid will be rendered on the top of box, it also needs to reflect the reserve argument. print_space will be ignored. Ensure that you will keep the directions and dimensions x and y accordingly by the picture above (named logically).

In case of to_print is true, both of the parts, will be rendered on their flat side, lying on on XY surface, both parts will sit on z=0, side by side centered on X axis, the space between them will be equal to print_space, this value is calculated between both outer walls of each box part, with it’s center in axis origins. Ensure that you will keep the directions and dimensions x and y accordingly by the picture above (named logically). The bottom part of box shall be moved in positive direction of X axis, the top part of box to the opposite side.

Render to right place is crucial, because of automatic test.

The modul must have written so it could be used with use directive - It must not store any constants outside module.

Ensure that you keep given argument values!

Code

Code must be well written, it must be logically indented throught the whole file. Repetitive code constructions must be implemented in it’s own modules and for-loops. Magical constants must be self explaining, or populated with comments. It is forbidden to use any external libraries, including the MCAD library. Any manipulation with $fn, $fs a $fa is also forbidden.

Submissions and classification

Name the file box.scad, achive it to root directory of box.zip and upload this archive to your personal namespace on EDUX. It must be downloadable by this kind of link https://edux.fit.cvut.cz/courses/BI-3DT/_media/student/username/box.zip or https://edux.fit.cvut.cz/courses/BI-3DT/_media/en/student/username/box.zip Place link pointing to archive to you namespace. The archive must contains all the necessary files, (files containing your modules, or STL), generated STL files of your box doesnt belong to archive.

To upload a file, use:

edux up1

The deadline is 5.4.2015 23:59:27. Late submission is possible to 19.4.2015 23:59:27, late submission counts for half of the points. In case of long term illnes, it is possible to setup special date. Illnes or accident close to deadline will not push your deadline forward.

After classification (which will be after deadline), you cannot fix your task. It is possible to consult and upload your task on EDUX however you want. If you want to submit your task after proper deadline, make sure that your namespace on EDUX is blank, otherwise the classification will go throught, by the date of proper submission term.

We use automatic test, which includes limit values of arguments. We advise you to test your task well. Based on quality of your code, you can gain 0 to 20 points. In case you will cheat, or you will not understand your own code, your classification will be -100 points, that means that you will get F.

Otázky od studentů

How is the box supposed to look like when rad > x/2 or y/2

See the text :“In case of it wont fit into corner with desire radius rad, the radius will be lowered to the smallest acceptable value.”

"In case of reserve > wall_thick, teeth will not render." Does it means that teeth wont render, but distance of boxes reserve + lock_z will still as it is, or is the box supposed to behave like if the lock_z == 0?

The first option is correct the distance will be reserve + lock_z.

"Both parts centered on X axis, Do i understand is correctly that both parts should be placed exactly on X and Y axis will be intersecting the gap between them, that means that parts will be facing each other by the side of size y?

​YES.

How is it supposed to behave when print_space < 0?

It should render the parts so they intersects, in case massively negative value of print_space the boxex will switch their location.

  • Is it neccesary to check if the value of lock_z > z1?**

See the submission text, if values z1 or z2wall_thick. The box will render only from bottom to up, reaching just the top of connecting mechanism.

Is the incision of the box supposed to look like this?

box

Yes, for a specific set of arguments.

**Can you clarify this:

"In case of z1 or z2 wall_thick The box will render only from bottom to up, reaching just the top of connecting mechanism.

What do you mean by top of connecting mechanism?

Does it mean, that top part will have thickness of ceiling z2 + the lock will be rendered?

And the bottom part will only have it’s thickness z1-lock_z? Therefore there will be only the lock in extreme case?**

Nope, the other way around. Thickness of bottom and ceiling will always be wall_thick. Lock will be rendered. In case the lock will not fit there, the height of the box will be automatically modified to make sure it will fit.

  • What do you mean by: In case of reserve < 0 or lock_z < 0, the values will be set to 0.**

You will always set just the variabkle which is lesser than 0 to 0.

When rad == x/2 or y/2, is the box supposed to have circle base?

When rad == x/2 and rad == y/2, the box will have circle base.