{"id":19974260,"url":"https://github.com/gbroques/freecad-to-obj","last_synced_at":"2025-08-21T00:13:31.202Z","repository":{"id":57432186,"uuid":"352401909","full_name":"gbroques/freecad-to-obj","owner":"gbroques","description":"Python package to export FreeCAD objects to the Wavefront (.obj) file format.","archived":false,"fork":false,"pushed_at":"2024-03-11T01:48:56.000Z","size":119,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-17T04:51:45.788Z","etag":null,"topics":["export","exporter","freecad","freecad-macro","obj","wavefront","wavefront-obj"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gbroques.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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":"2021-03-28T18:05:29.000Z","updated_at":"2022-12-20T13:05:34.000Z","dependencies_parsed_at":"2024-11-13T03:24:38.618Z","dependency_job_id":null,"html_url":"https://github.com/gbroques/freecad-to-obj","commit_stats":{"total_commits":78,"total_committers":1,"mean_commits":78.0,"dds":0.0,"last_synced_commit":"c8edb9b162d1b5895e0de9f3fc8c200d68151d92"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/gbroques/freecad-to-obj","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbroques%2Ffreecad-to-obj","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbroques%2Ffreecad-to-obj/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbroques%2Ffreecad-to-obj/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbroques%2Ffreecad-to-obj/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gbroques","download_url":"https://codeload.github.com/gbroques/freecad-to-obj/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbroques%2Ffreecad-to-obj/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271406022,"owners_count":24753898,"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","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["export","exporter","freecad","freecad-macro","obj","wavefront","wavefront-obj"],"created_at":"2024-11-13T03:14:28.643Z","updated_at":"2025-08-21T00:13:31.168Z","avatar_url":"https://github.com/gbroques.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# freecad-to-obj\n\n[![PyPI version](https://badge.fury.io/py/freecad-to-obj.svg)](https://badge.fury.io/py/freecad-to-obj)\n\nPython package to export FreeCAD objects to the [Wavefront (.obj)](https://en.wikipedia.org/wiki/Wavefront_.obj_file) file format.\n\n## Why this package?\nThis package satisfies some unique requirements for exporting to OBJ that FreeCAD's built-in functions do not currently satisfy:\n\n* Return a string or the file's contents; instead of writing to a file immediately.\n* Use an object's `Label` for the object's name in the `.obj` file.\n* Ungroup the following standard container objects:\n  * [Group](https://wiki.freecadweb.org/Std_Group)\n  * [Part](https://wiki.freecadweb.org/Std_Part)\n* Control export granularity keeping container objects grouped, and links unresolved.\n* Control which objects are exported (e.g. don't export invisible objects).\n* Export wires (the black outline or line segments surrounding parts).\n* Export link array elements.\n\n## Usage\n\n```python\nimport freecad_to_obj\nobj_file_contents = freecad_to_obj.export(objects)\n```\n\n## Export Format\nObject names in Wavefront .obj are preceded by an \"o [ObjectName]\" ([source](https://en.wikipedia.org/wiki/Wavefront_.obj_file#Reference_materials)).\n\nThis library uses the object's `Label` for the object name by default, but you can change this behavior via the `object_name_getter` keyword argument (see [API](#api)).\n\n    o [ObjectName]\n    v [x1] [y1] [y2]\n    v ...\n    vn [x1] [y1] [y2]\n    vn ...\n    f v1//vn1 v2//vn2 v3//vn3 ...\n\nAfter the object name are:\n\n* **v**ertices preceded by `v`\n* **v**ertex normals preceded by `vn`\n* and **f**aces preceded by `f`\n  * faces reference the vertices and vertex normals by number (starting from **1** instead of 0)\n\nCombined these make up the geometry for the object.\n\nWires for objects are exported as separate objects in the form:\n\n    [ObjectName]WireN\n    v [x1] [y1] [y2]\n    v ...\n    l v1 v2 v3 ...\n\nWhere `N` is a zero-indexed incrementing counter.\n\nFor example:\n\n    o ExampleObjectWire0\n    ...\n    o ExampleObjectWire1\n    ...\n    o ExampleObjectWire2\n\nAfter the object name are:\n\n* **v**ertices preceded by `v`\n* and **l**ine segments preceded by `l`\n  * line segments reference the vertices by number (starting from **1** instead of 0)\n\n## API\n\n### export(objects)\n\nExports a list of FreeCAD objects to Wavefront (.obj).\n\n#### Arguments\n\n|Name|Type|Required|Description|\n|----|----|--------|-----------|\n|`objects`|`List[object]`|`true`|List of FreeCAD objects to export|\n\n#### Keyword Arguments\n\n|Name|Type|Default|Description|\n|----|----|--------|-----------|\n|`object_name_getter`|`Callable[[object, List[object], int], str]`|`lambda obj, path, shape_index: obj.Label`|Defaults to the `Label`.|Function to return the name of the object used in export.|\n|` keep_unresolved`|`Callable[[object, List[object]], bool]`|`None`|Function to return whether to keep an object \"unresolved\" or a group such as `App::Link` or `App::Part`.|\n|`do_not_export`|`Callable[[object, List[object]], bool]`|`lambda obj, path: not obj.Visibility`|Function to return whether to export an object or not. By default, all invisible objects are *not* exported.|\n|`export_link_array_elements`|`boolean`|`False`|Boolean to control whether to export link array elements. By default, link arrays are exported as a single element.|\n|`mesh_settings`|`dict`|`{'LinearDeflection': 0.1, 'AngularDeflection': 0.7, 'Relative': True}`|Mesh settings, see [FreeCAD wiki](https://wiki.freecad.org/Mesh_FromPartShape).|\n\n**Returns:** (`string`) Wavefront .obj file contents.\n\n## Contributing\nSee [Contributing Guidelines](./CONTRIBUTING.md).\n\n## Changelog\nSee [Changelog](./CHANGELOG.md).\n\n## Limitations\nFor simplicity, this package does not care about thes generation of material (`.mtl`) files.\n\n## Supported FreeCAD Versions\nCurrently tested with FreeCAD `19.1`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgbroques%2Ffreecad-to-obj","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgbroques%2Ffreecad-to-obj","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgbroques%2Ffreecad-to-obj/lists"}