pycogk 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. pycogk-0.1.0/PKG-INFO +145 -0
  2. pycogk-0.1.0/README.md +118 -0
  3. pycogk-0.1.0/pyproject.toml +51 -0
  4. pycogk-0.1.0/setup.cfg +4 -0
  5. pycogk-0.1.0/src/picogk/__init__.py +114 -0
  6. pycogk-0.1.0/src/picogk/_api.py +2404 -0
  7. pycogk-0.1.0/src/picogk/_base.py +57 -0
  8. pycogk-0.1.0/src/picogk/_config.py +81 -0
  9. pycogk-0.1.0/src/picogk/_errors.py +14 -0
  10. pycogk-0.1.0/src/picogk/_extras.py +1901 -0
  11. pycogk-0.1.0/src/picogk/_native.py +220 -0
  12. pycogk-0.1.0/src/picogk/_types.py +68 -0
  13. pycogk-0.1.0/src/picogk/native/osx-arm64/picogk.1.7.dylib +0 -0
  14. pycogk-0.1.0/src/picogk/native/osx-arm64/picogk.1.7_liblzma.5.dylib +0 -0
  15. pycogk-0.1.0/src/picogk/native/osx-arm64/picogk.1.7_libzstd.1.dylib +0 -0
  16. pycogk-0.1.0/src/picogk/native/win-x64/blosc.dll +0 -0
  17. pycogk-0.1.0/src/picogk/native/win-x64/lz4.dll +0 -0
  18. pycogk-0.1.0/src/picogk/native/win-x64/picogk.1.7.dll +0 -0
  19. pycogk-0.1.0/src/picogk/native/win-x64/tbb12.dll +0 -0
  20. pycogk-0.1.0/src/picogk/native/win-x64/zlib1.dll +0 -0
  21. pycogk-0.1.0/src/picogk/native/win-x64/zstd.dll +0 -0
  22. pycogk-0.1.0/src/pycogk.egg-info/PKG-INFO +145 -0
  23. pycogk-0.1.0/src/pycogk.egg-info/SOURCES.txt +29 -0
  24. pycogk-0.1.0/src/pycogk.egg-info/dependency_links.txt +1 -0
  25. pycogk-0.1.0/src/pycogk.egg-info/requires.txt +6 -0
  26. pycogk-0.1.0/src/pycogk.egg-info/top_level.txt +1 -0
  27. pycogk-0.1.0/tests/test_extras.py +139 -0
  28. pycogk-0.1.0/tests/test_parity_gate.py +78 -0
  29. pycogk-0.1.0/tests/test_production_readiness.py +91 -0
  30. pycogk-0.1.0/tests/test_smoke.py +125 -0
  31. pycogk-0.1.0/tests/test_stability.py +57 -0
