{"id":22105199,"url":"https://github.com/ghackenberg/opencascade-tools","last_synced_at":"2025-07-25T02:31:55.211Z","repository":{"id":65738730,"uuid":"596543895","full_name":"ghackenberg/opencascade-tools","owner":"ghackenberg","description":"Easy-to-use wrapper around Open CASCADE Technology available as command line interface (CLI) and JavaScript/TypeScript applicartion programming interface (API)","archived":false,"fork":false,"pushed_at":"2023-06-07T19:12:20.000Z","size":44,"stargazers_count":9,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-03-23T11:58:29.008Z","etag":null,"topics":["cad","computer-aided-design","opencascade","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/opencascade-tools","language":"TypeScript","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/ghackenberg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2023-02-02T12:21:31.000Z","updated_at":"2024-04-23T12:36:51.646Z","dependencies_parsed_at":"2024-04-23T12:36:48.776Z","dependency_job_id":"27dbb835-11aa-4f6a-871f-ee96d12ef133","html_url":"https://github.com/ghackenberg/opencascade-tools","commit_stats":{"total_commits":55,"total_committers":1,"mean_commits":55.0,"dds":0.0,"last_synced_commit":"b04f1640d881872256ddfb8f8020541e6f30dc19"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghackenberg%2Fopencascade-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghackenberg%2Fopencascade-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghackenberg%2Fopencascade-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghackenberg%2Fopencascade-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghackenberg","download_url":"https://codeload.github.com/ghackenberg/opencascade-tools/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227502887,"owners_count":17781707,"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":["cad","computer-aided-design","opencascade","typescript"],"created_at":"2024-12-01T06:39:32.058Z","updated_at":"2024-12-01T06:39:32.619Z","avatar_url":"https://github.com/ghackenberg.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# opencascade-tools\n\nThis project provides an **easy-to-use wrapper** around [Open CASCADE Technology](https://www.opencascade.com/open-cascade-technology/), a powerful free and open source computer-aided design (CAD) kernel. The project is based on [OpenCascade.js](https://github.com/donalffons/opencascade.js/), a WebAssembly port of the original native C++ library.\n\nFor now, you can use `opencascade-tools` to convert [IGES files](https://en.wikipedia.org/wiki/IGES) and [STEP files](https://en.wikipedia.org/wiki/ISO_10303-21) into [OBJ files](https://en.wikipedia.org/wiki/Wavefront_.obj_file) (Wavefront Technologies) and [GLTF/GLB files](https://en.wikipedia.org/wiki/GlTF) (Khronos Group). In the future, we plan to add more functionality depending on community requests.\n\nBelow you find a short *user guide* and an even shorter *developer guide* 😉.\n\n## 📙 User guide\n\nInstall `opencascade-tools` on your machine (requires [Node.js](https://nodejs.org/) and the [Node Package Manager (NPM)](https://www.npmjs.com/package/npm)):\n\n```\nnpm install -g opencascade-tools\n```\n\nAfterwards you can use our *command line interface (CLI)* and/or our *application programming interface (API)*.\n\n### 🖥️ Command line interface (CLI)\n\nOur CLI provides a few *general functions* (as the CLI of most CLI-based programs) and some (domain-) *specific functions*:\n\n#### ⚙️ General functions\n\nGet help on how to use the command line interface of `opencascade-tools`:\n\n```\nopencascade-tools --help\n```\n\nGet the version number of `opencascade-tools` as installed on your machine:\n\n```\nopencascade-tools --version\n```\n\n#### ⚙️ Specific functions\n\nConvert IGES file or STEP file to OBJ file, GLTF file, or GLB file with standard values for the parameters of the triangulation algorithm:\n\n```\nopencascade-tools --format \u003cobj|gltf|glb\u003e --input \u003cpath/to/igesOrStepFile\u003e --output \u003cpath/to/objOrGltfOrGlbFile\u003e\n```\n\nConvert IGES file or STEP file to OBJ file, GLTF file, or GLB file with custom value for the linear deflection parameter of the triangulation algorithm:\n\n```\nopencascade-tools --format \u003cobj|gltf|glb\u003e --linDeflection 1 --input \u003cpath/to/igesOrStepFile\u003e --output \u003cpath/to/objOrGltfOrGlbFile\u003e\n```\n\nConvert IGES file or STEP file to OBJ file, GLTF file, or GLB file with custom value for the angular deflection parameter of the triangulation algorithm:\n\n```\nopencascade-tools --format \u003cobj|gltf|glb\u003e --angDeflection 1 --input \u003cpath/to/igesOrStepFile\u003e --output \u003cpath/to/objOrGltfOrGlbFile\u003e\n```\n\n### 🖥️ Application programming interface (API)\n\nConvert STEP file to OBJ file, GLTF file, and GLB file with standard values for the parameters of the triangulation algorithm:\n\n```ts\nimport { init, readIgesFile, readStepFile, triangulate, writeObjFile, writeGltfFile, writeGlbFile } from 'opencascade-tools'\n\nasync function run() {\n    const oc = await init()\n\n    const docHandle = readIgesFile(oc, '\u003cpath/to/igesFile\u003e')\n    // or\n    const docHandle = readStepFile(oc, '\u003cpath/to/stepFile\u003e')\n\n    triangulate(oc, docHandle.get())\n\n    writeObjFile(oc, docHandle, '\u003cpath/to/objFile\u003e')\n    writeGltfFile(oc, docHandle, '\u003cpath/to/gltfFile\u003e')\n    writeGlbFile(oc, docHandle, '\u003cpath/to/glbFile\u003e')\n}\n\nrun()\n```\n\nConvert STEP file to OBJ file, GLTF file, and GLB file with custom values for the parameters of the triangulation algorithm:\n\n```ts\nimport { init, readIgesFile, readStepFile, triangulate, writeObjFile, writeGltfFile, writeGlbFile } from 'opencascade-tools'\n\nasync function run() {\n    const oc = await init()\n\n    const docHandle = readIgesFile(oc, '\u003cpath/to/igesFile\u003e')\n    // or\n    const docHandle = readStepFile(oc, '\u003cpath/to/stepFile\u003e')\n\n    const linDeflection = 0.1\n    const isRelative = false\n    const angDeflection = 0.1\n    const isInParallel = false\n\n    triangulate(oc, docHandle.get(), linDeflection, isRelative, angDeflection, isInParallel)\n\n    writeObjFile(oc, docHandle, '\u003cpath/to/objFile\u003e')\n    writeGltfFile(oc, docHandle, '\u003cpath/to/gltfFile\u003e')\n    writeGlbFile(oc, docHandle, '\u003cpath/to/glbFile\u003e')\n}\n\nrun()\n```\n\n## 📙 Developer guide\n\nClone the Git repository:\n\n```\ngit clone https://github.com/ghackenberg/opencascade-tools.git\n```\n\nInstall development and production dependencies:\n\n```\ncd opencascade-tools \u0026\u0026 npm install\n```\n\nAfterwards you can use the following *scripts*:\n\n### 🖥️ Scripts\n\nRemove JavaScript binaries and TypeScript type definitions from previous builds:\n\n```\ncd opencascade-tools \u0026\u0026 npm run clean\n```\n\nCompile TypeScript sources to JavaScript binaries and TypeScript type definitions:\n\n```\ncd opencascade-tools \u0026\u0026 npm run build\n```\n\nInstall your version of `opencascade-tools` into local NPM registry:\n\n```\ncd opencascade-tools \u0026\u0026 npm run deploy-local\n```\n\nRun all test cases with local installation of `opencascade-tools`:\n\n```\ncd opencascade-tools \u0026\u0026 npm run test-all\n```\n\nRun IGES test cases with local installation of `opencascade-tools`:\n\n```\ncd opencascade-tools \u0026\u0026 npm run test-iges\n```\n\nRun STEP test cases with local installation of `opencascade-tools`:\n\n```\ncd opencascade-tools \u0026\u0026 npm run test-step\n```\n\nShorthand for clean, build, deploy local and run all test cases (see above scripts):\n\n```\ncd opencascade-tools \u0026\u0026 npm run test\n```\n\nShorthand for clean, build, and publish to global NPM registry (see above scripts):\n\n```\ncd opencascade-tools \u0026\u0026 npm run deploy-global\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghackenberg%2Fopencascade-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghackenberg%2Fopencascade-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghackenberg%2Fopencascade-tools/lists"}