icadkit 0.3.12__tar.gz → 0.3.14__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {icadkit-0.3.12 → icadkit-0.3.14}/Cargo.lock +4 -4
- {icadkit-0.3.12 → icadkit-0.3.14}/Cargo.toml +2 -2
- {icadkit-0.3.12 → icadkit-0.3.14}/LICENSES/rust-dependencies.txt +1 -1
- {icadkit-0.3.12 → icadkit-0.3.14}/PKG-INFO +3 -3
- {icadkit-0.3.12 → icadkit-0.3.14}/README.md +1 -1
- {icadkit-0.3.12 → icadkit-0.3.14}/crates/icad-core/LICENSE +1 -1
- {icadkit-0.3.12 → icadkit-0.3.14}/crates/icad-core/src/lib.rs +6 -2
- {icadkit-0.3.12 → icadkit-0.3.14}/crates/icad-core/src/native.rs +152 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/crates/icad-core/src/parts.rs +37 -12
- {icadkit-0.3.12 → icadkit-0.3.14}/crates/icad-core/src/views.rs +2 -2
- {icadkit-0.3.12 → icadkit-0.3.14}/crates/icad-python/LICENSE +1 -1
- {icadkit-0.3.12 → icadkit-0.3.14}/crates/icad-python/src/brep.rs +4 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/crates/icad-python/src/document.rs +1 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/docs/api.md +1 -1
- {icadkit-0.3.12 → icadkit-0.3.14}/docs/changelog.md +71 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/docs/drawing.md +1 -1
- {icadkit-0.3.12 → icadkit-0.3.14}/docs/native.md +22 -2
- {icadkit-0.3.12 → icadkit-0.3.14}/docs/parts.md +15 -5
- {icadkit-0.3.12 → icadkit-0.3.14}/docs/references.md +1 -1
- {icadkit-0.3.12 → icadkit-0.3.14}/docs/saved-bodies.md +22 -10
- {icadkit-0.3.12 → icadkit-0.3.14}/docs/support.md +9 -4
- {icadkit-0.3.12 → icadkit-0.3.14}/docs/viewer.md +2 -2
- {icadkit-0.3.12 → icadkit-0.3.14}/pyproject.toml +1 -1
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/_core.pyi +1 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/_csg_occt.py +26 -7
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/_preview_bridge.py +1 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/_saved_occt.py +24 -9
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/_shape_occt.py +10 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/drawing.py +1 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/geometry.py +3 -1
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/native.py +7 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/references.py +1 -1
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/saved.py +12 -2
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/shape.py +15 -9
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/versions.py +13 -2
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/viewer.py +1 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/part_fixtures.py +2 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_api.py +4 -4
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_drawing.py +1 -1
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_geometry.py +25 -5
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_part_profiles.py +2 -1
- icadkit-0.3.12/tests/test_v8l4_boundary.py → icadkit-0.3.14/tests/test_unknown_version_boundary.py +6 -5
- icadkit-0.3.14/tests/test_v8l4_parts.py +145 -0
- icadkit-0.3.14/tests/test_v8l4_saved.py +347 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_views_placement.py +4 -4
- {icadkit-0.3.12 → icadkit-0.3.14}/uv.lock +7 -7
- {icadkit-0.3.12 → icadkit-0.3.14}/COMMERCIAL-LICENSE.md +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/LICENSE +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/LICENSES/Apache-2.0.txt +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/LICENSES/PolyForm-Noncommercial-1.0.0.md +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/LICENSES/parasolid-core-MIT.txt +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/THIRD_PARTY_NOTICES.md +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/corpus/README.md +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/corpus/generate.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/corpus/public.jsonl +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/crates/icad-core/Cargo.toml +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/crates/icad-core/build.rs +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/crates/icad-core/src/compression.rs +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/crates/icad-core/src/container.rs +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/crates/icad-core/src/document.rs +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/crates/icad-core/src/error.rs +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/crates/icad-core/src/header.rs +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/crates/icad-core/src/limits.rs +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/crates/icad-core/src/parasolid.rs +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/crates/icad-core/src/provenance.rs +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/crates/icad-core/src/reader.rs +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/crates/icad-core/src/record.rs +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/crates/icad-core/src/resource.rs +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/crates/icad-core/src/schema.rs +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/crates/icad-core/src/trailer.rs +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/crates/icad-core/tests/container.rs +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/crates/icad-core/tests/header.rs +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/crates/icad-core/tests/resources.rs +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/crates/icad-python/Cargo.toml +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/crates/icad-python/src/geometry.rs +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/crates/icad-python/src/lib.rs +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/crates/icad-python/src/schema.rs +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/docs/csg.md +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/docs/license.md +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/docs/parameters.md +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/docs/preview.md +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/docs/roadmap.md +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/docs/shapes.md +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/docs/trailer.md +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/docs/writing.md +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/scripts/bump_version.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/scripts/check_license.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/scripts/check_public_tree.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/scripts/test_publication.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/scripts/test_versions.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/scripts/verify_artifacts.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/scripts/verify_corpus.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/scripts/verify_install.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/scripts/verify_native_corpus.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/__init__.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/__main__.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/_viewer/index.html +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/_viewer/viewer.css +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/_viewer/viewer.js +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/_viewer_io.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/api.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/cli.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/container.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/csg.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/document.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/errors.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/models.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/parameters.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/parts.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/preview.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/py.typed +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/schema.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/trailer.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/views.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/src/icadkit/write.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/conftest.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/drawing_fixtures.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/fixture_builders.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/geometry_fixtures.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/parameter_fixtures.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/preview_fixtures.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/saved_fixtures.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_cli.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_container.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_corpus.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_csg.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_distribution.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_extrusion.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_followup_parts.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_inspect.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_legacy_parts.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_mirrors.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_native.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_native_corpus.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_native_round.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_parameters.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_part_semantics.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_parts.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_parts_material.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_preview.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_profile_shapes.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_references.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_resource_cli.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_resources.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_saved.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_shape.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_trailer.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_v7_parts.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_version_geometry.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_viewer.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/test_write.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/trailer_fixtures.py +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/viewer_assembly_browser.mjs +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/viewer_browser.mjs +0 -0
- {icadkit-0.3.12 → icadkit-0.3.14}/tests/viewer_mirror_browser.mjs +0 -0
|
@@ -89,7 +89,7 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
|
89
89
|
|
|
90
90
|
[[package]]
|
|
91
91
|
name = "icad-core"
|
|
92
|
-
version = "0.3.
|
|
92
|
+
version = "0.3.14"
|
|
93
93
|
dependencies = [
|
|
94
94
|
"flate2",
|
|
95
95
|
"parasolid-core",
|
|
@@ -99,7 +99,7 @@ dependencies = [
|
|
|
99
99
|
|
|
100
100
|
[[package]]
|
|
101
101
|
name = "icad-python"
|
|
102
|
-
version = "0.3.
|
|
102
|
+
version = "0.3.14"
|
|
103
103
|
dependencies = [
|
|
104
104
|
"icad-core",
|
|
105
105
|
"parasolid-core",
|
|
@@ -142,9 +142,9 @@ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
|
142
142
|
|
|
143
143
|
[[package]]
|
|
144
144
|
name = "parasolid-core"
|
|
145
|
-
version = "0.3.
|
|
145
|
+
version = "0.3.12"
|
|
146
146
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
147
|
-
checksum = "
|
|
147
|
+
checksum = "a32654f3e5ffd2d2bc8ea581248b4197d6dbf589552c83e22eb28e78f9190d8f"
|
|
148
148
|
|
|
149
149
|
[[package]]
|
|
150
150
|
name = "portable-atomic"
|
|
@@ -4,13 +4,13 @@ resolver = "3"
|
|
|
4
4
|
|
|
5
5
|
[workspace.package]
|
|
6
6
|
# Release version source. Update with: python3 scripts/bump_version.py X.Y.Z
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.14"
|
|
8
8
|
edition = "2024"
|
|
9
9
|
rust-version = "1.88"
|
|
10
10
|
license = "PolyForm-Noncommercial-1.0.0"
|
|
11
11
|
|
|
12
12
|
[workspace.dependencies]
|
|
13
|
-
parasolid-core = "=0.3.
|
|
13
|
+
parasolid-core = "=0.3.12"
|
|
14
14
|
pyo3 = { version = "=0.29.2", features = ["abi3-py310"] }
|
|
15
15
|
flate2 = { version = "1", default-features = false, features = ["rust_backend"] }
|
|
16
16
|
sha2 = "0.10"
|
|
@@ -134,7 +134,7 @@ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
|
134
134
|
DEALINGS IN THE SOFTWARE.
|
|
135
135
|
|
|
136
136
|
|
|
137
|
-
=== parasolid-core 0.3.
|
|
137
|
+
=== parasolid-core 0.3.12 (MIT AND Apache-2.0) ===
|
|
138
138
|
MIT License
|
|
139
139
|
|
|
140
140
|
Copyright (c) 2026 parasolid-kit contributors
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: icadkit
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.14
|
|
4
4
|
Classifier: Development Status :: 2 - Pre-Alpha
|
|
5
5
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
6
6
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
7
7
|
Classifier: Programming Language :: Rust
|
|
8
8
|
Classifier: Typing :: Typed
|
|
9
|
-
Requires-Dist: parasolid-kit[occt]
|
|
9
|
+
Requires-Dist: parasolid-kit[occt]>=0.3.12,<0.4 ; extra == 'preview'
|
|
10
10
|
Provides-Extra: preview
|
|
11
11
|
License-File: LICENSE
|
|
12
12
|
License-File: COMMERCIAL-LICENSE.md
|
|
@@ -138,7 +138,7 @@ also displays qualified cones/frusta and full ring tori. The built-in exact V34
|
|
|
138
138
|
profile covers qualified toroidal resources without an external catalog.
|
|
139
139
|
|
|
140
140
|
Qualified millimetre frames and bounded native/saved geometry cover
|
|
141
|
-
V7L6/V7L7 and V8L1/V8L2/V8L3, including internal mirrors.
|
|
141
|
+
V7L6/V7L7 and V8L1/V8L2/V8L3/V8L4, including internal mirrors.
|
|
142
142
|
Signed occurrence orientation is separate from already placed geometry; see
|
|
143
143
|
[mirror semantics](docs/parts.md#coordinate-frames-and-units). Explicit
|
|
144
144
|
[external-reference resolution](docs/references.md) now composes qualified child
|
|
@@ -110,7 +110,7 @@ also displays qualified cones/frusta and full ring tori. The built-in exact V34
|
|
|
110
110
|
profile covers qualified toroidal resources without an external catalog.
|
|
111
111
|
|
|
112
112
|
Qualified millimetre frames and bounded native/saved geometry cover
|
|
113
|
-
V7L6/V7L7 and V8L1/V8L2/V8L3, including internal mirrors.
|
|
113
|
+
V7L6/V7L7 and V8L1/V8L2/V8L3/V8L4, including internal mirrors.
|
|
114
114
|
Signed occurrence orientation is separate from already placed geometry; see
|
|
115
115
|
[mirror semantics](docs/parts.md#coordinate-frames-and-units). Explicit
|
|
116
116
|
[external-reference resolution](docs/references.md) now composes qualified child
|
|
@@ -584,7 +584,7 @@ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
|
584
584
|
DEALINGS IN THE SOFTWARE.
|
|
585
585
|
|
|
586
586
|
|
|
587
|
-
=== parasolid-core 0.3.
|
|
587
|
+
=== parasolid-core 0.3.12 (MIT AND Apache-2.0) ===
|
|
588
588
|
MIT License
|
|
589
589
|
|
|
590
590
|
Copyright (c) 2026 parasolid-kit contributors
|
|
@@ -87,9 +87,13 @@ mod tests {
|
|
|
87
87
|
assert!(!info.builtin_profile_ids.is_empty());
|
|
88
88
|
let registry = BuiltinProfileRegistry::compiled()?;
|
|
89
89
|
let covered = SchemaKey::parse("SCH_3000310_30000_13006")?;
|
|
90
|
-
//
|
|
91
|
-
|
|
90
|
+
// Another modeller build of a covered schema resolves through the
|
|
91
|
+
// schema family derived from its reviewed profiles (parasolid-core
|
|
92
|
+
// 0.3.12); a schema without any reviewed profile never does.
|
|
93
|
+
let same_schema = SchemaKey::parse("SCH_3000311_30000_13006")?;
|
|
94
|
+
let uncovered = SchemaKey::parse("SCH_3000311_30001_13006")?;
|
|
92
95
|
assert!(registry.provider_for_key(&covered).is_some());
|
|
96
|
+
assert!(registry.provider_for_key(&same_schema).is_some());
|
|
93
97
|
assert!(registry.provider_for_key(&uncovered).is_none());
|
|
94
98
|
Ok(())
|
|
95
99
|
}
|
|
@@ -22,6 +22,12 @@ pub struct NativeEntityRecord {
|
|
|
22
22
|
pub byte_range: ByteRange,
|
|
23
23
|
pub source_id: Option<u32>,
|
|
24
24
|
pub raw_type: Option<u32>,
|
|
25
|
+
/// The qualified record kind: a primitive kind, construction geometry
|
|
26
|
+
/// (`reference_point`, `reference_plane`, `reference_axis`) or an
|
|
27
|
+
/// annotation (`text`, `note`, `dimension`, `angular_dimension`,
|
|
28
|
+
/// `diameter_dimension`, `coordinate_systems`, `annotation`). None while
|
|
29
|
+
/// the layout is unqualified.
|
|
30
|
+
pub kind: Option<&'static str>,
|
|
25
31
|
pub layer: Option<u32>,
|
|
26
32
|
pub color_index: Option<u32>,
|
|
27
33
|
pub visible: Option<bool>,
|
|
@@ -52,6 +58,7 @@ fn undecoded_entity(bytes: &[u8], byte_range: ByteRange) -> NativeEntityRecord {
|
|
|
52
58
|
byte_range,
|
|
53
59
|
source_id: None,
|
|
54
60
|
raw_type: (bytes.len() >= 16).then(|| word(bytes, 12) >> 24),
|
|
61
|
+
kind: None,
|
|
55
62
|
layer: None,
|
|
56
63
|
color_index: None,
|
|
57
64
|
visible: None,
|
|
@@ -142,6 +149,134 @@ pub(crate) fn read_entity(bytes: &[u8], byte_range: ByteRange) -> NativeEntityRe
|
|
|
142
149
|
decode_entity(bytes, byte_range, false)
|
|
143
150
|
}
|
|
144
151
|
|
|
152
|
+
/// The standalone entity header shared by primitives, construction geometry
|
|
153
|
+
/// and annotations: byte length, layer, zero, the marker word, a source ID
|
|
154
|
+
/// in the 0x8... range and zero. The marker's class bytes are checked by the
|
|
155
|
+
/// caller.
|
|
156
|
+
fn standalone_header(bytes: &[u8]) -> bool {
|
|
157
|
+
bytes.len() >= 32
|
|
158
|
+
&& word(bytes, 0) as usize == bytes.len()
|
|
159
|
+
&& word(bytes, 4) > 0
|
|
160
|
+
&& word(bytes, 8) == 0
|
|
161
|
+
&& word(bytes, 16) & 0xf0000000 == 0x80000000
|
|
162
|
+
&& word(bytes, 20) == 0
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/// The 16-bit payload length at +24: the bytes after the 24-byte header for
|
|
166
|
+
/// fixed records, or the fixed block before the variable tail of annotations.
|
|
167
|
+
fn payload_length(bytes: &[u8]) -> usize {
|
|
168
|
+
usize::from(u16::from_le_bytes([bytes[24], bytes[25]]))
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
fn doubles(bytes: &[u8]) -> Vec<f64> {
|
|
172
|
+
bytes
|
|
173
|
+
.chunks_exact(8)
|
|
174
|
+
.map(|chunk| {
|
|
175
|
+
let mut raw = [0; 8];
|
|
176
|
+
raw.copy_from_slice(chunk);
|
|
177
|
+
f64::from_le_bytes(raw)
|
|
178
|
+
})
|
|
179
|
+
.collect()
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
fn unit_vector(v: &[f64]) -> bool {
|
|
183
|
+
(v.iter().map(|x| x * x).sum::<f64>() - 1.0).abs() <= 1e-8
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
fn norm(v: &[f64]) -> f64 {
|
|
187
|
+
v.iter().map(|x| x * x).sum::<f64>().sqrt()
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
fn header_fields(result: &mut NativeEntityRecord, bytes: &[u8], kind: &'static str) {
|
|
191
|
+
result.kind = Some(kind);
|
|
192
|
+
result.source_id = Some(word(bytes, 16));
|
|
193
|
+
result.layer = Some(word(bytes, 4));
|
|
194
|
+
result.visible = Some(word(bytes, 12) & 0x40 != 0);
|
|
195
|
+
result.geometry_status = Status::Complete;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
fn unqualified_layout(mut result: NativeEntityRecord) -> NativeEntityRecord {
|
|
199
|
+
result.issue(
|
|
200
|
+
ErrorKind::Unsupported,
|
|
201
|
+
"native.layout",
|
|
202
|
+
0,
|
|
203
|
+
"Unqualified native entity layout; source range retained",
|
|
204
|
+
);
|
|
205
|
+
result
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/// Construction geometry that owns no body. After the header and the payload
|
|
209
|
+
/// length word come two retained values and, for a reference point (type 1,
|
|
210
|
+
/// 80 bytes) a point and one retained value; for a reference plane (type 2,
|
|
211
|
+
/// 104 bytes) a point, a unit normal and one retained value; for a reference
|
|
212
|
+
/// axis (type 5, 152 bytes) a point, the half-length, a unit direction and the
|
|
213
|
+
/// two end offsets of that length. The marker byte is 0xc0 on default planes
|
|
214
|
+
/// and 0xc1 (or 0x81 hidden) otherwise. Qualified on 57 points, 607 planes
|
|
215
|
+
/// and 82 axes of V7L2–V8L4 files; a qualified record leaves nothing drawable
|
|
216
|
+
/// of its part unread.
|
|
217
|
+
fn construction_entity(
|
|
218
|
+
mut result: NativeEntityRecord,
|
|
219
|
+
bytes: &[u8],
|
|
220
|
+
kind: &'static str,
|
|
221
|
+
length: usize,
|
|
222
|
+
unit_at: Option<usize>,
|
|
223
|
+
) -> NativeEntityRecord {
|
|
224
|
+
let layout = bytes.len() == length
|
|
225
|
+
&& standalone_header(bytes)
|
|
226
|
+
&& word(bytes, 12) & 0x00ffefbe == 0x00010080
|
|
227
|
+
&& payload_length(bytes) == length - 24;
|
|
228
|
+
if !layout {
|
|
229
|
+
return unqualified_layout(result);
|
|
230
|
+
}
|
|
231
|
+
let values = doubles(&bytes[32..length]);
|
|
232
|
+
let mut qualified = values.iter().all(|v| v.is_finite())
|
|
233
|
+
&& unit_at.is_none_or(|at| unit_vector(&values[at..at + 3]));
|
|
234
|
+
if kind == "reference_axis" {
|
|
235
|
+
let half = values[5];
|
|
236
|
+
qualified = qualified
|
|
237
|
+
&& half > 0.0
|
|
238
|
+
&& (norm(&values[9..12]) - half).abs() <= 1e-6 * half.max(1.0)
|
|
239
|
+
&& (norm(&values[12..15]) - half).abs() <= 1e-6 * half.max(1.0);
|
|
240
|
+
}
|
|
241
|
+
if !qualified {
|
|
242
|
+
return unqualified_layout(result);
|
|
243
|
+
}
|
|
244
|
+
header_fields(&mut result, bytes, kind);
|
|
245
|
+
result
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/// Annotations that own no body: text (type 21), leader notes (22), length,
|
|
249
|
+
/// angular and diameter dimensions (25, 26, 27), coordinate-system tables
|
|
250
|
+
/// (248) and type-15 labels. Their marker carries the class byte 0x80 instead
|
|
251
|
+
/// of the geometry class 0x01, and the payload length word names a fixed
|
|
252
|
+
/// 96-byte block: two retained values and a rigid frame (origin, Z axis, X
|
|
253
|
+
/// axis). The attribute block, text runs and drawn items that follow are
|
|
254
|
+
/// retained raw. Qualified on 1,761 records of V7L2–V8L4 files.
|
|
255
|
+
fn annotation_entity(
|
|
256
|
+
mut result: NativeEntityRecord,
|
|
257
|
+
bytes: &[u8],
|
|
258
|
+
kind: &'static str,
|
|
259
|
+
) -> NativeEntityRecord {
|
|
260
|
+
let layout = bytes.len() >= 120
|
|
261
|
+
&& standalone_header(bytes)
|
|
262
|
+
&& word(bytes, 12) & 0x0000ffbe == 0x00008080
|
|
263
|
+
&& payload_length(bytes) == 96;
|
|
264
|
+
if !layout {
|
|
265
|
+
return unqualified_layout(result);
|
|
266
|
+
}
|
|
267
|
+
let frame = doubles(&bytes[48..120]);
|
|
268
|
+
let dot = |a: &[f64], b: &[f64]| a.iter().zip(b).map(|(a, b)| a * b).sum::<f64>();
|
|
269
|
+
let rigid = frame.iter().all(|v| v.is_finite())
|
|
270
|
+
&& unit_vector(&frame[3..6])
|
|
271
|
+
&& unit_vector(&frame[6..9])
|
|
272
|
+
&& dot(&frame[3..6], &frame[6..9]).abs() <= 1e-8;
|
|
273
|
+
if !rigid {
|
|
274
|
+
return unqualified_layout(result);
|
|
275
|
+
}
|
|
276
|
+
header_fields(&mut result, bytes, kind);
|
|
277
|
+
result
|
|
278
|
+
}
|
|
279
|
+
|
|
145
280
|
/// A component record of a saved boolean body: the standalone layout with the
|
|
146
281
|
/// component bit set, an optional explicit-result bit, and a result backlink
|
|
147
282
|
/// where a standalone record stores zero. The caller checks that backlink and
|
|
@@ -152,6 +287,21 @@ pub(crate) fn read_component_entity(bytes: &[u8], byte_range: ByteRange) -> Nati
|
|
|
152
287
|
|
|
153
288
|
fn decode_entity(bytes: &[u8], byte_range: ByteRange, component: bool) -> NativeEntityRecord {
|
|
154
289
|
let mut result = undecoded_entity(bytes, byte_range);
|
|
290
|
+
if !component {
|
|
291
|
+
match result.raw_type {
|
|
292
|
+
Some(1) => return construction_entity(result, bytes, "reference_point", 80, None),
|
|
293
|
+
Some(2) => return construction_entity(result, bytes, "reference_plane", 104, Some(5)),
|
|
294
|
+
Some(5) => return construction_entity(result, bytes, "reference_axis", 152, Some(6)),
|
|
295
|
+
Some(15) => return annotation_entity(result, bytes, "annotation"),
|
|
296
|
+
Some(21) => return annotation_entity(result, bytes, "text"),
|
|
297
|
+
Some(22) => return annotation_entity(result, bytes, "note"),
|
|
298
|
+
Some(25) => return annotation_entity(result, bytes, "dimension"),
|
|
299
|
+
Some(26) => return annotation_entity(result, bytes, "angular_dimension"),
|
|
300
|
+
Some(27) => return annotation_entity(result, bytes, "diameter_dimension"),
|
|
301
|
+
Some(248) => return annotation_entity(result, bytes, "coordinate_systems"),
|
|
302
|
+
_ => {}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
155
305
|
// Layer, saved visibility and palette index are qualified only for these
|
|
156
306
|
// exact native layouts. A Parasolid body has a different attribute layout.
|
|
157
307
|
// Variable-length layouts carry their own length in the marker word.
|
|
@@ -279,6 +429,7 @@ fn decode_entity(bytes: &[u8], byte_range: ByteRange, component: bool) -> Native
|
|
|
279
429
|
frame,
|
|
280
430
|
parameters,
|
|
281
431
|
});
|
|
432
|
+
result.kind = Some(kind);
|
|
282
433
|
result.geometry_status = Status::Complete;
|
|
283
434
|
}
|
|
284
435
|
Err((kind, code, text)) => {
|
|
@@ -390,6 +541,7 @@ fn decode_entity(bytes: &[u8], byte_range: ByteRange, component: bool) -> Native
|
|
|
390
541
|
frame,
|
|
391
542
|
parameters: values[9..].to_vec(),
|
|
392
543
|
});
|
|
544
|
+
result.kind = Some(kind);
|
|
393
545
|
result.geometry_status = Status::Complete;
|
|
394
546
|
result
|
|
395
547
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//! Bounded V7L2 through V7L7 and V8L1 through
|
|
1
|
+
//! Bounded V7L2 through V7L7 and V8L1 through V8L4 part records.
|
|
2
2
|
|
|
3
3
|
use std::collections::{BTreeMap, BTreeSet};
|
|
4
4
|
|
|
@@ -166,6 +166,7 @@ enum PartProfile {
|
|
|
166
166
|
V8L1,
|
|
167
167
|
V8L2,
|
|
168
168
|
V8L3,
|
|
169
|
+
V8L4,
|
|
169
170
|
}
|
|
170
171
|
|
|
171
172
|
impl PartProfile {
|
|
@@ -248,6 +249,14 @@ impl PartProfile {
|
|
|
248
249
|
Some("v8_resource_association"),
|
|
249
250
|
None,
|
|
250
251
|
),
|
|
252
|
+
Self::V8L4 => (
|
|
253
|
+
"icad-v8l4-parts-r3",
|
|
254
|
+
"root_relative",
|
|
255
|
+
"saved_entities",
|
|
256
|
+
Some("mm"),
|
|
257
|
+
Some("v8_resource_association"),
|
|
258
|
+
None,
|
|
259
|
+
),
|
|
251
260
|
};
|
|
252
261
|
PartProfileInfo {
|
|
253
262
|
profile_id,
|
|
@@ -279,6 +288,7 @@ impl PartProfile {
|
|
|
279
288
|
[0, 8, 0, 1] => Some(Self::V8L1),
|
|
280
289
|
[0, 8, 0, 2] => Some(Self::V8L2),
|
|
281
290
|
[0, 8, 0, 3] => Some(Self::V8L3),
|
|
291
|
+
[0, 8, 0, 4] => Some(Self::V8L4),
|
|
282
292
|
_ => None,
|
|
283
293
|
}
|
|
284
294
|
}
|
|
@@ -288,13 +298,14 @@ impl PartProfile {
|
|
|
288
298
|
Self::V7L2 | Self::V7L3 | Self::V7L4 | Self::V7L5 => 0x61000001,
|
|
289
299
|
Self::V7L6 | Self::V7L7 => 0x61000002,
|
|
290
300
|
Self::V8L1 | Self::V8L2 | Self::V8L3 => 0x61000003,
|
|
301
|
+
Self::V8L4 => 0x61000004,
|
|
291
302
|
}
|
|
292
303
|
}
|
|
293
304
|
|
|
294
305
|
fn mirrors(self) -> bool {
|
|
295
306
|
matches!(
|
|
296
307
|
self,
|
|
297
|
-
Self::V7L6 | Self::V7L7 | Self::V8L1 | Self::V8L2 | Self::V8L3
|
|
308
|
+
Self::V7L6 | Self::V7L7 | Self::V8L1 | Self::V8L2 | Self::V8L3 | Self::V8L4
|
|
298
309
|
)
|
|
299
310
|
}
|
|
300
311
|
|
|
@@ -306,7 +317,7 @@ impl PartProfile {
|
|
|
306
317
|
}
|
|
307
318
|
|
|
308
319
|
fn v8(self) -> bool {
|
|
309
|
-
matches!(self, Self::V8L1 | Self::V8L2 | Self::V8L3)
|
|
320
|
+
matches!(self, Self::V8L1 | Self::V8L2 | Self::V8L3 | Self::V8L4)
|
|
310
321
|
}
|
|
311
322
|
|
|
312
323
|
fn metadata_layout(self, bytes: &[u8]) -> bool {
|
|
@@ -543,7 +554,7 @@ impl PartIndex {
|
|
|
543
554
|
}
|
|
544
555
|
|
|
545
556
|
impl Document {
|
|
546
|
-
/// Read observed little-endian V7L2–V7L7/V8L1–
|
|
557
|
+
/// Read observed little-endian V7L2–V7L7/V8L1–V8L4 3DGLOBAL part records.
|
|
547
558
|
/// Unknown entities stop the view; their bytes are never scanned for parts.
|
|
548
559
|
pub fn read_parts(&self, limits: PartLimits) -> Result<PartIndex, InspectError> {
|
|
549
560
|
if limits.max_parts == 0
|
|
@@ -581,7 +592,7 @@ impl Document {
|
|
|
581
592
|
ErrorKind::Unsupported,
|
|
582
593
|
"parts.profile",
|
|
583
594
|
12,
|
|
584
|
-
"part records require an observed little-endian V7L2 through V7L7 or V8L1 through
|
|
595
|
+
"part records require an observed little-endian V7L2 through V7L7 or V8L1 through V8L4 profile",
|
|
585
596
|
);
|
|
586
597
|
for r in self.records().iter().filter(|r| r.tag == "V/W") {
|
|
587
598
|
result.opaque(
|
|
@@ -705,7 +716,7 @@ impl Document {
|
|
|
705
716
|
}
|
|
706
717
|
break;
|
|
707
718
|
}
|
|
708
|
-
if matches!(tag, 0x61000001..=
|
|
719
|
+
if matches!(tag, 0x61000001..=0x61000004) && tag != profile.part_tag() {
|
|
709
720
|
result.index_status = if result.parts.is_empty() {
|
|
710
721
|
Status::Unsupported
|
|
711
722
|
} else {
|
|
@@ -779,7 +790,7 @@ impl Document {
|
|
|
779
790
|
// their own byte length, not another marker.
|
|
780
791
|
if tag == 0x30010000 && !in_entities && !result.parts.is_empty() {
|
|
781
792
|
if end - at >= 8
|
|
782
|
-
&& matches!(word(bytes, at + 4), 0xfe000000 | 0x61000001..=
|
|
793
|
+
&& matches!(word(bytes, at + 4), 0xfe000000 | 0x61000001..=0x61000004)
|
|
783
794
|
{
|
|
784
795
|
result.index_status = Status::Partial;
|
|
785
796
|
result.issue(
|
|
@@ -842,12 +853,20 @@ impl Document {
|
|
|
842
853
|
let next = at + length + prefix;
|
|
843
854
|
if is_part {
|
|
844
855
|
in_entities = false;
|
|
856
|
+
// V8L4 external occurrences (flags 0x50) append a 564-byte
|
|
857
|
+
// extension behind a 0x101 marker: counted UTF-16 attribute
|
|
858
|
+
// strings and resource links. It is retained as opaque bytes.
|
|
859
|
+
let v8l4_external_extension = profile == PartProfile::V8L4
|
|
860
|
+
&& length == 916
|
|
861
|
+
&& word(bytes, at + 8) == 0x50
|
|
862
|
+
&& word(bytes, at + 360) == 0x101;
|
|
845
863
|
let extended_part = ((length == 700 && profile.v8())
|
|
846
864
|
|| (matches!(profile, PartProfile::V8L1 | PartProfile::V8L2)
|
|
847
|
-
&& length == 22364)
|
|
865
|
+
&& length == 22364)
|
|
866
|
+
|| v8l4_external_extension)
|
|
848
867
|
&& word(bytes, at + 12) == 1
|
|
849
868
|
&& word(bytes, at + 356) as usize == length - 352
|
|
850
|
-
&& word(bytes, at + 360) == 1
|
|
869
|
+
&& (word(bytes, at + 360) == 1 || v8l4_external_extension)
|
|
851
870
|
&& word(bytes, at + 364) == 1;
|
|
852
871
|
if length != 352 && !extended_part {
|
|
853
872
|
result.index_status = Status::Partial;
|
|
@@ -878,7 +897,10 @@ impl Document {
|
|
|
878
897
|
&& length == 700
|
|
879
898
|
&& matches!(
|
|
880
899
|
profile,
|
|
881
|
-
PartProfile::V8L1
|
|
900
|
+
PartProfile::V8L1
|
|
901
|
+
| PartProfile::V8L2
|
|
902
|
+
| PartProfile::V8L3
|
|
903
|
+
| PartProfile::V8L4
|
|
882
904
|
);
|
|
883
905
|
if result.parts.len() >= limits.max_parts {
|
|
884
906
|
return Err(limit(
|
|
@@ -980,8 +1002,11 @@ impl Document {
|
|
|
980
1002
|
&& (word(bytes, at + 12) == 0xcf010081
|
|
981
1003
|
|| (profile.mirrors() && word(bytes, at + 12) == 0xcf011081))
|
|
982
1004
|
{
|
|
1005
|
+
// The second word is 1 in every V7L7–V8L3 record; V8L4 user
|
|
1006
|
+
// attribute text (the same `User_*,"value"` list) saves 230.
|
|
983
1007
|
if length >= 32
|
|
984
|
-
&& word(bytes, at + 4) == 1
|
|
1008
|
+
&& (word(bytes, at + 4) == 1
|
|
1009
|
+
|| (profile == PartProfile::V8L4 && word(bytes, at + 4) == 230))
|
|
985
1010
|
&& word(bytes, at + 8) == 0
|
|
986
1011
|
&& word(bytes, at + 20) == 0
|
|
987
1012
|
&& word(bytes, at + 24) & 0xff000000 == 0xfd000000
|
|
@@ -1095,7 +1120,7 @@ impl Document {
|
|
|
1095
1120
|
};
|
|
1096
1121
|
part.entities.push(if parametric_owner {
|
|
1097
1122
|
crate::native::read_parametric_entity(&bytes[at..next], range)
|
|
1098
|
-
} else if profile
|
|
1123
|
+
} else if matches!(profile, PartProfile::V8L3 | PartProfile::V8L4) {
|
|
1099
1124
|
crate::native::read_entity(&bytes[at..next], range)
|
|
1100
1125
|
} else if profile == PartProfile::V7L7 {
|
|
1101
1126
|
crate::native::read_opaque_entity(&bytes[at..next], range)
|
|
@@ -71,7 +71,7 @@ pub(crate) fn observed_version(order: ByteOrder, v: [u8; 4]) -> bool {
|
|
|
71
71
|
ByteOrder::Big => matches!(v,
|
|
72
72
|
[0, 1, 0, 9] | [0, 3, 0, 1..=5 | 7..=9]
|
|
73
73
|
| [0, 5, 0, 1..=4] | [0, 6, 0, 1..=2] | [0, 7, 0, 1]),
|
|
74
|
-
ByteOrder::Little => matches!(v, [0, 7, 0, 2..=7] | [0, 8, 0, 1..=
|
|
74
|
+
ByteOrder::Little => matches!(v, [0, 7, 0, 2..=7] | [0, 8, 0, 1..=4]),
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
|
|
@@ -382,7 +382,7 @@ impl Document {
|
|
|
382
382
|
continue;
|
|
383
383
|
}
|
|
384
384
|
let (prefix, kind) = match tag {
|
|
385
|
-
0x61000001..=
|
|
385
|
+
0x61000001..=0x61000004 if is_3d => (4, "part"),
|
|
386
386
|
0x60000001 | 0x60000002 if is_3d => (4, "legacy_owner"),
|
|
387
387
|
0x20000000 | 0x21000000 | 0x40000000 => (4, "metadata"),
|
|
388
388
|
0x50000001 if reference_profile && reference_record(cursor + 4) => {
|
|
@@ -584,7 +584,7 @@ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
|
584
584
|
DEALINGS IN THE SOFTWARE.
|
|
585
585
|
|
|
586
586
|
|
|
587
|
-
=== parasolid-core 0.3.
|
|
587
|
+
=== parasolid-core 0.3.12 (MIT AND Apache-2.0) ===
|
|
588
588
|
MIT License
|
|
589
589
|
|
|
590
590
|
Copyright (c) 2026 parasolid-kit contributors
|
|
@@ -324,6 +324,10 @@ fn surfacekind(py: Python<'_>, d: &Bound<'_, PyDict>, kind: &SurfaceKind) -> PyR
|
|
|
324
324
|
d.set_item("end_parameter", *end_parameter)?;
|
|
325
325
|
d.set_item("x_axis", x_axis.as_ref().map(|v| v.to_array()))?;
|
|
326
326
|
}
|
|
327
|
+
SurfaceKind::Swept { section, direction } => {
|
|
328
|
+
d.set_item("section", section)?;
|
|
329
|
+
d.set_item("direction", direction.to_array())?;
|
|
330
|
+
}
|
|
327
331
|
SurfaceKind::Unsupported { type_name } => {
|
|
328
332
|
d.set_item("type_name", type_name)?;
|
|
329
333
|
}
|
|
@@ -14,6 +14,7 @@ fn entity_dict<'py>(
|
|
|
14
14
|
)?;
|
|
15
15
|
e.set_item("source_id", entity.source_id)?;
|
|
16
16
|
e.set_item("raw_type", entity.raw_type)?;
|
|
17
|
+
e.set_item("kind", entity.kind)?;
|
|
17
18
|
e.set_item("layer", entity.layer)?;
|
|
18
19
|
e.set_item("color_index", entity.color_index)?;
|
|
19
20
|
e.set_item("visible", entity.visible)?;
|
|
@@ -475,7 +475,7 @@ change these outcomes.
|
|
|
475
475
|
|
|
476
476
|
### Internal mirror orientation
|
|
477
477
|
|
|
478
|
-
For qualified V7L6/V7L7/V8L1/V8L2/V8L3 profiles,
|
|
478
|
+
For qualified V7L6/V7L7/V8L1/V8L2/V8L3/V8L4 profiles,
|
|
479
479
|
`PartProfile.mirror_policy == "stored_parity"`. `PartPlacement` retains the
|
|
480
480
|
right-handed SDK coordinate frames and adds `orientation_world_transform` and
|
|
481
481
|
`orientation_local_transform` for signed occurrence orientation. These fields
|
|
@@ -15,6 +15,77 @@
|
|
|
15
15
|
|
|
16
16
|
### Added
|
|
17
17
|
|
|
18
|
+
- iCAD SX **V8L4** (header bytes `00 08 00 04`) is qualified for the part,
|
|
19
|
+
view and drawing readers, observed on seven 2026 production files. Its part
|
|
20
|
+
records carry the new tag `0x61000004` with the V8L3 352-byte layout
|
|
21
|
+
(`icad-v8l4-parts-r3`, `saved_entities`, `v8_resource_association`);
|
|
22
|
+
external occurrences (flags `0x50`) may append a 564-byte extension behind
|
|
23
|
+
a `0x101` marker (counted UTF-16 attribute strings and resource links),
|
|
24
|
+
retained as opaque `part_metadata_extension`; and the user attribute text
|
|
25
|
+
record (`User_*,"value"` pairs) saves 230 instead of 1 in its second word.
|
|
26
|
+
V8L4 2D views and composite records use the V8L3 layouts unchanged.
|
|
27
|
+
`qualified_versions()` lists V8L4 for parts, little-endian views and the
|
|
28
|
+
drawing layout. The saved final bodies of V8L4 files are Parasolid V35
|
|
29
|
+
streams (`SCH_3501238_35102_13006`), which parasolid-core 0.3.12 resolves
|
|
30
|
+
through its `family-35102-13006` profile (coverage `family_inferred`); on
|
|
31
|
+
the seven files, 365 of 460 saved bodies converted to OCCT solids.
|
|
32
|
+
- `NativeEntity.kind` names the qualified record kind, and construction
|
|
33
|
+
geometry and annotations read `complete` without a primitive instead of
|
|
34
|
+
`unsupported` (`native.layout`): reference points (type 1, 80 bytes),
|
|
35
|
+
reference planes (type 2, 104 bytes; marker byte `0xc0` on the three
|
|
36
|
+
default planes, `0xc1` on placed ones) and reference axes (type 5, 152
|
|
37
|
+
bytes), whose records hold two retained values, a point and, for planes a
|
|
38
|
+
unit normal, for axes the half-length, a unit direction and the two end
|
|
39
|
+
offsets; and the annotation class (marker class byte `0x80`): text (21),
|
|
40
|
+
leader notes (22), length, angular and diameter dimensions (25, 26, 27),
|
|
41
|
+
coordinate-system tables (248) and type-15 labels, whose 96-byte block
|
|
42
|
+
holds two retained values and a rigid frame before the attribute block,
|
|
43
|
+
text runs and items that stay raw. Qualified on 57 points, 607 planes, 82
|
|
44
|
+
axes and 1,761 annotations of V7L2–V8L4 files, including the 2026
|
|
45
|
+
production files. Primitives report their primitive kind in the same field.
|
|
46
|
+
- Final-body markers in the `0x550108c0` state on 352-byte V8L4 parts bind
|
|
47
|
+
and convert like the `0xc1` state (a purchased part whose three bodies
|
|
48
|
+
carry only that state: 8 faces, 7,528 mm³ each, placed on the part).
|
|
49
|
+
Before, V8 accepted that state only on 704-byte extended owners.
|
|
50
|
+
|
|
51
|
+
- Saved **sheet bodies** convert to their open shells: `read_saved_bodies`,
|
|
52
|
+
`read_part_shapes`, `evaluate_saved_body` and the viewer mesh them like
|
|
53
|
+
solids, with `solid_count` 0, no volume (`ShapeBody.volume_mm3` is None,
|
|
54
|
+
`CsgMesh.volume_mm3` is 0.0) and the area centroid. Wire bodies (curves
|
|
55
|
+
without faces; 14 of the 40 bodies of a 2026 production part) and other
|
|
56
|
+
body kinds stay unqualified (`saved.body_kind`).
|
|
57
|
+
- The preview bridge maps swept surfaces (`swept`, parasolid-core
|
|
58
|
+
`SurfaceKind::Swept`), so saved bodies bounded by them convert instead of
|
|
59
|
+
stopping with `preview.geometry_kind`.
|
|
60
|
+
- `GeometryLimits.max_nodes` defaults to 1,000,000 (was 100,000); a 4.6 MB
|
|
61
|
+
production body streams 108,613 nodes, and the payload bound still applies.
|
|
62
|
+
- Non-fatal backend diagnostics no longer fail a saved-body conversion. The
|
|
63
|
+
only one the builder raises, `occt.parametric_approximation` (sampled
|
|
64
|
+
FIN-to-output differences above the source edge tolerance while the
|
|
65
|
+
conversion error budget passed), is recorded as the operation
|
|
66
|
+
`source_fin_deviation_within_conversion_budget`; fatal or error-level
|
|
67
|
+
diagnostics still raise `saved.conversion_diagnostics`.
|
|
68
|
+
|
|
69
|
+
### Changed
|
|
70
|
+
|
|
71
|
+
- `SavedBodyLimits.max_source_tolerance_mm` defaults to 0.5 mm (was 0.01).
|
|
72
|
+
Tolerant edges and vertices above 0.01 mm are common in production bodies
|
|
73
|
+
(63 of 659 in the 2026 corpus); with the new bound 50 of the 54 bodies
|
|
74
|
+
between 0.01 and 0.5 mm convert and validate, the other four fail closed
|
|
75
|
+
with their kernel diagnostics, and none of the nine bodies above 0.5 mm
|
|
76
|
+
converted. The bound is still a rejection policy; nothing is healed.
|
|
77
|
+
|
|
78
|
+
### Changed
|
|
79
|
+
|
|
80
|
+
- The native extension now embeds `parasolid-core` 0.3.12 (was 0.3.7) and
|
|
81
|
+
the `preview` extra requires `parasolid-kit[occt]>=0.3.12`. Another
|
|
82
|
+
modeller build of a reviewed schema resolves through its schema family
|
|
83
|
+
instead of failing with `schema.missing_base_schema`; four standard iCAD
|
|
84
|
+
profiles carry new revisions (`icad-1700000-16100-r2`,
|
|
85
|
+
`icad-2401000-20000-r3`, `icad-2901000-28101-r2`, `icad-3200000-32001-r2`);
|
|
86
|
+
SWEPT_SURF (67) is declared for the 13006 keys and `SurfaceKind::Swept`
|
|
87
|
+
(`section`, `direction`) reaches Python as the `swept` surface kind, which
|
|
88
|
+
the saved-body conversion now accepts.
|
|
18
89
|
- `DrawingText.underline`: view labels ("A-A", "Z矢視図") append one line
|
|
19
90
|
item after their runs; it is read like a dimension item in both byte
|
|
20
91
|
orders, and the fixed words of such labels (+14, +46, +60, +76) read
|
|
@@ -28,7 +28,7 @@ for entity in drawing.entities:
|
|
|
28
28
|
|
|
29
29
|
Observed big-endian profiles cover V1L9, V3L1/L2/L3/L4/L5/L7/L8/L9,
|
|
30
30
|
V5L1/L2/L3/L4, V6L1/L2 and V7L1. Little-endian profiles cover V7L2–V7L7
|
|
31
|
-
and V8L1–
|
|
31
|
+
and V8L1–V8L4. The counted view header and record boundaries must also match;
|
|
32
32
|
a version label alone does not establish support. V3L6 and V8L4 are not qualified.
|
|
33
33
|
Numeric values follow the file byte order. Packed attribute bytes have separate
|
|
34
34
|
rules and cannot be decoded by swapping the entire file.
|
|
@@ -53,6 +53,26 @@ qualified for traversal; its contents are not treated as primitive parameters.
|
|
|
53
53
|
A saved Parasolid wrapper remains an unsupported entity in this API. No mapping
|
|
54
54
|
from that entity to `Document.resources` is inferred.
|
|
55
55
|
|
|
56
|
+
`NativeEntity.kind` names the qualified record kind: a primitive kind, one of
|
|
57
|
+
the construction kinds below, or an annotation kind. It is `None` while the
|
|
58
|
+
layout is unqualified.
|
|
59
|
+
|
|
60
|
+
Construction geometry and annotations own no body, so a qualified record reads
|
|
61
|
+
`complete` with `primitive=None` and never lowers the part's native geometry
|
|
62
|
+
status. Their records share the standalone header (byte length, layer, marker
|
|
63
|
+
word, source ID) followed by a 16-bit payload length and an opaque kind word:
|
|
64
|
+
|
|
65
|
+
| Kind | Raw type | Record | Qualified layout |
|
|
66
|
+
| --- | --- | --- | --- |
|
|
67
|
+
| `reference_point` | 1 | 80 bytes | two retained values, a point, one retained value |
|
|
68
|
+
| `reference_plane` | 2 | 104 bytes | two retained values, a point, a unit normal, one retained value; marker byte `0xc0` on the three default planes, `0xc1` on placed planes |
|
|
69
|
+
| `reference_axis` | 5 | 152 bytes | two retained values, a point, the half-length, a unit direction and two end offsets of that length |
|
|
70
|
+
| `text`, `note`, `dimension`, `angular_dimension`, `diameter_dimension`, `coordinate_systems`, `annotation` | 21, 22, 25, 26, 27, 248, 15 | 120 bytes or more | marker class byte `0x80`; a 96-byte block of two retained values and a rigid frame (origin, Z axis, X axis), then the attribute block, text runs and drawn items, retained raw |
|
|
71
|
+
|
|
72
|
+
The qualification used 57 points, 607 planes, 82 axes and 1,761 annotations of
|
|
73
|
+
V7L2–V8L4 files. Offsets, extents, dimension values and note text stay in the
|
|
74
|
+
retained bytes; this API does not interpret them.
|
|
75
|
+
|
|
56
76
|
## Primitive contract
|
|
57
77
|
|
|
58
78
|
`NativePrimitive.kind` is `box`, `cylinder`, `sphere`, `cone`, `torus`,
|
|
@@ -130,7 +150,7 @@ bounds and Z from zero to `height`. A cylinder's bottom centre is `(0, 0, 0)` an
|
|
|
130
150
|
its top centre is `(0, 0, height)` in this frame.
|
|
131
151
|
|
|
132
152
|
The exposed `world_transform` is in **3DGLOBAL coordinates**; do not multiply it
|
|
133
|
-
by the part frame again. All qualified V7L6/V7L7/V8L1/V8L2/V8L3 profiles use
|
|
153
|
+
by the part frame again. All qualified V7L6/V7L7/V8L1/V8L2/V8L3/V8L4 profiles use
|
|
134
154
|
`inverse(saved_root_frame) * stored_primitive_frame`, independently of the owning
|
|
135
155
|
part frame. Qualified negative-height box/cone/polygon records additionally reverse
|
|
136
156
|
the stored Z column once. Raw bytes retain the original stored frame. If the root context is
|
|
@@ -155,7 +175,7 @@ resource ownership or whole-model geometry completeness.
|
|
|
155
175
|
|
|
156
176
|
## Qualified entity mirrors
|
|
157
177
|
|
|
158
|
-
Internal mirrors are qualified in V7L6/V7L7 and V8L1/V8L2/V8L3. The entity mirror
|
|
178
|
+
Internal mirrors are qualified in V7L6/V7L7 and V8L1/V8L2/V8L3/V8L4. The entity mirror
|
|
159
179
|
flag is independent of its owning part flag; a mirrored entity can belong to an
|
|
160
180
|
unmirrored part. Its saved frame/parameters already incorporate the operation.
|
|
161
181
|
Neither the part frame nor its orientation matrix is applied a second time.
|