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.2.tar.gz (122.4 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.2-cp313-cp313-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.13Windows x86-64

adaone_utils-0.0.2-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.2-cp313-cp313-macosx_11_0_arm64.whl (3.8 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

adaone_utils-0.0.2-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.2-cp312-cp312-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.12Windows x86-64

adaone_utils-0.0.2-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.2-cp312-cp312-macosx_11_0_arm64.whl (3.8 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

adaone_utils-0.0.2-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.2.tar.gz.

File metadata

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

File hashes

Hashes for adaone_utils-0.0.2.tar.gz
Algorithm Hash digest
SHA256 94ac556af3052c03d2e844b9e9dd2eae25884663c8c15999b7226f282e2ecb11
MD5 19825780d4b5523d190b7e1f26a6ce01
BLAKE2b-256 145380030d6efec20cae5b3a83ff77a90d0788905039faea9e8c8b7d4e222d9b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 032d68b28ac42631a64f6cbaab6d55c69a31e8f56cd9ead363a92c84762f8a9d
MD5 f54067d8c5559d704ad20cc5137288ab
BLAKE2b-256 e10290fe106b3b84099d860003ea1fc10761b76b4494bf2b63e7daf9995a9510

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 91c574283929a6f5a7f842bd1836b1c575bf01253064c126126070cde8534497
MD5 0d5daa428c45b78fce72a7db4c1dcf7e
BLAKE2b-256 5498743aa14cc9c6f9bd987875cad399021408a78e13c3765d9488e47f482a31

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5da58e14c2356accbf59eb085e5f372a055a78723b6c643a9fea87169673d539
MD5 98ad6ed1abfeaed5af0603301f0164df
BLAKE2b-256 fdbb5dd59fde037ca4cb043944022b314509ebb6b4ea3639c34dd37d65fbf82e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.2-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 52e377800ec50809e1179503a199fe368a4dfd782967fb25c05ee2617339af17
MD5 f56b6c81587a20656a9b22d0877e6f02
BLAKE2b-256 467bf81b4d935e1fc8521a77edfa16556148e6d2981a13475c3b6f17ffb140dc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2e27e1d75ad17db7cafdf073e597798f6baa8fe11d444a7f9a74420fb1536ad8
MD5 c1b803304d89d06f70bf15285714862f
BLAKE2b-256 9b345153e9f5a70ba9f1ba5b6e35cc1128fafbc596483b2a31834787ac50f81e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e1360eed5dfbf4453fd906c8f9adbb9a6cdf9264f252521cd7f84b726a82934b
MD5 5e374a09bf79a32ae901aacd4b9b7ce8
BLAKE2b-256 4949d1c076c6c3b821d9742cdb3df757fd906983ce108fe8a8ffdf76338448f8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1b54584390ceaef1746488d5abb1dbe38f584d66ceba03fa42119e0cb0de6fde
MD5 f35cfed0ab2e8794042cfa422a791295
BLAKE2b-256 f654d39e766f4b15e2a7d44639864d85f6f9ecf5f57edbe730ff00a46c6db2b4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.2-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a0406dd34493016c35df2e633b33f3b8888c8ee759db8a34dcb49fb648c139a5
MD5 ae7ac9e9523c6257dc50b614160af16c
BLAKE2b-256 67f96a5baf9571d827104c0765bcb3b8bf44aba6e7cfd2858eac6b4d9443eee9

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