evo-data-converters-duf 0.2.0__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.
@@ -0,0 +1,140 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.pyc
6
+
7
+ # C extensions
8
+ *.so
9
+
10
+ # Distribution / packaging
11
+ .Python
12
+ build/
13
+ develop-eggs/
14
+ dist/
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ wheels/
24
+ pip-wheel-metadata/
25
+ share/python-wheels/
26
+ *.egg-info/
27
+ .installed.cfg
28
+ *.egg
29
+ MANIFEST
30
+
31
+ # PyInstaller
32
+ # Usually these files are written by a python script from a template
33
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
34
+ *.manifest
35
+ *.spec
36
+
37
+ # Installer logs
38
+ pip-log.txt
39
+ pip-delete-this-directory.txt
40
+
41
+ # Unit test / coverage reports
42
+ htmlcov/
43
+ .tox/
44
+ .nox/
45
+ .coverage
46
+ .coverage.*
47
+ .cache
48
+ nosetests.xml
49
+ coverage.xml
50
+ *.cover
51
+ *.py,cover
52
+ .hypothesis/
53
+ .pytest_cache/
54
+
55
+ # Translations
56
+ *.mo
57
+ *.pot
58
+
59
+ # Django stuff:
60
+ *.log
61
+ local_settings.py
62
+ db.sqlite3
63
+ db.sqlite3-journal
64
+
65
+ # Flask stuff:
66
+ instance/
67
+ .webassets-cache
68
+
69
+ # Scrapy stuff:
70
+ .scrapy
71
+
72
+ # Sphinx documentation
73
+ docs/_build/
74
+
75
+ # PyBuilder
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pipenv
86
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
87
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
88
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
89
+ # install all needed dependencies.
90
+ #Pipfile.lock
91
+
92
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
93
+ __pypackages__/
94
+
95
+ # Celery stuff
96
+ celerybeat-schedule
97
+ celerybeat.pid
98
+
99
+ # SageMath parsed files
100
+ *.sage.py
101
+
102
+ # Environments
103
+ .env
104
+ .venv
105
+ example_virtual_env
106
+ env/
107
+ venv/
108
+ ENV/
109
+ env.bak/
110
+ venv.bak/
111
+
112
+ # Spyder project settings
113
+ .spyderproject
114
+ .spyproject
115
+
116
+ # Rope project settings
117
+ .ropeproject
118
+
119
+ # mkdocs documentation
120
+ /site
121
+
122
+ # mypy
123
+ .mypy_cache/
124
+ .dmypy.json
125
+ dmypy.json
126
+
127
+ # Pyre type checker
128
+ .pyre/
129
+
130
+ # Custom
131
+ .idea
132
+ query_results.parquet
133
+ .cache_ggshield
134
+
135
+ # Object data client caches
136
+ samples/data-converters/python/convert-omf/data/cache
137
+ data/cache
138
+
139
+ # Development tools
140
+ .vscode/
@@ -0,0 +1,190 @@
1
+ Copyright © 2025 Bentley Systems, Incorporated.
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
14
+
15
+ Apache License
16
+ Version 2.0, January 2004
17
+ http://www.apache.org/licenses/
18
+
19
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
20
+
21
+ 1. Definitions.
22
+
23
+ "License" shall mean the terms and conditions for use, reproduction,
24
+ and distribution as defined by Sections 1 through 9 of this document.
25
+
26
+ "Licensor" shall mean the copyright owner or entity authorized by
27
+ the copyright owner that is granting the License.
28
+
29
+ "Legal Entity" shall mean the union of the acting entity and all
30
+ other entities that control, are controlled by, or are under common
31
+ control with that entity. For the purposes of this definition,
32
+ "control" means (i) the power, direct or indirect, to cause the
33
+ direction or management of such entity, whether by contract or
34
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
35
+ outstanding shares, or (iii) beneficial ownership of such entity.
36
+
37
+ "You" (or "Your") shall mean an individual or Legal Entity
38
+ exercising permissions granted by this License.
39
+
40
+ "Source" form shall mean the preferred form for making modifications,
41
+ including but not limited to software source code, documentation
42
+ source, and configuration files.
43
+
44
+ "Object" form shall mean any form resulting from mechanical
45
+ transformation or translation of a Source form, including but
46
+ not limited to compiled object code, generated documentation,
47
+ and conversions to other media types.
48
+
49
+ "Work" shall mean the work of authorship, whether in Source or
50
+ Object form, made available under the License, as indicated by a
51
+ copyright notice that is included in or attached to the work
52
+ (an example is provided in the Appendix below).
53
+
54
+ "Derivative Works" shall mean any work, whether in Source or Object
55
+ form, that is based on (or derived from) the Work and for which the
56
+ editorial revisions, annotations, elaborations, or other modifications
57
+ represent, as a whole, an original work of authorship. For the purposes
58
+ of this License, Derivative Works shall not include works that remain
59
+ separable from, or merely link (or bind by name) to the interfaces of,
60
+ the Work and Derivative Works thereof.
61
+
62
+ "Contribution" shall mean any work of authorship, including
63
+ the original version of the Work and any modifications or additions
64
+ to that Work or Derivative Works thereof, that is intentionally
65
+ submitted to Licensor for inclusion in the Work by the copyright owner
66
+ or by an individual or Legal Entity authorized to submit on behalf of
67
+ the copyright owner. For the purposes of this definition, "submitted"
68
+ means any form of electronic, verbal, or written communication sent
69
+ to the Licensor or its representatives, including but not limited to
70
+ communication on electronic mailing lists, source code control systems,
71
+ and issue tracking systems that are managed by, or on behalf of, the
72
+ Licensor for the purpose of discussing and improving the Work, but
73
+ excluding communication that is conspicuously marked or otherwise
74
+ designated in writing by the copyright owner as "Not a Contribution."
75
+
76
+ "Contributor" shall mean Licensor and any individual or Legal Entity
77
+ on behalf of whom a Contribution has been received by Licensor and
78
+ subsequently incorporated within the Work.
79
+
80
+ 2. Grant of Copyright License. Subject to the terms and conditions of
81
+ this License, each Contributor hereby grants to You a perpetual,
82
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
83
+ copyright license to reproduce, prepare Derivative Works of,
84
+ publicly display, publicly perform, sublicense, and distribute the
85
+ Work and such Derivative Works in Source or Object form.
86
+
87
+ 3. Grant of Patent License. Subject to the terms and conditions of
88
+ this License, each Contributor hereby grants to You a perpetual,
89
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
90
+ (except as stated in this section) patent license to make, have made,
91
+ use, offer to sell, sell, import, and otherwise transfer the Work,
92
+ where such license applies only to those patent claims licensable
93
+ by such Contributor that are necessarily infringed by their
94
+ Contribution(s) alone or by combination of their Contribution(s)
95
+ with the Work to which such Contribution(s) was submitted. If You
96
+ institute patent litigation against any entity (including a
97
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
98
+ or a Contribution incorporated within the Work constitutes direct
99
+ or contributory patent infringement, then any patent licenses
100
+ granted to You under this License for that Work shall terminate
101
+ as of the date such litigation is filed.
102
+
103
+ 4. Redistribution. You may reproduce and distribute copies of the
104
+ Work or Derivative Works thereof in any medium, with or without
105
+ modifications, and in Source or Object form, provided that You
106
+ meet the following conditions:
107
+
108
+ (a) You must give any other recipients of the Work or
109
+ Derivative Works a copy of this License; and
110
+
111
+ (b) You must cause any modified files to carry prominent notices
112
+ stating that You changed the files; and
113
+
114
+ (c) You must retain, in the Source form of any Derivative Works
115
+ that You distribute, all copyright, patent, trademark, and
116
+ attribution notices from the Source form of the Work,
117
+ excluding those notices that do not pertain to any part of
118
+ the Derivative Works; and
119
+
120
+ (d) If the Work includes a "NOTICE" text file as part of its
121
+ distribution, then any Derivative Works that You distribute must
122
+ include a readable copy of the attribution notices contained
123
+ within such NOTICE file, excluding those notices that do not
124
+ pertain to any part of the Derivative Works, in at least one
125
+ of the following places: within a NOTICE text file distributed
126
+ as part of the Derivative Works; within the Source form or
127
+ documentation, if provided along with the Derivative Works; or,
128
+ within a display generated by the Derivative Works, if and
129
+ wherever such third-party notices normally appear. The contents
130
+ of the NOTICE file are for informational purposes only and
131
+ do not modify the License. You may add Your own attribution
132
+ notices within Derivative Works that You distribute, alongside
133
+ or as an addendum to the NOTICE text from the Work, provided
134
+ that such additional attribution notices cannot be construed
135
+ as modifying the License.
136
+
137
+ You may add Your own copyright statement to Your modifications and
138
+ may provide additional or different license terms and conditions
139
+ for use, reproduction, or distribution of Your modifications, or
140
+ for any such Derivative Works as a whole, provided Your use,
141
+ reproduction, and distribution of the Work otherwise complies with
142
+ the conditions stated in this License.
143
+
144
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
145
+ any Contribution intentionally submitted for inclusion in the Work
146
+ by You to the Licensor shall be under the terms and conditions of
147
+ this License, without any additional terms or conditions.
148
+ Notwithstanding the above, nothing herein shall supersede or modify
149
+ the terms of any separate license agreement you may have executed
150
+ with Licensor regarding such Contributions.
151
+
152
+ 6. Trademarks. This License does not grant permission to use the trade
153
+ names, trademarks, service marks, or product names of the Licensor,
154
+ except as required for reasonable and customary use in describing the
155
+ origin of the Work and reproducing the content of the NOTICE file.
156
+
157
+ 7. Disclaimer of Warranty. Unless required by applicable law or
158
+ agreed to in writing, Licensor provides the Work (and each
159
+ Contributor provides its Contributions) on an "AS IS" BASIS,
160
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
161
+ implied, including, without limitation, any warranties or conditions
162
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
163
+ PARTICULAR PURPOSE. You are solely responsible for determining the
164
+ appropriateness of using or redistributing the Work and assume any
165
+ risks associated with Your exercise of permissions under this License.
166
+
167
+ 8. Limitation of Liability. In no event and under no legal theory,
168
+ whether in tort (including negligence), contract, or otherwise,
169
+ unless required by applicable law (such as deliberate and grossly
170
+ negligent acts) or agreed to in writing, shall any Contributor be
171
+ liable to You for damages, including any direct, indirect, special,
172
+ incidental, or consequential damages of any character arising as a
173
+ result of this License or out of the use or inability to use the
174
+ Work (including but not limited to damages for loss of goodwill,
175
+ work stoppage, computer failure or malfunction, or any and all
176
+ other commercial damages or losses), even if such Contributor
177
+ has been advised of the possibility of such damages.
178
+
179
+ 9. Accepting Warranty or Additional Liability. While redistributing
180
+ the Work or Derivative Works thereof, You may choose to offer,
181
+ and charge a fee for, acceptance of support, warranty, indemnity,
182
+ or other liability obligations and/or rights consistent with this
183
+ License. However, in accepting such obligations, You may act only
184
+ on Your own behalf and on Your sole responsibility, not on behalf
185
+ of any other Contributor, and only if You agree to indemnify,
186
+ defend, and hold each Contributor harmless for any liability
187
+ incurred by, or claims asserted against, such Contributor by reason
188
+ of your accepting any such warranty or additional liability.
189
+
190
+ END OF TERMS AND CONDITIONS
@@ -0,0 +1,143 @@
1
+ Metadata-Version: 2.4
2
+ Name: evo-data-converters-duf
3
+ Version: 0.2.0
4
+ Summary: Python data converters for Deswik DUF to Evo geoscience objects
5
+ Author-email: Seequent <support@seequent.com>
6
+ License-File: LICENSE.md
7
+ Classifier: Operating System :: Microsoft :: Windows
8
+ Requires-Python: >=3.10
9
+ Requires-Dist: evo-data-converters-common
10
+ Requires-Dist: pythonnet<3.1.0,>=3.0.5
11
+ Description-Content-Type: text/markdown
12
+
13
+ <p align="center">
14
+ <a href="https://seequent.com" target="_blank">
15
+ <picture>
16
+ <source media="(prefers-color-scheme: dark)"
17
+ srcset="https://developer.seequent.com/img/seequent-logo-dark.svg"
18
+ alt="Seequent logo" width="400" />
19
+ <img src="https://developer.seequent.com/img/seequent-logo.svg" alt="Seequent logo" width="400" />
20
+ </picture>
21
+ </a>
22
+ </p>
23
+ <p align="center">
24
+ <a href="https://pypi.org/project/evo-data-converters-duf/">
25
+ <img alt="PyPI - Version" src="https://img.shields.io/pypi/v/evo-data-converters-duf" />
26
+ </a>
27
+ <a href="https://github.com/SeequentEvo/evo-data-converters/actions/workflows/on-merge.yaml">
28
+ <img src="https://github.com/SeequentEvo/evo-data-converters/actions/workflows/on-merge.yaml/badge.svg" alt=""/>
29
+ </a>
30
+ </p>
31
+ <p align="center">
32
+ <a href="https://developer.seequent.com/" target="_blank">Seequent Developer Portal</a>
33
+ &bull; <a href="https://community.seequent.com/" target="_blank">Seequent Community</a>
34
+ &bull; <a href="https://seequent.com" target="_blank">Seequent website</a>
35
+ </p>
36
+
37
+ ## Evo
38
+
39
+ Evo is a unified platform for geoscience teams. It enables access, connection, computation, and management of subsurface
40
+ data. This empowers better decision-making, simplified collaboration, and accelerated innovation. Evo is built on open
41
+ APIs, allowing developers to build custom integrations and applications. Our open schemas, code examples, and SDK are
42
+ available for the community to use and extend.
43
+
44
+ Evo is powered by Seequent, a Bentley organisation.
45
+
46
+ ## Pre-requisites
47
+
48
+ * Python virtual environment with Python 3.10, 3.11, or 3.12
49
+ * Microsoft Windows - this package is not currently supported on Linux or macOS
50
+ * Deswik Spatial - https://www.deswik.com/products/spatial
51
+ * .NET Framework v4.7.2 or higher (or other compatible .NET runtime)
52
+
53
+ ## Installation
54
+
55
+ ### Windows
56
+
57
+ #### Python package
58
+
59
+ The package can be installed from PyPI using pip:
60
+
61
+ pip install evo-data-converters-duf
62
+
63
+ #### Deswik Suite
64
+
65
+ The `duf` data-converter package depends on an installed version of `Deswik.Suite` for interacting with DUF files. The
66
+ package will search for `Deswik.Suite` in `C:\Program Files\Deswik`, and use the latest version installed. If you have
67
+ installed `Deswik.Suite` in a different location, you will need to set the environment variable `DESWIK_PATH` to point
68
+ to your installation location, for example:
69
+
70
+ set DESWIK_PATH="D:\Applications\Deswik\Deswik.Suite 2024.1"
71
+
72
+ This package has been tested with Deswik Suite version 2024.1.
73
+
74
+ #### .NET Framework
75
+
76
+ The package uses [pythonnet](https://pythonnet.github.io/pythonnet/) to resolve the appropriate .NET runtime. For Deswik.Suite 2024.1 up until (but not including) Deswik.Suite 2025.2, .NET Framework 4.7.2 or later is required. For 2025.2 and later, .NETCoreApp 8 or later is required.
77
+
78
+ If pythonnet fails to load the runtime, and you know where the runtime is installed, then you can set the environment variable DOTNET_ROOT. For other suggestions and more reading, see [here](https://pythonnet.github.io/pythonnet/python.html#loading-a-runtime). However, things described there are untested and may not work with your Deswik Suite installation.
79
+
80
+ ### macOS
81
+
82
+ Not currently supported.
83
+
84
+ ### Linux
85
+
86
+ Not currently supported.
87
+
88
+ ## DUF
89
+
90
+ Deswik Unified File (DUF) is a proprietary file format from Deswik Mining Consultants Pty Ltd.
91
+
92
+ ### Publish geoscience objects from a DUF file
93
+
94
+ [The `evo-sdk-common` Python library](https://pypi.org/project/evo-sdk-common/) can be used to sign in. After
95
+ successfully signing in, the user can select an organisation, an Evo hub, and a workspace. Use
96
+ [`evo-objects`](https://pypi.org/project/evo-objects/) to get an `ObjectAPIClient`, and
97
+ [`evo-data-converters-common`](https://pypi.org/project/evo-data-converters-common/) to convert your file.
98
+
99
+ Choose the DUF file you want to publish. Choose an EPSG code to use for the Coordinate Reference System. You can also
100
+ specify tags to add to the created geoscience objects.
101
+
102
+ The flag `combine_objects_in_layers` can be specified `True` to cause the convert to attempt to combine objects of the
103
+ same type found in the same layer. For example, where a layer in the file contains only `Polyface` objects, these can
104
+ all be published as parts on a single Evo triangle-mesh object. Where a layer contains a mix of object types, or a
105
+ single type, but the Evo type the objects map to does not support multiple parts, the objects will be published as
106
+ separate Evo objects.
107
+
108
+ Then call `convert_duf`, passing it the DUF file path, EPSG code, the workspace metadata or service manager widget, the
109
+ tags, optionally the flag `combine_objects_in_layers`, and finally a path you want the published objects to appear under
110
+ in your workspace.
111
+
112
+ See [the convert-duf sample notebook](https://github.com/seequentevo/evo-data-converters/blob/main/packages/duf/samples/convert-duf/convert-duf.ipynb)
113
+ for a complete example.
114
+
115
+ **Note:** Some geometry types are not yet supported. A warning will be shown for each element that could not be
116
+ converted. Currently, for publishing we support polyface objects and polylines, and all attribute types except for colour
117
+ attributes.
118
+
119
+ ### Export objects to DUF
120
+
121
+ To do.
122
+
123
+ ## Code of conduct
124
+
125
+ We rely on an open, friendly, inclusive environment. To help us ensure this remains possible, please familiarise
126
+ yourself with our [code of conduct.](https://github.com/SeequentEvo/evo-data-converters/blob/main/CODE_OF_CONDUCT.md)
127
+
128
+ ## License
129
+
130
+ Evo data converters are open source and licensed under the [Apache 2.0 license.](https://github.com/SeequentEvo/evo-data-converters/tree/main/packages/duf/./LICENSE.md)
131
+
132
+ Copyright © 2025 Bentley Systems, Incorporated.
133
+
134
+ Licensed under the Apache License, Version 2.0 (the "License").
135
+ You may obtain a copy of the License at
136
+
137
+ http://www.apache.org/licenses/LICENSE-2.0
138
+
139
+ Unless required by applicable law or agreed to in writing, software
140
+ distributed under the License is distributed on an "AS IS" BASIS,
141
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
142
+ See the License for the specific language governing permissions and
143
+ limitations under the License.
@@ -0,0 +1,49 @@
1
+ [project]
2
+ name = "evo-data-converters-duf"
3
+ description = "Python data converters for Deswik DUF to Evo geoscience objects"
4
+ version = "0.2.0"
5
+ requires-python = ">=3.10"
6
+ license-files = ["LICENSE.md"]
7
+ dynamic = ["readme"]
8
+ authors = [
9
+ { name = "Seequent", email = "support@seequent.com" }
10
+ ]
11
+ dependencies = [
12
+ "evo-data-converters-common",
13
+ "pythonnet>=3.0.5,<3.1.0",
14
+ ]
15
+ classifiers = [
16
+ "Operating System :: Microsoft :: Windows"
17
+ ]
18
+
19
+ [dependency-groups]
20
+ dev = [
21
+ "pandas",
22
+ "pytest",
23
+ "requests-mock",
24
+ ]
25
+
26
+ [tool.ruff]
27
+ src = ["src", "tests"]
28
+ line-length = 120
29
+ [build-system]
30
+ requires = ["hatchling", "hatch-fancy-pypi-readme"]
31
+ build-backend = "hatchling.build"
32
+
33
+ [tool.hatch.build.targets.sdist]
34
+ include = ["src"]
35
+
36
+ [tool.hatch.build.targets.wheel]
37
+ packages = ["src/evo"]
38
+
39
+ [tool.hatch.metadata.hooks.fancy-pypi-readme]
40
+ content-type = "text/markdown"
41
+
42
+ [[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
43
+ path = "README.md"
44
+
45
+ [[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
46
+ # Literal TOML strings (single quotes) need no escaping of backslashes.
47
+ # Converts relative links to absolute links in PyPI
48
+ pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)'
49
+ replacement = '[\1](https://github.com/SeequentEvo/evo-data-converters/tree/main/packages/duf/\g<2>)'
@@ -0,0 +1,22 @@
1
+ # Copyright © 2025 Bentley Systems, Incorporated
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ # http://www.apache.org/licenses/LICENSE-2.0
6
+ # Unless required by applicable law or agreed to in writing, software
7
+ # distributed under the License is distributed on an "AS IS" BASIS,
8
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9
+ # See the License for the specific language governing permissions and
10
+ # limitations under the License.
11
+
12
+ from .common import DUFFileNotFoundException, InvalidDUFFileException, ObjectCollector
13
+ from .duf_reader_context import DUFCollectorContext
14
+ from .utils import is_duf
15
+
16
+ __all__ = [
17
+ "DUFCollectorContext",
18
+ "DUFFileNotFoundException",
19
+ "InvalidDUFFileException",
20
+ "ObjectCollector",
21
+ "is_duf",
22
+ ]
@@ -0,0 +1,24 @@
1
+ # Copyright © 2025 Bentley Systems, Incorporated
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ # http://www.apache.org/licenses/LICENSE-2.0
6
+ # Unless required by applicable law or agreed to in writing, software
7
+ # distributed under the License is distributed on an "AS IS" BASIS,
8
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9
+ # See the License for the specific language governing permissions and
10
+ # limitations under the License.
11
+
12
+ from .duf_wrapper import (
13
+ DUFFileNotFoundException,
14
+ DUFWrapper,
15
+ InvalidDUFFileException,
16
+ ObjectCollector,
17
+ )
18
+
19
+ __all__ = [
20
+ "DUFFileNotFoundException",
21
+ "DUFWrapper",
22
+ "InvalidDUFFileException",
23
+ "ObjectCollector",
24
+ ]
@@ -0,0 +1,17 @@
1
+ # Copyright © 2025 Bentley Systems, Incorporated
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ # http://www.apache.org/licenses/LICENSE-2.0
6
+ # Unless required by applicable law or agreed to in writing, software
7
+ # distributed under the License is distributed on an "AS IS" BASIS,
8
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9
+ # See the License for the specific language governing permissions and
10
+ # limitations under the License.
11
+
12
+ from enum import Enum
13
+
14
+
15
+ class EvoSchema(Enum):
16
+ triangle_mesh = "triangle_mesh"
17
+ line_segments = "line_segments"
@@ -0,0 +1,98 @@
1
+ # Copyright © 2025 Bentley Systems, Incorporated
2
+ # Licensed under the Apache License, Version 2.0 (the "License");
3
+ # you may not use this file except in compliance with the License.
4
+ # You may obtain a copy of the License at
5
+ # http://www.apache.org/licenses/LICENSE-2.0
6
+ # Unless required by applicable law or agreed to in writing, software
7
+ # distributed under the License is distributed on an "AS IS" BASIS,
8
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9
+ # See the License for the specific language governing permissions and
10
+ # limitations under the License.
11
+
12
+ # ruff: noqa: E402
13
+
14
+ # This links the C# libraries and sets up the Python runtime to import Deswik's C# libraries
15
+ from evo.data_converters.duf.common import setup_deswik_lib_bindings # noqa: F401
16
+
17
+ from Deswik.Core.Structures import Vector3_dp, Vector4_dp
18
+ from Deswik.Duf import (
19
+ EntityMetadata,
20
+ CompressionMethod,
21
+ DufImplementation,
22
+ FilterCriteria,
23
+ ItemHeader,
24
+ NotDufFileException,
25
+ PerformanceTweaking,
26
+ SaveByIndexSet,
27
+ SaveEntityItem,
28
+ SaveSet,
29
+ SaveByEnumerableSet,
30
+ )
31
+ from Deswik.Entities import BaseEntity, PropValue, XProperty, XProperties
32
+ from Deswik.Entities.Base import DufList, SerializationBehaviour
33
+ from Deswik.Entities.Cad import (
34
+ Activator,
35
+ Category,
36
+ Document,
37
+ Figure,
38
+ Layer,
39
+ Polyface,
40
+ Polyline,
41
+ Upgrader,
42
+ dwPolyline,
43
+ LineType,
44
+ Color,
45
+ dwPoint,
46
+ )
47
+ from Deswik.Serialization import GuidReferences
48
+ from System import ArgumentException, Boolean, Double, Guid, Int32, NullReferenceException, String, UInt32
49
+ from System.Collections.Generic import List
50
+ from System.Reflection import BindingFlags
51
+
52
+
53
+ __all__ = [
54
+ # Deswik
55
+ "Activator",
56
+ "BaseEntity",
57
+ "BindingFlags",
58
+ "Category",
59
+ "Color",
60
+ "CompressionMethod",
61
+ "Document",
62
+ "Double",
63
+ "DufList",
64
+ "DufImplementation",
65
+ "dwPoint",
66
+ "dwPolyline",
67
+ "EntityMetadata",
68
+ "Figure",
69
+ "FilterCriteria",
70
+ "GuidReferences",
71
+ "ItemHeader",
72
+ "Layer",
73
+ "LineType",
74
+ "NotDufFileException",
75
+ "PerformanceTweaking",
76
+ "Polyface",
77
+ "Polyline",
78
+ "PropValue",
79
+ "SaveByEnumerableSet",
80
+ "SaveEntityItem",
81
+ "SaveByIndexSet",
82
+ "SaveSet",
83
+ "SerializationBehaviour",
84
+ "Upgrader",
85
+ "Vector3_dp",
86
+ "Vector4_dp",
87
+ "XProperty",
88
+ "XProperties",
89
+ # System
90
+ "ArgumentException",
91
+ "Boolean",
92
+ "Guid",
93
+ "NullReferenceException",
94
+ "Int32",
95
+ "String",
96
+ "UInt32",
97
+ "List",
98
+ ]