Commit Graph

199 Commits

Author SHA1 Message Date
Martin Müller fb4791f803 Fix typo in help text for tabs 2019-02-26 00:02:30 +01:00
Florian Festi 8640514daf Omit reference for svg_Ponoko format 2019-02-14 21:36:54 +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 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 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
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 73050d4969 Make .continueDirection() more private 2018-12-22 17:23:33 +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 ed6855d79c RoundedPlate: Call first callback only once
Remove left over call to .cc()
2018-11-09 21:01:00 +01:00
Florian Festi a4b5af98e2 Add new "mirror" key word to the where parameter of Boxes.move() 2018-10-19 19:05:07 +02:00
Florian Festi c45b5cd30b Add debug rectangle for move commands 2018-10-19 18:58:29 +02:00
Florian Festi db16b16533 .rectangularWall(): Fix placement for hex holes enabled by holesMargin param 2018-09-13 09:23:56 +02:00
Florian Festi 9ad64a1764 Boxes.buildArgParser: Update doc string 2018-09-10 10:00:02 +02:00
Florian Festi 259834a983 ArgparseEdgeType: Add doc string 2018-09-10 10:00:02 +02:00
Florian Festi 84df48ba1d Add units (mm) to the tabs param description 2018-09-10 10:00:02 +02:00
Rotzbua 84ce484f93 [doc] add hint to disable reference 2018-09-08 15:33:09 +02:00
Florian Festi 3767598d5d Fix placement of rectangularHole() which was off by one burn 2018-08-27 15:09:17 +02:00
Florian Festi 897fc23029 Doc string for Boxes.flex2D() 2018-08-23 23:28:24 +02:00
Florian Festi 6c43f4a382 Doc string for Boxes.TX() 2018-08-23 23:28:20 +02:00
Florian Festi a99094b8d7 Doc string for Boxes.partsMatrix() 2018-08-23 23:27:35 +02:00
Florian Festi 46175dde11 Fix url params for checkboxes when re-opening an input form
Thanks to Rotzbua for pointing the issue out!
2018-08-16 08:54:52 +02:00
Florian Festi af7f29c51f Add (wall)pieces param to roundedPlate() and surroundingWall() 2018-08-06 19:46:23 +02:00
Florian Festi 05c41be4d1 Remove or comment debugging outputs 2018-07-24 20:36:13 +02:00
Florian Festi 2c7f9f4dc0 UniversalBox: Add f and F as possible top_edge types 2018-07-02 19:07:26 +02:00
Sebastian Reichel d75ea78196 Add support for specifying font color/size 2018-06-27 21:48:35 +02:00
Florian Festi 924372f79d Use a minimal line width (0.05mm) even for very small burn values
to keep the lines visible in these cases.
2018-05-17 11:27:58 +02:00
Florian Festi 2828a85725 Add flatHole() for shafts that are flattened on both sides. 2018-05-05 19:08:37 +02:00
Florian Festi 65358c9fad Add hint to outside param to nominally inner sizes 2018-04-05 22:55:23 +02:00
Florian Festi 211e302b41 Fix devision by zero for zero lengths 2018-02-10 21:00:08 +01:00
Florian Festi 6ef43a8f48 Add flangedWall() and use it in the ElectronicsBox 2018-02-03 21:52:12 +01:00
Florian Festi 8314a413fd Fix placement of rectangularTriangles 2018-01-21 16:48:43 +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
Florian Festi ce240105a8 Add tabs param to hole() 2017-12-20 18:25:55 +01:00
Florian Festi c02cc1e95c Add tabs to corner 2017-12-20 18:25:55 +01:00
Florian Festi d2496df3bb Boxes.moveArc() 2017-12-20 18:25:44 +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 1b2f5791bd Use Boxes.description in the cli help and the web interface 2017-11-30 22:48:02 +01:00
Daniela Festi fa9ac678c0 Added variables for description of generators to main class 2017-11-30 22:46:35 +01:00
Florian Festi eb07c927c4 Support multi line .text() 2017-11-22 21:32:04 +01:00
Florian Festi 90078049f8 Also support d (diameter) param for Boxes.hole() 2017-11-15 17:19:41 +01:00
Florian Festi 64c980817b Manully select font face 2017-09-19 22:53:27 +02:00
Florian Festi ab750077fa .partsMatrix(): Do not error out for zero or negative parts count 2017-08-28 23:10:56 +02:00
Florian Festi 93b94d6e70 Fix move="right" for partsMatrix 2017-08-07 17:08:16 +02:00
Florian Festi abb7706b6d Python2 compat for Inkscape 2017-05-14 21:47:49 +02:00
Florian Festi 770b3dc02f Add .dHole() 2017-05-05 16:52:42 +02:00
Florian Festi 07ede0a5c5 Add support for "only" in the move param of .partsMatrix() 2017-05-04 21:41:18 +02:00
Florian Festi 9bf9922d28 Stroke in move after part is completed 2017-05-04 21:41:18 +02:00
Florian Festi 3822cc4882 Add TX holes 2017-05-04 21:41:18 +02:00
Florian Festi bffd732c3f scripts/boxes: Use generator classes instead of main functions
Make Boxes.parseArgs more robust
--list generators by UI group.
Pass arguments explicitly instead of fiddling with sys.argv
2017-04-05 04:33:28 +02:00
Florian Festi c7490155f7 Add nema_mount default parameter
Make nema_sizes available outside of NEMA() function.
This whole stuff should probably move into it's own file/class at some point
2017-03-29 07:38:10 +02:00
Florian Festi 53cbed768b Allow using keyword args for buildArgParser for setting the defaults 2017-03-29 07:36:50 +02:00
Florian Festi c2ab70eefe Add Boxes.circle() primitive 2017-03-22 22:03:09 +01:00
Florian Festi a0d992f43a Stop printing random stuff on stdout 2017-02-26 17:02:16 +01:00
Florian Festi 41bc4d028f Use sys.stdout.buffer to be able to write bytes (for Python 3 compat) 2017-02-25 19:59:53 +01:00
Florian Festi e0a4d06c43 Hackish way to make scriptsboxes to work with Inkscape. 2017-02-23 17:38:26 +01:00
Florian Festi 39e74e67ba Add scripts/boxes2inkscape for generating inx files from box generators
Code for handling traylayout still missing.
2017-02-23 17:38:26 +01:00
Florian Festi a93e280477 Make reference a separate path object
Avoid it being merged with teh first par tof the drawing
2017-02-23 17:38:26 +01:00
Florian Festi e23d8034c5 Make BoolArg accept upper and lower case values 2017-02-23 17:38:26 +01:00
Florian Festi 1bed3f2a39 rectangularWall() fix positioning with ignore_widths
containing parts of the lower left corner.
2017-02-22 20:01:29 +01:00
Florian Festi d3c76f2b9e Put box generator into groups and adjust the menu web page accordingly 2017-02-13 17:31:58 +01:00
Florian Festi dd6c5560f9 Support chars es edge parameters in Boxes.edgeCorner() 2017-02-12 15:00:17 +01:00
Florian Festi 305986dad8 Add cabinet hinge to top_edge and support it in Box2 2017-02-11 18:15:44 +01:00
Florian Festi 94c727cc30 Add CabinetHingeEdge 2017-02-11 18:15:44 +01:00
Florian Festi 3daa9a846a Add ignore_widths param for rectangularWall()
It does not pass the width of edges to edgeCorner but instead lengthen the
neighboring edge. The widths are numbered from 0 to 7 starting with the
horizontal part of the lower right corner.
2017-02-07 18:56:07 +01:00
Florian Festi 544c40a0d3 Add Chest Hinge edge classes 2017-02-06 22:35:26 +01:00
Florian Festi 70574056d6 Fixes for rectangularTriangle 2017-02-05 21:02:46 +01:00
Florian Festi f982918205 Add r param to rectangularTriangle() 2017-02-04 15:01:16 +01:00
christopher c36d819e10 Change defaults 2017-01-30 09:37:10 +01:00
Florian Festi 6ef950816e Add edge parameter to Boxes.roundedPlate 2017-01-21 13:54:58 +01:00
Florian Festi 8dc13440ee Fix boolean params. Not passing 0, None, False or off works for setting them to False
Thanks to chrisjshull for pointing out how to fix this in the web UI.
Fixes #19
2017-01-08 17:25:36 +01:00
Florian Festi 13cdb35954 Make RegularPolygonWall a path of its own 2016-12-17 11:37:11 +01:00
Florian Festi cbe32cc5a7 Code for Regular Polygons
* Boxes.regularPolygon for calculation
 * Boxes.regularPolygonAt for simple polygon
 * Boxes.regularPolygonWall

