feat: the geometry engine is C++ on OpenCASCADE, one package, prebuilt wheels
The modeling API (shapes, operators, sketches, products, queries, the reactive graph) is implemented in C++20 on OpenCASCADE (src/cpp) and ships inside the wheel as simplecadapi._cpp. The Python layers that stay Python (runtime, build, artifacts, editor, inspect, exporter, translators, scene) run on it unchanged; the previous Python test suite passes on the new engine. Layout: src/cpp and src/simplecadapi side by side, one distribution built by scikit-build-core. simplecadapi.core, .operators.*, .ql, .std.* and the other legacy modules are real forwarding modules; the Python adapter layer is simplecadapi/_glue. OCP is no longer a dependency and nothing imports it. Release: .github/workflows/release.yml builds wheels for Linux x86_64 and aarch64, macOS arm64 and Windows x86_64 (Python 3.10-3.13) against one static OCCT, runs the test suite on the Linux wheels and publishes to GitHub and PyPI; ci.yml caches the static OCCT for the test jobs. Errors: every message the library writes is English; the tag-validation and semantic-query errors render in full with possible causes and fixes. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -19,8 +19,30 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
occt:
|
||||
# The C++ module links a static OpenCASCADE built from source (the same build the release wheels use). It is built
|
||||
# once per version of the build script and cached; the jobs below restore it.
|
||||
name: Static OpenCASCADE
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 120
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
|
||||
|
||||
- name: Restore the static OpenCASCADE build
|
||||
id: cache
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: ~/occt
|
||||
key: occt-ci-linux-${{ hashFiles('src/cpp/tools/build_occt.py') }}
|
||||
|
||||
- name: Build OpenCASCADE
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: python3 src/cpp/tools/build_occt.py --prefix "$HOME/occt"
|
||||
|
||||
test:
|
||||
name: Python ${{ matrix.python-version }}
|
||||
needs: occt
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
@@ -43,8 +65,15 @@ jobs:
|
||||
enable-cache: true
|
||||
cache-python: true
|
||||
|
||||
- name: Install locked dependencies
|
||||
run: uv sync --locked --group dev
|
||||
- name: Restore the static OpenCASCADE build
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: ~/occt
|
||||
key: occt-ci-linux-${{ hashFiles('src/cpp/tools/build_occt.py') }}
|
||||
fail-on-cache-miss: true
|
||||
|
||||
- name: Install locked dependencies and build the C++ module
|
||||
run: CMAKE_ARGS="-DSCAD_OCCT_PREFIX=$HOME/occt" uv sync --locked --group dev
|
||||
- name: Verify headless rendering support
|
||||
run: command -v xvfb-run
|
||||
|
||||
@@ -56,6 +85,7 @@ jobs:
|
||||
run: xvfb-run --auto-servernum uv run pytest test tests -q
|
||||
|
||||
editor-e2e:
|
||||
needs: occt
|
||||
# The editor tests that boot a real marimo kernel (about a minute); the main
|
||||
# job runs the rest of test/test_editor.py without it.
|
||||
name: Editor end to end
|
||||
@@ -75,8 +105,15 @@ jobs:
|
||||
enable-cache: true
|
||||
cache-python: true
|
||||
|
||||
- name: Install locked dependencies
|
||||
run: uv sync --locked --group dev
|
||||
- name: Restore the static OpenCASCADE build
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: ~/occt
|
||||
key: occt-ci-linux-${{ hashFiles('src/cpp/tools/build_occt.py') }}
|
||||
fail-on-cache-miss: true
|
||||
|
||||
- name: Install locked dependencies and build the C++ module
|
||||
run: CMAKE_ARGS="-DSCAD_OCCT_PREFIX=$HOME/occt" uv sync --locked --group dev
|
||||
|
||||
- name: Run the editor tests, kernel included
|
||||
run: uv run pytest test/test_editor.py -q
|
||||
|
||||
+339
-43
@@ -1,5 +1,17 @@
|
||||
name: Release
|
||||
|
||||
# A release is one distribution, `simplecadapi`, built as four platform wheels per Python version (3.10-3.13):
|
||||
#
|
||||
# linux-x86_64 manylinux_2_28
|
||||
# linux-aarch64 manylinux_2_28
|
||||
# macos-arm64 macOS 14+ (Apple silicon)
|
||||
# windows-x86_64
|
||||
#
|
||||
# Each wheel carries the compiled C++ module (`simplecadapi._cpp`) linked against the same static OpenCASCADE, built from
|
||||
# source by src/cpp/tools/build_occt.py, so no OCCT is needed on the user's machine and the kernel behaves identically
|
||||
# everywhere. Building OCCT takes the better part of an hour per platform; the install prefix is cached by the hash of the
|
||||
# build script, so only a change to OCCT's version or options pays for it again.
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
@@ -7,9 +19,14 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: Existing v-prefixed tag to release
|
||||
description: Existing v-prefixed tag to release (a branch or tag name when dry_run is set)
|
||||
required: true
|
||||
type: string
|
||||
dry_run:
|
||||
description: Build and verify everything, but publish nothing (no GitHub release, no PyPI upload)
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -18,38 +35,38 @@ concurrency:
|
||||
group: release-${{ github.ref_name }}
|
||||
cancel-in-progress: false
|
||||
|
||||
env:
|
||||
RELEASE_TAG: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref_name }}
|
||||
DRY_RUN: ${{ github.event_name == 'workflow_dispatch' && inputs.dry_run }}
|
||||
|
||||
jobs:
|
||||
release:
|
||||
validate:
|
||||
# Releases are built and published from the private repository only.
|
||||
# The public mirror carries the same workflow file, where a tag push
|
||||
# could never succeed (no release credentials); skip it there.
|
||||
if: github.repository == 'So3Lab/CADIR'
|
||||
name: Test, build, and release
|
||||
name: Validate the tag
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 45
|
||||
permissions:
|
||||
contents: write
|
||||
env:
|
||||
RELEASE_TAG: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref_name }}
|
||||
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- name: Check out tagged revision
|
||||
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
|
||||
with:
|
||||
ref: ${{ env.RELEASE_TAG }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install uv and Python
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
python-version: "3.12"
|
||||
enable-cache: true
|
||||
cache-python: true
|
||||
|
||||
- name: Validate tag and project version
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [[ "$DRY_RUN" == "true" ]]; then
|
||||
echo "dry run of $RELEASE_TAG: no tag or version check, nothing will be published"
|
||||
exit 0
|
||||
fi
|
||||
if [[ ! "$RELEASE_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+([ab]|rc)?[0-9]*$ ]]; then
|
||||
echo "Invalid release tag: $RELEASE_TAG" >&2
|
||||
exit 1
|
||||
@@ -65,63 +82,307 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Install locked dependencies
|
||||
run: uv sync --locked --group dev
|
||||
- name: Install headless rendering support
|
||||
run: sudo apt-get update && sudo apt-get install --yes xvfb
|
||||
webui:
|
||||
# `sca edit` serves a web UI that is built from editor-web/ and git-ignored: without this step the wheels would ship an
|
||||
# editor with no front end. Built once, shared with every wheel and the sdist.
|
||||
name: Build the editor web UI
|
||||
needs: validate
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- name: Check out tagged revision
|
||||
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
|
||||
with:
|
||||
ref: ${{ env.RELEASE_TAG }}
|
||||
|
||||
|
||||
- name: Compile package
|
||||
run: uv run python -m compileall -q src/simplecadapi
|
||||
|
||||
- name: Run tests
|
||||
run: xvfb-run --auto-servernum uv run pytest test tests -q
|
||||
|
||||
# `sca edit` serves a web UI that is built from editor-web/ and git-ignored:
|
||||
# without this step the wheel would ship an editor with no front end.
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||
with:
|
||||
node-version: "22"
|
||||
cache: npm
|
||||
cache-dependency-path: editor-web/package-lock.json
|
||||
|
||||
- name: Build the editor web UI
|
||||
working-directory: editor-web
|
||||
run: |
|
||||
npm ci
|
||||
npm run build
|
||||
|
||||
- name: Build wheel and source distribution
|
||||
run: uv build
|
||||
- name: Keep the built UI
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
name: webui
|
||||
path: src/simplecadapi/editor/webui
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Verify distributions
|
||||
run: uv run twine check dist/*
|
||||
wheels:
|
||||
name: Wheels (${{ matrix.name }})
|
||||
needs: webui
|
||||
runs-on: ${{ matrix.os }}
|
||||
timeout-minutes: 240
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- name: linux-x86_64
|
||||
os: ubuntu-latest
|
||||
archs: x86_64
|
||||
occt_cache: /home/runner/occt-cache
|
||||
- name: linux-aarch64
|
||||
os: ubuntu-24.04-arm
|
||||
archs: aarch64
|
||||
occt_cache: /home/runner/occt-cache
|
||||
- name: macos-arm64
|
||||
os: macos-14
|
||||
archs: arm64
|
||||
occt_cache: /tmp/occt
|
||||
- name: windows-x86_64
|
||||
os: windows-2022
|
||||
archs: AMD64
|
||||
occt_cache: C:\occt
|
||||
steps:
|
||||
- name: Check out tagged revision
|
||||
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
|
||||
with:
|
||||
ref: ${{ env.RELEASE_TAG }}
|
||||
|
||||
- name: Verify the wheel carries the editor, the skill and the example
|
||||
- name: Fetch the built editor web UI
|
||||
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
||||
with:
|
||||
name: webui
|
||||
path: src/simplecadapi/editor/webui
|
||||
|
||||
# The static OpenCASCADE prefix. On Linux the build runs inside the manylinux container, which gets this directory
|
||||
# mounted at /opt/occt; elsewhere cibuildwheel's before-all writes to the path configured in pyproject.toml.
|
||||
- name: Restore the static OpenCASCADE build
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: ${{ matrix.occt_cache }}
|
||||
key: occt-${{ matrix.name }}-${{ hashFiles('src/cpp/tools/build_occt.py') }}
|
||||
|
||||
- name: Prepare the OpenCASCADE cache directory (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
run: mkdir -p "${{ matrix.occt_cache }}"
|
||||
|
||||
# Windows: the MSVC environment, so the OpenCASCADE build and the extension use Ninja (every translation unit in
|
||||
# parallel) instead of the Visual Studio generator, which is several times slower for a build this size.
|
||||
- name: Activate the MSVC environment (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
|
||||
with:
|
||||
arch: x64
|
||||
|
||||
- name: Build the wheels (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
uses: pypa/cibuildwheel@b9e566a2b284570af229f6c2a33673410d0389a3 # v4.3.4
|
||||
env:
|
||||
CIBW_ARCHS: ${{ matrix.archs }}
|
||||
# share the cached prefix with the container (before-all in pyproject.toml builds OCCT only if it is absent)
|
||||
CIBW_CONTAINER_ENGINE: "docker; create_args: --volume ${{ matrix.occt_cache }}:/opt/occt"
|
||||
|
||||
- name: Build the wheels (macOS, Windows)
|
||||
if: runner.os != 'Linux'
|
||||
uses: pypa/cibuildwheel@b9e566a2b284570af229f6c2a33673410d0389a3 # v4.3.4
|
||||
env:
|
||||
CIBW_ARCHS: ${{ matrix.archs }}
|
||||
|
||||
- name: Keep the wheels
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
name: wheels-${{ matrix.name }}
|
||||
path: wheelhouse/*.whl
|
||||
if-no-files-found: error
|
||||
|
||||
sdist:
|
||||
name: Source distribution
|
||||
needs: webui
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- name: Check out tagged revision
|
||||
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
|
||||
with:
|
||||
ref: ${{ env.RELEASE_TAG }}
|
||||
|
||||
- name: Fetch the built editor web UI
|
||||
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
||||
with:
|
||||
name: webui
|
||||
path: src/simplecadapi/editor/webui
|
||||
|
||||
- name: Install uv and Python
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
- name: Build the source distribution
|
||||
run: uv build --sdist --out-dir dist
|
||||
|
||||
- name: Keep the source distribution
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
name: sdist
|
||||
path: dist/*.tar.gz
|
||||
if-no-files-found: error
|
||||
|
||||
test:
|
||||
# The full test suite, on the Linux x86_64 wheel of every supported Python (the other platforms run the wheel smoke
|
||||
# test inside cibuildwheel). The checkout carries the tests only: `simplecadapi` is the installed wheel.
|
||||
name: Tests (Python ${{ matrix.python-version }})
|
||||
needs: wheels
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 45
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
||||
steps:
|
||||
- name: Check out tagged revision
|
||||
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
|
||||
with:
|
||||
ref: ${{ env.RELEASE_TAG }}
|
||||
|
||||
- name: Fetch the Linux x86_64 wheels
|
||||
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
||||
with:
|
||||
name: wheels-linux-x86_64
|
||||
path: dist
|
||||
|
||||
- name: Install uv and Python
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
enable-cache: true
|
||||
cache-python: true
|
||||
|
||||
- name: Install the test dependencies and the wheel
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
wheel="$(ls dist/*.whl)"
|
||||
listing="$(unzip -Z1 "$wheel")"
|
||||
for required in \
|
||||
simplecadapi/editor/webui/index.html \
|
||||
simplecadapi/skill/resources/skillproj.toml \
|
||||
simplecadapi/skill/resources/docs/skill/SKILL.md \
|
||||
simplecadapi/example/resources/u_link_motor_mount/u_link.py \
|
||||
simplecadapi/example/resources/u_link_motor_mount/dimensions.py; do
|
||||
if ! grep -qx "$required" <<<"$listing"; then
|
||||
echo "wheel is missing $required" >&2
|
||||
py="cp${{ matrix.python-version }}"; py="${py/./}"
|
||||
# the locked dev dependencies without the project itself, then the built wheel on top
|
||||
uv sync --locked --group dev --no-install-project
|
||||
uv pip install --no-deps dist/*-"$py"-"$py"-*.whl
|
||||
|
||||
- name: Install headless rendering support
|
||||
run: sudo apt-get update && sudo apt-get install --yes xvfb
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
xvfb-run --auto-servernum .venv/bin/python -m pytest test tests -q
|
||||
xvfb-run --auto-servernum .venv/bin/python -m pytest src/cpp/tests/python -q
|
||||
|
||||
release:
|
||||
name: Build the skill and publish the release
|
||||
needs: [wheels, sdist, test]
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Check out tagged revision
|
||||
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
|
||||
with:
|
||||
ref: ${{ env.RELEASE_TAG }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Fetch the wheels and the source distribution
|
||||
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
||||
with:
|
||||
path: artifacts
|
||||
|
||||
- name: Gather the distributions
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mkdir -p dist
|
||||
cp artifacts/wheels-*/*.whl artifacts/sdist/*.tar.gz dist/
|
||||
ls -l dist
|
||||
|
||||
- name: Install uv and Python
|
||||
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
|
||||
with:
|
||||
python-version: "3.12"
|
||||
enable-cache: true
|
||||
cache-python: true
|
||||
|
||||
- name: Verify the distributions
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
uvx twine check dist/*
|
||||
# four platforms, four Pythons each, plus the sdist
|
||||
wheels="$(ls dist/*.whl | wc -l)"
|
||||
if [[ "$wheels" -ne 16 ]]; then
|
||||
echo "expected 16 wheels (4 platforms x 4 Pythons), found $wheels" >&2
|
||||
ls dist
|
||||
exit 1
|
||||
fi
|
||||
for tag in 'manylinux.*x86_64' 'manylinux.*aarch64' 'macosx.*arm64' 'win_amd64'; do
|
||||
for py in cp310 cp311 cp312 cp313; do
|
||||
if ! ls dist/*-"$py"-"$py"-*.whl | grep -Eq "$tag"; then
|
||||
echo "no wheel for $py / $tag" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
- name: Verify every wheel carries the compiled module, the editor, the skill and the example
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
for wheel in dist/*.whl; do
|
||||
listing="$(unzip -Z1 "$wheel")"
|
||||
for required in \
|
||||
simplecadapi/editor/webui/index.html \
|
||||
simplecadapi/skill/resources/skillproj.toml \
|
||||
simplecadapi/skill/resources/docs/skill/SKILL.md \
|
||||
simplecadapi/example/resources/u_link_motor_mount/u_link.py \
|
||||
simplecadapi/example/resources/u_link_motor_mount/dimensions.py; do
|
||||
if ! grep -qx "$required" <<<"$listing"; then
|
||||
echo "$wheel is missing $required" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
# exactly one compiled module, built for the Python this wheel is tagged for
|
||||
extensions="$(grep -E '^simplecadapi/_cpp/_native\..*\.(so|pyd)$' <<<"$listing" || true)"
|
||||
if [[ "$(grep -c . <<<"$extensions")" -ne 1 ]]; then
|
||||
echo "$wheel must carry exactly one compiled module, found:" >&2
|
||||
echo "$extensions" >&2
|
||||
exit 1
|
||||
fi
|
||||
py_tag="$(basename "$wheel" | sed -E 's/^[^-]+-[^-]+-(cp3[0-9]+)-.*/\1/')"
|
||||
if ! grep -q "${py_tag#cp}" <<<"$extensions"; then
|
||||
echo "$wheel is tagged $py_tag but carries $extensions" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Install the Linux wheel to build the skill from it
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
uv sync --locked --group dev --no-install-project
|
||||
uv pip install --no-deps dist/*-cp312-cp312-*manylinux*x86_64*.whl
|
||||
|
||||
- name: Build and verify Agent Skill archive
|
||||
run: |
|
||||
uv run python tools/auto_docs_gen.py --quiet
|
||||
uv run python tools/skillbuild.py --target omp
|
||||
uv run pytest test/test_skill_build.py -q
|
||||
.venv/bin/python tools/auto_docs_gen.py --quiet
|
||||
.venv/bin/python tools/skillbuild.py --target omp
|
||||
.venv/bin/python -m pytest test/test_skill_build.py -q
|
||||
tar -C skills -czf skills/simplecadapi.tar.gz simplecadapi-omp
|
||||
|
||||
- name: Keep the verified distributions
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
name: dist
|
||||
path: |
|
||||
dist/*
|
||||
skills/simplecadapi.tar.gz
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Create GitHub release
|
||||
if: env.DRY_RUN != 'true'
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
@@ -134,3 +395,38 @@ jobs:
|
||||
--generate-notes \
|
||||
--title "$RELEASE_TAG" \
|
||||
"${release_flags[@]}"
|
||||
|
||||
publish-pypi:
|
||||
# PyPI keeps a version forever, so this runs last: only after every wheel is built, tested and verified, and the
|
||||
# GitHub release exists. Uses PyPI trusted publishing (this workflow + the `pypi` environment registered as the
|
||||
# project's trusted publisher); a `PYPI_API_TOKEN` secret, when set, is used instead.
|
||||
if: ${{ !(github.event_name == 'workflow_dispatch' && inputs.dry_run) }}
|
||||
name: Publish to PyPI
|
||||
needs: release
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
environment:
|
||||
name: pypi
|
||||
url: https://pypi.org/p/simplecadapi
|
||||
permissions:
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Fetch the verified distributions
|
||||
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
||||
with:
|
||||
name: dist
|
||||
path: artifacts
|
||||
|
||||
- name: Select the files PyPI takes
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mkdir -p dist
|
||||
cp artifacts/dist/*.whl artifacts/dist/*.tar.gz dist/
|
||||
ls -l dist
|
||||
|
||||
- name: Upload to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
|
||||
with:
|
||||
packages-dir: dist
|
||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||
|
||||
@@ -93,3 +93,8 @@ design-docs/
|
||||
# local, not part of the SDK
|
||||
examples/workspace/
|
||||
phase2-contract-review.md
|
||||
|
||||
# the C++ extension built in place (see src/cpp/bindings/python/CMakeLists.txt)
|
||||
src/simplecadapi/_cpp/*.so
|
||||
src/simplecadapi/_cpp/*.pyd
|
||||
src/simplecadapi/_cpp/*.dylib
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class Assembly(assembly_id: str, name: Optional[str] = None, components: Tuple[Component, ...] = (), public_connectors: Tuple[PublicConnectorRef, ...] = (), constraints: Tuple[Constraint, ...] = (), grounded_component_ids: Tuple[str, ...] = ())
|
||||
class Assembly(assembly_id, name=None, components=(), public_connectors=(), constraints=(), grounded_component_ids=())
|
||||
```
|
||||
|
||||
*Source: product/assembly.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class BSplineFitResult(degree: int, control_points: Tuple[PointTuple, ...], knots: Tuple[float, ...], sample_parameters: Tuple[float, ...], max_error: float, rms_error: float, tolerance: float, fairing: float, iterations: int, converged: bool)
|
||||
class BSplineFitResult()
|
||||
```
|
||||
|
||||
*Source: math.py*
|
||||
|
||||
@@ -14,4 +14,4 @@ class CenterDecl(view: str, p1: tuple | None = None, p2: tuple | None = None, ar
|
||||
|
||||
## Description
|
||||
|
||||
中心线声明:p1/p2 直线中心线,或 arc=(cx,cy,r,a0,a1) 圆弧中心线。
|
||||
Centre-line declaration: p1/p2 straight centre line, or arc=(cx,cy,r,a0,a1) arc centre line.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class Component(component_id: str, item: AssemblyItem, placement: Placement, name: Optional[str] = None)
|
||||
class Component(component_id, item, placement, name=None)
|
||||
```
|
||||
|
||||
*Source: product/assembly.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class Connector(connector_id: str, geometry_ref: Optional[GeometryRef] = None, name: Optional[str] = None, anchor: Optional[ConnectorAnchor] = None)
|
||||
class Connector(connector_id, geometry_ref=None, name=None, anchor=None)
|
||||
```
|
||||
|
||||
*Source: product/connector.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class ConnectorAnchor(anchor_kind: str, geometry_ref: Optional[GeometryRef] = None, placement: Optional[Placement] = None)
|
||||
class ConnectorAnchor(anchor_kind, geometry_ref=None, placement=None)
|
||||
```
|
||||
|
||||
*Source: product/connector.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class ConnectorRef(component_id: str, connector_id: str)
|
||||
class ConnectorRef(component_id, connector_id)
|
||||
```
|
||||
|
||||
*Source: product/connector.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class Const(value: float, expr_id: str = '')
|
||||
class Const(value, expr_id='')
|
||||
```
|
||||
|
||||
*Source: params/expr.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class Constraint(constraint_id: str, constraint_kind: ConstraintKind, connector_a: ConnectorRef, connector_b: ConnectorRef, drive_distance: Optional[float] = None, distance_limit: Optional[ScalarLimit] = None, drive_angle_degrees: Optional[float] = None, angle_limit: Optional[ScalarLimit] = None, pitch_radius_a: Optional[float] = None, pitch_radius_b: Optional[float] = None, pulley_radius_a: Optional[float] = None, pulley_radius_b: Optional[float] = None, pitch_radius: Optional[float] = None, phase_offset: Optional[float] = None, name: Optional[str] = None)
|
||||
class Constraint(constraint_id, constraint_kind, connector_a, connector_b, drive_distance=None, distance_limit=None, drive_angle_degrees=None, angle_limit=None, pitch_radius_a=None, pitch_radius_b=None, pulley_radius_a=None, pulley_radius_b=None, pitch_radius=None, phase_offset=None, name=None)
|
||||
```
|
||||
|
||||
*Source: product/constraint.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class ConstraintReport(solved: bool, grounded_component_ids: Tuple[str, ...], solved_component_ids: Tuple[str, ...], unsolved_component_ids: Tuple[str, ...], residuals: Tuple[ConstraintResidual, ...])
|
||||
class ConstraintReport(solved, grounded_component_ids, solved_component_ids, unsolved_component_ids, residuals)
|
||||
```
|
||||
|
||||
*Source: product/constraint.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class ConstraintResidual(constraint_id: str, translation_error: float, angular_error_degrees: float, within_tolerance: bool)
|
||||
class ConstraintResidual(constraint_id, translation_error, angular_error_degrees, within_tolerance)
|
||||
```
|
||||
|
||||
*Source: product/constraint.py*
|
||||
|
||||
@@ -14,4 +14,4 @@ class DatumDecl(letter: str, kind: str, view: str, at: tuple, box_off: tuple = (
|
||||
|
||||
## Description
|
||||
|
||||
基准符号声明(GB 基准体系):主基准 A、辅助基准 B/C…。
|
||||
Datum symbol declaration (the GB datum system): primary datum A, secondary datums B/C…
|
||||
|
||||
@@ -14,4 +14,4 @@ class DimDecl(kind: str, view: str, semantic: str, caption: str, value: float |
|
||||
|
||||
## Description
|
||||
|
||||
一条尺寸声明。kind=定位(position)尺寸必须在 datum 里引用已声明基准。
|
||||
One dimension declaration. A position dimension (kind=position) must reference a declared datum in `datum`.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class Dimension(length: int = 0, angle: int = 0)
|
||||
class Dimension(length=0, angle=0)
|
||||
```
|
||||
|
||||
*Source: params/units.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class DimensionTolerance(lower_deviation: float, upper_deviation: float)
|
||||
class DimensionTolerance(lower_deviation, upper_deviation)
|
||||
```
|
||||
|
||||
*Source: params/expr.py*
|
||||
|
||||
@@ -18,5 +18,5 @@ Point-pair and stroke-length measurements with optional mm conversion.
|
||||
|
||||
Every entry keeps its native ``length_pt``; ``length_mm`` is populated
|
||||
only when a calibration is supplied. Millimetre values derived here are
|
||||
〔推算〕-grade claims: they must be cross-checked against annotated
|
||||
"inferred"-grade claims: they must be cross-checked against annotated
|
||||
dimensions before they harden into facts.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class Expr(op: str, args: Tuple[ScalarExpr, ...], expr_id: str = '')
|
||||
class Expr(op, args, expr_id='')
|
||||
```
|
||||
|
||||
*Source: params/expr.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class GeometryRef(kind: str, source_node_id: Optional[str], geo_selector: Dict[str, Any], flip: bool = False)
|
||||
class GeometryRef(kind, source_node_id, geo_selector, flip=False)
|
||||
```
|
||||
|
||||
*Source: product/connector.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class GraphSession(graph_id: Optional[str] = None, *, allow_external_definitions: bool = False, namespace: Optional[str] = None, shared_lineage: bool = False)
|
||||
class GraphSession()
|
||||
```
|
||||
|
||||
*Source: recording/graph.py*
|
||||
|
||||
@@ -14,4 +14,4 @@ class LeaderDecl(view: str, anchor: tuple, lines: list, off: tuple = (30.0, -18.
|
||||
|
||||
## Description
|
||||
|
||||
引出说明声明:从 anchor 引出折线到注释文本。
|
||||
Leader declaration: a polyline from anchor to the note text.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class Material(material_id: str, name: Optional[str] = None, density: Optional[float] = None, density_unit: Optional[str] = None, color: Optional[Vec3] = None)
|
||||
class Material(material_id, name=None, density=None, density_unit=None, color=None)
|
||||
```
|
||||
|
||||
*Source: product/material.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class Part(part_id: str, body: Solid, name: Optional[str] = None, material: Optional[Material] = None, connectors: Tuple[Connector, ...] = ())
|
||||
class Part(part_id, body, name=None, material=None, connectors=())
|
||||
```
|
||||
|
||||
*Source: product/part.py*
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
# Placement
|
||||
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class Placement(origin: Vec3, x_axis: Vec3 = (1.0, 0.0, 0.0), y_axis: Vec3 = (0.0, 1.0, 0.0), z_axis: Vec3 = (0.0, 0.0, 1.0))
|
||||
```
|
||||
|
||||
*Source: product/placement.py*
|
||||
|
||||
## Import Surface
|
||||
|
||||
- top-level: `from simplecadapi import Placement`
|
||||
|
||||
## Description
|
||||
|
||||
Right-handed placement mapping child-local coordinates to parent coordinates.
|
||||
@@ -3,7 +3,7 @@
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class PublicConnectorRef(public_connector_id: str, component_id: str, connector_id: str, name: Optional[str] = None)
|
||||
class PublicConnectorRef(public_connector_id, component_id, connector_id, name=None)
|
||||
```
|
||||
|
||||
*Source: product/assembly.py*
|
||||
|
||||
@@ -116,6 +116,7 @@ This index includes generated docs for the public SimpleCAD API surface, includi
|
||||
- [Fusion360Translator](Fusion360Translator.md) *(from translator/fusion360_translator/translator.py)* `translator backend`
|
||||
- [SolidWorksTranslator](SolidWorksTranslator.md) *(from translator/solidworks_translator/translator.py)* `translator backend`
|
||||
- [export_model_json_to_solidworks_step](export_model_json_to_solidworks_step.md) *(from translator/solidworks_translator/api.py)* `translator backend`
|
||||
- [make_interpolated_bspline_edge](make_interpolated_bspline_edge.md) *(from translator/solidworks_translator/translator.py)* `translator backend`
|
||||
- [translate_model_json_to_fcstd](translate_model_json_to_fcstd.md) *(from translator/freecad_translator/api.py)* `translator backend`
|
||||
- [translate_model_json_to_freecad_script](translate_model_json_to_freecad_script.md) *(from translator/freecad_translator/api.py)* `translator backend`
|
||||
- [translate_model_json_to_solidworks_script](translate_model_json_to_solidworks_script.md) *(from translator/solidworks_translator/api.py)* `translator backend`
|
||||
@@ -323,13 +324,10 @@ This index includes generated docs for the public SimpleCAD API surface, includi
|
||||
- [GeometryRef](GeometryRef.md) *(from product/connector.py)* `top-level`
|
||||
- [Material](Material.md) *(from product/material.py)* `top-level`
|
||||
- [Part](Part.md) *(from product/part.py)* `top-level`
|
||||
- [Placement](Placement.md) *(from product/placement.py)* `top-level`
|
||||
- [ProductPackage](ProductPackage.md) *(from product/packages.py)* `top-level`
|
||||
- [ProductPackageError](ProductPackageError.md) *(from product/packages.py)* `top-level`
|
||||
- [PublicConnectorRef](PublicConnectorRef.md) *(from product/assembly.py)* `top-level`
|
||||
- [ScalarLimit](ScalarLimit.md) *(from product/constraint.py)* `top-level`
|
||||
- [SemanticDelta](SemanticDelta.md) *(from topology/model.py)* `top-level`
|
||||
- [SemanticRef](SemanticRef.md) *(from topology/model.py)* `top-level`
|
||||
- [SurfaceBoundary](SurfaceBoundary.md) *(from operators/geometry.py)* `top-level`
|
||||
- [SurfaceFillingSettings](SurfaceFillingSettings.md) *(from operators/geometry.py)* `top-level`
|
||||
- [add_arc_rsketch](add_arc_rsketch.md) *(from operators/sketch.py)* `top-level`
|
||||
@@ -393,6 +391,7 @@ This index includes generated docs for the public SimpleCAD API surface, includi
|
||||
- [identity_placement_rplacement](identity_placement_rplacement.md) *(from operators/product.py)* `top-level`
|
||||
- [inspect_assembly_constraints_rconstraintreport](inspect_assembly_constraints_rconstraintreport.md) *(from operators/product.py)* `top-level`
|
||||
- [inspect_sketch_rsketchresult](inspect_sketch_rsketchresult.md) *(from operators/sketch.py)* `top-level`
|
||||
- [key](key.md) *(from ql.py)* `submodule:ql`
|
||||
- [linear_pattern_rsolidlist](linear_pattern_rsolidlist.md) *(from operators/transform.py)* `top-level`
|
||||
- [load_brep_region_rshell](load_brep_region_rshell.md) *(from operators/geometry.py)* `top-level`
|
||||
- [load_brep_region_rsolid](load_brep_region_rsolid.md) *(from operators/geometry.py)* `top-level`
|
||||
@@ -408,7 +407,9 @@ This index includes generated docs for the public SimpleCAD API surface, includi
|
||||
- [placement_frame_mm](placement_frame_mm.md) *(from product/placement.py)* `submodule:product/placement`
|
||||
- [placement_from_canonical](placement_from_canonical.md) *(from product/placement.py)* `submodule:product/placement`
|
||||
- [placement_ticks](placement_ticks.md) *(from product/placement.py)* `submodule:product/placement`
|
||||
- [prop](prop.md) *(from ql.py)* `submodule:ql`
|
||||
- [radial_pattern_rsolidlist](radial_pattern_rsolidlist.md) *(from operators/transform.py)* `top-level`
|
||||
- [register_property_resolver](register_property_resolver.md) *(from ql.py)* `submodule:ql`
|
||||
- [render_screenshot_rpath](render_screenshot_rpath.md) *(from operators/features.py)* `top-level`
|
||||
- [scale_rsolid](scale_rsolid.md) *(from operators/transform.py)* `top-level`
|
||||
- [select](select.md) *(from ql.py)* `submodule:ql`
|
||||
|
||||
@@ -14,5 +14,5 @@ class Resolved(kind: str, name: str, view: str, requested: str, resolved: str, a
|
||||
|
||||
## Description
|
||||
|
||||
一个标注元素在纸面上的求解结果:requested(声明值) → resolved(实际位置) +
|
||||
adjust(最少调整顺延记录) + draw(渲染所需的预计算几何) + rules(触发的规则)。
|
||||
The solved result of one annotation element on the sheet: requested (declared value) → resolved (actual position) +
|
||||
adjust (record of the minimum adjustments) + draw (precomputed geometry for rendering) + rules (the rules that fired).
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class ScalarLimit(lower_value: float, upper_value: float)
|
||||
class ScalarLimit(lower_value, upper_value)
|
||||
```
|
||||
|
||||
*Source: product/constraint.py*
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
# SemanticDelta
|
||||
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class SemanticDelta(created: Tuple[SemanticRef, ...] = (), modified: Tuple[SemanticRef, ...] = (), deleted: Tuple[SemanticRef, ...] = (), metadata: Dict[str, Any] = field(default_factory=dict))
|
||||
```
|
||||
|
||||
*Source: topology/model.py*
|
||||
|
||||
## Import Surface
|
||||
|
||||
- top-level: `from simplecadapi import SemanticDelta`
|
||||
|
||||
## Description
|
||||
|
||||
Semantic entity change set attached to a single recorded operation.
|
||||
@@ -1,17 +0,0 @@
|
||||
# SemanticRef
|
||||
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class SemanticRef(graph_id: str, node_id: str, entity_type: str, entity_id: str)
|
||||
```
|
||||
|
||||
*Source: topology/model.py*
|
||||
|
||||
## Import Surface
|
||||
|
||||
- top-level: `from simplecadapi import SemanticRef`
|
||||
|
||||
## Description
|
||||
|
||||
Stable reference to a semantic model entity in the recorded graph.
|
||||
@@ -14,8 +14,8 @@ class SheetDecl(title: str, dwg_no: str, scale: float, front: str, anchor: tuple
|
||||
|
||||
## Description
|
||||
|
||||
一张图纸的完整声明:图幅信息 + 视图 + 基准 + 尺寸 + 中心线 + 引出说明 + 参数表。
|
||||
The complete declaration of one sheet: sheet information + views + datums + dimensions + centre lines + leaders + parameter table.
|
||||
|
||||
调用方只声明"要表达什么",不指定任何纸面坐标;布局与标注位置由
|
||||
SheetPlan.solve() 求解。front/anchor 定义主视图锚定,其余视图经
|
||||
ViewDecl.align 相对主视图对正(第一角投影,长对正/高平齐)。
|
||||
The caller declares only "what to express" and no sheet coordinate; the layout and the annotation positions are
|
||||
solved by SheetPlan.solve(). front/anchor anchors the main view, the other views align to it through
|
||||
ViewDecl.align (first-angle projection, length-aligned / height-aligned).
|
||||
|
||||
@@ -14,9 +14,9 @@ class SheetPlan(decl: SheetDecl)
|
||||
|
||||
## Description
|
||||
|
||||
标注方案求解器:SheetDecl → solve() → resolved/accepted/report() → render()。
|
||||
The dimensioning-plan solver: SheetDecl → solve() → resolved/accepted/report() → render().
|
||||
|
||||
求解流程:视图布局(第一角投影、align 对正) → 基准安放 → 线性尺寸
|
||||
(按视图/侧/行/大外小内排序) → 直径/半径尺寸 → 引出说明 → 参数覆盖检查。
|
||||
所有冲突处理遵循"最少调整":优先顺延候选位置并记入 Resolved.adjust,
|
||||
放不下则记入 R1 警告,绝不静默丢弃。
|
||||
Solving: view layout (first-angle projection, align) → datum placement → linear dimensions
|
||||
(ordered by view/side/row, large outside, small inside) → diameter/radius dimensions → leaders → parameter-coverage check.
|
||||
Every conflict follows "minimum adjustment": candidate positions are shifted first and recorded in Resolved.adjust;
|
||||
when nothing fits it is recorded as an R1 warning, never silently dropped.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class Sketch(curves: Iterable[Edge | Wire] | None = None, *, name: Optional[str] = None, plane: Any = 'XY', sketch_id: Optional[str] = None)
|
||||
class Sketch(curves=None, *, name=None, plane='XY', sketch_id=None)
|
||||
```
|
||||
|
||||
*Source: sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class SketchConstraint(constraint_id: str, kind: str, targets: Tuple[Dict[str, Any], ...], value: Any = None, driving: bool = True, metadata: Dict[str, Any] = field(default_factory=dict))
|
||||
class SketchConstraint()
|
||||
```
|
||||
|
||||
*Source: sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class SketchConstraintDiagnostic(constraint_id: Optional[str], severity: str, code: str, message: str, residual: Optional[float] = None)
|
||||
class SketchConstraintDiagnostic(constraint_id, severity, code, message, residual=None)
|
||||
```
|
||||
|
||||
*Source: sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class SketchRef(sketch_id: str, entity_id: str, *, kind: str, subentity: str = 'geometry')
|
||||
class SketchRef(sketch_id, entity_id, *, kind, subentity='geometry')
|
||||
```
|
||||
|
||||
*Source: sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class SketchSolveResult(sketch_id: str, status: str, dof: int, residual_norm: float, iterations: int, solved_points: Dict[str, Tuple[float, float]], solved_scalars: Dict[str, float], solved_entities: Dict[str, Dict[str, Any]] = field(default_factory=dict), diagnostics: Tuple[SketchConstraintDiagnostic, ...] = (), backend: str = 'unknown', backend_version: str = 'unknown', backend_status_code: Optional[int] = None)
|
||||
class SketchSolveResult(sketch_id, status, dof, residual_norm, iterations, solved_points, solved_scalars, solved_entities=None, diagnostics=None, backend='unknown', backend_version='unknown', backend_status_code=None)
|
||||
```
|
||||
|
||||
*Source: sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class SurfaceBoundary(edge: Edge, continuity: str = 'C0', support: Optional[Face] = None)
|
||||
class SurfaceBoundary(edge, continuity='C0', support=None)
|
||||
```
|
||||
|
||||
*Source: operators/geometry.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class SurfaceFillingSettings(degree: int = 3, points_per_curve: int = 15, iterations: int = 2, anisotropic: bool = False, tolerance_2d: float = 1e-05, tolerance_3d: float = 0.0001, angular_tolerance: float = 0.01, curvature_tolerance: float = 0.1, max_degree: int = 8, max_segments: int = 9)
|
||||
class SurfaceFillingSettings(degree=3, points_per_curve=15, iterations=2, anisotropic=False, tolerance_2d=1e-05, tolerance_3d=0.0001, angular_tolerance=0.01, curvature_tolerance=0.1, max_degree=8, max_segments=9)
|
||||
```
|
||||
|
||||
*Source: operators/geometry.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class Unit(symbol: str, dimension: Dimension, scale_to_canonical: float)
|
||||
class Unit(symbol, dimension, scale_to_canonical)
|
||||
```
|
||||
|
||||
*Source: params/units.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class UnitValidationError
|
||||
class UnitValidationError()
|
||||
```
|
||||
|
||||
*Source: params/units.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## Class Definition
|
||||
|
||||
```python
|
||||
class Var(name: str, default: float, comment: str | None = None, expr_id: str = '', tolerance: DimensionTolerance | None = None, unit: Unit | None = None, tolerance_unit: Unit | None = None)
|
||||
class Var(name, default, comment=None, expr_id='', tolerance=None, unit=None, tolerance_unit=None, *, ui=None, control=None, min=None, max=None, step=None, label=None, group=None)
|
||||
```
|
||||
|
||||
*Source: params/expr.py*
|
||||
|
||||
@@ -14,4 +14,4 @@ class ViewDecl(name: str, shape: object, n: tuple, xd: tuple, align: dict = fiel
|
||||
|
||||
## Description
|
||||
|
||||
HLR 投影视图。n=观察方向, xd=投影面内屏幕右方向; align 定义布局约束。
|
||||
An HLR projected view. n = viewing direction, xd = screen-right direction in the projection plane; align defines the layout constraint.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def add_arc_rsketch(sketch: Sketch, entity_id: str, start: Union[SketchRef, str], end: Union[SketchRef, str], center: Union[SketchRef, str], *, construction: bool = False) -> Sketch
|
||||
def add_arc_rsketch(sketch, entity_id, start, end, center, *, construction=False)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def add_belt_constraint_rassembly(assembly: Assembly, constraint_id: str, connector_a: ConnectorRef, connector_b: ConnectorRef, pulley_radius_a: float, pulley_radius_b: float, phase_offset: Optional[float] = None, name: Optional[str] = None) -> Assembly
|
||||
def add_belt_constraint_rassembly(assembly, constraint_id, connector_a, connector_b, pulley_radius_a, pulley_radius_b, phase_offset=None, name=None)
|
||||
```
|
||||
|
||||
*Source: operators/product.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def add_bspline_rsketch(sketch: Sketch, entity_id: str, start: Union[SketchRef, str], end: Union[SketchRef, str], control_points: Sequence[Any], degree: int = 3, knots: Optional[Sequence[float]] = None, multiplicities: Optional[Sequence[int]] = None, weights: Optional[Sequence[float]] = None, periodic: bool = False, *, construction: bool = False) -> Sketch
|
||||
def add_bspline_rsketch(sketch, entity_id, start, end, control_points, degree=3, knots=None, multiplicities=None, weights=None, periodic=False, *, construction=False)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def add_circle_rsketch(sketch: Sketch, entity_id: str, center: Union[SketchRef, str], radius: ScalarLike, *, construction: bool = False) -> Sketch
|
||||
def add_circle_rsketch(sketch, entity_id, center, radius, *, construction=False)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def add_component_rassembly(assembly: Assembly, item: Union[Part, Assembly], component_id: str, placement: Placement, name: Optional[str] = None) -> Assembly
|
||||
def add_component_rassembly(assembly, item, component_id, placement, name=None)
|
||||
```
|
||||
|
||||
*Source: operators/product.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def add_connector_rpart(part: Part, connector: Connector) -> Part
|
||||
def add_connector_rpart(part, connector)
|
||||
```
|
||||
|
||||
*Source: operators/product.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def add_ellipse_rsketch(sketch: Sketch, entity_id: str, center: Union[SketchRef, str], major_point: Union[SketchRef, str], minor_point: Union[SketchRef, str], *, construction: bool = False) -> Sketch
|
||||
def add_ellipse_rsketch(sketch, entity_id, center, major_point, minor_point, *, construction=False)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def add_fixed_constraint_rassembly(assembly: Assembly, constraint_id: str, connector_a: ConnectorRef, connector_b: ConnectorRef, name: Optional[str] = None) -> Assembly
|
||||
def add_fixed_constraint_rassembly(assembly, constraint_id, connector_a, connector_b, name=None)
|
||||
```
|
||||
|
||||
*Source: operators/product.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def add_gear_constraint_rassembly(assembly: Assembly, constraint_id: str, connector_a: ConnectorRef, connector_b: ConnectorRef, pitch_radius_a: float, pitch_radius_b: float, phase_offset: Optional[float] = None, name: Optional[str] = None) -> Assembly
|
||||
def add_gear_constraint_rassembly(assembly, constraint_id, connector_a, connector_b, pitch_radius_a, pitch_radius_b, phase_offset=None, name=None)
|
||||
```
|
||||
|
||||
*Source: operators/product.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def add_line_rsketch(sketch: Sketch, entity_id: str, start: Union[SketchRef, str], end: Union[SketchRef, str], *, construction: bool = False) -> Sketch
|
||||
def add_line_rsketch(sketch, entity_id, start, end, *, construction=False)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def add_point_rsketch(sketch: Sketch, point_id: str, x: ScalarLike, y: ScalarLike) -> Sketch
|
||||
def add_point_rsketch(sketch, point_id, x, y)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def add_prismatic_constraint_rassembly(assembly: Assembly, constraint_id: str, connector_a: ConnectorRef, connector_b: ConnectorRef, drive_distance: Optional[float] = None, distance_limit: Optional[ScalarLimit] = None, name: Optional[str] = None) -> Assembly
|
||||
def add_prismatic_constraint_rassembly(assembly, constraint_id, connector_a, connector_b, drive_distance=None, distance_limit=None, name=None)
|
||||
```
|
||||
|
||||
*Source: operators/product.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def add_rack_pinion_constraint_rassembly(assembly: Assembly, constraint_id: str, rack_connector: ConnectorRef, pinion_connector: ConnectorRef, pitch_radius: float, phase_offset: Optional[float] = None, name: Optional[str] = None) -> Assembly
|
||||
def add_rack_pinion_constraint_rassembly(assembly, constraint_id, rack_connector, pinion_connector, pitch_radius, phase_offset=None, name=None)
|
||||
```
|
||||
|
||||
*Source: operators/product.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def add_revolute_constraint_rassembly(assembly: Assembly, constraint_id: str, connector_a: ConnectorRef, connector_b: ConnectorRef, drive_angle_degrees: Optional[float] = None, angle_limit: Optional[ScalarLimit] = None, name: Optional[str] = None) -> Assembly
|
||||
def add_revolute_constraint_rassembly(assembly, constraint_id, connector_a, connector_b, drive_angle_degrees=None, angle_limit=None, name=None)
|
||||
```
|
||||
|
||||
*Source: operators/product.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def and_(*predicates: Predicate) -> Predicate
|
||||
def and_(*args)
|
||||
```
|
||||
|
||||
*Source: ql.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def apply_tag(shape: AnyShape, tag: str) -> AnyShape
|
||||
def apply_tag(shape, tag)
|
||||
```
|
||||
|
||||
*Source: operators/selection.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def apply_tag_rselection(scope: AnyShape, targets: Union[ShapeSelector, Sequence[AnyShape]], tag: str, topology_propagation: str | TopologyPropagation = TopologyPropagation.LOCAL, lineage_policy: str | LineagePolicy = LineagePolicy.CONTINUATION_FRAGMENT) -> AnyShape
|
||||
def apply_tag_rselection(scope, targets, tag, topology_propagation=<LOCAL: 'local'>, lineage_policy=<CONTINUATION_FRAGMENT: 'continuation_fragment'>)
|
||||
```
|
||||
|
||||
*Source: operators/selection.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def assign_material_rpart(part: Part, material: Material) -> Part
|
||||
def assign_material_rpart(part, material)
|
||||
```
|
||||
|
||||
*Source: operators/product.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def boolean_rsolidlist(left: Sequence[Solid], right: Sequence[Solid], operation: str) -> list[Solid]
|
||||
def boolean_rsolidlist(left, right, operation)
|
||||
```
|
||||
|
||||
*Source: operators/boolean.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def canonical_unit_for_dimension(dimension: Dimension) -> Unit
|
||||
def canonical_unit_for_dimension(dimension)
|
||||
```
|
||||
|
||||
*Source: params/units.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def chamfer_rsolid(solid: Solid, edges: Union[Sequence[Edge], ShapeSelector], distance: ScalarLike, *, angle: Optional[float] = None, reference_direction: Optional[Tuple[float, float, float]] = None, result_tag: Optional[str] = None, generated_faces_tag: Optional[str] = None) -> Solid
|
||||
def chamfer_rsolid(solid, edges, distance, *, angle=None, reference_direction=None, result_tag=None, generated_faces_tag=None)
|
||||
```
|
||||
|
||||
*Source: operators/features.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def const(value: int | float) -> Const
|
||||
def const(value)
|
||||
```
|
||||
|
||||
*Source: params/expr.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def constrain_angle_rsketch(sketch: Sketch, a: Union[SketchRef, str], b: Union[SketchRef, str], value: ScalarLike, *, constraint_id: Optional[str] = None, driving: bool = True) -> Sketch
|
||||
def constrain_angle_rsketch(sketch, a, b, value, *, constraint_id=None, driving=True)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def constrain_coincident_rsketch(sketch: Sketch, a: Union[SketchRef, str], b: Union[SketchRef, str], *, constraint_id: Optional[str] = None) -> Sketch
|
||||
def constrain_coincident_rsketch(sketch, a, b, *, constraint_id=None)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def constrain_collinear_rsketch(sketch: Sketch, a: Union[SketchRef, str], b: Union[SketchRef, str], *, constraint_id: Optional[str] = None) -> Sketch
|
||||
def constrain_collinear_rsketch(sketch, a, b, *, constraint_id=None)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def constrain_concentric_rsketch(sketch: Sketch, a: Union[SketchRef, str], b: Union[SketchRef, str], *, constraint_id: Optional[str] = None) -> Sketch
|
||||
def constrain_concentric_rsketch(sketch, a, b, *, constraint_id=None)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def constrain_connect_rsketch(sketch: Sketch, a: Union[SketchRef, str], b: Union[SketchRef, str], *, constraint_id: Optional[str] = None) -> Sketch
|
||||
def constrain_connect_rsketch(sketch, a, b, *, constraint_id=None)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def constrain_diameter_rsketch(sketch: Sketch, circle: Union[SketchRef, str], value: ScalarLike, *, constraint_id: Optional[str] = None, driving: bool = True) -> Sketch
|
||||
def constrain_diameter_rsketch(sketch, circle, value, *, constraint_id=None, driving=True)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def constrain_distance_rsketch(sketch: Sketch, a: Union[SketchRef, str], b: Union[SketchRef, str], value: ScalarLike, *, constraint_id: Optional[str] = None, driving: bool = True) -> Sketch
|
||||
def constrain_distance_rsketch(sketch, a, b, value, *, constraint_id=None, driving=True)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def constrain_distance_x_rsketch(sketch: Sketch, a: Union[SketchRef, str], b: Union[SketchRef, str], value: ScalarLike, *, constraint_id: Optional[str] = None, driving: bool = True) -> Sketch
|
||||
def constrain_distance_x_rsketch(sketch, a, b, value, *, constraint_id=None, driving=True)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def constrain_distance_y_rsketch(sketch: Sketch, a: Union[SketchRef, str], b: Union[SketchRef, str], value: ScalarLike, *, constraint_id: Optional[str] = None, driving: bool = True) -> Sketch
|
||||
def constrain_distance_y_rsketch(sketch, a, b, value, *, constraint_id=None, driving=True)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def constrain_equal_length_rsketch(sketch: Sketch, a: Union[SketchRef, str], b: Union[SketchRef, str], *, constraint_id: Optional[str] = None) -> Sketch
|
||||
def constrain_equal_length_rsketch(sketch, a, b, *, constraint_id=None)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def constrain_equal_radius_rsketch(sketch: Sketch, a: Union[SketchRef, str], b: Union[SketchRef, str], *, constraint_id: Optional[str] = None) -> Sketch
|
||||
def constrain_equal_radius_rsketch(sketch, a, b, *, constraint_id=None)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def constrain_fix_rsketch(sketch: Sketch, target: Union[SketchRef, str], *, constraint_id: Optional[str] = None) -> Sketch
|
||||
def constrain_fix_rsketch(sketch, target, *, constraint_id=None)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def constrain_horizontal_rsketch(sketch: Sketch, line: Union[SketchRef, str], *, constraint_id: Optional[str] = None) -> Sketch
|
||||
def constrain_horizontal_rsketch(sketch, line, *, constraint_id=None)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def constrain_length_rsketch(sketch: Sketch, line: Union[SketchRef, str], value: ScalarLike, *, constraint_id: Optional[str] = None, driving: bool = True) -> Sketch
|
||||
def constrain_length_rsketch(sketch, line, value, *, constraint_id=None, driving=True)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def constrain_line_distance_rsketch(sketch: Sketch, a: Union[SketchRef, str], b: Union[SketchRef, str], value: ScalarLike, *, constraint_id: Optional[str] = None, driving: bool = True) -> Sketch
|
||||
def constrain_line_distance_rsketch(sketch, a, b, value, *, constraint_id=None, driving=True)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def constrain_major_radius_rsketch(sketch: Sketch, ellipse: Union[SketchRef, str], value: ScalarLike, *, constraint_id: Optional[str] = None, driving: bool = True) -> Sketch
|
||||
def constrain_major_radius_rsketch(sketch, ellipse, value, *, constraint_id=None, driving=True)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def constrain_midpoint_points_rsketch(sketch: Sketch, mid: Union[SketchRef, str], a: Union[SketchRef, str], b: Union[SketchRef, str], *, constraint_id: Optional[str] = None) -> Sketch
|
||||
def constrain_midpoint_points_rsketch(sketch, mid, a, b, *, constraint_id=None)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def constrain_midpoint_rsketch(sketch: Sketch, point: Union[SketchRef, str], line: Union[SketchRef, str], *, constraint_id: Optional[str] = None) -> Sketch
|
||||
def constrain_midpoint_rsketch(sketch, point, line, *, constraint_id=None)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def constrain_minor_radius_rsketch(sketch: Sketch, ellipse: Union[SketchRef, str], value: ScalarLike, *, constraint_id: Optional[str] = None, driving: bool = True) -> Sketch
|
||||
def constrain_minor_radius_rsketch(sketch, ellipse, value, *, constraint_id=None, driving=True)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def constrain_mirror_rsketch(sketch: Sketch, a: Union[SketchRef, str], axis: Union[SketchRef, str], b: Union[SketchRef, str], *, constraint_id: Optional[str] = None) -> Sketch
|
||||
def constrain_mirror_rsketch(sketch, a, axis, b, *, constraint_id=None)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def constrain_normal_rsketch(sketch: Sketch, a: Union[SketchRef, str], b: Union[SketchRef, str], *, constraint_id: Optional[str] = None) -> Sketch
|
||||
def constrain_normal_rsketch(sketch, a, b, *, constraint_id=None)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def constrain_parallel_rsketch(sketch: Sketch, a: Union[SketchRef, str], b: Union[SketchRef, str], *, constraint_id: Optional[str] = None) -> Sketch
|
||||
def constrain_parallel_rsketch(sketch, a, b, *, constraint_id=None)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def constrain_perpendicular_rsketch(sketch: Sketch, a: Union[SketchRef, str], b: Union[SketchRef, str], *, constraint_id: Optional[str] = None) -> Sketch
|
||||
def constrain_perpendicular_rsketch(sketch, a, b, *, constraint_id=None)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def constrain_point_on_rsketch(sketch: Sketch, point: Union[SketchRef, str], entity: Union[SketchRef, str], *, constraint_id: Optional[str] = None) -> Sketch
|
||||
def constrain_point_on_rsketch(sketch, point, entity, *, constraint_id=None)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def constrain_points_horizontal_rsketch(sketch: Sketch, a: Union[SketchRef, str], b: Union[SketchRef, str], *, constraint_id: Optional[str] = None) -> Sketch
|
||||
def constrain_points_horizontal_rsketch(sketch, a, b, *, constraint_id=None)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def constrain_points_vertical_rsketch(sketch: Sketch, a: Union[SketchRef, str], b: Union[SketchRef, str], *, constraint_id: Optional[str] = None) -> Sketch
|
||||
def constrain_points_vertical_rsketch(sketch, a, b, *, constraint_id=None)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def constrain_radius_rsketch(sketch: Sketch, circle: Union[SketchRef, str], value: ScalarLike, *, constraint_id: Optional[str] = None, driving: bool = True) -> Sketch
|
||||
def constrain_radius_rsketch(sketch, circle, value, *, constraint_id=None, driving=True)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def constrain_symmetric_rsketch(sketch: Sketch, a: Union[SketchRef, str], b: Union[SketchRef, str], axis: Union[SketchRef, str], *, constraint_id: Optional[str] = None) -> Sketch
|
||||
def constrain_symmetric_rsketch(sketch, a, b, axis, *, constraint_id=None)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def constrain_tangent_rsketch(sketch: Sketch, a: Union[SketchRef, str], b: Union[SketchRef, str], *, at_a: Optional[str] = None, at_b: Optional[str] = None, mode: str = 'external', constraint_id: Optional[str] = None) -> Sketch
|
||||
def constrain_tangent_rsketch(sketch, a, b, *, at_a=None, at_b=None, mode='external', constraint_id=None)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def constrain_vertical_rsketch(sketch: Sketch, line: Union[SketchRef, str], *, constraint_id: Optional[str] = None) -> Sketch
|
||||
def constrain_vertical_rsketch(sketch, line, *, constraint_id=None)
|
||||
```
|
||||
|
||||
*Source: operators/sketch.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def convert_value(value: int | float, from_unit: UnitLike, to_unit: UnitLike) -> float
|
||||
def convert_value(value, from_unit, to_unit)
|
||||
```
|
||||
|
||||
*Source: params/units.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def cut_rsolid(*solids: Union[Solid, Sequence[Solid]], skip_non_intersecting: bool = True, tracking_policy: TrackingPolicy | str = TrackingPolicy.FULL) -> Solid
|
||||
def cut_rsolid(*solids, skip_non_intersecting=True, tracking_policy='full')
|
||||
```
|
||||
|
||||
*Source: operators/boolean.py*
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## API Definition
|
||||
|
||||
```python
|
||||
def draft_rsolid(solid: Solid, faces_to_draft: Sequence[Face] | ShapeSelector, angle: ScalarLike, plane_origin: Sequence[float] = (0, 0, 0), plane_normal: Sequence[float] = (0, 0, 1)) -> Solid
|
||||
def draft_rsolid(solid, faces_to_draft, angle, plane_origin=(0, 0, 0), plane_normal=(0, 0, 1))
|
||||
```
|
||||
|
||||
*Source: operators/features.py*
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user