{"id":18370816,"url":"https://github.com/miho/jcsg-meshextensions-sample","last_synced_at":"2025-04-10T21:27:31.369Z","repository":{"id":137157809,"uuid":"80246366","full_name":"miho/JCSG-MeshExtensions-Sample","owner":"miho","description":null,"archived":false,"fork":false,"pushed_at":"2018-07-10T19:27:30.000Z","size":81,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-15T21:20:04.722Z","etag":null,"topics":["constructive-solid-geometries","csg","java","jcsg","mesh"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miho.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":"2017-01-27T21:13:01.000Z","updated_at":"2018-11-05T10:51:59.000Z","dependencies_parsed_at":"2024-07-11T07:30:07.837Z","dependency_job_id":null,"html_url":"https://github.com/miho/JCSG-MeshExtensions-Sample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miho%2FJCSG-MeshExtensions-Sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miho%2FJCSG-MeshExtensions-Sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miho%2FJCSG-MeshExtensions-Sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miho%2FJCSG-MeshExtensions-Sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miho","download_url":"https://codeload.github.com/miho/JCSG-MeshExtensions-Sample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248300418,"owners_count":21080728,"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":["constructive-solid-geometries","csg","java","jcsg","mesh"],"created_at":"2024-11-05T23:40:24.976Z","updated_at":"2025-04-10T21:27:31.339Z","avatar_url":"https://github.com/miho.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JCSG-MeshExtensions-Sample\n\nDemonstrates the [JCSG-MeshExtensions](https://github.com/miho/JCSG-MeshExtensions) library, a [JCSG](https://github.com/miho/JCSG) extension library for producing high-quality meshes from [JCSG](https://github.com/miho/JCSG) mesh objects. The mesh optimization is performed with the cross-platform meshing software [ProMesh](http://promesh3d.com/) which is available as [ug4](https://github.com/UG4/ugcore) plugin.\n\n\u003cimg src=\"https://raw.githubusercontent.com/miho/JCSG-MeshExtensions/master/res/img/optimize.jpg\" alt=\"optimization\" width=\"450\"\u003e\n\n## Sample Code\n```java\n// we use cube and sphere as base geometries\nCSG cube   = new Cube(2).toCSG();\nCSG sphere = new Sphere(1.25).toCSG();\n\n// compute difference between cube and sphere\nCSG cubeMinusSphere = cube.difference(sphere);\n\n// create a copy of cube-sphere that shall be optimized\nCSG optimized       = cubeMinusSphere.\n        transformed(Transform.unity().translateX(3));\n\n// perform the optimization\nCSG all = MeshTools.optimize(\n        optimized, // csg object to optimize\n        1e-6,      // tolerance\n        1e-4,      // max tolerance\n        0.25,      // min edge length\n        1.5        // max edge length\n);\n\n// save combined unoptimized and optimized mesh as \"all.stl\"\nFiles.write(Paths.get(\"all.stl\"), all.toStlString().getBytes());\n```\n\n## How to Run JCSG-MeshExtensions-Sample\n\n### Requirements\n\n- Java \u003e= 1.8\n- Internet connection (dependencies are downloaded automatically)\n- IDE: [Gradle](http://www.gradle.org/) Plugin (not necessary for command line usage)\n\n### IDE\n\nOpen the `JCSG-MeshExtensions-Sample` [Gradle](http://www.gradle.org/) project in your favourite IDE (tested with NetBeans 8.2) and build it\nby calling the `run` task.\n\n### Command Line\n\nNavigate to the [Gradle](http://www.gradle.org/) project (e.g., `path/to/JCSG-MeshExtensions-Sample`) and enter the following command\n\n#### Bash (Linux/OS X/Cygwin/other Unix-like shell)\n\n    bash gradlew run\n    \n#### Windows (CMD)\n\n    gradlew run\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiho%2Fjcsg-meshextensions-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiho%2Fjcsg-meshextensions-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiho%2Fjcsg-meshextensions-sample/lists"}