{"id":13626985,"url":"https://github.com/yeicor-3d/dl4to4ocp","last_synced_at":"2025-04-16T19:31:00.256Z","repository":{"id":238024542,"uuid":"795667846","full_name":"yeicor-3d/dl4to4ocp","owner":"yeicor-3d","description":"This is a tool that helps perform topology optimization on your OCP-based CAD models (CadQuery/Build123d/...) using the dl4to library.","archived":false,"fork":false,"pushed_at":"2024-09-14T07:02:40.000Z","size":569,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-09-15T16:27:16.451Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yeicor-3d.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-05-03T19:08:53.000Z","updated_at":"2024-09-14T07:02:42.000Z","dependencies_parsed_at":"2024-08-29T20:31:51.738Z","dependency_job_id":"8c8ea3c7-0a78-4504-b78b-346ca6970b9c","html_url":"https://github.com/yeicor-3d/dl4to4ocp","commit_stats":null,"previous_names":["yeicor-3d/dl4to4ocp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeicor-3d%2Fdl4to4ocp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeicor-3d%2Fdl4to4ocp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeicor-3d%2Fdl4to4ocp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeicor-3d%2Fdl4to4ocp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yeicor-3d","download_url":"https://codeload.github.com/yeicor-3d/dl4to4ocp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249268547,"owners_count":21240940,"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":[],"created_at":"2024-08-01T22:00:28.319Z","updated_at":"2025-04-16T19:30:59.825Z","avatar_url":"https://github.com/yeicor-3d.png","language":"Python","funding_links":[],"categories":["Extensions and Plugins"],"sub_categories":[],"readme":"# dl4to4ocp - Deep Learning for Topology Optimization for OpenCascade Python\n\nThis is a tool that helps perform [topology optimization](https://en.wikipedia.org/wiki/Topology_optimization) on\nyour [OCP](https://github.com/CadQuery/OCP)-based CAD\nmodels ([CadQuery](https://github.com/CadQuery/cadquery)/[Build123d](https://github.com/gumyr/build123d)/...) using\nthe [dl4to](https://github.com/dl4to/dl4to) library.\n\n## Example\n\n### Installation\n\nThis guide assumes you already have a working recent python 3 environment with pip installed.\n\n- Download the contents of the `example` folder and enter it.\n- Create the virtual python environment and install the dependencies:\n\n```bash\npython -m venv venv\n. venv/bin/activate  # Execute this line every time you change the terminal\npip install -r requirements.txt\n```\n\n- Start the ocp_vscode to view the intermediate results (optional).\n- Run the script: `python example.py`.\n- The `export` folder will contain the solution.\n\n### Usage\n\nThe `example.py` script contains all the code that defines the optimization problem and runs the optimization.\n\nThe script defines the problem by creating the following CAD solids:\n\n![problem.png](.github/docs/problem.png)\n\n1. The green solids are the boundary conditions. Think of them as the fixed parts of the structure.\n2. The red solid has a force applied to it in the direction of the red arrow.\n3. The gray solid is the design space. The optimization algorithm will remove some material from this solid to optimize\n   the structure according to your criteria (material properties, force strength, target volume, etc).\n\nOnce these solids are defined, they are passed to the `ProblemSetup` class, which configures the `dl4to` problem.\nYou have full control over the optimization problem by interacting with `dl4to` directly after the conversion, but some\nutilities and defaults are also available to make starting easier. The solution for this example is:\n\n![solution.png](.github/docs/solution.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyeicor-3d%2Fdl4to4ocp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyeicor-3d%2Fdl4to4ocp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyeicor-3d%2Fdl4to4ocp/lists"}