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.6.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.6-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.2 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.13Windows x86-64

adaone_utils-0.0.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

adaone_utils-0.0.6-cp313-cp313-macosx_10_12_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

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

Uploaded CPython 3.12Windows x86-64

adaone_utils-0.0.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

adaone_utils-0.0.6-cp312-cp312-macosx_10_12_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for adaone_utils-0.0.6.tar.gz
Algorithm Hash digest
SHA256 59aafff37aaefbbe9c67575957f15752944437995a0ba96a97e5b07456a4fd14
MD5 e2b9cfaba2945f60b32db7e51acce392
BLAKE2b-256 12e9ab57e15136b081d4c4a86225cb936eb63e0d37bf22eb2dae8b45013a5f4a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.6-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5d9d601691264805875568e05216aa46a21ca28f602b51d98f941fe9d4a7cd7d
MD5 da4437933f2555e87717ce1b44114975
BLAKE2b-256 d6757fbcf90fc7905287226d0be7391e13c94a04e3b0b719a6030d9d2d714855

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.6-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 b657871f356c9e7892d37f0c215bc9e208dfe88a4ffec972b936687aa040dfcb
MD5 4c08828ba0a742a4d0a73aa2f7d9f4e7
BLAKE2b-256 9187b3872acefbaf0b71748dff0f3d426264e1fec7140f844d20e6ae0b63e612

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.6-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 543b69ec9b93f6442250f8d9c8f6edd0fe0f0aa5dd15604b5ff4f4b46eaafd9f
MD5 9ff467746cfd04827ccd0ca8d1d6ced9
BLAKE2b-256 3807bd7517601fec09da97d710bcb6a51d7b87566560ad0893c779591d5d4319

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.6-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3ba0d7c7b4af0066c97dcac41596601c99baf48b37c2b257195ad76f61a64a4d
MD5 3901f94e8bc7a7c4a07c0590030ece14
BLAKE2b-256 6dd53a88c9913d916a13588edfd5b3d066bb91d66be83786d078d9f8793119f6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.6-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 d003b9615b4b6e64f8fc16f5553db27f5a1ad64ed0e3ecd25c2ecd46e16cd7bd
MD5 5680f4057cbb780f0870b791ee203b06
BLAKE2b-256 f5cf0592a727d741fb06a6fb1fab0953e567a735a16ac07b9127f6b46c9c03ad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 856099cb53474f6b3592c5a9142695e72fb2a410b1aa5cc6084da8032f0fa2e3
MD5 7cfcfe9fe0ab6d351164bb0bf48ee82d
BLAKE2b-256 ef42b7185bd38e83169f6d3102a9b0f393ee0acc1c0982ab5c543bdb1b702235

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e754b3edafe7e9ab2068af1b48a4ed2a33b670a36cbbcb502bac01f216c4ec3f
MD5 a78d2dda67ab3ba4f1ec942f944d874d
BLAKE2b-256 ab2bb60cdef066dc1c24355af5300fd17560aae379d91dade54246b2968268a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.6-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 724c406b90bc28273650aa87afd1c8be4363c29a912d5a5f4b904ba167a808dc
MD5 2f322f1c97187f480fdfa55e5fef9717
BLAKE2b-256 9805e24c0aa5f53047ba7ed2b3b315351c15d213a0587d74c887f5ff0f5ce07d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adaone_utils-0.0.6-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ceb501015451f195b4c22fb08a53baf60e2cf6d2487ccf31f8ed5bbf52716c20
MD5 343647015ecba12ad58ad7da8c8c604e
BLAKE2b-256 de3bff82e5c6d764aa18dc45b87096d33a7e4e017b2d5ea3f79a5839b0ff03f0

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