# adaone-utils
A Python utility package for working with AdaOne toolpaths. This package provides a high-level interface to read, modify, and write toolpaths generated by [AdaOne](https://adaone.adaxis.eu/), the software platform by [Adaxis](https://adaxis.eu/).
## Description
`adaone-utils` provides a Python interface using Polars DataFrames to read and manipulate *.ada3dp files. It leverages Rust for performance and uses the `pyo3` and `polars` libraries to provide a fast and memory-efficient implementation.
Key features:
- Read *.ada3dp files into Polars DataFrames
- Write modified toolpaths back to *.ada3dp format
- Full access to all toolpath data including:
- Position, direction, and orientation
- Layer information
- Process parameters
- External axes positions
- Fan settings
- User events
## Installation
```sh
pip install adaone-utils
```
## Usage
### Reading a *.ada3dp file
```python
from adaone_utils import Toolpath
import plotly.express as px
# Load the toolpath file
toolpath = Toolpath.from_file("path/to/your/file.ada3dp")
# The DataFrame contains columns for all toolpath properties
print(toolpath.data.columns)
# Example: Plot the toolpath
fig = px.line_3d(
toolpath.data,
x="position.x",
y="position.y",
z="position.z",
color="segment_type",
line_group="segmentID"
)
fig.show()
```
### Writing a *.ada3dp file
```python
from adaone_utils import Toolpath, Parameters, PathPlanningStrategy
# Create parameters
params = Parameters(
layer_height=0.2,
path_planning_strategy=PathPlanningStrategy.PLANAR_HORIZONTAL,
posi_axis1_val=0.0,
posi_axis2_val=0.0,
posi_axis1_dynamic=False,
posi_axis2_dynamic=False,
deposition_width=0.4
)
# Create a new toolpath or modify an existing one
toolpath = Toolpath(data=modified_df, parameters=params)
# Write to file
toolpath.to_file("path/to/output.ada3dp")
```
## Data Format
This package reads and writes the ADA3DP format, which is based on Protocol Buffers. For details about the format, see the [AdaOne documentation](https://adaone.adaxis.eu/docs/functionality/experimental/read-edit-in-python#reading-a-tool-path-file).
The DataFrame structure provides easy access to all toolpath properties, which are organized in three scopes:
### Per Point Properties
Properties that can vary at each point along the toolpath:
- `position.{x,y,z}`: Tool position in mm
- `direction.{x,y,z}`: Tool direction vector (normalized)
- `orientation.{x,y,z,w}`: Tool orientation as quaternion
- `speed`: Feed rate in mm/s
- `deposition`: Material flow rate multiplier (0.0-1.0)
- `externalAxes`: List of external axis positions in degrees or mm
- `fans.{num,speed}`: Fan number and speed settings
- `userEvents.num`: User event IDs triggered at this point
### Per Segment Properties
Properties that apply to an entire segment (continuous toolpath):
- `segmentID`: Unique identifier for each segment (added by the package)
- `segment_type`: Type of path segment (wall, infill, etc.)
- `speedTCP`: Tool center point speed in mm/s
- `processOnDelay`: Delay before starting process in seconds
- `processOffDelay`: Delay after stopping process in seconds
- `startDelay`: Delay before starting movement in seconds
- `processHeadID`: ID of the equipment used
- `toolID`: ID of the tool used
- `materialID`: ID of the material used
### Per Layer Properties
Properties that apply to an entire layer:
- `layerIndex`: Layer number
When working with the DataFrame, all properties are unrolled into individual rows for easier manipulation. However, when writing back to a file, only the first row's value of segment and layer properties is used for each segment or layer.
## Development
For development, install the package in editable mode:
```sh
pip install -e ".[dev]"
```
To run tests:
```sh
pytest
```
## License
This project is licensed under the MIT License.
Raw data
{
"_id": null,
"home_page": null,
"name": "adaone-utils",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "adaone, adaxis, toolpath, slicing, 3d-printing, robotics",
"author": null,
"author_email": "CEAD Group <software@ceadgroup.com>",
"download_url": "https://files.pythonhosted.org/packages/bc/e7/ca479550d13599122269070513587edc1e3ba8bc2717b0f66fa780682f65/adaone_utils-0.0.1.tar.gz",
"platform": null,
"description": "# adaone-utils\n\nA Python utility package for working with AdaOne toolpaths. This package provides a high-level interface to read, modify, and write toolpaths generated by [AdaOne](https://adaone.adaxis.eu/), the software platform by [Adaxis](https://adaxis.eu/).\n\n## Description\n\n`adaone-utils` provides a Python interface using Polars DataFrames to read and manipulate *.ada3dp files. It leverages Rust for performance and uses the `pyo3` and `polars` libraries to provide a fast and memory-efficient implementation.\n\nKey features:\n- Read *.ada3dp files into Polars DataFrames\n- Write modified toolpaths back to *.ada3dp format\n- Full access to all toolpath data including:\n - Position, direction, and orientation\n - Layer information\n - Process parameters\n - External axes positions\n - Fan settings\n - User events\n\n## Installation\n\n```sh\npip install adaone-utils\n```\n\n## Usage\n\n### Reading a *.ada3dp file\n\n```python\nfrom adaone_utils import Toolpath\nimport plotly.express as px\n\n# Load the toolpath file\ntoolpath = Toolpath.from_file(\"path/to/your/file.ada3dp\")\n\n# The DataFrame contains columns for all toolpath properties\nprint(toolpath.data.columns)\n\n# Example: Plot the toolpath\nfig = px.line_3d(\n toolpath.data,\n x=\"position.x\",\n y=\"position.y\",\n z=\"position.z\",\n color=\"segment_type\",\n line_group=\"segmentID\"\n)\nfig.show()\n```\n\n### Writing a *.ada3dp file\n\n```python\nfrom adaone_utils import Toolpath, Parameters, PathPlanningStrategy\n\n# Create parameters\nparams = Parameters(\n layer_height=0.2,\n path_planning_strategy=PathPlanningStrategy.PLANAR_HORIZONTAL,\n posi_axis1_val=0.0,\n posi_axis2_val=0.0,\n posi_axis1_dynamic=False,\n posi_axis2_dynamic=False,\n deposition_width=0.4\n)\n\n# Create a new toolpath or modify an existing one\ntoolpath = Toolpath(data=modified_df, parameters=params)\n\n# Write to file\ntoolpath.to_file(\"path/to/output.ada3dp\")\n```\n\n## Data Format\n\nThis package reads and writes the ADA3DP format, which is based on Protocol Buffers. For details about the format, see the [AdaOne documentation](https://adaone.adaxis.eu/docs/functionality/experimental/read-edit-in-python#reading-a-tool-path-file).\n\nThe DataFrame structure provides easy access to all toolpath properties, which are organized in three scopes:\n\n### Per Point Properties\nProperties that can vary at each point along the toolpath:\n- `position.{x,y,z}`: Tool position in mm\n- `direction.{x,y,z}`: Tool direction vector (normalized)\n- `orientation.{x,y,z,w}`: Tool orientation as quaternion\n- `speed`: Feed rate in mm/s\n- `deposition`: Material flow rate multiplier (0.0-1.0)\n- `externalAxes`: List of external axis positions in degrees or mm\n- `fans.{num,speed}`: Fan number and speed settings\n- `userEvents.num`: User event IDs triggered at this point\n\n### Per Segment Properties\nProperties that apply to an entire segment (continuous toolpath):\n- `segmentID`: Unique identifier for each segment (added by the package)\n- `segment_type`: Type of path segment (wall, infill, etc.)\n- `speedTCP`: Tool center point speed in mm/s\n- `processOnDelay`: Delay before starting process in seconds\n- `processOffDelay`: Delay after stopping process in seconds\n- `startDelay`: Delay before starting movement in seconds\n- `processHeadID`: ID of the equipment used\n- `toolID`: ID of the tool used\n- `materialID`: ID of the material used\n\n### Per Layer Properties\nProperties that apply to an entire layer:\n- `layerIndex`: Layer number\n\nWhen working with the DataFrame, all properties are unrolled into individual rows for easier manipulation. However, when writing back to a file, only the first row's value of segment and layer properties is used for each segment or layer.\n\n## Development\n\nFor development, install the package in editable mode:\n\n```sh\npip install -e \".[dev]\"\n```\n\nTo run tests:\n\n```sh\npytest\n```\n\n## License\n\nThis project is licensed under the MIT License.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Utilities for working with AdaOne toolpaths",
"version": "0.0.1",
"project_urls": {
"Documentation": "https://github.com/CEAD-group/adaone-utils/blob/main/README.md",
"Homepage": "https://github.com/CEAD-group/adaone-utils",
"Repository": "https://github.com/CEAD-group/adaone-utils.git"
},
"split_keywords": [
"adaone",
" adaxis",
" toolpath",
" slicing",
" 3d-printing",
" robotics"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "0f433d3182a95a076f64594a1960287a67c2ac63a80ec6627d8eb0e3d5d75eb6",
"md5": "d76866d9f9de1486998a873175183d4c",
"sha256": "105c88827ffbfcbcc95e4634d75a5effecd054f34d6ad64bd1ae142dd5d78878"
},
"downloads": -1,
"filename": "adaone_utils-0.0.1-cp312-cp312-macosx_10_12_x86_64.whl",
"has_sig": false,
"md5_digest": "d76866d9f9de1486998a873175183d4c",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.12",
"size": 4104056,
"upload_time": "2025-02-20T14:37:59",
"upload_time_iso_8601": "2025-02-20T14:37:59.381069Z",
"url": "https://files.pythonhosted.org/packages/0f/43/3d3182a95a076f64594a1960287a67c2ac63a80ec6627d8eb0e3d5d75eb6/adaone_utils-0.0.1-cp312-cp312-macosx_10_12_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "804af7a5a6293ade8ae155b309b1d88efca001bfbf07d95bbd50f4d51fed057e",
"md5": "08eecb5e5ce1034b6337574d88670183",
"sha256": "ee092fbb4a970eaf4248595426166fefc574613a0da2848272b5984f71949d41"
},
"downloads": -1,
"filename": "adaone_utils-0.0.1-cp312-cp312-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "08eecb5e5ce1034b6337574d88670183",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.12",
"size": 3831893,
"upload_time": "2025-02-20T14:37:55",
"upload_time_iso_8601": "2025-02-20T14:37:55.476579Z",
"url": "https://files.pythonhosted.org/packages/80/4a/f7a5a6293ade8ae155b309b1d88efca001bfbf07d95bbd50f4d51fed057e/adaone_utils-0.0.1-cp312-cp312-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "5e4710fb6abeca59aa9f4588213f00d33b5dec9ff719afd46601a27cc3d8f3f5",
"md5": "f9dbae421216891e54ffdc74262552d4",
"sha256": "7215589a7715f7fb51affaba7163bc34288218ef16da64912e91524ec31ed1cd"
},
"downloads": -1,
"filename": "adaone_utils-0.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "f9dbae421216891e54ffdc74262552d4",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.12",
"size": 4506857,
"upload_time": "2025-02-20T14:37:49",
"upload_time_iso_8601": "2025-02-20T14:37:49.456136Z",
"url": "https://files.pythonhosted.org/packages/5e/47/10fb6abeca59aa9f4588213f00d33b5dec9ff719afd46601a27cc3d8f3f5/adaone_utils-0.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "0dd7a461fa0206bf574864309a30abbe676e05ae7961b5994fdc93d1076b3854",
"md5": "b58f7a3fe0a1a49391be12e735f06b6e",
"sha256": "6b66eb134a65fbc6fba7170bb31879ff5d77f0375bca6dc96037ec31bb96c833"
},
"downloads": -1,
"filename": "adaone_utils-0.0.1-cp312-cp312-win_amd64.whl",
"has_sig": false,
"md5_digest": "b58f7a3fe0a1a49391be12e735f06b6e",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.12",
"size": 3901070,
"upload_time": "2025-02-20T14:38:05",
"upload_time_iso_8601": "2025-02-20T14:38:05.455061Z",
"url": "https://files.pythonhosted.org/packages/0d/d7/a461fa0206bf574864309a30abbe676e05ae7961b5994fdc93d1076b3854/adaone_utils-0.0.1-cp312-cp312-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "da3af0442e9b9f55ed22a11630722943837dfa915e4465ef470049c0bebaa5b2",
"md5": "10a45a1268e180bc223451f8ce98ac0c",
"sha256": "c23db9fc857c4ce92af0025a9dda09416c7d2f9decced8cd2e99e60f654c6100"
},
"downloads": -1,
"filename": "adaone_utils-0.0.1-cp313-cp313-macosx_10_12_x86_64.whl",
"has_sig": false,
"md5_digest": "10a45a1268e180bc223451f8ce98ac0c",
"packagetype": "bdist_wheel",
"python_version": "cp313",
"requires_python": ">=3.12",
"size": 4102789,
"upload_time": "2025-02-20T14:38:01",
"upload_time_iso_8601": "2025-02-20T14:38:01.271315Z",
"url": "https://files.pythonhosted.org/packages/da/3a/f0442e9b9f55ed22a11630722943837dfa915e4465ef470049c0bebaa5b2/adaone_utils-0.0.1-cp313-cp313-macosx_10_12_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "3a3a847ca828076dede6681d613eb6bcd2feb7c9ec564cd84c20b208ef79f1d1",
"md5": "07b97208855849220915023e0ec6b67f",
"sha256": "7e700a73fd9ea47b80e0af60eb7ddaf292a35ad42993934d5540164dff207867"
},
"downloads": -1,
"filename": "adaone_utils-0.0.1-cp313-cp313-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "07b97208855849220915023e0ec6b67f",
"packagetype": "bdist_wheel",
"python_version": "cp313",
"requires_python": ">=3.12",
"size": 3830793,
"upload_time": "2025-02-20T14:37:57",
"upload_time_iso_8601": "2025-02-20T14:37:57.568939Z",
"url": "https://files.pythonhosted.org/packages/3a/3a/847ca828076dede6681d613eb6bcd2feb7c9ec564cd84c20b208ef79f1d1/adaone_utils-0.0.1-cp313-cp313-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "c02ab88b7816a49ef5f4e67c7f24ee62f3eb80cfb635caca4d92ad43a59198b1",
"md5": "8ebd77f59f12b9a3050718df8a1295ad",
"sha256": "5246113a73ec2987ca5f0db510d4d2dbe87a14623f3f8acfdaa5bf2bd8aec393"
},
"downloads": -1,
"filename": "adaone_utils-0.0.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "8ebd77f59f12b9a3050718df8a1295ad",
"packagetype": "bdist_wheel",
"python_version": "cp313",
"requires_python": ">=3.12",
"size": 4506305,
"upload_time": "2025-02-20T14:37:53",
"upload_time_iso_8601": "2025-02-20T14:37:53.008125Z",
"url": "https://files.pythonhosted.org/packages/c0/2a/b88b7816a49ef5f4e67c7f24ee62f3eb80cfb635caca4d92ad43a59198b1/adaone_utils-0.0.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "1dd16937388f21ae789cce7bcece9fbd91cb4a587a9f2db754467d37a80f0760",
"md5": "3043eb7c0b4a534840820b057b8468c3",
"sha256": "c99a37be9fa2f6b72886672337fc24953fa12f2e62c336d8ccdb35c0e5075f77"
},
"downloads": -1,
"filename": "adaone_utils-0.0.1-cp313-cp313-win_amd64.whl",
"has_sig": false,
"md5_digest": "3043eb7c0b4a534840820b057b8468c3",
"packagetype": "bdist_wheel",
"python_version": "cp313",
"requires_python": ">=3.12",
"size": 3901159,
"upload_time": "2025-02-20T14:38:08",
"upload_time_iso_8601": "2025-02-20T14:38:08.635920Z",
"url": "https://files.pythonhosted.org/packages/1d/d1/6937388f21ae789cce7bcece9fbd91cb4a587a9f2db754467d37a80f0760/adaone_utils-0.0.1-cp313-cp313-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "bce7ca479550d13599122269070513587edc1e3ba8bc2717b0f66fa780682f65",
"md5": "37c8769818aec36b84d0abf6049a53ee",
"sha256": "7b6f0bfd6a28aeae6506b74c1557da4e2ecc7eb6d3ad263a912953f65dcb09e9"
},
"downloads": -1,
"filename": "adaone_utils-0.0.1.tar.gz",
"has_sig": false,
"md5_digest": "37c8769818aec36b84d0abf6049a53ee",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 122417,
"upload_time": "2025-02-20T14:38:03",
"upload_time_iso_8601": "2025-02-20T14:38:03.416274Z",
"url": "https://files.pythonhosted.org/packages/bc/e7/ca479550d13599122269070513587edc1e3ba8bc2717b0f66fa780682f65/adaone_utils-0.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-20 14:38:03",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "CEAD-group",
"github_project": "adaone-utils",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "adaone-utils"
}