Matthijs Kooijman
8ecf04cbe8
Fix handling of space in LidSideRight/Left
...
Previously, the extra space was added above the first pin and below the
(optional) second pin. This would cause the lid to misalign with the
holes in the back wall, making it harder to close the lid.
With this commit, the extra space is divided evenly above and below the
nominal position of the pin.
For this to work, the startwidth (or endwidth, depending on the side) is
slightly adjusted (since the start of the first pin slot is actually
generated by the adjacent edge). This moves the starting point, so the
location of the spring hole is adjusted to compensate for that.
2019-07-27 13:30:06 +02:00
Matthijs Kooijman
3bd4dc9907
Fix spring hole offsets by burn in LidSideRight/Left
2019-07-27 13:30:06 +02:00
Matthijs Kooijman
4691a65a29
Let LidSideRight/Left respect edge_width
...
This allows modifying the height of the wall that extends above the lid.
The box back wall (with holes) would already support edge_width, so this
makes it supported on all three walls where needed.
2019-07-27 13:30:06 +02:00
Matthijs Kooijman
db1da4ec12
Fix hole positions offset by burn in FingerHoleEdge
...
When rendering the FingerHoleEdge, the current position would be
corrected for burn (e.g. it would be on the center of the laser path,
rather than the actual edge of the final part). However, the FingerHoles
class (or actually the rectangularHole method called by it) that draws
the actual holes already corrects for burn, which caused the hole
position to be offset by the burn value.
This offset was particularly problematic when making a sliding lid,
since the holes would not align perfectly with the lid, making it hard
to close the lid. With this change, the sliding slots in the side walls
and the holes in the back wall align perfectly (though only when the lid
settings have zero play, which is a separate problem).
This commit fixes FingerHoleEdge (and its subclass LidHoleEdge), but
there might be other users of the FingerHole class (usually indirectly
through boxes.fingerHolesAt) that still have the same problem.
2019-07-27 13:30:06 +02:00
Matthijs Kooijman
eeb2c344d5
Clarify where l and L edges should be used
2019-07-27 13:30:06 +02:00
Marko Luther
ca1a3575d0
forward holesSettings to hexHolesRectangle from within rectangularWall
2019-07-21 01:21:55 +02:00
Rotzbua
c06b95d2d0
link: http -> https
2019-07-20 00:23:29 +02:00
Florian Festi
0a55e9ca6b
Optimize SVG paths
...
Resolves #63
2019-07-19 21:49:55 +02:00
Florian Festi
a38254667c
Remove no longer needed line in _template.py
2019-07-18 20:55:07 +02:00
Florian Festi
17d7cd80ab
Don't show generators in modules starting with underscore (templates)
2019-07-12 00:47:09 +02:00
Florian Festi
11174f2ecc
New generator SlatwallDrillBox
2019-07-12 00:43:06 +02:00
Florian Festi
88e99a5726
New generator: FlexBox5
...
Resolves #147
2019-07-12 00:24:50 +02:00
Florian Festi
e6f431ab15
New generator: MakitaPowerSupply
2019-07-07 16:26:29 +02:00
Florian Festi
fff74cf382
Add metadata as a xml comment
...
Resolves #66
2019-07-07 13:43:04 +02:00
Florian Festi
a19debf1bd
Rename remaining Slatwall generators from Sw* to Slatwall*
2019-07-04 22:59:32 +02:00
Florian Festi
573b630adc
New generator: SlatwallPlaneHolder
2019-07-04 22:39:34 +02:00
Florian Festi
31d46088c2
Move drawing to origin for SVGs
2019-07-04 17:52:28 +02:00
Florian Festi
635a42a25e
Use eTree to caclulate the eytend of the drawing
...
Also check symbols (text character) now
2019-07-04 17:52:28 +02:00
Florian Festi
d162c769b4
Use built in eTree implementation instead of lxml
2019-07-04 17:52:08 +02:00
Florian Festi
4a9cdc8d8e
Switch to eTree as a xml library (instead of minidom)
2019-07-04 17:48:53 +02:00
Stefan Grosshauser
443c8a1c38
properly rewrite svg viewPort using minidom for xml
...
This avoids raising the 'Not enough space for size' exception.
2019-07-04 17:48:53 +02:00
Florian Festi
abdab6866a
New generator: StorageRack - Box with rails to slide other boxes in
2019-06-30 20:53:42 +02:00
Florian Festi
2f7603b4b4
New generator: SlatWallWrenchHolder
2019-06-30 20:53:42 +02:00
Florian Festi
0105957c05
New generator: SlatWallChiselHolder
2019-06-30 17:19:02 +02:00
Florian Festi
138dffbf2a
New generator: SlatWallCaliperHolder
2019-06-30 15:48:09 +02:00
Florian Festi
be8aed394a
New generator: Slatwall PlaneHolder
2019-06-30 15:18:11 +02:00
Florian Festi
09df973d69
New generator: SlatwallConsole - an outset and angled plate to mount stuff to
2019-06-22 00:07:23 +02:00
Florian Festi
810c3dbe3e
New generator: SwTypeTray - a tray to hang at a slat wall
2019-06-22 00:05:57 +02:00
Florian Festi
f1ce996aae
New generator: SwPliersHolder - a bar to hang pliers on
2019-06-22 00:04:30 +02:00
Florian Festi
6c85ae7ea2
Add trapezoidSideWall() that supports radius param for additional strength
2019-06-21 23:16:59 +02:00
Florian Festi
6a809e17e7
Move trapezoidWall() from UnevenHeightBox to Boxes class
2019-06-21 21:37:57 +02:00
Florian Festi
01ca56fdce
Support all different section syntaxes (sx, sy, ...) side by side
2019-06-21 21:37:57 +02:00
Florian Festi
db706fc939
SlatWall edges: Make bottom hook selectable, various fixes
2019-06-21 21:36:28 +02:00
Florian Festi
1e35a3b9ed
New generator: SwSlottedHolder
...
A tool holder for slat wall
2019-06-21 21:22:10 +02:00
Florian Festi
5cef906a9a
Add SlatWallHoleEdge (dD) classes
...
Similar to FigerHolesEdge (h)
2019-06-21 18:47:29 +02:00
Florian Festi
9415a6864f
Add boxes/generators/_swtemplate.py as a starting point for Slat Wall boxes
2019-06-13 19:02:02 +02:00
Florian Festi
aadf5ceafc
Add Edge types, example and UIGroup for slat wall compatible boxes
2019-06-13 19:00:32 +02:00
chrysn
753422fa46
New generator DiscRack
...
A rack for storing disk-shaped objects vertically next to each other
2019-06-01 13:09:01 +02:00
Germain Lemasson
e8e248994b
Add a StorageSelf generator. This is a shelf for storing TypeTray boxes.
...
It is based on TypeTray generator. The sh parameter replace the sx parameter.
It is not a subclasse of TypeTray in order to have the top and bottom at
the right place.
2019-06-01 12:52:34 +02:00
Florian Festi
a6ca723759
Mirror holes on the other walls
...
to have them match up. Otherwise boxes with non symetric top edges don't fit
together.
Fixes #141
2019-05-11 17:18:10 +02:00
Florian Festi
46157b2030
Add .mirrorX() and .mirrorY() wrappers
...
These are especially useful for warpping callbacks.
2019-05-11 17:17:11 +02:00
Florian Festi
93c2093ef3
AllEdges: Fix spacing and add edegs around the corner
...
to make it more clear which direction the edges are pointing.
Related #132
2019-04-14 18:17:09 +02:00
Florian Festi
f22be6f6d5
Fix polygonWalls for inner corners
2019-04-14 18:17:09 +02:00
Florian Festi
0b781ce7ef
Add turtle param to polygonWall
...
to allow using it as turtle graphic command instead of a part
2019-04-14 18:17:09 +02:00
Florian Festi
dc11929258
Fix _polygonWallExtend for corners with negative angles
2019-04-14 18:17:09 +02:00
chrysn
95dba0dee7
box: raise NotImplementedError
...
NotImplemented is a sentinel for comparisons; encountering this as an
exception would result in a meta-error.
2019-04-10 17:56:12 +02:00
Florian Festi
ce8576d39e
New generator: HeartBox
2019-03-24 21:52:26 +01:00
Florian Festi
7aec26e893
New .polygonWall() part
...
Similar to .polyline() but with (f) edges on the outside
.polygonWalls draws the surrounding walls
2019-03-24 21:50:36 +01:00
Florian Festi
4f4d947253
.corner(): Fix tabs for small arcs
2019-03-24 21:50:11 +01:00
Florian Festi
f178215f20
.corner(): Also accept (angle, radius) tuples
2019-03-24 21:50:11 +01:00
Florian Festi
c09ee50fbd
New generator: NotesHolder
2019-03-23 12:36:21 +01:00
Florian Festi
8bacd1f766
UniversalBox: Fix missing lids for various top_edges
...
Call got refactored away
Resolves : #121
2019-02-27 22:58:05 +01:00
Martin Müller
fb4791f803
Fix typo in help text for tabs
2019-02-26 00:02:30 +01:00
Florian Festi
cbb000f12e
DoveTailJoint: remove no longer needed ctx.translate
2019-02-24 14:45:57 +01:00
Florian Festi
abed8c06ac
FingerHoles: use .saved_context()
2019-02-24 14:42:48 +01:00
Florian Festi
72617110cf
FingerHoleEdge: Use modern code and add tab support
2019-02-24 13:14:21 +01:00
Florian Festi
eb5f3008da
RoundedTriangleEdge: Add tabs
2019-02-24 12:16:47 +01:00
Florian Festi
8640514daf
Omit reference for svg_Ponoko format
2019-02-14 21:36:54 +01:00
Florian Festi
8db3942757
UniversalBox: Fix positioning of lid parts
2019-02-14 21:32:27 +01:00
Florian Festi
25ea02d317
Handle the drawing reaching into the negative x axis properly
2019-02-14 21:15:28 +01:00
Florian Festi
c6e872a146
Add tabs to .parts
2019-02-14 17:34:22 +01:00
Florian Festi
81708bbbca
.polyline: mention tabs feature in doc string
2019-02-14 17:32:59 +01:00
Florian Festi
3a0e34eed8
Fix NutHole which broke after switching over to saved_context
2019-02-14 17:31:56 +01:00
Florian Festi
679234afd3
Fix docstrings of .open() and .close() to match new use pattern
2019-02-13 09:04:57 +01:00
Florian Festi
9b1ce265bf
Make docstrings ready for autodoc
2019-02-13 09:01:20 +01:00
Florian Festi
e3ba617f22
Fix traceback for top_edge == "L"
...
No longer access the t1 edge type after changing it which may lead
to t1 being a char instead of a Edge instance
Thanks to michael (https://hackaday.io/hacker/381347-michael ) for
pointing this out!
2019-02-10 19:49:51 +01:00
Florian Festi
0d07f48b7f
Remove .open() call from the .render() method
...
Having this call there was necessary in the past as the open() method would
need the canvas size as a parameter. This is now determined automatically
after rendering.
Still calling open() is deprecated but won't result in an error.
2019-02-08 17:43:15 +01:00
Florian Festi
861c8451e2
Remove call to .close() from .render() method
...
There is really no need for all the generator to care
Still calling it is deprecated but won't result in an error
2019-02-08 17:32:04 +01:00
Florian Festi
2ba6fa1bf3
Use .saved_context() instead of .ctx.save() and .restore()
2019-02-07 22:43:04 +01:00
Florian Festi
1724f67bdf
Delete never to be finished printer generator
...
This should have become a 3D printer using strings in a delta configuration.
2019-02-07 22:43:04 +01:00
Florian Festi
ded5addbe9
Remove no longer needed calls to ctx.stroke()
...
Boxes.move() take care of that nowadays
2019-02-07 22:43:04 +01:00
Florian Festi
80ab24dceb
Fix format of doc strings
2019-02-07 17:42:41 +01:00
Wayne Wylupski
c5d434105b
Add svg_Ponoko output format
...
This is just regular SVG with Ponoko-specific line properties
Yes, the lines are too thin to be seen in a regular web browser.
Resolves : #112
2019-02-03 16:30:28 +01:00
Wayne Wylupski
abacdd486e
Implement proper color handling
...
Avoid accessing Boxes.ctx (the cairo context) all over the code.
Have named colors
2019-02-03 16:28:02 +01:00
Wayne Wylupski
c573914bcd
Add Boxes.saved_context() context manager
...
Avoid directly accessing Boxes.ctx (the cairo context) all over the place.
Also have a more modern API for returning to a previous spot.
2019-02-03 16:25:31 +01:00
Wayne Wylupski
acb457be2a
Add GPL copy right header
2019-02-02 18:05:04 +01:00
Florian Festi
2e5a19a40f
Python 2 compat fix
2019-01-12 18:42:44 +01:00
Florian Festi
6f4e94577b
New generator: RectangularWall
2019-01-12 15:28:17 +01:00
Florian Festi
dac6b3ac3d
Fix Edge descriptions
...
Add descriptions for edges that don't have their own class
Make ChestHingeFront sub class of Edge as BaseEdge no longer draws anything
2019-01-12 15:28:17 +01:00
Florian Festi
1739d11af5
Doc string for GearSettings
2019-01-12 15:28:17 +01:00
Florian Festi
d0356a12a3
Add parameters to addTopEdgeSettings() for changed defaults
2019-01-12 00:07:37 +01:00
Florian Festi
ba3cacbf93
RoundedTriangleEdge: Add outset setting
2019-01-12 00:07:22 +01:00
Florian Festi
2747d9719a
Add RoundedTriangleEdge to top_edges
2019-01-12 00:00:55 +01:00
Florian Festi
31fd0024ee
Add RoundedTriangleEdge t
...
Based on the Caddy generator by bobm123 in the PR #14
(https://github.com/florianfesti/boxes/pull/14 )
Edge will be added to the TypeTray generator to achieve similar results as Caddy
Co-authored-by: bobm123 <bobm123@gmail.com>
2019-01-11 23:56:28 +01:00
Florian Festi
64fb498e6e
UniversalBox: Use a more robust way of placing the pieces
...
No longer rely on all side walls having the same height
2019-01-11 19:41:02 +01:00
Florian Festi
97e7e3b68f
TypeTray: Swap vertical edge types to match the layout of the UniversalBox
2019-01-11 19:41:02 +01:00
Florian Festi
5c70515f01
TypeTray: Add lids matching top_edge
2019-01-10 22:27:36 +01:00
Florian Festi
371097aa89
PaintStorage: Make grip hole smaller and more rounded
...
Fixes #108
2019-01-10 22:09:45 +01:00
Florian Festi
c0a782b745
TypeTray: Add support for all top_edges
2019-01-03 11:13:27 +01:00
Florian Festi
c2615d4b38
TypeTray: rearrange parts
2018-12-27 17:19:10 +01:00
Florian Festi
73050d4969
Make .continueDirection() more private
2018-12-22 17:23:33 +01:00
Florian Festi
2df63b6ec8
ShutterBox: Add style with two rounded corners
...
Move generator to FlexBox category
2018-12-19 18:04:34 +01:00
Florian Festi
879b3149bb
New generator: ShutterBox
...
A box with a rolling shutter made out of flex
2018-12-13 18:39:01 +01:00
Florian Festi
4a79c37e71
CardBox: Add gripping ledge to the lid
2018-12-11 19:33:52 +01:00
Florian Festi
4d2592fecf
Add e edge to bottom_edge selection
2018-12-08 18:22:13 +01:00
Florian Festi
fd956d1f08
rectangularHole(): clamp corner radius to available space
2018-12-08 12:42:36 +01:00
Florian Festi
8f03030c53
PaintStorage: Add carrying hole
2018-12-08 12:37:20 +01:00
Florian Festi
925c6ce6dc
PaintStand: Fix previous change
2018-11-24 22:47:35 +01:00
Florian Festi
17e4eb8563
PaintStorage: Fix heights
2018-11-15 22:10:19 +01:00
Florian Festi
ed6855d79c
RoundedPlate: Call first callback only once
...
Remove left over call to .cc()
2018-11-09 21:01:00 +01:00