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.5.tar.gz (146.9 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.5-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.1 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

adaone_utils-0.0.5-cp313-cp313-win_amd64.whl (4.5 MB view details)

Uploaded CPython 3.13Windows x86-64

adaone_utils-0.0.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

adaone_utils-0.0.5-cp313-cp313-macosx_11_0_arm64.whl (4.4 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

adaone_utils-0.0.5-cp313-cp313-macosx_10_12_x86_64.whl (4.7 MB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

adaone_utils-0.0.5-cp312-cp312-win_amd64.whl (4.5 MB view details)

Uploaded CPython 3.12Windows x86-64

adaone_utils-0.0.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

adaone_utils-0.0.5-cp312-cp312-macosx_11_0_arm64.whl (4.4 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

adaone_utils-0.0.5-cp312-cp312-macosx_10_12_x86_64.whl (4.7 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for adaone_utils-0.0.5.tar.gz
Algorithm Hash digest
SHA256 8263a354b430469eb7366ae9f288318db4c433d2d276dca532b5f1ed09e3e0dd
MD5 ef67b3639ebb63d7c0d8d7f968c2ccec
BLAKE2b-256 6e19ba79cf8c2ec1d42aac2c84bd8e9f3d9152d26be5e91e989ae880fe52c8c0

See more details on using hashes here.

File details

Details for the file adaone_utils-0.0.5-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for adaone_utils-0.0.5-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 833c5fd3a8c216d043ea0eaea44a4c6c3546ecf204684a0b2559edac85036211
MD5 044e81aaa64baf44899de0f00136bbed
BLAKE2b-256 60005a52218f067521eea1a36935feb43b09ea5551805d6819fc05d1d09c924a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.5-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d7c4d690522259bf2d0d7c8db44f41c039322b1b1700bc470f9dfeb13f678a16
MD5 436092f0377f01d14b62e2761f2a756a
BLAKE2b-256 82e0b6f363b41e728a98267e269abeda3914e3fe45565dc71bb4a37ba3b74c2a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 03be91b9d29d65eec3a7b0daa7a0b9ed97348e9f352f58fed0511707d16173fc
MD5 c60f14278fedb04819ad45eea9d91c48
BLAKE2b-256 d6778b202e378fa41e0b23d44fcac518ca3151cd8551aea3afe0a46dfa05803b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.5-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e1acdab02f704977496e26b545e0a55e9ddba4e1ded6b37650021160137b5e55
MD5 555d67472fc672b9f3c533da4ed5ff18
BLAKE2b-256 9e99ed10e9034b83595330aefe81d4951ba6bac0bbf165aa53c1a8161467d6f4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.5-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 75514cbcf83b1202f55a4bc588df6ab73035606f2d019cd39eab0d9897ea5000
MD5 2e71881f22793d1092d8311886317e41
BLAKE2b-256 c8e10114df9ee3044c010541912e5c1d33b951a5dcd0ca684b988caa6cbec6cd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 50cb11c1c13509c4a65d44d9b636bd7f6382603447ed1246056eed400f75a651
MD5 f84e396e07178b21195226a045799272
BLAKE2b-256 8f701e2215fad12fe616266e4bd6570210c7c7f91e6536804d1a89032402a0cc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0ec3b30515a81789bfa08a79e745d11841f83731b7b9f203025a9e694e8ca50c
MD5 f1a747a83548a57c36903ca4538e0b5b
BLAKE2b-256 ca6745617172c019a8fcddff0db33d85d0b4f9738ebe63c98ce01ef7bdfc98a7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fec5b0737e6cc662d71bc82cba6f2c40f1866ef14cfaf1ce95250934c652a2dc
MD5 8ff948c9b196f862495c8ad2c502c279
BLAKE2b-256 f5ecee37adcddd0d061370e7c55f49d7b8ba851e79603f0b8512a7671d41baff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.5-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 c49fef89ab2731d969984907ff272bf3fb0c435e1f16165db2a661685978d782
MD5 25ec88a14779a2af762ec01cef4bc8f6
BLAKE2b-256 862dcd17286666c02416c717581ad8c9447461a0640b434e534497f3ea9b723f

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