Commit Graph

159 Commits

Author SHA1 Message Date
Florian Festi a0c04d10ca Add description to ClickSettings 2020-08-04 23:42:12 +02:00
Florian Festi 7c004e2d2c New primitive: Boxes.step()
Outset a line by a given margin - negative values for insetting
2020-02-28 17:46:44 +01:00
Florian Festi dd0f2d748c ChestHingeSettings: check pin_height for minimal size 2020-02-01 14:27:17 +01:00
Florian Festi 0f3eb5b21a StackableSettings: check angle for invalid values 2020-02-01 14:16:26 +01:00
Florian Festi 8cb5a8e042 Check values of flex settings 2019-12-14 13:09:43 +01:00
Florian Festi fe9555a79f checkValues 2019-12-14 13:09:43 +01:00
Florian Festi 83b5363bc8 StackableEdge: Fix margin for upper (S) variant 2019-11-04 17:05:18 +01:00
Florian Festi cfbcbb065c Clarify doc string for FingerJointSettings.play 2019-10-19 12:03:57 +02:00
Florian Festi 13ecfc9914 Support springs for finger joints (FingerJointSettings.style)
Resolves: #177
2019-10-11 22:32:57 +02:00
Florian Festi 9db79243f8 Make Slide-on Lid with pin easier to insert
Make slot half a thickness wider and round the corners

Resolves: #156

Thanks to Matthijs Kooijman for suggesting this change!
2019-08-17 00:05:13 +02:00
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
Florian Festi db706fc939 SlatWall edges: Make bottom hook selectable, various fixes 2019-06-21 21:36:28 +02:00
Florian Festi 5cef906a9a Add SlatWallHoleEdge (dD) classes
Similar to FigerHolesEdge (h)
2019-06-21 18:47:29 +02:00
Florian Festi aadf5ceafc Add Edge types, example and UIGroup for slat wall compatible boxes 2019-06-13 19:00:32 +02: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 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 9b1ce265bf Make docstrings ready for autodoc 2019-02-13 09:01:20 +01:00
Florian Festi 2e5a19a40f Python 2 compat fix 2019-01-12 18:42:44 +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 ba3cacbf93 RoundedTriangleEdge: Add outset setting 2019-01-12 00:07:22 +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 b7bd6306d1 Fix division by zero in FlexEdge 2018-11-05 21:38:49 +01:00
Florian Festi 60cb0eed87 CabinetHinge: Add style param with new value outside 2018-10-04 22:18:07 +02:00
Florian Festi fc127237fd Fix placement of fingerHoles in CrossingFingerHoleEdge
which were too low by one burn
2018-08-27 15:12:17 +02:00
Florian Festi 0e8a718a1b Fix placement of debugging rectangel for FingerHoles
Not the outer border of the lines are exactly at the border of the matching
part
2018-08-27 15:10:50 +02:00
Florian Festi cd0fcdcb96 Set a char for CrossingFingerHoleEdge tp avoid collision with the "e" edge. 2018-07-02 19:13:52 +02:00
Florian Festi f99bf32c85 Add hinges and spacing params to CabinetHingeEdge 2018-05-08 23:55:09 +02:00
Florian Festi 73438fb614 Fix .__getattr__ of Settings class so it can be passed to copy.copy() 2018-04-25 21:52:51 +02:00
Florian Festi 90ba9f8ee9 LidEdge: Fix duplicated option for spring 2018-03-05 20:10:55 +01:00
Florian Festi 78d35a92e0 Fix CrossingFingerHoleEdge
which relies on __call__() of the super class drawing a line
2018-02-12 22:04:20 +01:00
Florian Festi 4e034949d3 Fix tabs for straight edges (eE) with bed bolts
Add tabs param to bedBoltHole
2018-01-19 23:48:27 +01:00
Stefan Grosshauser 73e1821e71 enable bedbolts for Straight 'e' and OutSet edges 'E'
note that this mostly ignores that positioning bedbolts is done
in the BedBolt class for finger joints.
Coding style could be much improved.
2018-01-18 15:07:33 +01:00
Stefan Grosshauser 07f88cd8e5 make __call__() abstract for BaseEdge; and inherit OutSetEdge from Edge 2018-01-18 15:07:24 +01:00
Florian Festi 7bd2b9e452 HingeEdge: Add tabs to hinge disk 2017-12-20 18:25:55 +01:00
Florian Festi e5bb6a5d7a Add tabs to Boxes.edge() and most Edge classes
and Boxes.polyline()

