{"id":26103153,"url":"https://github.com/S1N4X/SmithForge","last_synced_at":"2025-03-09T20:02:18.686Z","repository":{"id":269891663,"uuid":"908762379","full_name":"S1N4X/SmithForge","owner":"S1N4X","description":"A tool for combining two 3MF models by overlaying a Hueforge model onto a base model with automatic scaling, positioning, and proper model intersection.","archived":false,"fork":false,"pushed_at":"2024-12-27T05:15:40.000Z","size":748,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-27T05:20:57.241Z","etag":null,"topics":["3d","3d-models","3d-printing","3mf","chromalink","decor","hueforge","mesh","model","stl"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/S1N4X.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-26T22:47:38.000Z","updated_at":"2024-12-27T05:15:43.000Z","dependencies_parsed_at":"2024-12-27T05:21:13.074Z","dependency_job_id":null,"html_url":"https://github.com/S1N4X/SmithForge","commit_stats":null,"previous_names":["s1n4x/forgesmith","s1n4x/smithforge"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/S1N4X%2FSmithForge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/S1N4X%2FSmithForge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/S1N4X%2FSmithForge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/S1N4X%2FSmithForge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/S1N4X","download_url":"https://codeload.github.com/S1N4X/SmithForge/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242744102,"owners_count":20178174,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d","3d-models","3d-printing","3mf","chromalink","decor","hueforge","mesh","model","stl"],"created_at":"2025-03-09T20:02:16.074Z","updated_at":"2025-03-09T20:02:18.672Z","avatar_url":"https://github.com/S1N4X.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"img\\smithforge_logo_white_small_v2.gif\" alt=\"smithforge Logo\"\u003e\n\n# SmithForge\n\u003c/p\u003e\n\nSmithForge is a tool for seamlessly combining two 3MF models by overlaying and embedding a Hueforge model onto a base shape with automatic scaling, positioning, and precise intersection alignment. All this using the great [trimesh](https://github.com/mikedh/trimesh) Python library. The resulting 3MF file would then be ready to be opened in your favourite slicer for 3D printing. \n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"img/process.png\" alt=\"Process\"\u003e\n\u003c/p\u003e\n\nThis small but efficient script can be used to automate the process of shaping HueForge models to your needs. HueForge Z axis integrity is kept through the process (which means the script does not modify the original Z height config).\n\nThis project was originally designed to simplify embedding Hueforge models onto ChromaLink (previously named MagHex) hexagonal bases. Please see the [Slug3D.com](https://www.slug3d.com) ChromaLink's framework for 3D printed wall art designing.\n\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\nThis project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details.\n\n## Features\n- Automatic scaling of X \u0026 Y axis to match the base dimensions while maintaining aspect ratio.\n- The Z-axis scaling remains unchanged throughout the process to avoid disrupting the Hueforge's visual integrity\n- Also maintains model integrity through convex hull clipping\n- Automatic centering\n- Custom X/Y/Z positioning\n- Proper model intersection and union\n- Smart Z-axis embedding with configurable overlap\n- Base model rotation support\n\n## Technical Process\n1. Loads both 3MF models\n2. Optionally rotates base model\n3. Calculates and applies scaling to match base dimensions\n4. Centers Hueforge on base model\n5. Embeds Hueforge with slight Z overlap\n6. Applies user-specified position adjustments\n7. Creates convex hull of base for proper intersection\n8. Performs boolean operations for clean combination\n9. Exports final unified model\n\n## Notes\n- Default overlap is 0.1mm for proper model union (can be changed with --zshift)\n- Scale maintains aspect ratio in X/Y dimensions\n- Z-axis height is never modified (as per HueForge guidelines)\n- Models must have proper manifold geometry\n\n## Future Features\n- Add height modifiers and filament colours from HueForge description files in the 3MF output\n\n## Requirements\n- Python 3.x\n- trimesh\n- shapely\n- A base model (.3mf)\n- A model to be embedded like a HueForge (.3mf)\n\n## Installation\n```bash\npip install trimesh shapely\n```\n\n## Usage\n```bash\npython smithforge.py -f hueforge.3mf -b base.3mf [options]\n```\n\n### Parameters\n#### File paths\n```bash\n-f, --hueforge: Path of the 3MF file that will serve as the overlay to be embedded to the base (required)\n-b, --base: Path of the base shape 3MF file (required)\n-o, --output: Output file path (default: combined.3mf)\n```\n\n#### Overlay geometry\n```bash\n--xshift: X-axis shift in mm\n--yshift: Y-axis shift in mm\n--zshift: Z-axis shift in mm\n-s, --scale: Force specific scale value\n--scaledown: Allow downscaling below 1.0\n```\n\n#### Base geometry\n```bash\n--rotatebase: Rotate base model (degrees, 0-360)\n```\n\n### Examples\nBasic combination:\n```bash\npython smithforge.py -f hueforge.3mf -b base.3mf\n```\n\nRotate base and adjust position of HueForge (in mm):\n```bash\npython smithforge.py -f hueforge.3mf -b base.3mf --rotatebase 90 --xshift 5 --zshift 0.5\n```\n\nForce a user defined scale for the HueForge model (example: 1.5x size)\n```bash\npython smithforge.py -f hueforge.3mf -b base.3mf -s 1.5\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FS1N4X%2FSmithForge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FS1N4X%2FSmithForge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FS1N4X%2FSmithForge/lists"}