Also fix edgeCorner() for angles != 90 degrees
2016-12-13 22:58:10 +01:00
Florian Festi aa5fa73c8a Add edgeObjects() method to Settings to create Edge objects 2016-11-28 21:11:38 +01:00
Florian Festi a8af428941 Manually use multiple arcs to get more precise curves 2016-11-02 21:50:44 +01:00
Florian Festi fe79970cc3 Beautify web UI
Watch self.css
2016-11-01 23:46:25 +01:00
Florian Festi 748d8b3888 Remove arguments for FingerJoints from default arguments 2016-11-01 23:46:25 +01:00
Florian Festi ec2a365598 Use arguments from default Setting classes when creating the default edges 2016-11-01 23:46:25 +01:00
Florian Festi fd3a333cb0 Allow passing new default values to Boxes.addSettingsArgs() 2016-11-01 14:04:35 +01:00
Florian Festi 3a0df10866 Create arguments from edge settings starting with FingerJointSettings 2016-10-31 22:13:09 +01:00
Florian Festi 5a721df82b Put arguments into groups and use them to display them in the web interface 2016-10-31 22:11:54 +01:00
Florian Festi 44b55029a0 Do not break lines on empty callbacks
Boxes.cc() did move the coordinate system arround even if the callback is
None. This breaks the continuity of the border. If there is callback the
line is still broken.
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 9220bccb68 Clarify burn param 2016-10-20 20:07:23 +02:00
Florian Festi 3ce2115365 Add RackEdge 2016-10-12 22:52:35 +02:00
Florian Festi ad00d64b26 partsMatrix() 2016-10-02 20:48:22 +02:00
Florian Festi 586aeb7fb3 Allow finger joints as top edge
Add matching lid to Box2
2016-10-02 20:47:02 +02:00
Florian Festi 610a26736e Support drawing multiple rectangularTriangle(s) at once
Add support for setting diagonal edge type
2016-09-26 21:59:52 +02:00
Florian Festi cc42a8e165 Add rectangularTriangle() 2016-09-26 21:59:52 +02:00
Florian Festi 14acd07faf Fix latch length
Remove no longer needed burn correction
2016-09-26 21:59:52 +02:00
schinken 93af56ff9c Code Reformat #1 2016-08-17 15:07:41 +02:00