2019-02-08 22:56:19 +01:00
|
|
|
Drawing commands
|
|
|
|
================
|
|
|
|
|
|
|
|
|
|
|
|
Turtle Graphics commands
|
|
|
|
------------------------
|
|
|
|
|
|
|
|
These commands all move the coordinate system with them.
|
|
|
|
|
|
|
|
.. automethod:: boxes.Boxes.edge
|
|
|
|
.. automethod:: boxes.Boxes.corner
|
|
|
|
.. automethod:: boxes.Boxes.curveTo
|
|
|
|
.. automethod:: boxes.Boxes.polyline
|
|
|
|
|
|
|
|
Special Functions
|
|
|
|
.................
|
|
|
|
|
|
|
|
.. automethod:: boxes.Boxes.bedBoltHole
|
|
|
|
|
|
|
|
Latch and Grip
|
|
|
|
..............
|
|
|
|
|
|
|
|
These should probably be Edge classes. But right now they are still functions.
|
|
|
|
|
|
|
|
.. automethod:: boxes.Boxes.grip
|
|
|
|
.. automethod:: boxes.Boxes.latch
|
|
|
|
.. automethod:: boxes.Boxes.handle
|
|
|
|
|
2019-02-24 13:13:34 +01:00
|
|
|
Tab support
|
|
|
|
...........
|
|
|
|
|
2022-12-28 17:03:26 +01:00
|
|
|
Tabs are small interruptions in the border of a part to keep it in
|
2019-02-24 13:13:34 +01:00
|
|
|
place. They are enabled with the **tabs** parameter. All
|
|
|
|
**Edges** automatically create about two tabs. So parts like
|
|
|
|
:py:meth:`boxes.Boxes.rectangularWall` will have 8 tabs holding them
|
|
|
|
in place. Because of this developers often don't need to be concerned
|
2020-02-23 13:57:39 +01:00
|
|
|
about tabs. But some part may be completely drawn by low level Turtle
|
2019-02-24 13:13:34 +01:00
|
|
|
Graphics commands. For those both :py:meth:`boxes.Boxes.edge` and
|
|
|
|
:py:meth:`boxes.Boxes.corner` do support a **tabs** parameter. In
|
2019-02-26 11:00:15 +01:00
|
|
|
addition the length of the line segments in :py:meth:`boxes.Boxes.polyline` can
|
2019-02-24 13:13:34 +01:00
|
|
|
be given as a tuple **(length, tabs)**.
|
|
|
|
|
2019-02-08 22:56:19 +01:00
|
|
|
Draw Commands
|
|
|
|
-------------
|
|
|
|
|
|
|
|
These commands do not change the coordinate system but get the
|
|
|
|
coordinates passed as parameters. All of them are either som sort of
|
2020-02-23 13:57:39 +01:00
|
|
|
hole or text. These artifacts are placed somewhere independently of
|
2019-02-08 22:56:19 +01:00
|
|
|
some continuous outline of the part their on.
|
|
|
|
|
|
|
|
.. automethod:: boxes.Boxes.hole
|
|
|
|
.. automethod:: boxes.Boxes.rectangularHole
|
|
|
|
.. automethod:: boxes.Boxes.dHole
|
|
|
|
.. automethod:: boxes.Boxes.flatHole
|
|
|
|
.. automethod:: boxes.Boxes.text
|
|
|
|
.. automethod:: boxes.Boxes.NEMA
|
|
|
|
.. automethod:: boxes.Boxes.TX
|
|
|
|
.. automethod:: boxes.Boxes.flex2D
|
|
|
|
.. py:class:: NutHole
|
|
|
|
|
|
|
|
An instance is available as **boxes.Boxes.nutHole()**
|
|
|
|
|
|
|
|
An instance of
|
|
|
|
|
|
|
|
.. autoclass:: boxes.edges.FingerHoles
|
|
|
|
:noindex:
|
|
|
|
|
|
|
|
is accessible as **Boxes.fingerHolesAt**.
|
|
|
|
|
|
|
|
|
|
|
|
Hexagonal Hole patterns
|
|
|
|
.......................
|
|
|
|
|
|
|
|
Hexagonal hole patterns are one way to have some ventilation for
|
2020-02-23 13:57:39 +01:00
|
|
|
housings made with Boxes.py. Right now both ``.rectangularWall()``
|
2019-02-08 22:56:19 +01:00
|
|
|
and ``.roundedPlate()`` do supports this pattern directly by passing
|
|
|
|
the parameters to the calls. For other use cases these more low level
|
|
|
|
methods can be used.
|
|
|
|
|
|
|
|
For now this is the only supported pattern for ventilation slots. More
|
|
|
|
may be added in the future.
|
|
|
|
|
|
|
|
There is a global Boxes.hexHolesSettings object that is used if no settings are
|
2020-02-23 13:57:39 +01:00
|
|
|
passed. It currently is just a tuple of (r, dist, style) defaulting to
|
2019-02-08 22:56:19 +01:00
|
|
|
(5, 3, 'circle') but might be replace by a Settings instance in the future.
|
|
|
|
|
|
|
|
.. automethod:: boxes.Boxes.hexHolesRectangle
|
|
|
|
.. automethod:: boxes.Boxes.hexHolesCircle
|
|
|
|
.. automethod:: boxes.Boxes.hexHolesPlate
|
|
|
|
.. automethod:: boxes.Boxes.hexHolesHex
|