{"id":38683970,"url":"https://github.com/fusion-energy/brep_part_finder","last_synced_at":"2026-01-17T10:18:59.801Z","repository":{"id":43652830,"uuid":"442006212","full_name":"fusion-energy/brep_part_finder","owner":"fusion-energy","description":"A Python package to identify the part ID number in Brep format CAD files","archived":false,"fork":false,"pushed_at":"2023-02-01T11:52:34.000Z","size":161,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-12T18:25:32.420Z","etag":null,"topics":["cad","dagmc","metadata","neutronics","paramak","workflow"],"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/fusion-energy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-12-26T23:52:21.000Z","updated_at":"2022-01-17T16:58:26.000Z","dependencies_parsed_at":"2023-02-17T05:01:06.421Z","dependency_job_id":null,"html_url":"https://github.com/fusion-energy/brep_part_finder","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/fusion-energy/brep_part_finder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fusion-energy%2Fbrep_part_finder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fusion-energy%2Fbrep_part_finder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fusion-energy%2Fbrep_part_finder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fusion-energy%2Fbrep_part_finder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fusion-energy","download_url":"https://codeload.github.com/fusion-energy/brep_part_finder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fusion-energy%2Fbrep_part_finder/sbom","scorecard":{"id":414426,"data":{"date":"2025-08-11","repo":{"name":"github.com/fusion-energy/brep_part_finder","commit":"b0709828a0d54533c84cd971e553f1ad3006509c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/7 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/anaconda-publish.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/fusion-energy/brep_part_finder/anaconda-publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/black.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/fusion-energy/brep_part_finder/black.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/black.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/fusion-energy/brep_part_finder/black.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/black.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/fusion-energy/brep_part_finder/black.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci_with_install.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/fusion-energy/brep_part_finder/ci_with_install.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/conda-build-test.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/fusion-energy/brep_part_finder/conda-build-test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/fusion-energy/brep_part_finder/python-publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/fusion-energy/brep_part_finder/python-publish.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/black.yml:25","Warn: pipCommand not pinned by hash: .github/workflows/black.yml:26","Warn: pipCommand not pinned by hash: .github/workflows/ci_with_install.yml:33","Warn: pipCommand not pinned by hash: .github/workflows/ci_with_install.yml:37","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:30","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:31","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   6 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/anaconda-publish.yml:1","Warn: no topLevel permission defined: .github/workflows/black.yml:1","Warn: no topLevel permission defined: .github/workflows/ci_with_install.yml:1","Warn: no topLevel permission defined: .github/workflows/conda-build-test.yml:1","Warn: no topLevel permission defined: .github/workflows/python-publish.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T23:27:26.830Z","repository_id":43652830,"created_at":"2025-08-18T23:27:26.831Z","updated_at":"2025-08-18T23:27:26.831Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28506063,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"last_error":"SSL_read: 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","dagmc","metadata","neutronics","paramak","workflow"],"created_at":"2026-01-17T10:18:58.427Z","updated_at":"2026-01-17T10:18:59.787Z","avatar_url":"https://github.com/fusion-energy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![N|Python](https://www.python.org/static/community_logos/python-powered-w-100x40.png)](https://www.python.org)\n\n[![CI with install](https://github.com/fusion-energy/brep_part_finder/actions/workflows/ci_with_install.yml/badge.svg)](https://github.com/fusion-energy/brep_part_finder/actions/workflows/ci_with_install.yml)\n\n[![Upload Python Package](https://github.com/fusion-energy/brep_part_finder/actions/workflows/python-publish.yml/badge.svg)](https://github.com/fusion-energy/brep_part_finder/actions/workflows/python-publish.yml)\n[![anaconda-publish](https://github.com/fusion-energy/brep_part_finder/actions/workflows/anaconda-publish.yml/badge.svg)](https://github.com/fusion-energy/brep_part_finder/actions/workflows/anaconda-publish.yml)\n\n[![Anaconda-Server Badge](https://anaconda.org/fusion-energy/brep_part_finder/badges/version.svg)](https://anaconda.org/fusion-energy/brep_part_finder)\n[![PyPI](https://img.shields.io/pypi/v/brep_part_finder?color=brightgreen\u0026label=pypi\u0026logo=grebrightgreenen\u0026logoColor=green)](https://pypi.org/project/brep_part_finder/)\n\nBrep-part-finder is able to search within a Brep file for parts that match user\nspecified properties such as volume, center of mass and bounding box. The\nmatching ID number of the part will be returned if found.\n\nThis is useful because the order or parts changes when exporting to Brep files.\nThis part finder package helps keep track of meta data within a workflow.\nThe [neutronics workflow](https://github.com/fusion-energy/neutronics-workshop)\nmakes use of this package to help correctly identify materials when making\n[DAGMC](https://github.com/svalinn/DAGMC/) h5m files from \n[Paramak](https://github.com/fusion-energy/paramak) geometries for neutronics\nsimulations.\n\n# Installation (Conda)\n\nThe installation instructions below create a new conda enviroment and install \n\n```bash\nconda create --name bpf_env\nconda activate bpf_env\nconda install -c cadquery -c fusion-energy -c conda-forge brep_part_finder\n```\n\n# Installation (Conda + Pip)\n\nThe installation instructions below create a new conda enviroment, install CadQuery and install this package.\nThe master branch of CadQuery is currently required as latest features are required.\nWhen CadQuery version 2.2 is released then install can target a stable version.\n\n```bash\nconda create --name bpf_env\nconda activate bpf_env\nconda install -c cadquery -c conda-forge cadquery=master\npip install brep_part_finder\n```\n\n# Usage\n\nTo view the properties of the parts in the Brep file the first stage is to import the package and make use of the ```get_part_properties_from_file``` function.\n\n```python\nimport brep_part_finder as bpf\n\nmy_brep_part_properties = bpf.get_part_properties_from_file('my_brep_file.brep')\n\nprint(my_brep_part_properties)\n\u003e\u003e\u003e{\n    1: {\n        'Center.x': 0, 'Center.y': 0, 'Center.z': 0,\n        'Volume': 10,\n        'BoundingBox.xmin': -20, 'BoundingBox.ymin': -20, 'BoundingBox.zmin': -20,\n        'BoundingBox.xmax': 20, 'BoundingBox.ymax': 20, 'BoundingBox.zmax': 20\n       },\n     2: {\n         'Center.x': 5, 'Center.y': 6, 'Center.z': 7,\n         'Volume': 10,\n         'BoundingBox.xmin': -40.0, 'BoundingBox.ymin': -40.0, 'BoundingBox.zmin': -40.0,\n         'BoundingBox.xmax': 40.0, 'BoundingBox.ymax': 40.0, 'BoundingBox.zmax': 40.0\n        },\n     3: {\n         'Center.x': 0, 'Center.y': 0, 'Center.z': 0,\n         'Volume': 10,\n         'BoundingBox.xmin': -10, 'BoundingBox.ymin': -10, 'BoundingBox.zmin': -10,\n         'BoundingBox.xmax': 10, 'BoundingBox.ymax': 10, 'BoundingBox.zmax': 10\n        } \n    }\n```\n\nFrom the above dictionary it is possible to identify parts from their central of mass (x,y,z coordinate), volume and bounding box. This can be done manually or one can pass the required properties into the ```find_part_id``` or ```find_part_ids``` functions to identify the part numbers of solids automatically.\n\nA minimal example that finds the part id numbers with matching volumes\n```python\nimport brep_part_finder as bpf\n\nmy_brep_part_properties = bpf.get_part_properties_from_file('my_brep_file.brep')\npart_id = bpf.find_part_id(\n    brep_part_properties=my_brep_part_properties,\n    volume=10,\n\n)\n\nprint(part_id)\n\u003e\u003e [1, 3, 4]\n```\n\nThe above example found 3 part ids with matching volumes.\n\nThe follow example also specifies the center of mass which helps narrow down the part ids to just to matching parts.\n```python\nimport brep_part_finder as bpf\n\nmy_brep_part_properties = bpf.get_part_properties_from_file('my_brep_file.brep')\npart_id = bpf.find_part_id(\n    brep_part_properties=my_brep_part_properties,\n    volume=10,\n    center_of_mass=(0,0,0),\n)\n\nprint(part_id)\n\u003e\u003e [1, 3]\n```\n\nIn the this example the bounding box of the part has also been specified and these three pieces of information are enough to find one part that matches all three criteria.\n```python\nimport brep_part_finder as bpf\n\nmy_brep_part_properties = bpf.get_part_properties_from_file('my_brep_file.brep')\npart_id = bpf.find_part_id(\n    brep_part_properties=my_brep_part_properties,\n    volume=10,\n    center_of_mass=(0,0,0),\n    bounding_box = [[10,10,10], [-10,-10,10]]\n)\n\nprint(part_id)\n\u003e\u003e [3]\n```\n\nFor more usage examples see the [examples](https://github.com/fusion-energy/brep_part_finder/tree/main/examples) folder in this repository\n\n# Combining with Paramak\n\nWhen reactor models made with Paramak are exported to Brep files it is likely that the order of parts in the Brep file does not match the order of parts within the Paramak object. Therefore this program is useful when identifying parts in the Brep file. See the [paramak_example](https://github.com/fusion-energy/brep_part_finder/blob/main/examples/paramak_example.py) file in the examples folder of this repository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffusion-energy%2Fbrep_part_finder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffusion-energy%2Fbrep_part_finder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffusion-energy%2Fbrep_part_finder/lists"}