Add to some parts of the Otto Bot
2017-12-15 16:45:32 +01:00
Florian Festi f0dc89c617 Make play of ChestHinge a regular param 2017-12-09 16:54:10 +01:00
Florian Festi 9dfa95f45b Fix ChestHinge
Add the play of the hinge to the width of the edge
Adjust IntegratedHingeBox
Fixes #45
2017-12-07 22:29:09 +01:00
Florian Festi b7f877eacd Fix bedbolts
BedBoltSettings need to become a subclass of Settings instead of a list
of values at some point.
2017-09-13 11:39:03 +02:00
Florian Festi d4edafe2d9 Fix ChestHingeSetting
Got broken by 6756d16b67
2017-02-23 20:57:01 +01:00
Florian Festi b440d1c767 Use BoolArg when creating arg parser for edges.Settings 2017-02-23 17:38:26 +01:00
Florian Festi 6756d16b67 Use .settings.thickness in edges instead of global value 2017-02-18 19:05:21 +01:00
Florian Festi 94c727cc30 Add CabinetHingeEdge 2017-02-11 18:15:44 +01:00
Florian Festi f1b8d68d65 Fix bedbolts for finger holes 2017-02-11 18:15:34 +01:00
Florian Festi 544c40a0d3 Add Chest Hinge edge classes 2017-02-06 22:35:26 +01:00
Florian Festi 2fa07190ff Fix finger joint setting defaults
space and width got mixed up in 8d754c3855
2017-02-05 16:30:37 +01:00
christopher 8d754c3855 Use default finger/width settings of 2.0 for every box 2017-01-30 10:12:27 +01:00
Florian Festi b2b0ccd6f1 Fix FingerJoints with angles != 90 degrees
Fix margins
Fix amount of recess for spaces
2016-12-14 22:07:36 +01:00
Florian Festi be6de6a793 Support FingerJoints with less than 90 degrees.
This means bending angle < 90. The actual angle is bigger than 90
2016-11-28 21:11:38 +01:00
Florian Festi 6f0a4cae86 Use polyline() for FingerJointEdge 2016-11-28 21:11:38 +01:00
Florian Festi aa5fa73c8a Add edgeObjects() method to Settings to create Edge objects 2016-11-28 21:11:38 +01:00
Florian Festi f30221d265 Fix .margin() for CompondEdge 2016-11-26 13:40:27 +01:00
Florian Festi a0be85764a Use FingerJointSettings.height as margin of Finger Joints 2016-11-17 21:39:32 +01:00
Florian Festi 69ac52aaab Slide-on Edge: Add optional springs that hold the lid in place
Fix pin length to two thicknesses
2016-11-12 17:50:29 +01:00
Florian Festi 43c0178d14 Make fingers for slide-on lid bigger by defaut 2016-11-12 17:01:44 +01:00
Florian Festi 7baafebaea Remove debug print 2016-11-01 23:46:25 +01:00
Florian Festi d980c6b95f Add minimal doc strings to Settings 2016-11-01 23:46:25 +01:00
Florian Festi c3e2470e8d Rename style values to something more meaningful 2016-11-01 23:46:25 +01:00
Florian Festi 2ace15475a Check types in Settings class and support choices 2016-11-01 23:46:25 +01:00
Florian Festi 699fb920bc Make Hinges more robut against invalid style arguments 2016-11-01 14:04:35 +01:00
Florian Festi fd3a333cb0 Allow passing new default values to Boxes.addSettingsArgs() 2016-11-01 14:04:35 +01:00
Florian Festi c816de811b Beautify doc strings of edge settings and sort argument entries 2016-10-31 22:16:51 +01:00
Florian Festi 3a0df10866 Create arguments from edge settings starting with FingerJointSettings 2016-10-31 22:13:09 +01:00
Florian Festi 9095c3934f Return to original point after drawing finger holes 2016-10-30 20:20:56 +01:00
Florian Festi 33d11487de Add edges for a sliding lid
Add to top_edges and support in Box2
2016-10-30 20:17:13 +01:00
Florian Festi 2494aeb3ae Add play param for FingerJoints 2016-10-30 19:48:59 +01:00
Florian Festi 7203320e70 Move finger calculation into FingerJointBase class 2016-10-30 19:48:59 +01:00
Florian Festi dc045eefe2 Remove no longer needed local vars 2016-10-30 19:48:59 +01:00
Florian Festi 4f3883374d Fix position of finger holes 2016-10-15 20:57:36 +02:00
Florian Festi 3ce2115365 Add RackEdge 2016-10-12 22:52:35 +02:00
schinken 93af56ff9c Code Reformat #1 2016-08-17 15:07:41 +02:00
Florian Festi 4cf33dae50 Move spacing out of the Edge margin() and into Boxes.move()
Also move ctx.save() and restoreinto Boxes.move().
Adjust (hopefully) all places using it.
2016-07-27 22:19:32 +02:00
Marius Bergmann 4b487014d0 Fix project for use within virtualenv
- Use /usr/bin/env to determine path to python3 instead of a hard-coded
  path, so that virtualenv stubs work properly.