pycogk-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,145 @@
1
+ Metadata-Version: 2.4
2
+ Name: pycogk
3
+ Version: 0.1.0
4
+ Summary: Python ctypes bindings for PicoGK runtime with vedo viewer
5
+ Author: pycogk contributors
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/ghedo44/PycoGK
8
+ Project-URL: Documentation, https://github.com/ghedo44/PycoGK
9
+ Project-URL: Repository, https://github.com/ghedo44/PycoGK
10
+ Project-URL: Issues, https://github.com/ghedo44/PycoGK/issues
11
+ Keywords: geometry,voxels,mesh,openvdb,cad,engineering
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3 :: Only
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Topic :: Scientific/Engineering
19
+ Classifier: Topic :: Software Development :: Libraries
20
+ Requires-Python: >=3.10
21
+ Description-Content-Type: text/markdown
22
+ Requires-Dist: numpy>=1.26
23
+ Requires-Dist: vedo>=2025.5.0
24
+ Provides-Extra: dev
25
+ Requires-Dist: pytest>=8.0; extra == "dev"
26
+ Requires-Dist: pytest-cov>=5.0; extra == "dev"
27
+
28
+ # pycogk
29
+
30
+ Python package for working with PicoGK from Python.
31
+
32
+ This is an unofficial community library.
33
+
34
+ - Official PicoGK project (C++ / C#): https://github.com/leap71/PicoGK
35
+ - This Python package repository: https://github.com/ghedo44/PycoGK
36
+
37
+ The package keeps a PicoGK-like API where practical while adapting parts of the experience to Python, including a vedo-based viewer layer.
38
+
39
+ ## Why pycogk
40
+
41
+ Use pycogk when you want to script computational geometry workflows in Python while leveraging PicoGK runtime capabilities:
42
+
43
+ 1. Build implicit geometry with lattices.
44
+ 2. Convert to voxels and apply boolean/filter/offset operations.
45
+ 3. Extract meshes and work with STL/VDB/CLI/TGA.
46
+ 4. Create scalar/vector field workflows.
47
+ 5. Preview and iterate quickly from Python.
48
+
49
+ ## Install
50
+
51
+ From PyPI:
52
+
53
+ ```bash
54
+ pip install pycogk
55
+ ```
56
+
57
+ From this repository:
58
+
59
+ ```bash
60
+ pip install "git+https://github.com/ghedo44/PycoGK.git"
61
+ ```
62
+
63
+
64
+ ## Import Name
65
+
66
+ The distribution name is `pycogk`, but the Python import is:
67
+
68
+ ```python
69
+ import picogk
70
+ ```
71
+
72
+ ## Runtime Notes
73
+
74
+ pycogk loads the PicoGK native runtime using `ctypes`.
75
+
76
+ Bundled runtime targets currently include:
77
+
78
+ 1. `win-x64`
79
+ 2. `osx-arm64`
80
+
81
+ If your platform is not bundled, set `PICOGK_RUNTIME_PATH` to a compatible binary.
82
+
83
+ PowerShell example:
84
+
85
+ ```powershell
86
+ $env:PICOGK_RUNTIME_PATH = "C:\path\to\picogk.1.7.dll"
87
+ python your_script.py
88
+ ```
89
+
90
+ ## Quick Start
91
+
92
+ ```python
93
+ from picogk import Lattice, Voxels, Mesh, go
94
+
95
+ def task() -> None:
96
+ with Lattice() as lat:
97
+ lat.AddSphere((0.0, 0.0, 0.0), 10.0)
98
+ with Voxels.from_lattice(lat) as vox:
99
+ with Mesh.from_voxels(vox) as msh:
100
+ print("triangles:", msh.nTriangleCount())
101
+
102
+ go(0.5, task, end_on_task_completion=True)
103
+ ```
104
+
105
+ ## Documentation
106
+
107
+ New-user docs are organized like a book:
108
+
109
+ 1. [Book Home](docs/BOOK.md)
110
+ 2. [Chapter 1: Orientation](docs/book/01_orientation.md)
111
+ 3. [Chapter 2: Installation and Runtime](docs/book/02_installation_and_runtime.md)
112
+ 4. [Chapter 3: First Project](docs/book/03_first_project.md)
113
+ 5. [Chapter 4: Core Concepts](docs/book/04_core_concepts.md)
114
+ 6. [Chapter 5: Modeling Workflow](docs/book/05_modeling_workflow.md)
115
+ 7. [Chapter 6: Viewer and Interaction](docs/book/06_viewer_and_interaction.md)
116
+ 8. [Chapter 7: Data IO](docs/book/07_data_io.md)
117
+ 9. [Chapter 8: Troubleshooting](docs/book/08_troubleshooting.md)
118
+ 10. [Chapter 9: Production and Publishing](docs/book/09_production_and_publishing.md)
119
+
120
+ ## Examples
121
+
122
+ Runnable examples are in [examples](examples):
123
+
124
+ 1. [examples/basic_usage.py](examples/basic_usage.py)
125
+ 2. [examples/01_lattice_to_mesh.py](examples/01_lattice_to_mesh.py)
126
+ 3. [examples/02_voxel_boolean_filters.py](examples/02_voxel_boolean_filters.py)
127
+ 4. [examples/03_scalar_vector_fields.py](examples/03_scalar_vector_fields.py)
128
+ 5. [examples/04_openvdb_io.py](examples/04_openvdb_io.py)
129
+ 6. [examples/05_stl_io_and_mesh_math.py](examples/05_stl_io_and_mesh_math.py)
130
+ 7. [examples/06_slicing_and_cli.py](examples/06_slicing_and_cli.py)
131
+ 8. [examples/07_images_and_tga.py](examples/07_images_and_tga.py)
132
+ 9. [examples/08_animation_and_csv.py](examples/08_animation_and_csv.py)
133
+ 10. [examples/09_polyline_and_viewer.py](examples/09_polyline_and_viewer.py)
134
+ 11. [examples/10_utils_tempfolder_log.py](examples/10_utils_tempfolder_log.py)
135
+ 12. [examples/11_viewer_controls_and_timelapse.py](examples/11_viewer_controls_and_timelapse.py)
136
+
137
+ ## Status
138
+
139
+ pycogk is actively developed and has production-readiness gates, but it is still an unofficial project and not a drop-in official replacement.
140
+
141
+ For readiness details, see:
142
+
143
+ 1. [Production Readiness](docs/PRODUCTION_READINESS.md)
144
+ 2. [Parity Matrix](docs/PARITY_MATRIX.md)
145
+ 3. [Publishing Guide](docs/PUBLISHING.md)
pycogk-0.1.0/README.md ADDED
@@ -0,0 +1,118 @@
1
+ # pycogk
2
+
3
+ Python package for working with PicoGK from Python.
4
+
5
+ This is an unofficial community library.
6
+
7
+ - Official PicoGK project (C++ / C#): https://github.com/leap71/PicoGK
8
+ - This Python package repository: https://github.com/ghedo44/PycoGK
9
+
10
+ The package keeps a PicoGK-like API where practical while adapting parts of the experience to Python, including a vedo-based viewer layer.
11
+
12
+ ## Why pycogk
13
+
14
+ Use pycogk when you want to script computational geometry workflows in Python while leveraging PicoGK runtime capabilities:
15
+
16
+ 1. Build implicit geometry with lattices.
17
+ 2. Convert to voxels and apply boolean/filter/offset operations.
18
+ 3. Extract meshes and work with STL/VDB/CLI/TGA.
19
+ 4. Create scalar/vector field workflows.
20
+ 5. Preview and iterate quickly from Python.
21
+
22
+ ## Install
23
+
24
+ From PyPI:
25
+
26
+ ```bash
27
+ pip install pycogk
28
+ ```
29
+
30
+ From this repository:
31
+
32
+ ```bash
33
+ pip install "git+https://github.com/ghedo44/PycoGK.git"
34
+ ```
35
+
36
+
37
+ ## Import Name
38
+
39
+ The distribution name is `pycogk`, but the Python import is:
40
+
41
+ ```python
42
+ import picogk
43
+ ```
44
+
45
+ ## Runtime Notes
46
+
47
+ pycogk loads the PicoGK native runtime using `ctypes`.
48
+
49
+ Bundled runtime targets currently include:
50
+
51
+ 1. `win-x64`
52
+ 2. `osx-arm64`
53
+
54
+ If your platform is not bundled, set `PICOGK_RUNTIME_PATH` to a compatible binary.
55
+
56
+ PowerShell example:
57
+
58
+ ```powershell
59
+ $env:PICOGK_RUNTIME_PATH = "C:\path\to\picogk.1.7.dll"
60
+ python your_script.py
61
+ ```
62
+
63
+ ## Quick Start
64
+
65
+ ```python
66
+ from picogk import Lattice, Voxels, Mesh, go
67
+
68
+ def task() -> None:
69
+ with Lattice() as lat:
70
+ lat.AddSphere((0.0, 0.0, 0.0), 10.0)
71
+ with Voxels.from_lattice(lat) as vox:
72
+ with Mesh.from_voxels(vox) as msh:
73
+ print("triangles:", msh.nTriangleCount())
74
+
75
+ go(0.5, task, end_on_task_completion=True)
76
+ ```
77
+
78
+ ## Documentation
79
+
80
+ New-user docs are organized like a book:
81
+
82
+ 1. [Book Home](docs/BOOK.md)
83
+ 2. [Chapter 1: Orientation](docs/book/01_orientation.md)
84
+ 3. [Chapter 2: Installation and Runtime](docs/book/02_installation_and_runtime.md)
85
+ 4. [Chapter 3: First Project](docs/book/03_first_project.md)
86
+ 5. [Chapter 4: Core Concepts](docs/book/04_core_concepts.md)
87
+ 6. [Chapter 5: Modeling Workflow](docs/book/05_modeling_workflow.md)
88
+ 7. [Chapter 6: Viewer and Interaction](docs/book/06_viewer_and_interaction.md)
89
+ 8. [Chapter 7: Data IO](docs/book/07_data_io.md)
90
+ 9. [Chapter 8: Troubleshooting](docs/book/08_troubleshooting.md)
91
+ 10. [Chapter 9: Production and Publishing](docs/book/09_production_and_publishing.md)
92
+
93
+ ## Examples
94
+
95
+ Runnable examples are in [examples](examples):
96
+
97
+ 1. [examples/basic_usage.py](examples/basic_usage.py)
98
+ 2. [examples/01_lattice_to_mesh.py](examples/01_lattice_to_mesh.py)
99
+ 3. [examples/02_voxel_boolean_filters.py](examples/02_voxel_boolean_filters.py)
100
+ 4. [examples/03_scalar_vector_fields.py](examples/03_scalar_vector_fields.py)
101
+ 5. [examples/04_openvdb_io.py](examples/04_openvdb_io.py)
102
+ 6. [examples/05_stl_io_and_mesh_math.py](examples/05_stl_io_and_mesh_math.py)
103
+ 7. [examples/06_slicing_and_cli.py](examples/06_slicing_and_cli.py)
104
+ 8. [examples/07_images_and_tga.py](examples/07_images_and_tga.py)
105
+ 9. [examples/08_animation_and_csv.py](examples/08_animation_and_csv.py)
106
+ 10. [examples/09_polyline_and_viewer.py](examples/09_polyline_and_viewer.py)
107
+ 11. [examples/10_utils_tempfolder_log.py](examples/10_utils_tempfolder_log.py)
108
+ 12. [examples/11_viewer_controls_and_timelapse.py](examples/11_viewer_controls_and_timelapse.py)
109
+
110
+ ## Status
111
+
112
+ pycogk is actively developed and has production-readiness gates, but it is still an unofficial project and not a drop-in official replacement.
113
+
114
+ For readiness details, see:
115
+
116
+ 1. [Production Readiness](docs/PRODUCTION_READINESS.md)
117
+ 2. [Parity Matrix](docs/PARITY_MATRIX.md)
118
+ 3. [Publishing Guide](docs/PUBLISHING.md)
@@ -0,0 +1,51 @@
1
+ [build-system]
2
+ requires = ["setuptools>=69", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "pycogk"
7
+ version = "0.1.0"
8
+ description = "Python ctypes bindings for PicoGK runtime with vedo viewer"
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = "Apache-2.0"
12
+ authors = [{ name = "pycogk contributors" }]
13
+ keywords = ["geometry", "voxels", "mesh", "openvdb", "cad", "engineering"]
14
+ classifiers = [
15
+ "Development Status :: 4 - Beta",
16
+ "Intended Audience :: Developers",
17
+ "Programming Language :: Python :: 3",
18
+ "Programming Language :: Python :: 3 :: Only",
19
+ "Programming Language :: Python :: 3.10",
20
+ "Programming Language :: Python :: 3.11",
21
+ "Topic :: Scientific/Engineering",
22
+ "Topic :: Software Development :: Libraries",
23
+ ]
24
+ dependencies = [
25
+ "numpy>=1.26",
26
+ "vedo>=2025.5.0",
27
+ ]
28
+
29
+ [project.urls]
30
+ Homepage = "https://github.com/ghedo44/PycoGK"
31
+ Documentation = "https://github.com/ghedo44/PycoGK"
32
+ Repository = "https://github.com/ghedo44/PycoGK"
33
+ Issues = "https://github.com/ghedo44/PycoGK/issues"
34
+
35
+ [project.optional-dependencies]
36
+ dev = [
37
+ "pytest>=8.0",
38
+ "pytest-cov>=5.0",
39
+ ]
40
+
41
+ [tool.setuptools]
42
+ package-dir = {"" = "src"}
43
+ include-package-data = true
44
+
45
+ [tool.setuptools.packages.find]
46
+ where = ["src"]
47
+
48
+ [tool.setuptools.package-data]
49
+ picogk = [
50
+ "native/**/*",
51
+ ]
pycogk-0.1.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,114 @@
1
+ from ._api import (
2
+ AnimGroupMatrixRotate,
3
+ AnimViewRotate,
4
+ FieldMetadata,
5
+ KeyAction,
6
+ KeyHandler,
7
+ Lattice,
8
+ Library,
9
+ Mesh,
10
+ OpenVdbFile,
11
+ PolyLine,
12
+ RotateToNextRoundAngleAction,
13
+ ScalarField,
14
+ VedoViewer,
15
+ VectorField,
16
+ Voxels,
17
+ go,
18
+ )
19
+ from ._extras import (
20
+ BBox2,
21
+ ActiveVoxelCounterScalar,
22
+ Animation,
23
+ AnimationQueue,
24
+ Cli,
25
+ CliIo,
26
+ CsvTable,
27
+ ESliceMode,
28
+ EStlUnit,
29
+ ImageRgba32,
30
+ ImageRgb24,
31
+ Easing,
32
+ FieldUtils,
33
+ Image,
34
+ ImageBW,
35
+ ImageColor,
36
+ ImageGrayScale,
37
+ MeshIo,
38
+ MeshMath,
39
+ PolyContour,
40
+ PolySlice,
41
+ PolySliceStack,
42
+ SdfVisualizer,
43
+ AddVectorFieldToViewer,
44
+ LogFile,
45
+ ImplicitMesh,
46
+ ImplicitTriangle,
47
+ TempFolder,
48
+ TgaIo,
49
+ TriangleVoxelization,
50
+ Utils,
51
+ Vector3Ext,
52
+ VectorFieldMerge,
53
+ SurfaceNormalFieldExtractor,
54
+ )
55
+ from ._types import BBox3
56
+ from ._errors import PicoGKDisposedError, PicoGKError, PicoGKInvalidHandleError, PicoGKLoadError
57
+
58
+ __all__ = [
59
+ "PicoGKError",
60
+ "Easing",
61
+ "PicoGKLoadError",
62
+ "PicoGKDisposedError",
63
+ "PicoGKInvalidHandleError",
64
+ "Library",
65
+ "KeyAction",
66
+ "KeyHandler",
67
+ "RotateToNextRoundAngleAction",
68
+ "AnimGroupMatrixRotate",
69
+ "AnimViewRotate",
70
+ "Mesh",
71
+ "MeshIo",
72
+ "BBox2",
73
+ "BBox3",
74
+ "EStlUnit",
75
+ "ESliceMode",
76
+ "MeshMath",
77
+ "Lattice",
78
+ "Voxels",
79
+ "ScalarField",
80
+ "VectorField",
81
+ "FieldUtils",
82
+ "ActiveVoxelCounterScalar",
83
+ "SurfaceNormalFieldExtractor",
84
+ "VectorFieldMerge",
85
+ "SdfVisualizer",
86
+ "AddVectorFieldToViewer",
87
+ "Image",
88
+ "ImageBW",
89
+ "ImageGrayScale",
90
+ "ImageColor",
91
+ "TgaIo",
92
+ "PolyContour",
93
+ "PolySlice",
94
+ "PolySliceStack",
95
+ "Cli",
96
+ "CliIo",
97
+ "CsvTable",
98
+ "Animation",
99
+ "AnimationQueue",
100
+ "ImplicitTriangle",
101
+ "ImplicitMesh",
102
+ "TriangleVoxelization",
103
+ "Utils",
104
+ "Vector3Ext",
105
+ "TempFolder",
106
+ "LogFile",
107
+ "FieldMetadata",
108
+ "OpenVdbFile",
109
+ "PolyLine",
110
+ "VedoViewer",
111
+ "go",
112
+ "ImageRgb24",
113
+ "ImageRgba32",
114
+ ]