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.0.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.0-cp313-cp313-win_amd64.whl (3.9 MB view details)

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

adaone_utils-0.0.0-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.0.tar.gz.

File metadata

  • Download URL: adaone_utils-0.0.0.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.0.tar.gz
Algorithm Hash digest
SHA256 fb2bc4285ea98b27bebeda72cafe68c3e5a8fe3a315ab546a7e0899ce89c564e
MD5 0a3c1ce0f9783ec73d8380f55de43177
BLAKE2b-256 df4be901a2b8bd45e3404eff08e23c65fda770083aa03ba589cade79fd662e91

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 b4da6fd0cd0cccfcffa70c5188009410659001e8b1ebcb0d8d8828e0aa735425
MD5 21269fcc4de505354bc884effcfe15a0
BLAKE2b-256 a9de752aca579d697df5217f4401093b9a34600335115bdc0bc10df3d2bd211c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 742593763f9e275945d019944430fc02526f0ccf72329e5ef91088fc40cec5b1
MD5 19f6dbcd6440b02012b38ccd5c328d2f
BLAKE2b-256 3cbd0e66fd1f9f21d6c8dee879211f0168024cdd34d746454b61753b7f1cd675

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d05b5ad294a41dcc2fbe33806c34ac9c2fd5f01dd0c3091ae5af15564f0842b2
MD5 6fc4873b5d0d1140653bc18c57e07e50
BLAKE2b-256 2eacaf3aade009c7cae95cc31a3d6ca18b98101aad07a1e0e3a0e6dbc1619d5d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.0-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0ea4b9836768fcc88b82b0b21fea7cabf4adc16e2e8214ddd7337d50b9e4abfe
MD5 bd25b1f585188213ba92ac1379c79637
BLAKE2b-256 fdb3323710a52502052c8219b6d83dd8233b88446cfa01405a0aede248b85c7a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a816e6e310e06dae162a2b39ac1c2c8fee79649dee3ad7d08bdc172cd57abbcf
MD5 19a198e0debb81724a7b5bc3399917a2
BLAKE2b-256 3e891b76dba0e22d13980b0defcc775622fd22380ee7a06c070483f1c6929866

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2cf7454cabeeb93f32fb3a413b7dd8d6ff9ee71f3019e1e2ab3211165e4391e9
MD5 6b8d79987ff6e92fba45bfd342a486f5
BLAKE2b-256 a384b31ee092cbb8bde643ea856a115fd2b012f1cb22c31237ed0d1557a5298a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7c77d1281c85079e53d78945bb21e7f73389b650047ffa990f2c1f8d1c42d73b
MD5 f94413d414885c22d35983456d6ebe84
BLAKE2b-256 4cb3af0d9229cd0c537ba6e8937a3471fb93a670e5098bcd311e634db4cf9da7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ee555daf72c645809a87c6458b3a9db3a5f796f5a1c07c379131936b66b778ac
MD5 75b7b121642f65113cd22211b91cf324
BLAKE2b-256 eceadb3d76f01a487ad4f5283ccb3eb3df5222a0c943c8e12d4093836179430d

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