Skip to main content

Utilities for working with AdaOne toolpaths

Project description

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, the software platform by Adaxis.

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

pip install adaone-utils

Usage

Reading a *.ada3dp file

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

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.

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:

pip install -e ".[dev]"

To run tests:

pytest

License

This project is licensed under the MIT License.

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

adaone_utils-0.0.4.tar.gz (123.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

adaone_utils-0.0.4-cp313-cp313-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.13Windows x86-64

adaone_utils-0.0.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

adaone_utils-0.0.4-cp313-cp313-macosx_11_0_arm64.whl (3.8 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

adaone_utils-0.0.4-cp313-cp313-macosx_10_12_x86_64.whl (4.1 MB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

adaone_utils-0.0.4-cp312-cp312-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.12Windows x86-64

adaone_utils-0.0.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

adaone_utils-0.0.4-cp312-cp312-macosx_11_0_arm64.whl (3.8 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

adaone_utils-0.0.4-cp312-cp312-macosx_10_12_x86_64.whl (4.1 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

File details

Details for the file adaone_utils-0.0.4.tar.gz.

File metadata

  • Download URL: adaone_utils-0.0.4.tar.gz
  • Upload date:
  • Size: 123.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.8.3

File hashes

Hashes for adaone_utils-0.0.4.tar.gz
Algorithm Hash digest
SHA256 d462d43563ca8c031c6568ff505befcfb518a02e3df77928a2bcec9548d797e5
MD5 86bbd7531fc26d24c57e9097c1e55c9d
BLAKE2b-256 4a0aa639f1bc8148b6ea62cd628d6b6d049ad22dde9a293cb9fa50dbe70a5e3e

See more details on using hashes here.

File details

Details for the file adaone_utils-0.0.4-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for adaone_utils-0.0.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 905cb4a23b5766ab15c89b7bdfb1883aa256012b9f02edee396f319c8612babb
MD5 74f96e80f3e1273bf778bc1b099a4190
BLAKE2b-256 3f78607fd8d6b95b09b5aaf9115a809654772aa64b4b6cff6f6bf7209bf29f64

See more details on using hashes here.

File details

Details for the file adaone_utils-0.0.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for adaone_utils-0.0.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b3a0ffe53c36a8fa75139ca432646b961e9dd1d1f2b0a77d370e4065e1adba59
MD5 9ca195b207bd9b46c2ce918e73b9f569
BLAKE2b-256 32fa9430db444d5d720941e0e4479b6771831a7302519222eced86ee602d2338

See more details on using hashes here.

File details

Details for the file adaone_utils-0.0.4-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for adaone_utils-0.0.4-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fbf54a5480af0d245965a9c44df7320577f8057aa75905f16a33089f0e744899
MD5 3ca52c9a0206b1c5ebf71ee68bf70bb6
BLAKE2b-256 d0092ccb547a8a844e088797a1312982b59a9f266a64ada8b1b4a74059a9c2c6

See more details on using hashes here.

File details

Details for the file adaone_utils-0.0.4-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for adaone_utils-0.0.4-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 6591cc5f20889f1423057da4e0850c72ff7c4bbb16d1a96313dda57648114a71
MD5 856376f061012050d048b73a98c27e86
BLAKE2b-256 77624c97c4fe494503a3d6382c1c6b5814832b8134549e13a6274f7e483c9aff

See more details on using hashes here.

File details

Details for the file adaone_utils-0.0.4-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for adaone_utils-0.0.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3dd5b53b876dd6ddebb33c07feaa3a7947586c7fd9997e3c903fd87eba37e637
MD5 8bf83e2e5d0e7f5d422da42574f7dfc2
BLAKE2b-256 6eef9a23f8ddf372b755a5d6ba3e05eacaecd9039f2c8478d91b51b112290809

See more details on using hashes here.

File details

Details for the file adaone_utils-0.0.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for adaone_utils-0.0.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 341c414e090b19a7538eac489b37216f469bb960d0d9565755aae839134a85d2
MD5 5727d54687add5753aa90dd37a04ffda
BLAKE2b-256 d8989da7ec13f2c993aa0f21e4ac9936c74b623c3fba3be0aacbe296ad0f5b85

See more details on using hashes here.

File details

Details for the file adaone_utils-0.0.4-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for adaone_utils-0.0.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c5c9454edfa69a43248b1f42129ac566e9ae280c5eb247fe254355c5a4b2191f
MD5 3dd457590a16674319c45263b72d03be
BLAKE2b-256 9ac0b140e91c475ab54af1dcbbb6c07abbec619b7ecd5a821400a1f04426aa33

See more details on using hashes here.

File details

Details for the file adaone_utils-0.0.4-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for adaone_utils-0.0.4-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 3a42298191bdab711d3771e6a9db07068b2563a4f4e8e9fd056e462686f79446
MD5 e822abfadc6b4ba2a2fd3030f09ab9ee
BLAKE2b-256 bf4b79ea87ebb87b66b1535193ad0e55b928125f401a0474c27873a8584a4cae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page