This release is a pre-release and may not be stable for production use.
parasolid-kit
parasolid-kit is an experimental, schema-aware parser for Parasolid X_T and
X_B transmit files. Parsing and geometry mapping run in a safe Rust core, while
Python users work with immutable typed models.
The project is read-focused and currently pre-alpha. It is intended for file inspection, validation, research, and conversion pipelines where preserving the transmitted structure matters more than silently approximating unsupported data.
Features
- Inspect X_T and X_B headers without a schema catalog.
- Parse the verified Onshape V30 subset without an external schema file.
- Use an explicit schema provider for inputs outside the built-in profile.
- Reconstruct an unmodified parsed X_B document byte-for-byte.
- Compare X_T and X_B documents after pointer-index remapping.
- Map supported topology, analytic geometry, and NURBS records to a typed B-Rep source model.
- Parse, map, and summarize one file with
read_brep()or the human-readablecheckcommand. - Convert the exact optional OCCT subset and export validated AP242 plus a provenance sidecar without routing through CadQuery.
- Wrap the same strict conversion as CadQuery
Shapevalues for immediate inspection and downstream CadQuery operations. - Write a bounded GLB/source manifest and inspect faces or edges in a bundled, offline local WebGL viewer.
- Return structured diagnostics and enforce configurable resource limits.
- Use the same functionality from Python or a command-line interface with deterministic JSON output where required.
See format support and limitations before relying on the parser for production data.
Installation
Python 3.10 or newer is required. Install the current development release from PyPI:
python -m pip install --pre parasolid-kit
The --pre option is required while only development releases are available.
To install the current release by exact version instead:
python -m pip install "parasolid-kit==0.1.0.dev3"
Stable releases, once available, can be installed without --pre:
python -m pip install parasolid-kit
Alternatively, install a downloaded wheel directly:
python -m pip install /path/to/parasolid_kit-0.1.0.dev3-cp310-abi3-PLATFORM.whl
Header inspection works immediately after installation. Complete parsing and
B-Rep checking also work without a schema file for the built-in
SCH_3000000_30000 profile (verified_subset): Onshape V30 text/neutral binary
exports of single solid boxes, prisms, cylinders, and through-holes with zero
user fields. Other keys and uncovered types require an explicit provider; see
Schema catalogs. STEP, CadQuery, and preview operations also
require an optional runtime and geometry supported by that adapter.
Optional interoperability profiles
The base install remains parser-only and has no runtime dependency on a geometry kernel. Two mutually exclusive profiles establish the optional OCCT boundary:
# Headless OCP runtime without CadQuery or VTK; Python 3.10+
python -m pip install --pre "parasolid-kit[occt]"
# CadQuery and its full OCP runtime; Linux/macOS, Python 3.11+
python -m pip install --pre "parasolid-kit[cadquery]"
Do not install both profiles in one environment. Their OCP distributions can
provide the same Python import namespace; parasolid-kit detects that state
before importing OCP and reports commands for returning to one profile. There
is intentionally no [all] extra.
The base parser and [occt] profile support Linux, macOS, and Windows.
The [cadquery] profile supports Linux and macOS. On Windows, the tested
CadQuery runtime crashes during process shutdown, so CadQuery adapter calls
raise interop.unsupported_platform before importing the native runtime.
Use [occt] on Windows for conversion, STEP export, and preview.
On Intel macOS, the CadQuery extra uses Numba 0.62.x, the last release series with prebuilt wheels for that platform. Use Python 3.11–3.13 for this profile on Intel Macs; see Numba's platform notice.
The [occt] profile converts the documented exact I7 subset from BrepModel into a
validated OCCT shape and can export that result directly as AP242. The
[cadquery] profile runs the same strict converter with CadQuery's full OCP
runtime and exposes the result through CadQuery Shape objects. Tessellation
and the local viewer use the same OCCT result and are available in either
optional profile; they do not require VTK, a CDN, or Node.js at runtime.
You can confirm that one optional runtime is usable without importing it during normal parsing:
from parasolid_kit.interop import require_occt
OCP = require_occt() # imports OCP only after distribution checks pass
Convert a parsed result by naming the source length unit explicitly:
from parasolid_kit import read_brep
from parasolid_kit.interop.occt import to_occt, write_step
parsed = read_brep("box-v30.x_t")
converted = to_occt(
parsed.brep,
source_unit="m",
target_unit="mm",
)
print(converted.report.occt_valid)
print(converted.report.metrics.to_dict())
print(converted.source_map.to_dict())
shape = converted.shape # owned TopoDS_Shape runtime object
exported = write_step(
converted,
"model.step",
output_unit="mm",
)
print(exported.report.validation.passed)
print(exported.sidecar_path) # model.step.conversion.json
With the [cadquery] profile, the shortest interactive confirmation path is:
from parasolid_kit.interop.cadquery import to_cadquery, to_cadquery_shapes
shape = to_cadquery(parsed.brep, source_unit="m")
print(type(shape).__name__, shape.BoundingBox(), shape.Area())
print(sum(solid.Volume() for solid in shape.Solids())) # solid-only volume
# One immutable tuple entry per source body, in source order.
body_shapes = to_cadquery_shapes(parsed.brep, source_unit="m")
A single source body becomes its most specific CadQuery Shape subclass;
multiple bodies become a cadquery.Compound. The adapter does not infer a
cadquery.Assembly, reconstruct a Workplane chain, or recreate editable
feature history. Source mapping belongs to the original conversion result and must not
be treated as valid after a returned CadQuery object is modified.
Generate a persistent, self-contained preview from that same conversion:
from parasolid_kit.interop.preview import PreviewOptions, write_preview
preview = write_preview(
converted,
parsed.brep,
"model.parasolid-preview",
options=PreviewOptions(linear_deflection=0.1),
)
print(preview.index_path, preview.report.to_dict())
The directory contains index.html, viewer.js, viewer.css, preview.glb,
and preview.manifest.json. Each face/edge primitive retains its
conversion-local key plus Parasolid entity ID, source node ID, byte range,
geometry kind, and diagnostics. The manifest never includes raw source bytes
or a path-like source_identity; only an exact sha256:<digest> is retained.
I7 extends the exact OCCT path with ellipses, parabolas, hyperbolas, explicit
trimmed curves, cone frustums, untrimmed spheres and ring tori, open
non-periodic non-rational 3D NURBS, and exact offset surfaces.
geometry_coverage() exposes the parser, OCCT, STEP, and constraint status
without importing OCP. Rational, closed, or periodic NURBS, pcurves,
intersection curves, and blend surfaces remain explicit errors; they are not
approximated from incomplete semantics. Unknown orientation, invalid
references or topology, metric disagreement, and requested healing likewise
stop with OcctConversionError, whose partial report retains the diagnostic.
Generated OCCT seam/boundary topology remains explicit in the source map.
write_step() accepts only a complete, valid OcctConversionResult. It stages
both outputs, cold-reimports the STEP in a separate Python process, and commits
the final paths only after body/face counts, validity, bounding box, area, and
volume pass. Existing output is rejected unless overwrite=True. The sidecar
contains versions, units, conversion status, metrics, limits, and the complete
source mapping; a caller-provided path-like source identity is omitted by
default. A source_identity="sha256:<digest>" remains safe to retain.
To install from a source checkout, Rust 1.88 or newer is also required:
git clone https://github.com/monozukuri-ai/parasolid-kit.git
cd parasolid-kit
python -m pip install .
Schema catalogs
The built-in onshape-sch30000-r1 profile (revision 1, verified_subset) is
selected when neither a provider nor a schema directory is supplied and the
internal key is exactly SCH_3000000_30000. It needs no catalog, network, or
CAD installation at runtime. Profile provenance and coverage
records its source, canonical hash, and validation scope.
Use an external catalog for other keys, including embedded-base keys, or for
types outside the built-in subset. An explicit provider is authoritative: an
empty provider or missing exact catalog fails without switching to the built-in
profile. schema_provider=None means default selection. Nearby versions and
the human-readable X_T common-header SCH value are never used as substitutes.
Siemens schema catalogs are not included in this repository or its packages.
Obtain the catalog from a Parasolid SDK or a Parasolid-based product available
to you, then point --schema-dir at the directory that contains it. The parser
reads the catalog in place and does not copy it into the package.
1. Find the required catalog
Inspecting the header does not require a catalog:
parasolid-kit inspect model.x_b
Read header.schema_key in the JSON output. When using an external provider,
the required filename is selected as follows:
| Internal schema key | Required catalog |
|---|---|
SCH_3000000_30000 |
sch_30000.sch_txt |
SCH_3000310_30000_13006 |
sch_13006.sch_txt |
For a two-number key, use the second number. For a three-number embedded-base key, use the third number. This value is also called the provider schema.
2. Obtain and locate the catalog
- If you already have a Parasolid SDK or a Parasolid-based CAD product, search
its installation directory for the exact filename. Product layouts vary;
schema directories are commonly named
schema, and an installation used during this project's validation placed them underETC/schema. - If you do not have a suitable installation, request access through the
Siemens Parasolid SDK,
the Siemens 3D SDK trial page,
or Parasolid Support.
Ask specifically for the numeric schema version reported by
inspect. - If the X_T/X_B file came from another CAD system, its vendor or the file producer may be able to supply the matching catalog or export to a Parasolid version for which you already have one.
For example, search a known product installation directory without scanning the whole machine:
# Linux or macOS
find /path/to/product -type f -iname 'sch_13006.sch_txt'
# Windows PowerShell
Get-ChildItem 'C:\path\to\product' -Recurse -File -Filter 'sch_13006.sch_txt'
Pass the containing directory, not the catalog file itself:
parasolid-kit check model.x_b --schema-dir /path/to/product/ETC/schema
DirectorySchemaProvider loads only the exact
sch_<provider-schema>.sch_txt filename and verifies that the identifier inside
the catalog matches. A similarly numbered catalog is not substituted.
Python example
from pathlib import Path
from parasolid_kit import read_brep
source = Path("model.x_b")
parsed = read_brep(
source,
)
print(parsed.summary.to_dict())
print(len(parsed.document.nodes), len(parsed.brep.bodies), parsed.complete)
read_brep() selects X_T/X_B from a known suffix or signature, resolves the
exact built-in profile (or an explicitly supplied catalog), parses the document,
maps the B-Rep, and returns all three views as ParsedBrep.
parsed.document.schema_resolution and parsed.summary.schema_resolution
record the selected provider and built-in profile metadata.
The lower-level inspect_xb(), parse_xb(), map_brep(), and write_xb()
APIs remain available when each stage must be controlled independently.
map_brep() can return a valid but incomplete model when a well-formed geometry
record has no typed mapping yet. Inspect parsed.complete and
parsed.brep.diagnostics instead of assuming that every parsed record has been
interpreted.
Command line
These examples assume an input covered by the built-in profile. Add
--schema-dir /path/to/schema to select an external catalog explicitly.
# Header inspection does not need a schema catalog.
parasolid-kit inspect model.x_b
# Parse, map, and print a compact human-readable report.
parasolid-kit check model.x_b
# Use stable JSON when the result is consumed by another program.
parasolid-kit check model.x_t --json
# These examples use the exact built-in SCH_3000000_30000 subset.
parasolid-kit parse model.x_t
parasolid-kit parse model.x_b --brep
parasolid-kit compare model.x_t model.x_b
# Requires one optional profile; source units are explicit and output is
# cold-reimported before model.step becomes visible.
parasolid-kit export-step model.x_t model.step \
--source-unit m
# Generate the same bounded artifacts, bind an ephemeral localhost port, and
# open the bundled offline viewer. Use --no-open for remote/CI shells.
parasolid-kit view model.x_t \
--source-unit m
check is human-readable by default and accepts --json; the existing
inspect, parse, compare, export-step, and view reports remain JSON.
view writes <input-stem>.parasolid-preview before serving only its five
fixed resources from 127.0.0.1 and an ephemeral port. --write-only retains
the artifacts without a server, --overwrite replaces an existing output,
and non-loopback --host values require the separate --allow-external
acknowledgement. Partial display is opt-in with --allow-partial and always
shows a warning plus the missing-entity list. Exit
status is 0 for a complete/exported result or equivalent documents, 1 for
an incomplete B-Rep mapping or a valid comparison that found differences, and
2 for input, schema, parse, conversion, or export errors.
python -m parasolid_kit provides the same interface.
Documentation
- Python API
- Format support and limitations
- Built-in profile provenance
- Corpus provenance and redistribution policy
Project boundaries
parasolid-kit does not parse native CAD containers such as iCAD .icd, CAD
assembly structures, occurrence transforms, visibility, or appearance. A
format-specific adapter can extract a bounded X_T/X_B payload and pass it to
this package without making the parser depend on that CAD product.
The base package has no runtime dependency on a CAD product, geometry kernel, or OpenCascade binding. Optional profiles add an explicitly selected OCP or CadQuery runtime without making it part of the parser core. The package does not bundle Siemens schema data or proprietary CAD files.
License
This project is licensed under the MIT License.
Metadata
Release files for parasolid-kit 0.1.0.dev3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| parasolid_kit-0.1.0.dev3.tar.gz | 299.8 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| parasolid_kit-0.1.0.dev3-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details |
| parasolid_kit-0.1.0.dev3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| parasolid_kit-0.1.0.dev3-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details |
| parasolid_kit-0.1.0.dev3-cp310-abi3-macosx_10_12_x86_64.whl | CPython 3.10 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 3.3 MB
Release files / parasolid_kit-0.1.0.dev3.tar.gz
| Download URL | parasolid_kit-0.1.0.dev3.tar.gz |
|---|---|
| Size | 299.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
622b7d5dbe9b0ee75de6c9f216a1b653bda90c7396ba904addef60f87fedfc12
|
|
BLAKE2b-256 checksum How to use checksums |
a8f79f481312a8bb766f8772355218152a9a0f6ff8f868f34f74f96ef139b709
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.
Transparency logRelease files / parasolid_kit-0.1.0.dev3-cp310-abi3-win_amd64.whl
| Download URL | parasolid_kit-0.1.0.dev3-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 648.2 kB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
5d58361eba04d718498097d88cb5b38a6bdd9a46fb6d9ae2e65dc15736c1d2aa
|
|
BLAKE2b-256 checksum How to use checksums |
e3e616ae685d7c41efb72c00b6f318abaaa0f1cee6910908bff8ce42d10a9fa0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.
Transparency logRelease files / parasolid_kit-0.1.0.dev3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | parasolid_kit-0.1.0.dev3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 811.1 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
957ea641fc585de5d26ca9e489e53592215a584dda969384782aa5e61d4011e6
|
|
BLAKE2b-256 checksum How to use checksums |
2922a83d1522d4d50a664b53a1311618abb2b8072bea4303c21f0686c6ab944b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.
Transparency logRelease files / parasolid_kit-0.1.0.dev3-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | parasolid_kit-0.1.0.dev3-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 743.3 kB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a6447185997877d015c4dc274debfa9d7e791aca7ebdb94bf39011d8621fa535
|
|
BLAKE2b-256 checksum How to use checksums |
df7a4c322cd7f4163f77fef6260b80a9976c8d8741235a82cd2a3661effa9a4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.
Transparency logRelease files / parasolid_kit-0.1.0.dev3-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | parasolid_kit-0.1.0.dev3-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 753.8 kB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
4c574eaad8abbb2c4141f9a0db24d7d6278d3a559ba1a3a82415422c94d726c8
|
|
BLAKE2b-256 checksum How to use checksums |
4db6d2d1fca1692d8c24fa63d05df7ec334a29edf46e63081795ec147c7977cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.
Transparency log