cad3d-ir-icad
cad3d-ir-icad imports iCAD SX models (.icd, parts and assemblies in one
file) into cad3d-ir through
icadkit. It takes the final
bodies iCAD SX saves with each part (embedded Parasolid resources that icadkit
converts into exact OCCT solids through parasolid-kit), places them by the
saved part frames and writes one glTF binary with the same conventions as the
STEP adapter. Native primitives and V7L7 CSG results stand in when a part
stores no saved body. Because the solids are exact B-Rep, the same package can
be written as a STEP assembly (export_step).
What the adapter reports but does not map: colours (iCAD stores palette
indices), the 2D drawing views stored in the same file, and parts that are
external references to other .icd files. Versions icadkit has not qualified
(V8L5 and later with icadkit 0.3.14, which added V8L4; see
icadkit.qualified_versions()) fail closed with ICD_VERSION_UNQUALIFIED.
The distribution depends on cad3d-ir, cad3d-ir-step (tessellation and the
STEP writer) and icadkit[preview]; 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_icad import IcadImporter, export_step
result = IcadImporter().import_file(
Path("assembly.icd"),
options=ImportOptions(include_visualization_mesh=True, include_brep=False),
resources=DirectoryResourceWriter("converted"),
)
print(result.statistics["parts_converted"], result.statistics["triangles"])
for item in result.diagnostics:
print(item.code, item.message)
export_step(Path("assembly.icd"), Path("assembly.step"), schema="AP214")
cad3d-ir-icad assembly.icd converted --step assembly.step
Package layout
- One
ProductDefinitionandConfigurationper saved part record (the document root included); oneOccurrenceper child record with the saved local transform, so the product tree follows the iCAD part tree. - One
Bodyper part that converted, with abreprepresentation wheninclude_brepis set (one OCCT BREP resource per distinct solid). - One package
Visualization(GLB, millimetres, Z up): one glTF node per part record, parts with identical solids share one mesh.
Diagnostics
| Code | Meaning |
|---|---|
ICD_SAVED_BREP |
Geometry comes from the saved solids (info) |
ICD_APPEARANCE_NOT_MAPPED |
Palette colours are not mapped; default colour (info) |
ICD_2D_VIEWS_PRESENT |
The file also stores 2D drawing views (info) |
ICD_BODY_UNSUPPORTED |
Parts with saved bodies that did not convert, with reasons |
ICD_EXTERNAL_PART_MISSING |
Parts referencing other .icd files that were not provided |
ICD_PLACEMENT_UNQUALIFIED |
Parts without a qualified frame, placed at their parent's origin |
ICD_PART_ORPHAN |
Part records not linked to the root, placed as roots |
ICD_LEGACY_VERSION_NO_GEOMETRY |
A version whose native geometry icadkit does not evaluate |
ICD_REGISTERED_PART |
A registered 2D library part; no 3D model |
ICD_MESH_FAILED |
Solids that could not be tessellated |
ICD_SHAPE_LIMIT |
icadkit stopped at a resource limit |
ICD_KERNEL_MISSING |
The preview extra (parasolid-kit[occt]) is not installed |
ICD_NO_GEOMETRY |
No part yielded a displayable solid |
ICD_VERSION_UNQUALIFIED |
The saved version is not qualified by icadkit (error) |
statistics carries the saved version (icd_version), part and body counts
by outcome, the number of shared meshes, triangle counts and the 2D view
count, so a caller can show what was and was not read.
License
PolyForm Noncommercial 1.0.0, following icadkit. Commercial licences are available from UnRobotics Inc.
Metadata
Release files for cad3d-ir-icad 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cad3d_ir_icad-0.3.1.tar.gz | 29.8 kB | Without provenance | Details for cad3d_ir_icad-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cad3d_ir_icad-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for cad3d_ir_icad-0.3.1-py3-none-any.whl |
Total release size: 55.8 kB
Release files / cad3d_ir_icad-0.3.1.tar.gz
| Download URL | cad3d_ir_icad-0.3.1.tar.gz |
|---|---|
| Size | 29.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a4ced2cc845beef54d097aba0ac3f66abcb5ebac5c17d3e20909a43ca5cfe7de
|
|
BLAKE2b-256 checksum How to use checksums |
11912df380c7cecfa3d7bfe3b21ba63bd28e6f66b1a30b93976e413b8c193cfc
|
| 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_icad-0.3.1-py3-none-any.whl
| Download URL | cad3d_ir_icad-0.3.1-py3-none-any.whl |
|---|---|
| Size | 26.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7335f0a2a8b3c5455d5a6b0bd6d6b755e585f0988d3bccd18f02d9c1d042a8de
|
|
BLAKE2b-256 checksum How to use checksums |
85e7edd0bf8db45321f4e26cc690ee88d00e882667a0976a0d6e09f076ba33af
|
| 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-icad 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.