Skip to main content

cad3d-ir-parasolid

cad3d-ir-parasolid imports Parasolid transmit files (.x_t, .x_b, .xmt_txt, .xmt_bin) into cad3d-ir through parasolid-kit. parasolid-kit parses the file with its built-in schema profiles (no Parasolid installation or schema catalog) and converts the B-Rep into exact OCCT bodies; the adapter scales them from the file's metres to millimetres, drops the faces whose construction fails (the body is kept as an open shell and the loss is reported), places the bodies by the assembly instances the file stores, colours and names them from the SDL/TYSA_COLOUR and SDL/TYSA_NAME attributes and writes one glTF binary with the same conventions as the STEP adapter. Because the bodies are exact B-Rep, the same package can be written as a STEP assembly (export_step), with the names and colours.

What the adapter reports but does not map: attributes other than the system colour and name, negative instances (placed like positive ones), general affine or perspective instance transforms. A file whose schema key no built-in profile covers (a Parasolid version parasolid-kit has not reviewed) fails closed with PARASOLID_SCHEMA_UNSUPPORTED, naming the writing application and Parasolid version from the file's common header.

The distribution depends on cad3d-ir, cad3d-ir-step (tessellation and the STEP writer) and parasolid-kit[occt]; the core distribution does not depend on this adapter.

Usage

from pathlib import Path

from cad3d_ir import DirectoryResourceWriter
from cad3d_ir.importers import ImportOptions
from cad3d_ir_parasolid import ParasolidImporter, export_step

result = ParasolidImporter().import_file(
    Path("part.x_t"),
    options=ImportOptions(include_visualization_mesh=True, include_brep=False),
    resources=DirectoryResourceWriter("converted"),
)
print(result.statistics["bodies_converted"], result.statistics["triangles"])
for item in result.diagnostics:
    print(item.code, item.message)

export_step(Path("part.x_t"), Path("part.step"), schema="AP214")
cad3d-ir-parasolid part.x_t converted --step part.step

Package layout

  • One root ProductDefinition for the file. Without assemblies it is a part whose configuration lists every converted body. With assemblies it is an assembly whose configuration places each root assembly; one product per assembly and one part product per body an instance places, with one Occurrence per instance carrying the stored transform (translation in millimetres).
  • One Body per converted body, named from SDL/TYSA_NAME when present, with a brep representation when include_brep is set (one OCCT BREP resource per body).
  • One package Visualization (GLB, millimetres, Z up): one glTF node per placement, one mesh per body shared between its placements, one material per colour (body colour, face colours by TopExp::MapShapes index).

Diagnostics

Code Meaning
PARASOLID_EXACT_BREP Geometry is the file's own B-Rep converted to OCCT (info)
PARASOLID_UNIT_M Lengths were converted from metres to millimetres (info)
PARASOLID_COLOURS_FROM_ATTRIBUTES Body and face colours come from SDL/TYSA_COLOUR (info)
PARASOLID_ATTRIBUTES_NOT_MAPPED Other attributes are not mapped; identifiers listed (info)
PARASOLID_ASSEMBLY_STRUCTURE Assemblies and instances became occurrences (info)
PARASOLID_SCHEMA_FAMILY_MATCH A Parasolid build without its own profile was read with its schema family (info)
PARASOLID_FACES_DROPPED Faces that could not be built were dropped; bodies kept as open shells
PARASOLID_SHAPE_INVALID OCCT's BRepCheck rejected the converted shape; shown as built
PARASOLID_BODY_UNSUPPORTED Bodies that did not convert, with reasons
PARASOLID_GEOMETRY_UNSUPPORTED Geometry records parasolid-kit does not decode
PARASOLID_NEGATIVE_INSTANCE Negative (subtracted) instances placed like positive ones
PARASOLID_TRANSFORM_UNSUPPORTED General affine or perspective transforms replaced by identity
PARASOLID_ASSEMBLY_TRUNCATED Nesting deeper than 64 levels not expanded
PARASOLID_MESH_FAILED Bodies that could not be tessellated
PARASOLID_CONVERSION_FAILED The bodies could not be converted to OCCT (error)
PARASOLID_LIMIT parasolid-kit stopped at a resource limit (error)
PARASOLID_KERNEL_MISSING parasolid-kit's occt extra is not installed (error)
PARASOLID_PARSE_FAILED The transmit file could not be read (error)
PARASOLID_SCHEMA_UNSUPPORTED The schema key is not covered by a built-in profile (error)
PARASOLID_NO_GEOMETRY No body yielded a displayable shape (error)

statistics carries the schema key and profile (schema_coverage is family_inferred when another Parasolid build of a reviewed schema was read), the writing application and Parasolid version, body counts by outcome, dropped faces, assembly and instance counts, the attribute identifiers seen, triangle counts and the parse and conversion times, so a caller can show what was and was not read.

License

MIT, like cad3d-ir and parasolid-kit. Parasolid is a trademark of Siemens Industry Software Inc.; this adapter reads the public transmit format and ships no Siemens software or schema catalog.

Metadata

Release files for cad3d-ir-parasolid 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cad3d-ir-parasolid 0.3.1
File Size Uploaded Provenance Actions
cad3d_ir_parasolid-0.3.1.tar.gz 38.5 kB Without provenance Details for cad3d_ir_parasolid-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cad3d-ir-parasolid 0.3.1
File Interpreter ABI Platform Actions
cad3d_ir_parasolid-0.3.1-py3-none-any.whl Python 3 none any Details for cad3d_ir_parasolid-0.3.1-py3-none-any.whl

Total release size: 67.5 kB

Release files / cad3d_ir_parasolid-0.3.1.tar.gz

Download URL cad3d_ir_parasolid-0.3.1.tar.gz
Size 38.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ecd23dec69c81fa744aa45d54bb6140add4d855e898222d0392e42a099fb726b
BLAKE2b-256 checksum
How to use checksums
9fe11788cde8639781a55dd7e83db0079b60835483f94092bcbcb35d87e4733b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / cad3d_ir_parasolid-0.3.1-py3-none-any.whl

Download URL cad3d_ir_parasolid-0.3.1-py3-none-any.whl
Size 29.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
348274312d5e7696ae691c99f6e60f618eb9fbd977ae8fc61425d19944b1a9cf
BLAKE2b-256 checksum
How to use checksums
19e5e2410c6376de864fe54450ff66d9ad637e03e03d0007a20533716399c483
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for cad3d-ir-parasolid 0.3.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page