- Change package name to 'boxes' ('boxes.py' did not work within
  virtualenv).
2016-07-12 13:13:03 +02:00
Florian Festi 325ae8a134 Make flex centered
Leave one space before and after the first/last cut.
Resolves https://github.com/florianfesti/boxes/issues/11
2016-07-09 10:55:42 +02:00
Florian Festi 20e55ed1c9 Remove left over debug print 2016-07-08 22:17:37 +02:00
Florian Festi fcda87d48a Make A style hinges parametrical 2016-07-08 19:51:36 +02:00
Florian Festi 401ef597d8 Make axle disk out of the hinge hole
Remove no longer needed .parts() method
2016-07-06 23:07:44 +02:00
Florian Festi d392f290e7 Move Boxes.fingerHoleEdgeWidth to FingerJointSettings 2016-07-03 16:42:21 +02:00
Florian Festi 28183257d6 Add optional gripping edges at the side of lids
And use it for double lid in box2
2016-07-03 16:00:25 +02:00
Florian Festi a7f0e97012 Add GrippingEdge
Still needs to replace Boxes.grip()
2016-06-30 14:25:29 +02:00
Florian Festi a032067c5b Add edge with two hinges to top edge param and edge descriptions 2016-06-30 11:12:51 +02:00
Florian Festi 60d465c83a Add edges for hinges 2016-06-30 10:32:41 +02:00
Florian Festi 142469cc47 Use rectangularHole for FingerHoles 2016-06-21 11:25:17 +02:00
Florian Festi 6b1d1d94d1 One more super() fix 2016-05-22 12:37:02 +02:00
Florian Festi 6e9b70b248 Use super properly
Restore Python2 compatibility
2016-05-20 20:32:40 +02:00
Florian Festi 5250fc768f New Edge type to clip on sides
Still untested due to lackof laser cutter
2016-05-03 23:02:50 +02:00
Florian Festi c462b1fc4b Make width of other side of DoveTailJoint width 0
This way the dove tails are completely in the inner space. This also makes it
easier to build surrounding walls as the dove tail joint doesn't need extra
space.
2016-04-26 21:52:41 +02:00
Florian Festi b0fd80e188 Fix FingerJointEdgeCounterPart() width 2016-04-26 12:19:43 +02:00
Florian Festi b22ee1f760 Replace Edge.width() with .startwidth() and .endwidth()
to allow changes in the with of the edge. This is currently needed for the
CompoundEdge but may be used by future edges, too.
2016-04-19 09:33:33 +02:00
Florian Festi 2ec1cb287c More fixups...
Turns out BaseEdge.startAngle and BaseEdge.endAngle are already used - sortof
2016-04-17 18:04:23 +02:00
Florian Festi ae0687d7f1 Fix rebase mixup 2016-04-17 17:43:16 +02:00
Florian Festi 00706ff3f6 Move description into Edge classes
Add boxes.edges.getDescriptions()
2016-04-17 16:37:29 +02:00
Florian Festi a6fd8da8f1 Add an abstract BaseEdge class 2016-04-17 16:35:13 +02:00