-
Notifications
You must be signed in to change notification settings - Fork 2
Refactor CNC layout to horizontal arrangement without text labels #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: dorkmo <[email protected]>
Co-authored-by: dorkmo <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the CNC layout file to optimize it for direct CNC machine import by arranging parts in a single horizontal line and removing all text labels. The changes implement parametric spacing based on actual part dimensions to prevent overlaps when dimensions change.
- Converted multi-row layout to single horizontal left-to-right arrangement of 19 parts
- Removed all text labels (
text()calls) and updatedlayout_part()function signature - Implemented parametric position calculations using sequential unique variables to comply with OpenSCAD's no-reassignment requirement
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| LifeTrac-v25/mechanical_design/openscad/cnclayout.scad | Refactored from multi-row to horizontal layout with parametric positioning; removed text labels and part_name parameter from layout_part() function |
| LifeTrac-v25/mechanical_design/openscad/CNCLAYOUT_CHANGES.md | Added comprehensive documentation covering layout changes, usage instructions, technical details, and compatibility notes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| side_panel_height_rotated = WHEEL_BASE; // ~1400mm (becomes height when rotated) | ||
|
|
||
| // Rear crossmember dimensions | ||
| crossmember_width = TRACK_WIDTH + SANDWICH_SPACING + PANEL_THICKNESS * 2; // ~1152mm |
Copilot
AI
Dec 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment states the crossmember width is approximately 1152mm, but based on the formula and parameter values (TRACK_WIDTH=900 + SANDWICH_SPACING=120 + PANEL_THICKNESS*2=25.4), the actual calculated width is approximately 1045.4mm. The comment should be updated to reflect the correct calculated dimension.
| crossmember_width = TRACK_WIDTH + SANDWICH_SPACING + PANEL_THICKNESS * 2; // ~1152mm | |
| crossmember_width = TRACK_WIDTH + SANDWICH_SPACING + PANEL_THICKNESS * 2; // ~1045mm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot can you parametrically get the dimensions of each plate and sum the distance to each piece then each subsequent piece. And define a universal distance between the pieces, about an inch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the layout to use parametric dimensions with spacing set to 25.4mm (~1 inch) as requested. The positions are calculated sequentially where each part's position = previous position + previous width + spacing. Also added a total_layout_width variable that sums all distances. Total layout is now ~9.81m wide. Changes in commit 273b323.
|
|
||
| ## Layout Dimensions | ||
|
|
||
| - **Total Width**: ~9.9 meters |
Copilot
AI
Dec 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documented total width of approximately 9.9 meters appears to be slightly overestimated. Based on the part dimensions and spacing calculations, the actual total width is approximately 9.7 meters (parts: 9345mm + spacings: 360mm + start offset: 10mm = 9715mm). Consider updating this value for accuracy.
| - **Total Width**: ~9.9 meters | |
| - **Total Width**: ~9.7 meters (9715mm) |
Co-authored-by: dorkmo <[email protected]>
The CNC layout required manual cleanup before machine import due to text labels and vertical row arrangement.
Changes
Layout arrangement: Converted from multi-row (vertical) to single horizontal line, left-to-right
Text removal: Eliminated all
text()calls (part labels, title, legend)Parametric positioning: Sequential position calculation using unique variables
pos[n] = pos[n-1] + width[n-1] + SPACINGtotal_layout_widthvariable that parametrically sums all distanceslifetrac_v25_params.scadDocumentation: Added
CNCLAYOUT_CHANGES.mdwith usage examples and technical detailsOriginal prompt
Created from VS Code.
💡 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.