| Name | tubecutterdxf JSON |
| Version |
0.1.4
JSON |
| download |
| home_page | None |
| Summary | Programmatically create Spiral and Brickwork patterns for laser cutting tubing |
| upload_time | 2025-10-23 12:57:58 |
| maintainer | None |
| docs_url | None |
| author | qwiebe |
| requires_python | >=3.12.4 |
| license | None |
| keywords |
cad
dxf
patterns
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# TubeCutterDXF
Programmatically create Spiral and Brickwork style patterns for rotary laser cutting tubing.
## Creating a Pattern
```python
from tubecutterdxf import CutPattern, CutBrick, CutSpiral, CutPartline, INCH
def newCutPattern():
# Create the pattern container. This stores the geometry and will help produce the DXF
pattern = CutPattern()
# Specify some general parameters
OD = 1
continuous = False # Change to True when ready to send to laser cutter
# Define the cut pattern
# Parting line at x = 0
cutPartline = CutPartline(OD)
# Spiral starting at x = 0.1in with 30deg cut followed by 10deg uncut repeating 5 times at a pitch of 0.1in with each cut increasing by 5deg and uncut portion decreasing by 5deg for each repetition.
cutSpiral = CutSpiral(OD, 0.1 * INCH, 0, 30, 10, 0.1 * INCH, 5, variableCutLength=True, cutIncrease=5, unCutIncrease=-5, continuous=continuous)
# Brick starting where cutSpiral left off with 3 90deg cuts equally spaced circumferentially and repeated 5 times with a pitch of 0.1in and each repetition offset by 45deg from the prior. No variation in cut length.
cutBrick = CutBrick(OD, cutSpiral.xNext, 0, 90, 3, 45, 0.1 * INCH, 5)
# Add the cuts to the pattern container
pattern.add(cutPartline)
pattern.add(cutSpiral)
pattern.add(cutBrick)
# Preview the pattern in an interactive graph
pattern.preview()
# List the cuts added and remove any by their cut #
pattern.printCutTable()
pattern.remove(1)
# Draw and Save the pattern to a file in the 'output' folder: this saves the .dxf and a .json config file
pattern.draw()
pattern.save("newCutPattern")
```
## Getting Started
Create a python virtual environment. If you don't know what this is, Google "venv", it may change your life.
Create a directory called "output" (I could do this for you in the code... but I don't want to)
> mkdir ./output
Now you're ready to go back up to [Creating a Pattern](#creating-a-pattern)!
## Liability Release :)
This code has bugs, for one. For another, be warned, if you are trying to make super small cuts you will run into floating point errors and anomalies due to the nature of how computers represent numbers. This mainly affects non-continuous cut patterns due to the overflow calculation when a cut wraps beyond the circumference; most of these errors are avoided when you create a continuous cut pattern, which most rotary laser cutters prefer anyways!
Feel free to post any bugs or requests for improvements via [Issues](https://github.com/qwiebe/TubeCutterDXF/issues).
Raw data
{
"_id": null,
"home_page": null,
"name": "tubecutterdxf",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12.4",
"maintainer_email": null,
"keywords": "CAD, DXF, Patterns",
"author": "qwiebe",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/78/9d/ca8106a215a52668b0796a572bbb7191a61c7722ea6b43763c9344ce14e8/tubecutterdxf-0.1.4.tar.gz",
"platform": null,
"description": "# TubeCutterDXF\n\nProgrammatically create Spiral and Brickwork style patterns for rotary laser cutting tubing.\n\n## Creating a Pattern\n```python\nfrom tubecutterdxf import CutPattern, CutBrick, CutSpiral, CutPartline, INCH\n\ndef newCutPattern():\n # Create the pattern container. This stores the geometry and will help produce the DXF\n pattern = CutPattern()\n\n # Specify some general parameters\n OD = 1\n continuous = False # Change to True when ready to send to laser cutter\n\n # Define the cut pattern\n # Parting line at x = 0\n cutPartline = CutPartline(OD)\n # Spiral starting at x = 0.1in with 30deg cut followed by 10deg uncut repeating 5 times at a pitch of 0.1in with each cut increasing by 5deg and uncut portion decreasing by 5deg for each repetition.\n cutSpiral = CutSpiral(OD, 0.1 * INCH, 0, 30, 10, 0.1 * INCH, 5, variableCutLength=True, cutIncrease=5, unCutIncrease=-5, continuous=continuous)\n # Brick starting where cutSpiral left off with 3 90deg cuts equally spaced circumferentially and repeated 5 times with a pitch of 0.1in and each repetition offset by 45deg from the prior. No variation in cut length.\n cutBrick = CutBrick(OD, cutSpiral.xNext, 0, 90, 3, 45, 0.1 * INCH, 5)\n \n # Add the cuts to the pattern container\n pattern.add(cutPartline)\n pattern.add(cutSpiral)\n pattern.add(cutBrick)\n\n # Preview the pattern in an interactive graph\n pattern.preview()\n\n # List the cuts added and remove any by their cut #\n pattern.printCutTable()\n pattern.remove(1)\n\n # Draw and Save the pattern to a file in the 'output' folder: this saves the .dxf and a .json config file\n pattern.draw()\n pattern.save(\"newCutPattern\")\n```\n## Getting Started\nCreate a python virtual environment. If you don't know what this is, Google \"venv\", it may change your life.\n\nCreate a directory called \"output\" (I could do this for you in the code... but I don't want to)\n\n > mkdir ./output\n\nNow you're ready to go back up to [Creating a Pattern](#creating-a-pattern)!\n\n## Liability Release :)\nThis code has bugs, for one. For another, be warned, if you are trying to make super small cuts you will run into floating point errors and anomalies due to the nature of how computers represent numbers. This mainly affects non-continuous cut patterns due to the overflow calculation when a cut wraps beyond the circumference; most of these errors are avoided when you create a continuous cut pattern, which most rotary laser cutters prefer anyways!\n\nFeel free to post any bugs or requests for improvements via [Issues](https://github.com/qwiebe/TubeCutterDXF/issues).",
"bugtrack_url": null,
"license": null,
"summary": "Programmatically create Spiral and Brickwork patterns for laser cutting tubing",
"version": "0.1.4",
"project_urls": {
"Homepage": "https://github.com/qwiebe/TubeCutterDXF",
"Issues": "https://github.com/qwiebe/TubeCutterDXF/issues"
},
"split_keywords": [
"cad",
" dxf",
" patterns"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "1dd60b58255a643e835fa4b2cfd62d3fc43e3305c5853eceef8d0d19e5ca0186",
"md5": "6b9b64e782b3bb956fc078b64524d1b7",
"sha256": "23b2a8e474781d1906efbd6371009bad43a7e4dac2d2abc58f8dfead0d548528"
},
"downloads": -1,
"filename": "tubecutterdxf-0.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6b9b64e782b3bb956fc078b64524d1b7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12.4",
"size": 8747,
"upload_time": "2025-10-23T12:57:57",
"upload_time_iso_8601": "2025-10-23T12:57:57.659938Z",
"url": "https://files.pythonhosted.org/packages/1d/d6/0b58255a643e835fa4b2cfd62d3fc43e3305c5853eceef8d0d19e5ca0186/tubecutterdxf-0.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "789dca8106a215a52668b0796a572bbb7191a61c7722ea6b43763c9344ce14e8",
"md5": "3e59d2a2abae1a63d4d2210fefcc13b0",
"sha256": "9f1cd38c2e77243a9f10c974044b787476c171650c1648809f1cf551225e5e2b"
},
"downloads": -1,
"filename": "tubecutterdxf-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "3e59d2a2abae1a63d4d2210fefcc13b0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12.4",
"size": 14863,
"upload_time": "2025-10-23T12:57:58",
"upload_time_iso_8601": "2025-10-23T12:57:58.702362Z",
"url": "https://files.pythonhosted.org/packages/78/9d/ca8106a215a52668b0796a572bbb7191a61c7722ea6b43763c9344ce14e8/tubecutterdxf-0.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-23 12:57:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "qwiebe",
"github_project": "TubeCutterDXF",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "tubecutterdxf"
}