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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

adaone_utils-0.0.3-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.3.tar.gz.

File metadata

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

File hashes

Hashes for adaone_utils-0.0.3.tar.gz
Algorithm Hash digest
SHA256 2e1512e4ec9aa16b093e57e1c03794e451ca154b51d9a05243db7ad289be4178
MD5 cffb008710c777b9cfbb3b5727bc91b3
BLAKE2b-256 bebf0ecef06b9ff4ecac4343d3a20850a008d05b20b8d38502fed3197c11ac98

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 8ce0fe8aa3324aa9f61512b7ea448045d3ec06a6803d812ac797a99224d5382e
MD5 6fc0a36ce4f5dadb13b9aea0c5107d01
BLAKE2b-256 bcf203356205a351f4e22965bb23496754de264f127eb065dbd7fc8abf1123e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5123f56cff3a25402ab53454d8c39e8928f16e715f43ffe238741602f99fb7db
MD5 7d10ee461d2b4f3d2cf835a26a207994
BLAKE2b-256 eebc8d9e04630aec6d3acf00beaf2c87d74aafaff21a4c30583c054d1ca18edb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.3-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 032fbd61a39447b13e5c7dfd27a78fbd348bd0eeb93564145377bb747b5949b6
MD5 9081653e998869ee11c03d24ee7e1193
BLAKE2b-256 534dbe394c42de56d57b9c96178d31e9ac8063c1b434123bf252fd636a0f4e2e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.3-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b84a8b85461434184a71059b998bc08903e91434c17c3ab60325575b299595cb
MD5 eb41f8a43c0a8d9458bb5fcb6ab2488d
BLAKE2b-256 c66bc3c2fc97e141fe088631e1329d90c18e39019ef7ae772814ffa2fbb02b02

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 32d65589167582126b4169be10d972c8b0501ac7ba29d9d9869edca79669c662
MD5 9a71bc4f8e49f1bc9b6e62ebdf7f41f9
BLAKE2b-256 5128be6c39ceab3e8bda4da2963f3c29db870240ca70dcb70573dd4870de2e4d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0bbfeed2033723db039a5b6e0fedbb1da78b67971458240c477c4ec553982050
MD5 6c18b4b7862192a010dd7853ff76ef1f
BLAKE2b-256 687da858a28c7acbe9cce7d134220cab0dd85682c5fba884071bb43ff140bf29

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e36ce86a19ec234eae9e8333610bb462432ab706c4a7c6b1969b5a168fe311f2
MD5 8e54b5f3cceb1a086779b7eb172b97f3
BLAKE2b-256 8f8d7e262ea9a27f75a34f3f6312d916e33396a94bc250076905f42ff7e4bbbd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.3-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 760b1b86b9e9e3f623d3298d6ea6e34ab3db9957c293cdf0926ab4c531dee1ae
MD5 f68ebcd989f71589300e79988ba7a530
BLAKE2b-256 1bf5788fbbf4366418cb7b4d53bcaeed1faab1131f0a0f32a0b96b3199307575

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