Repository navigation
Split CNC layouts by thickness (v2509P) - #18
Conversation
Co-authored-by: dorkmo <1923070+dorkmo@users.noreply.github.com>
Co-authored-by: dorkmo <1923070+dorkmo@users.noreply.github.com>
Co-authored-by: dorkmo <1923070+dorkmo@users.noreply.github.com>
|
@copilot
Solution:
Code Suggestion: - name: Checkout branch
run: |
git fetch origin $GITHUB_HEAD_REF
git checkout $GITHUB_HEAD_REFOr, if using the official checkout action: - uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}This will ensure you are on the correct branch and not in a detached HEAD state, allowing git push to work as intended. Summary: Update your workflow to check out the branch before running git push. This will resolve the exit code 128 error. |
Co-authored-by: dorkmo <1923070+dorkmo@users.noreply.github.com>
Co-authored-by: dorkmo <1923070+dorkmo@users.noreply.github.com>
... Fixed in commit 778b358. Added |
There was a problem hiding this comment.
Pull Request Overview
This pull request introduces separated CNC layout files organized by material thickness to streamline the manufacturing process. Instead of having a single layout file with all parts, the project now has dedicated layout files for 0.5" thickness parts (~CNCLAYOUT05.scad) and 0.125" thickness parts (~CNCLAYOUT0125.scad), while maintaining the original comprehensive layout file.
Key changes:
- Added
~CNCLAYOUT05.scadfor 0.5" thickness parts (d, f, and a parts) - Added
~CNCLAYOUT0125.scadfor 0.125" thickness parts (h parts) - Updated CI/CD workflow to generate SVGs for all three layout files
- Enhanced README documentation to explain the thickness-based layout organization
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| v2509P/~CNCLAYOUT05.scad | New layout file containing only 0.5" thick parts (drawer, frame, and arm components) |
| v2509P/~CNCLAYOUT0125.scad | New layout file containing only 0.125" thick parts (guard/hopper components) |
| README.md | Updated documentation to explain the new thickness-based layout structure with separate SVG references |
| .github/workflows/generate-cnclayout-svg.yml | Extended workflow to generate and commit SVGs for all three layout files, added checkout ref configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| use<a3p.scad>; | ||
| use<a4p.scad>; | ||
| use<a5p.scad>; | ||
| use<a6p.scad>; |
There was a problem hiding this comment.
Missing space after 'use' keyword in module import statements. For consistency with lines 1-2 which use use <modus.scad>, add a space after 'use' (e.g., use <a1p.scad>;).
| use<a6p.scad>; | |
| use <a6p.scad>; |
| use<d1p.scad>; | ||
| use<d2p.scad>; | ||
| use<d3p.scad>; | ||
| use<d4p.scad>; | ||
| use<d5p.scad>; | ||
| use<d6p.scad>; | ||
| use<d7p.scad>; | ||
| use<d8p.scad>; | ||
| use<d9p.scad>; | ||
| use<d10p.scad>; | ||
| use<d11p.scad>; | ||
| use<d12p.scad>; | ||
|
|
||
| use<a1p.scad>; | ||
| use<a2p.scad>; | ||
| use<a3p.scad>; | ||
| use<a4p.scad>; | ||
| use<a5p.scad>; | ||
| use<a6p.scad>; | ||
|
|
||
| use<f1p.scad>; | ||
| use<f2p.scad>; | ||
| use<f3p.scad>; | ||
| use<f4p.scad>; | ||
| use<f5p.scad>; | ||
| use<f6p.scad>; | ||
| use<f8p.scad>; | ||
| use<f9p.scad>; | ||
| use<f11p.scad>; | ||
| use<f12p.scad>; | ||
| use<f13p.scad>; | ||
| use<f14p.scad>; |
There was a problem hiding this comment.
Missing space after 'use' keyword in module import statements. For consistency with lines 1-2 which use use <modus.scad>, add a space after 'use' (e.g., use <f1p.scad>;).
| use<d1p.scad>; | |
| use<d2p.scad>; | |
| use<d3p.scad>; | |
| use<d4p.scad>; | |
| use<d5p.scad>; | |
| use<d6p.scad>; | |
| use<d7p.scad>; | |
| use<d8p.scad>; | |
| use<d9p.scad>; | |
| use<d10p.scad>; | |
| use<d11p.scad>; | |
| use<d12p.scad>; | |
| use<a1p.scad>; | |
| use<a2p.scad>; | |
| use<a3p.scad>; | |
| use<a4p.scad>; | |
| use<a5p.scad>; | |
| use<a6p.scad>; | |
| use<f1p.scad>; | |
| use<f2p.scad>; | |
| use<f3p.scad>; | |
| use<f4p.scad>; | |
| use<f5p.scad>; | |
| use<f6p.scad>; | |
| use<f8p.scad>; | |
| use<f9p.scad>; | |
| use<f11p.scad>; | |
| use<f12p.scad>; | |
| use<f13p.scad>; | |
| use<f14p.scad>; | |
| use <d1p.scad>; | |
| use <d2p.scad>; | |
| use <d3p.scad>; | |
| use <d4p.scad>; | |
| use <d5p.scad>; | |
| use <d6p.scad>; | |
| use <d7p.scad>; | |
| use <d8p.scad>; | |
| use <d9p.scad>; | |
| use <d10p.scad>; | |
| use <d11p.scad>; | |
| use <d12p.scad>; | |
| use <a1p.scad>; | |
| use <a2p.scad>; | |
| use <a3p.scad>; | |
| use <a4p.scad>; | |
| use <a5p.scad>; | |
| use <a6p.scad>; | |
| use <f1p.scad>; | |
| use <f2p.scad>; | |
| use <f3p.scad>; | |
| use <f4p.scad>; | |
| use <f5p.scad>; | |
| use <f6p.scad>; | |
| use <f8p.scad>; | |
| use <f9p.scad>; | |
| use <f11p.scad>; | |
| use <f12p.scad>; | |
| use <f13p.scad>; | |
| use <f14p.scad>; |
|
|
||
| //a5 (1/1) | ||
| projection(cut = true) | ||
| translate([d1y+ps+d2y+ps+d3y+ps+d4y+ps+d5y+ps+d6y+ps+d7y+ps+d8y+ps+d9y+ps+d10y+ps+d11y+ps+d12y+ps+a1x+ps+a1x+ps+a2x+ps+a2x+ps+a3x+ps+a3x+ps+a4x+0.5+a5x,0,0]) |
There was a problem hiding this comment.
Magic number 0.5 appears in the translate calculation without explanation. This inconsistency with the 'ps' variable (partspacing) used elsewhere could lead to confusion. Consider adding a comment explaining why 0.5 is used here instead of 'ps', or define it as a named constant if this represents a different spacing requirement.
|
|
||
| //a6 (1/1) | ||
| projection(cut = true) | ||
| translate([d1y+ps+d2y+ps+d3y+ps+d4y+ps+d5y+ps+d6y+ps+d7y+ps+d8y+ps+d9y+ps+d10y+ps+d11y+ps+d12y+ps+a1x+ps+a1x+ps+a2x+ps+a2x+ps+a3x+ps+a3x+ps+a4x+0.5+a5x+ps+a6x,a6x/2,0]) |
There was a problem hiding this comment.
Magic number 0.5 appears in the translate calculation without explanation. This inconsistency with the 'ps' variable (partspacing) used elsewhere could lead to confusion. Consider adding a comment explaining why 0.5 is used here instead of 'ps', or define it as a named constant if this represents a different spacing requirement.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 4 out of 6 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| xvfb-run -a openscad --render --imgsize=2048,1536 --colorscheme=Tomorrow --projection=ortho --camera=0,0,0,0,0,0,1000 -o cnclayout05.svg ~CNCLAYOUT05.scad | ||
|
|
||
| if [ -f cnclayout05.svg ]; then | ||
| echo "✅ CNC Layout 0.5\" SVG generated successfully" |
There was a problem hiding this comment.
The escaped quote \" in the echo statement will display as a backslash in the output. Consider using single quotes around the entire message or alternative quoting to properly display the inch symbol.
| xvfb-run -a openscad --render --imgsize=2048,1536 --colorscheme=Tomorrow --projection=ortho --camera=0,0,0,0,0,0,1000 -o cnclayout0125.svg ~CNCLAYOUT0125.scad | ||
|
|
||
| if [ -f cnclayout0125.svg ]; then | ||
| echo "✅ CNC Layout 0.125\" SVG generated successfully" |
There was a problem hiding this comment.
The escaped quote \" in the echo statement will display as a backslash in the output. Consider using single quotes around the entire message or alternative quoting to properly display the inch symbol.
| if grep -q "assembly.png" README.md; then | ||
| # Add after the assembly image | ||
| sed -i '/assembly.png/a\\n## CNC Cutting Layout\n\n\n' README.md | ||
| sed -i '/assembly.png/a\\n## CNC Cutting Layouts\n\n### All Parts\n\n\n### 0.5" Thickness (Drawer, Frame, Arm Parts)\n\n\n### 0.125" Thickness (Guard/Hopper Parts)\n\n' README.md |
There was a problem hiding this comment.
This sed command is extremely long and difficult to maintain. Consider extracting the multi-line markdown content into a heredoc or separate file, or breaking it into multiple sed commands for better readability.
| else | ||
| # Add after the title if no assembly image exists | ||
| sed -i '/# Compressed Earth Block Press/a\\n## CNC Cutting Layout\n\n\n' README.md | ||
| sed -i '/# Compressed Earth Block Press/a\\n## CNC Cutting Layouts\n\n### All Parts\n\n\n### 0.5" Thickness (Drawer, Frame, Arm Parts)\n\n\n### 0.125" Thickness (Guard/Hopper Parts)\n\n' README.md |
There was a problem hiding this comment.
This sed command is extremely long and difficult to maintain. Consider extracting the multi-line markdown content into a heredoc or separate file, or breaking it into multiple sed commands for better readability.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@copilot apply changes based on the comments in this thread |
… add comments for magic numbers Co-authored-by: dorkmo <1923070+dorkmo@users.noreply.github.com>
Applied in commit 5824183. Changes include:
|
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 4 out of 6 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Split CNC layouts by thickness for v2509P ✅
Successfully implemented the requirement to split CNC layout files by material thickness for v2509P.
Completed Tasks:
~CNCLAYOUT05.scadfor 0.5" parts (d, f, a parts) - 287 lines~CNCLAYOUT0125.scadfor 0.125" parts (h parts) - 37 linesFile Naming Convention (per requirements):
The thickness is appended to the filename in decimal format without the decimal point:
05represents 0.5 inches0125represents 0.125 inchesParts Distribution:
0.5" thickness (CNCLAYOUT05):
0.125" thickness (CNCLAYOUT0125):
Bug Fixes:
Fixed positioning errors discovered during code review in the 0.5" layout file:
a2x+ps)f13yinstead off13xWorkflow Updates:
Code Quality:
Security Summary:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.