{"id":22059740,"url":"https://github.com/precise-simulation/geomlib","last_synced_at":"2026-02-28T13:32:59.904Z","repository":{"id":201688127,"uuid":"530729575","full_name":"precise-simulation/geomlib","owner":"precise-simulation","description":"GEOMLib - 3D CSG Geometry Library for MATLAB® and GNU Octave","archived":false,"fork":false,"pushed_at":"2022-08-30T16:02:48.000Z","size":102,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-03T16:02:52.620Z","etag":null,"topics":["cad","csg","geometry","library","matlab","mesh","octave","polygon","stl"],"latest_commit_sha":null,"homepage":"https://www.mathworks.com/matlabcentral/fileexchange/116950-geomlib","language":"MATLAB","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/precise-simulation.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}},"created_at":"2022-08-30T15:59:54.000Z","updated_at":"2024-11-29T08:29:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"7af18d4d-75c5-4dd8-a11b-e5e3dd149d97","html_url":"https://github.com/precise-simulation/geomlib","commit_stats":null,"previous_names":["precise-simulation/geomlib"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/precise-simulation/geomlib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/precise-simulation%2Fgeomlib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/precise-simulation%2Fgeomlib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/precise-simulation%2Fgeomlib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/precise-simulation%2Fgeomlib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/precise-simulation","download_url":"https://codeload.github.com/precise-simulation/geomlib/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/precise-simulation%2Fgeomlib/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29935368,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T13:16:57.922Z","status":"ssl_error","status_checked_at":"2026-02-28T13:11:15.149Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cad","csg","geometry","library","matlab","mesh","octave","polygon","stl"],"created_at":"2024-11-30T17:32:09.265Z","updated_at":"2026-02-28T13:32:59.866Z","avatar_url":"https://github.com/precise-simulation.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"GEOMLib - 3D CSG Geometry Library for MATLAB® and GNU Octave\n============================================================\n\n**GEOMLib** is a 2D and 3D geometry library for MATLAB® and GNU Octave\nallowing _mesh based_ CSG (Composite Solid Geometry) operations.\n\nOriginally developed for use with the [FEATool Multiphysics](https://www.featool.com)\nFEA simulation toolbox, but now replaced with the OpenCASCADE geometry\nkernel to support BREP CAD geometry support.\n\n![GEOMLib - MATLAB CSG Geometry Library](geomlib-screenshot.jpg)\n\n\nInstallation\n------------\n\nDownload and copy the library to a folder. Start MATLAB® or Octave and\nstart the `runtests` script (or `runtests 1` for verbose output) to\nrun the test and validation suite.\n\n\nExamples\n--------\n\n1. 2D example of the union of a circle and unit square\n\n        % Create circle\n        c1 = gobj_circle([0, 0], 0.5, 'C1');\n        c1 = convert_gobj_polygons( c1, 1 );\n        c1 = csg_op( c1, 'b' );\n\n        % Create unit square\n        r1 = gobj_rectangle(0, 1, 0, 1, 'R1');\n        r1 = convert_gobj_polygons( r1, 2 );\n        r1 = csg_op( r1, 'b' );\n\n        % Join circle and square\n        [res,~,stat] = csg_op( c1, r1, '+' );\n\n        % Visualize result\n        csg_op(res, 'v')\n\n2. 3D subtraction of a sphere from a unit cube\n\n        % Create sphere\n        s1 = gobj_sphere([0, 0, 1], 0.5, 'S1');\n        s1 = convert_gobj_polygons( s1, 1 );\n        s1 = csg_op( s1, 'b' );\n\n        % Create unit cube\n        b1 = gobj_block(0, 1, 0, 1, 0, 1, 'B1');\n        b1 = convert_gobj_polygons( b1, 2 );\n        b1 = csg_op( b1, 'b' );\n\n        % Subtracting sphere from cube\n        [res,~,stat] = csg_op( b1, s1, '-' );\n\n        % Visualize result\n        csg_op(res, 'v')\n\n3. For more examples see the tests in the _test_ directory.\n\n\nFunctions\n---------\n\n    % Main CSG functions:\n\n    csg_op - apply CSG operation on polygons\n    csg_polygon_recombination - recombine and tessellate polygons\n    csg_polygon_tesselation - recombine and tessellate polygons\n\n    % Geometry object primitives:\n\n    gobj_block - create block\n    gobj_circle - create circle\n    gobj_cylinder - create cylinder\n    gobj_ellipse - create ellipse\n    gobj_polygon - create polygon\n    gobj_rectangle - create rectangle\n    gobj_sphere - create sphere\n\n    % Geometry utility and help functions:\n\n    convert_gobj_polygons - extract polygons from geometry object\n    deduplicate - remove duplicate rows or columns within tolerance\n    uunique - unsorted set unique\n\n\nSupport\n-------\n\nThis library has been open sourced on an _as is_ basis under the\nAGPLv3 License (see included LICENSE file) without warranty or\nsupport.\n\nFor technical support, consulting, and custom development of this\nlibrary, commercial licensing, or use of the newer OpenCASCADE based\ngeometry library (allowing BREP CAD geometry modeling such as STEP and\nIGES formats) please [contact Precise\nSimulation](https://www.precisesimulation.com#contact) directly.\n\n\nLicense\n-------\n\nCopyright (C) 2013-2022 Precise Simulation Ltd.\n\nKeywords: Geometry, CSG, Mesh, MATLAB®, Octave\n\nThis program is free software; you can redistribute it and/or modify\nit under the terms of version 3 of the GNU Affero General Public\nLicense (AGPLv3) as published by the Free Software Foundation.\n\nThis program is distributed in the hope that it will be useful, but\nWITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\nGeneral Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public\nLicense along with this program. If not, see\n[http://www.gnu.org/licenses](http://www.gnu.org/licenses).\n\n\nTrademarks\n----------\n\nFEATool Multiphysics™ is a trademark of Precise Simulation\nLimited. MATLAB® is a registered trademark of The MathWorks, Inc. All\nother trademarks are the property of their respective owners. Precise\nSimulation and its products are not affiliated with, endorsed, or\nsponsored by these trademark owners.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprecise-simulation%2Fgeomlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprecise-simulation%2Fgeomlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprecise-simulation%2Fgeomlib/lists"}