Python ctypes bindings for PicoGK runtime with vedo viewer
Project description
pycogk
Python package for working with PicoGK from Python.
This is an unofficial community library.
- Official PicoGK project (C++ / C#): https://github.com/leap71/PicoGK
- This Python package repository: https://github.com/ghedo44/PycoGK
The package keeps a PicoGK-like API where practical while adapting parts of the experience to Python, including a vedo-based viewer layer.
Why pycogk
Use pycogk when you want to script computational geometry workflows in Python while leveraging PicoGK runtime capabilities:
- Build implicit geometry with lattices.
- Convert to voxels and apply boolean/filter/offset operations.
- Extract meshes and work with STL/VDB/CLI/TGA.
- Create scalar/vector field workflows.
- Preview and iterate quickly from Python.
Install
From PyPI:
pip install pycogk
From this repository:
pip install "git+https://github.com/ghedo44/PycoGK.git"
Import Name
The distribution name is pycogk, but the Python import is:
import picogk
Runtime Notes
pycogk loads the PicoGK native runtime using ctypes.
Bundled runtime targets currently include:
win-x64osx-arm64
If your platform is not bundled, set PICOGK_RUNTIME_PATH to a compatible binary.
PowerShell example:
$env:PICOGK_RUNTIME_PATH = "C:\path\to\picogk.1.7.dll"
python your_script.py
Quick Start
from picogk import Lattice, Voxels, Mesh, go
def task() -> None:
with Lattice() as lat:
lat.AddSphere((0.0, 0.0, 0.0), 10.0)
with Voxels.from_lattice(lat) as vox:
with Mesh.from_voxels(vox) as msh:
print("triangles:", msh.nTriangleCount())
go(0.5, task, end_on_task_completion=True)
Documentation
New-user docs are organized like a book:
- Book Home
- Chapter 1: Orientation
- Chapter 2: Installation and Runtime
- Chapter 3: First Project
- Chapter 4: Core Concepts
- Chapter 5: Modeling Workflow
- Chapter 6: Viewer and Interaction
- Chapter 7: Data IO
- Chapter 8: Troubleshooting
- Chapter 9: Production and Publishing
Examples
Runnable examples are in examples:
- examples/basic_usage.py
- examples/01_lattice_to_mesh.py
- examples/02_voxel_boolean_filters.py
- examples/03_scalar_vector_fields.py
- examples/04_openvdb_io.py
- examples/05_stl_io_and_mesh_math.py
- examples/06_slicing_and_cli.py
- examples/07_images_and_tga.py
- examples/08_animation_and_csv.py
- examples/09_polyline_and_viewer.py
- examples/10_utils_tempfolder_log.py
- examples/11_viewer_controls_and_timelapse.py
Status
pycogk is actively developed and has production-readiness gates, but it is still an unofficial project and not a drop-in official replacement.
For readiness details, see:
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pycogk-0.1.0.tar.gz.
File metadata
- Download URL: pycogk-0.1.0.tar.gz
- Upload date:
- Size: 4.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df6716d07d96edb1867a241a9cc9645139ced120de306882f3b192d46e94daa3
|
|
| MD5 |
876cc5c34fa2c7dc32373cf055ff3c64
|
|
| BLAKE2b-256 |
133f60b8b45d80b9297e925a27b12c69cf71812a0cccd79eec2ac49906018c81
|
Provenance
The following attestation bundles were made for pycogk-0.1.0.tar.gz:
Publisher:
publish-pypi.yml on ghedo44/PycoGK
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pycogk-0.1.0.tar.gz -
Subject digest:
df6716d07d96edb1867a241a9cc9645139ced120de306882f3b192d46e94daa3 - Sigstore transparency entry: 1102212944
- Sigstore integration time:
-
Permalink:
ghedo44/PycoGK@a17e48c024a7632d480bef53ad9b18545f584b8c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ghedo44
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@a17e48c024a7632d480bef53ad9b18545f584b8c -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file pycogk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pycogk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf296fa9cb2971cb48398e2f016f72d9be064d5997282fb05cda979afe7da56b
|
|
| MD5 |
7a6dbff583102085335f063414f49c4c
|
|
| BLAKE2b-256 |
c8b10c623ddb8a96ecf54791906e26e007e28657c0bb2675b60ae24b66827de9
|
Provenance
The following attestation bundles were made for pycogk-0.1.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on ghedo44/PycoGK
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pycogk-0.1.0-py3-none-any.whl -
Subject digest:
bf296fa9cb2971cb48398e2f016f72d9be064d5997282fb05cda979afe7da56b - Sigstore transparency entry: 1102212947
- Sigstore integration time:
-
Permalink:
ghedo44/PycoGK@a17e48c024a7632d480bef53ad9b18545f584b8c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ghedo44
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@a17e48c024a7632d480bef53ad9b18545f584b8c -
Trigger Event:
workflow_dispatch
-
Statement type: