dimine-python-sdk 0.1.8__py3-none-any.whl
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.
- dimine_python_sdk/__init__.py +13 -0
- dimine_python_sdk/conn/__init__.py +5 -0
- dimine_python_sdk/conn/base_conn_client.py +167 -0
- dimine_python_sdk/conn/conn_client.py +382 -0
- dimine_python_sdk/docs/guides/data_edit.md +306 -0
- dimine_python_sdk/docs/guides/data_get.md +266 -0
- dimine_python_sdk/docs/guides/data_types.md +152 -0
- dimine_python_sdk/docs/guides/features.md +271 -0
- dimine_python_sdk/docs/guides/io.md +157 -0
- dimine_python_sdk/docs/index.md +41 -0
- dimine_python_sdk/docs/quickstart.md +45 -0
- dimine_python_sdk/docs/reference/SUMMARY.md +19 -0
- dimine_python_sdk/docs/reference/conn/base_conn_client.md +3 -0
- dimine_python_sdk/docs/reference/conn/conn_client.md +3 -0
- dimine_python_sdk/docs/reference/lib/algorithm/model_func.md +3 -0
- dimine_python_sdk/docs/reference/lib/io/file_conversion.md +3 -0
- dimine_python_sdk/docs/reference/lib/io/models.md +3 -0
- dimine_python_sdk/docs/reference/lib/io/project_plotting.md +3 -0
- dimine_python_sdk/docs/reference/lib/prospecting/block_data.md +3 -0
- dimine_python_sdk/docs/reference/lib/prospecting/drill_db.md +3 -0
- dimine_python_sdk/docs/reference/lib/prospecting/models.md +3 -0
- dimine_python_sdk/docs/reference/lib/prospecting/valuation.md +3 -0
- dimine_python_sdk/docs/reference/lib/types/entity.md +3 -0
- dimine_python_sdk/docs/reference/lib/types/line.md +3 -0
- dimine_python_sdk/docs/reference/lib/types/point.md +3 -0
- dimine_python_sdk/docs/reference/logger.md +3 -0
- dimine_python_sdk/docs/reference/models/conn.md +3 -0
- dimine_python_sdk/docs/reference/models/errors.md +3 -0
- dimine_python_sdk/docs/reference/models/types.md +3 -0
- dimine_python_sdk/docs/summary.md +6 -0
- dimine_python_sdk/lib/__init__.py +20 -0
- dimine_python_sdk/lib/algorithm/__init__.py +1 -0
- dimine_python_sdk/lib/algorithm/model_func.py +219 -0
- dimine_python_sdk/lib/exploitation/__init__.py +0 -0
- dimine_python_sdk/lib/io/__init__.py +2 -0
- dimine_python_sdk/lib/io/file_conversion.py +143 -0
- dimine_python_sdk/lib/io/models.py +180 -0
- dimine_python_sdk/lib/io/project_plotting.py +40 -0
- dimine_python_sdk/lib/prospecting/__init__.py +3 -0
- dimine_python_sdk/lib/prospecting/block_data.py +289 -0
- dimine_python_sdk/lib/prospecting/drill_db.py +333 -0
- dimine_python_sdk/lib/prospecting/models.py +276 -0
- dimine_python_sdk/lib/prospecting/valuation.py +113 -0
- dimine_python_sdk/lib/types/__init__.py +4 -0
- dimine_python_sdk/lib/types/entity.py +957 -0
- dimine_python_sdk/lib/types/line.py +188 -0
- dimine_python_sdk/lib/types/point.py +695 -0
- dimine_python_sdk/logger.py +7 -0
- dimine_python_sdk/models/__init__.py +3 -0
- dimine_python_sdk/models/conn.py +53 -0
- dimine_python_sdk/models/errors.py +4 -0
- dimine_python_sdk/models/types.py +131 -0
- dimine_python_sdk/site/404.html +671 -0
- dimine_python_sdk/site/assets/_mkdocstrings.css +237 -0
- dimine_python_sdk/site/assets/images/favicon.png +0 -0
- dimine_python_sdk/site/assets/javascripts/bundle.79ae519e.min.js +16 -0
- dimine_python_sdk/site/assets/javascripts/bundle.79ae519e.min.js.map +7 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.ar.min.js +1 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.da.min.js +18 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.de.min.js +18 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.du.min.js +18 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.el.min.js +1 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.es.min.js +18 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.fi.min.js +18 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.fr.min.js +18 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.he.min.js +1 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.hi.min.js +1 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.hu.min.js +18 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.hy.min.js +1 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.it.min.js +18 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.ja.min.js +1 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.jp.min.js +1 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.kn.min.js +1 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.ko.min.js +1 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.multi.min.js +1 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.nl.min.js +18 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.no.min.js +18 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.pt.min.js +18 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.ro.min.js +18 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.ru.min.js +18 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.sa.min.js +1 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.stemmer.support.min.js +1 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.sv.min.js +18 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.ta.min.js +1 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.te.min.js +1 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.th.min.js +1 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.tr.min.js +18 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.vi.min.js +1 -0
- dimine_python_sdk/site/assets/javascripts/lunr/min/lunr.zh.min.js +1 -0
- dimine_python_sdk/site/assets/javascripts/lunr/tinyseg.js +206 -0
- dimine_python_sdk/site/assets/javascripts/lunr/wordcut.js +6708 -0
- dimine_python_sdk/site/assets/javascripts/workers/search.2c215733.min.js +42 -0
- dimine_python_sdk/site/assets/javascripts/workers/search.2c215733.min.js.map +7 -0
- dimine_python_sdk/site/assets/stylesheets/main.484c7ddc.min.css +1 -0
- dimine_python_sdk/site/assets/stylesheets/main.484c7ddc.min.css.map +1 -0
- dimine_python_sdk/site/assets/stylesheets/palette.ab4e12ef.min.css +1 -0
- dimine_python_sdk/site/assets/stylesheets/palette.ab4e12ef.min.css.map +1 -0
- dimine_python_sdk/site/guides/data_edit.html +1251 -0
- dimine_python_sdk/site/guides/data_get.html +1206 -0
- dimine_python_sdk/site/guides/data_types.html +1529 -0
- dimine_python_sdk/site/guides/features.html +1217 -0
- dimine_python_sdk/site/guides/io.html +1025 -0
- dimine_python_sdk/site/index.html +849 -0
- dimine_python_sdk/site/objects.inv +0 -0
- dimine_python_sdk/site/quickstart.html +859 -0
- dimine_python_sdk/site/reference/SUMMARY.html +729 -0
- dimine_python_sdk/site/reference/conn/base_conn_client.html +1295 -0
- dimine_python_sdk/site/reference/conn/conn_client.html +3551 -0
- dimine_python_sdk/site/reference/lib/algorithm/model_func.html +2162 -0
- dimine_python_sdk/site/reference/lib/io/file_conversion.html +1725 -0
- dimine_python_sdk/site/reference/lib/io/models.html +1625 -0
- dimine_python_sdk/site/reference/lib/io/project_plotting.html +984 -0
- dimine_python_sdk/site/reference/lib/prospecting/block_data.html +2455 -0
- dimine_python_sdk/site/reference/lib/prospecting/drill_db.html +2836 -0
- dimine_python_sdk/site/reference/lib/prospecting/models.html +2309 -0
- dimine_python_sdk/site/reference/lib/prospecting/valuation.html +1373 -0
- dimine_python_sdk/site/reference/lib/types/entity.html +6728 -0
- dimine_python_sdk/site/reference/lib/types/line.html +1985 -0
- dimine_python_sdk/site/reference/lib/types/point.html +3672 -0
- dimine_python_sdk/site/reference/logger.html +751 -0
- dimine_python_sdk/site/reference/models/conn.html +751 -0
- dimine_python_sdk/site/reference/models/errors.html +802 -0
- dimine_python_sdk/site/reference/models/types.html +1679 -0
- dimine_python_sdk/site/search/search_index.json +1 -0
- dimine_python_sdk/site/sitemap.xml +107 -0
- dimine_python_sdk/site/sitemap.xml.gz +0 -0
- dimine_python_sdk/site/summary.html +697 -0
- dimine_python_sdk-0.1.8.dist-info/METADATA +15 -0
- dimine_python_sdk-0.1.8.dist-info/RECORD +135 -0
- dimine_python_sdk-0.1.8.dist-info/WHEEL +5 -0
- dimine_python_sdk-0.1.8.dist-info/top_level.txt +2 -0
- tests/conn_test.py +250 -0
- tests/test_base_type.py +143 -0
- tests/ws_client.py +60 -0
- tests/ws_server.py +271 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"],"fields":{"title":{"boost":1000.0},"text":{"boost":1.0},"tags":{"boost":1000000.0}}},"docs":[{"location":"index.html","title":"dimine-python-sdk","text":""},{"location":"index.html#1","title":"1. \u6982\u8ff0","text":"<p>\u7b80\u4ecb\uff1a</p> <p>\u672cSDK\u63d0\u4f9bDimine\u6570\u91c7Python\u63a5\u53e3\uff0c\u7528\u4e8e\u4e0eDimine\u6570\u5b57\u91c7\u77ff\u8bbe\u8ba1\u8f6f\u4ef6\u8fdb\u884c\u9ad8\u6548\u4ea4\u4e92\u3002\u5f00\u53d1\u8005\u53ef\u901a\u8fc7\u7f16\u5199 Python \u811a\u672c\uff0c\u5b9e\u73b0\u5bf9\u91c7\u77ff\u6a21\u578b\u3001\u573a\u666f\u7b49\u6838\u5fc3\u8d44\u6e90\u7684\u589e\u5220\u6539\u67e5\u64cd\u4f5c\uff0c\u4ee5\u53ca\u83b7\u53d6\u573a\u666f\u4fe1\u606f\u3001\u6267\u884c\u5206\u6790\u4efb\u52a1\u7b49\uff0c\u4ece\u800c\u5c06\u91c7\u77ff\u8bbe\u8ba1\u5de5\u4f5c\u6d41\u81ea\u52a8\u5316\u6216\u96c6\u6210\u5230\u73b0\u6709\u7cfb\u7edf\u4e2d\u3002</p> <p>\u6838\u5fc3\u7279\u6027\uff1a</p> <ul> <li>\u6a21\u578b\u7ba1\u7406\uff1a\u521b\u5efa\u3001\u8bfb\u53d6\u3001\u66f4\u65b0\u3001\u5220\u9664\u91c7\u77ff\u8bbe\u8ba1\u6a21\u578b\uff08\u5982\u5730\u8d28\u6a21\u578b\u3001\u91c7\u573a\u6a21\u578b\u3001\u5df7\u9053\u6a21\u578b\u7b49\uff09\u3002</li> <li>\u573a\u666f\u4ea4\u4e92\uff1a\u83b7\u53d6\u5f53\u524d\u6253\u5f00\u7684\u5de5\u7a0b\u573a\u666f\u4fe1\u606f\uff0c\u5305\u62ec\u573a\u666f\u5217\u8868\u3001\u573a\u666f\u5185\u5bf9\u8c61\u5c5e\u6027\u3002</li> <li>\u6570\u636e\u67e5\u8be2\uff1a\u652f\u6301\u6309\u6761\u4ef6\u8fc7\u6ee4\u6a21\u578b\u3001\u67e5\u8be2\u5c5e\u6027\u3001\u7a7a\u95f4\u5173\u7cfb\u68c0\u7d22\u3002</li> <li>\u5b9e\u65f6\u540c\u6b65\uff1a\u64cd\u4f5c\u7ed3\u679c\u5b9e\u65f6\u53cd\u6620\u5728\u8f6f\u4ef6\u754c\u9762\u4e2d\u3002</li> <li>\u5f02\u6b65\u652f\u6301\uff1a\u63d0\u4f9b\u5f02\u6b65\u8c03\u7528\u63a5\u53e3\uff0c\u9002\u7528\u4e8e\u6279\u91cf\u5904\u7406\u6216\u957f\u65f6\u95f4\u4efb\u52a1\u3002</li> </ul> <p>\u9002\u7528\u5e73\u53f0/\u8bed\u8a00\uff1aPython 3.12 \u53ca\u4ee5\u4e0a\u7248\u672c\uff1b\u652f\u6301 Windows / Linux \u64cd\u4f5c\u7cfb\u7edf\uff1b\u9700\u5b89\u88c5\u6570\u5b57\u91c7\u77ff\u8bbe\u8ba1\u8f6f\u4ef6\u5ba2\u6237\u7aef\u3002</p>"},{"location":"index.html#2","title":"2. \u5feb\u901f\u5b89\u88c5","text":"<pre><code>pip install dimine-python-sdk\n</code></pre>"},{"location":"index.html#3","title":"3. \u5feb\u901f\u5f00\u59cb","text":"<p>\u83b7\u53d6\u6570\u91c7\u5f53\u524d\u6253\u5f00\u7684\u6587\u4ef6\u5217\u8868</p> <pre><code>import asyncio\nfrom dimine_python_sdk.conn import open_client\n\nasync def main():\n async with open_client() as client:\n files = await client.get_files()\n print(files)\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"quickstart.html","title":"\u5feb\u901f\u5f00\u59cb","text":"<p>\u4ee5\u4e0b\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528sdk\u83b7\u53d6\u6570\u91c7\u5f53\u524d\u6587\u4ef6\u5217\u8868\u3001\u56fe\u5c42\u4fe1\u606f\u3001\u6a21\u578b\u5bf9\u8c61\u7b49\u4fe1\u606f</p>"},{"location":"quickstart.html#1","title":"1. \u83b7\u53d6\u6587\u4ef6\u5217\u8868","text":"<pre><code>import asyncio\nfrom dimine_python_sdk.conn import open_client\nasync def main():\n async with open_client() as client:\n files = await client.get_files()\n print(files)\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"quickstart.html#2","title":"2. \u83b7\u53d6\u56fe\u5c42\u4fe1\u606f","text":"<pre><code>import asyncio\nfrom dimine_python_sdk.conn import open_client\nasync def main():\n async with open_client() as client:\n files = await client.get_layers(file_id=\"123\")\n print(files)\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"quickstart.html#3","title":"3. \u83b7\u53d6\u6a21\u578b\u5bf9\u8c61","text":"<pre><code>import asyncio\nfrom dimine_python_sdk.conn import open_client\nasync def main():\n async with open_client() as client:\n files = await client.get_files()\n layers = await client.get_layers(file_id=files[len(files)-1].id)\n geometries = await client.get_geometry(file_id=files[len(files)-1].id, layer_id=layers[0].id, [\"point\"])\n print(geometries)\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"summary.html","title":"Summary","text":"<ul> <li>\u9996\u9875</li> <li>\u5feb\u901f\u5f00\u59cb</li> <li>\u64cd\u4f5c\u6307\u5357</li> <li>API \u53c2\u8003</li> <li>\u793a\u4f8b</li> </ul>"},{"location":"guides/data_edit.html","title":"\u6570\u636e\u4fee\u6539","text":"<p>\u4e3b\u8981\u7528\u4e8e\u4fee\u6539\u6570\u91c7\u8f6f\u4ef6\u573a\u666f\u5185\u7684\u6a21\u578b\u5bf9\u8c61\u3001\u5c5e\u6027\u3001\u56fe\u5c42\u3001\u6587\u4ef6\u7b49\u6570\u636e\uff0c \u652f\u6301\u4fee\u6539\u8303\u56f4\u5305\u62ec\uff1a\u521b\u5efa\u3001\u66f4\u65b0\u3001\u5220\u9664\u6a21\u578b\u5bf9\u8c61\u3001\u5c5e\u6027\u3001\u56fe\u5c42\u3001\u6587\u4ef6\u7b49</p>"},{"location":"guides/data_edit.html#1","title":"1. \u6570\u91c7\u6587\u4ef6\u5173\u95ed","text":"<p>\u5c06\u6570\u91c7\u8f6f\u4ef6\u573a\u666f\u4e0b\u7684\u67d0\u4e2a\u6253\u5f00\u7684\u6587\u4ef6\u5173\u95ed</p> <pre><code>import asyncio\nfrom dimine_python_sdk.conn import open_client\nasync def main():\n async with open_client() as client:\n # \u83b7\u53d6\u6587\u4ef6\u5217\u8868\n files = await client.get_files()\n # \u5173\u95ed\u6587\u4ef6\n await files[0].close()\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"guides/data_edit.html#2","title":"2. \u6570\u91c7\u6587\u4ef6\u6253\u5f00","text":"<p>\u5c06\u63a7\u5236\u6570\u91c7\u8f6f\u4ef6\u6253\u5f00\u67d0\u4e2a\u6587\u4ef6\u5230\u5f53\u524d\u573a\u666f\u4e0b</p> <pre><code>import asyncio\nfrom dimine_python_sdk.conn import open_client\nasync def main():\n async with open_client() as client:\n file_path = \"D:/test.dmf\" # \u652f\u6301\u6253\u5f00\u591a\u79cd\u7c7b\u578b\u6587\u4ef6\uff1admf\u3001dmm\u3001cad\u3001dmb\u3001dmd\u3001dmo\n file = await client.open_file(file_path)\n print(file.name)\n print(file.id)\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"guides/data_edit.html#3","title":"3. \u521b\u5efa\u6216\u66f4\u65b0\u6a21\u578b","text":"<p>\u901a\u8fc7<code>update_or_create_geometry</code>\u65b9\u6cd5\u6279\u91cf\u521b\u5efa\u6216\u66f4\u65b0\u6a21\u578b\uff0c\u5982\u679c\u6a21\u578b\u5df2\u5b58\u5728\u5219\u66f4\u65b0\uff0c\u4e0d\u5b58\u5728\u5219\u521b\u5efa\u3002</p> <pre><code>import asyncio\nimport numpy as np\nfrom dimine_python_sdk.conn import open_client\nfrom dimine_python_sdk.models.types import Point, Line, Shell, TINGeometry\n\nasync def main():\n async with open_client() as client:\n # \u83b7\u53d6\u5f53\u524d\u6587\u4ef6\u7684\u56fe\u5c42\u548c\u8981\u7d20\n files = await client.get_files()\n layers = await client.get_layers(file_id=files[len(files)-1].id)\n features = await client.get_features(files[len(files)-1].id)\n\n # \u51c6\u5907\u6a21\u578b\u6570\u636e - \u5305\u542b\u70b9\u3001\u7ebf\u3001\u5b9e\u4f53\n geometries = [\n # \u521b\u5efa\u70b9\n Point(\n file=files[0].id,\n layer=layers[0].id,\n feature=features[0].name,\n geometry=np.array([11, 32, 44]),\n color=[255, 0, 0] # \u7ea2\u8272\n ),\n # \u521b\u5efa\u7ebf\uff08\u591a\u6bb5\u7ebf\uff09\n Line(\n file=files[0].id,\n layer=layers[0].id,\n feature=features[0].name,\n geometry=np.array([[11, 12, 13], [14, 25, 26]]),\n color=[0, 255, 0] # \u7eff\u8272\n ),\n # \u521b\u5efa\u5b9e\u4f53\uff08\u4e09\u89d2\u7f51\uff09\n Shell(\n file=files[0].id,\n layer=layers[0].id,\n feature=features[0].name,\n geometry=TINGeometry(\n points=np.array([[11, 12, 13], [14, 25, 26], [27, 28, 29]]),\n faces=np.array([[0, 1, 2]]) # \u4e09\u4e2a\u70b9\u6784\u6210\u4e00\u4e2a\u4e09\u89d2\u5f62\u9762\n ),\n color=[0, 0, 255] # \u84dd\u8272\n )\n ]\n\n # \u6279\u91cf\u521b\u5efa\u6216\u66f4\u65b0\u6a21\u578b\n await client.update_or_create_geometry(geometries)\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"guides/data_edit.html#4","title":"4. \u521b\u5efa\u6a21\u578b\uff08\u5355\u72ec\uff09","text":"<p>\u5982\u679c\u53ea\u9700\u8981\u521b\u5efa\u65b0\u6a21\u578b\uff0c\u4f7f\u7528<code>create_geometry</code>\u65b9\u6cd5\uff1a</p> <pre><code>import asyncio\nimport numpy as np\nfrom dimine_python_sdk.conn import open_client\nfrom dimine_python_sdk.models.types import Point, Line, Shell, TINGeometry\n\nasync def main():\n async with open_client() as client:\n # \u83b7\u53d6\u5f53\u524d\u6587\u4ef6\u3001\u56fe\u5c42\u3001\u8981\u7d20\u4fe1\u606f\n files = await client.get_files()\n layers = await client.get_layers(file_id=files[0].id)\n features = await client.get_features(files[0].id)\n\n # \u521b\u5efa\u70b9\u6a21\u578b\n point = Point(\n file=files[0].id,\n layer=layers[0].id,\n feature=features[0].name,\n geometry=np.array([0, 0, 0])\n )\n\n await client.create_geometry([point])\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"guides/data_edit.html#5","title":"5. \u66f4\u65b0\u6a21\u578b\uff08\u5355\u72ec\uff09","text":"<p>\u5982\u679c\u53ea\u9700\u8981\u66f4\u65b0\u5df2\u5b58\u5728\u7684\u6a21\u578b\uff0c\u4f7f\u7528<code>update_geometry</code>\u65b9\u6cd5\uff1a</p> <pre><code>import asyncio\nfrom dimine_python_sdk.conn import open_client\nfrom dimine_python_sdk.models.types import Point\n\nasync def main():\n async with open_client() as client:\n # \u9996\u5148\u83b7\u53d6\u6a21\u578b\u5217\u8868\u627e\u5230\u8981\u66f4\u65b0\u7684\u6a21\u578b\n files = await client.get_files()\n layers = await client.get_layers(file_id=files[0].id)\n geometries = await client.get_geometry(file_id=files[0].id, layer_id=layers[0].id)\n\n # \u627e\u5230\u7b2c\u4e00\u4e2a\u70b9\u6a21\u578b\n point_to_update = None\n for geom in geometries:\n if geom.type == \"point\":\n point_to_update = geom\n break\n\n if point_to_update:\n # \u66f4\u65b0\u70b9\u5750\u6807\u548c\u989c\u8272\n point_to_update.geometry = np.array([100, 200, 300])\n point_to_update.color = [255, 255, 0] # \u9ec4\u8272\n\n await client.update_geometry([point_to_update])\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"guides/data_edit.html#6","title":"6. \u521b\u5efa\u56fe\u5c42","text":"<p>\u521b\u5efa\u65b0\u7684\u56fe\u5c42\uff1a</p> <pre><code>import asyncio\nfrom dimine_python_sdk.conn import open_client\n\nasync def main():\n async with open_client() as client:\n files = await client.get_files()\n # \u521b\u5efa\u65b0\u56fe\u5c42\n layer = await client.create_layer(\n file_id=files[len(files)-1].id,\n name=\"test_layer\"\n )\n print(f\"\u521b\u5efa\u56fe\u5c42: {layer.name}, ID: {layer.id}\")\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"guides/data_edit.html#7","title":"7. \u5220\u9664\u56fe\u5c42","text":"<p>\u5220\u9664\u6307\u5b9a\u56fe\u5c42\uff1a</p> <pre><code>import asyncio\nfrom dimine_python_sdk.conn import open_client\n\nasync def main():\n async with open_client() as client:\n files = await client.get_files()\n # \u521b\u5efa\u6d4b\u8bd5\u56fe\u5c42\n new_layer = await client.create_layer(\n file_id=files[len(files)-1].id,\n name=\"test_layer_to_delete\"\n )\n # \u5220\u9664\u56fe\u5c42\n await client.delete_layer(\n file_id=files[len(files)-1].id,\n layer_name=new_layer.name\n )\n print(\"\u56fe\u5c42\u5220\u9664\u6210\u529f\")\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"guides/data_edit.html#8","title":"8. \u66f4\u65b0\u6a21\u578b","text":"<p>\u66f4\u65b0\u5df2\u5b58\u5728\u7684\u6a21\u578b\u5c5e\u6027\u3001\u989c\u8272\u6216\u51e0\u4f55\u4fe1\u606f\uff1a</p> <pre><code>import asyncio\nfrom dimine_python_sdk.conn import open_client\n\nasync def main():\n async with open_client() as client:\n files = await client.get_files()\n layers = await client.get_layers(file_id=files[len(files)-1].id)\n features = await client.get_features(files[len(files)-1].id)\n geometries = await client.get_geometry(\n file_id=files[len(files)-1].id,\n layer_id=layers[0].id\n )\n\n if len(geometries) > 0:\n # \u66f4\u65b0\u51e0\u4f55\u989c\u8272\n geometries[0].color = [255, 0, 0] # \u7ea2\u8272\n # \u66f4\u65b0\u51e0\u4f55\u5750\u6807\uff08\u5982\u679c\u9700\u8981\uff09\n # geometries[0].geometry = np.array([new_x, new_y, new_z])\n\n await client.update_geometry([geometries[0]])\n print(f\"\u51e0\u4f55\u66f4\u65b0\u6210\u529f: {geometries[0].id}\")\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"guides/data_edit.html#9","title":"9. \u5220\u9664\u6a21\u578b","text":"<p>\u5220\u9664\u6307\u5b9a\u7684\u51e0\u4f55\u5bf9\u8c61\uff1a</p> <pre><code>import asyncio\nimport numpy as np\nfrom dimine_python_sdk.conn import open_client\nfrom dimine_python_sdk.models.types import Point\n\nasync def main():\n async with open_client() as client:\n files = await client.get_files()\n layers = await client.get_layers(file_id=files[len(files)-1].id)\n features = await client.get_features(files[len(files)-1].id)\n\n # \u5148\u521b\u5efa\u51e0\u4f55\n new_point = Point(\n file=files[0].id,\n layer=layers[0].id,\n feature=features[0].name,\n geometry=np.array([100, 200, 300])\n )\n await client.create_geometry([new_point])\n print(f\"\u521b\u5efa\u70b9\u51e0\u4f55: {new_point.id}\")\n\n # \u5220\u9664\u51e0\u4f55\n delete_items = [{\"id\": new_point.id, \"file\": files[0].id}]\n await client.delete_geometry(delete_items)\n print(\"\u51e0\u4f55\u5220\u9664\u6210\u529f\")\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"guides/data_edit.html#10","title":"10. \u6a21\u578b\u5c5e\u6027\u7ba1\u7406","text":"<p>\u53ef\u4ee5\u4e3a\u6a21\u578b\u6dfb\u52a0\u81ea\u5b9a\u4e49\u5c5e\u6027\uff1a</p> <pre><code>import asyncio\nimport numpy as np\nfrom dimine_python_sdk.conn import open_client\nfrom dimine_python_sdk.models.types import Point\nfrom dimine_python_sdk.models.types import PropertyValue\n\nasync def main():\n async with open_client() as client:\n files = await client.get_files()\n layers = await client.get_layers(file_id=files[0].id)\n features = await client.get_features(files[0].id)\n\n # \u521b\u5efa\u5e26\u5c5e\u6027\u7684\u70b9\n point = Point(\n file=files[0].id,\n layer=layers[0].id,\n feature=features[0].name,\n geometry=np.array([50, 50, 50]),\n properties=[\n PropertyValue(name=\"\u7c7b\u578b\", value=\"\u52d8\u63a2\u70b9\", type=\"string\"),\n PropertyValue(name=\"\u9ad8\u7a0b\", value=\"1250.5\", type=\"float\"),\n PropertyValue(name=\"\u6807\u8bc6\u53f7\", value=\"KP-001\", type=\"string\")\n ]\n )\n\n await client.create_geometry([point])\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"guides/data_get.html","title":"\u6570\u636e\u83b7\u53d6","text":"<p>\u4e3b\u8981\u7528\u4e8e\u4ece\u6570\u91c7\u8f6f\u4ef6\u573a\u666f\u5185\u83b7\u53d6\u6a21\u578b\u5bf9\u8c61\u3001\u5c5e\u6027\u3001\u56fe\u5c42\u3001\u6587\u4ef6\u7b49\u4fe1\u606f</p>"},{"location":"guides/data_get.html#1","title":"1. \u83b7\u53d6\u6587\u4ef6\u5217\u8868","text":"<p>\u83b7\u53d6\u6570\u91c7\u8f6f\u4ef6\u573a\u666f\u4e0b\u7684\u5df2\u7ecf\u6253\u5f00\u7684\u6587\u4ef6\u5217\u8868\uff0c\u5305\u542b\u6587\u4ef6id\u3001\u6587\u4ef6\u540d</p> <pre><code>import asyncio\nfrom dimine_python_sdk.conn import open_client\nasync def main():\n async with open_client() as client:\n # \u83b7\u53d6\u6587\u4ef6\u5217\u8868\n files = await client.get_files()\n for file in files:\n print(file.name)\n print(file.id)\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"guides/data_get.html#2","title":"2. \u83b7\u53d6\u56fe\u5c42\u4fe1\u606f","text":"<p>\u83b7\u53d6\u6587\u4ef6\u4e0b\u7684\u56fe\u5c42\u4fe1\u606f\uff0c\u5305\u542b\u56fe\u5c42id\u3001\u56fe\u5c42\u540d\u79f0\u3001\u56fe\u5c42\u7c7b\u578b</p> <pre><code>import asyncio\nfrom dimine_python_sdk.conn import open_client\nasync def main():\n async with open_client() as client:\n # \u83b7\u53d6\u6587\u4ef6\u5217\u8868\n files = await client.get_files()\n # \u83b7\u53d6\u6700\u540e\u4e00\u4e2a\u6587\u4ef6\u4e0b\u7684\u56fe\u5c42\n layers = await client.get_layers(file_id=files[len(files)-1].id)\n for layer in layers:\n print(layer.id)\n print(layer.name)\n print(layer.layer_type)\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"guides/data_get.html#3","title":"3. \u83b7\u53d6\u7279\u5b9a\u56fe\u5c42\u7684\u6a21\u578b","text":"<p>\u901a\u8fc7\u6307\u5b9a\u56fe\u5c42ID\u6765\u83b7\u53d6\u7279\u5b9a\u56fe\u5c42\u4e0b\u7684\u6a21\u578b\uff1a</p> <pre><code>import asyncio\nfrom dimine_python_sdk.conn import open_client\nasync def main():\n async with open_client() as client:\n # \u83b7\u53d6\u6587\u4ef6\u5217\u8868\n files = await client.get_files()\n # \u83b7\u53d6\u6587\u4ef6\u7684\u6240\u6709\u56fe\u5c42\n layers = await client.get_layers(file_id=files[0].id)\n\n # \u83b7\u53d6\u7b2c\u4e00\u4e2a\u56fe\u5c42\u7684\u6240\u6709\u6a21\u578b\n if len(layers) > 0:\n geometries = await client.get_geometry(\n file_id=files[0].id,\n layer_id=layers[0].id,\n entity_types=[\"point\", \"line\", \"shell\"]\n )\n\n print(f\"\u56fe\u5c42 '{layers[0].name}' \u5305\u542b {len(geometries)} \u4e2a\u6a21\u578b\")\n for geometry in geometries:\n print(f\" - {geometry.type}: {geometry.geometry}\")\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"guides/data_get.html#3_1","title":"3. \u83b7\u53d6\u6a21\u578b\u5bf9\u8c61","text":"<p>\u83b7\u53d6\u6a21\u578b\u5bf9\u8c61\uff0c\u5305\u542b\u6a21\u578b\u5bf9\u8c61id\u3001\u6a21\u578b\u5bf9\u8c61\u7c7b\u578b\u3001\u6a21\u578b\u5bf9\u8c61\u989c\u8272\u3001\u6240\u5c5e\u8981\u7d20\u3001\u6240\u5c5e\u56fe\u5c42\u3001\u5c5e\u6027\u6570\u7ec4\u3001\u6a21\u578b\u5bf9\u8c61\u51e0\u4f55\u4fe1\u606f</p> <pre><code>import asyncio\nfrom dimine_python_sdk.conn import open_client\nasync def main():\n async with open_client() as client:\n # \u83b7\u53d6\u6587\u4ef6\u5217\u8868\n files = await client.get_files()\n # \u83b7\u53d6\u6700\u540e\u4e00\u4e2a\u6587\u4ef6\u4e0b\u7684\u56fe\u5c42\n layers = await client.get_layers(file_id=files[len(files)-1].id)\n # \u83b7\u53d6\u6700\u540e\u56fe\u5c42\u4e0b\u7684\u6a21\u578b\u5bf9\u8c61\u6570\u7ec4\n geometries = await client.get_geometry(file_id=files[len(files)-1].id, layer_id=layers[0].id, [\"point\"])\n for geometry in geometries:\n print(geometry.id) # \u6a21\u578b\u5bf9\u8c61id\n print(geometry.type) # \u6a21\u578b\u5bf9\u8c61\u7c7b\u578b\n print(geometry.color) # \u5c55\u793a\u989c\u8272\n print(geometry.feature) # \u6240\u5c5e\u8981\u7d20\n print(geometry.layer) # \u6240\u5c5e\u56fe\u5c42\n print(geometry.properties) # \u5c5e\u6027\u6570\u7ec4\n print(geometry.geometry) # \u6a21\u578b\u5bf9\u8c61\u51e0\u4f55\u4fe1\u606f\uff1a\u70b9: np.ndarray(3,), \u7ebf: np.ndarray(N,3), \u5b9e\u4f53: TINGeometry\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"guides/data_get.html#4","title":"4. \u83b7\u53d6\u7279\u5b9a\u7c7b\u578b\u7684\u6a21\u578b","text":"<p>\u53ef\u4ee5\u901a\u8fc7<code>entity_types</code>\u53c2\u6570\u8fc7\u6ee4\u83b7\u53d6\u7279\u5b9a\u7c7b\u578b\u7684\u6a21\u578b\uff1a</p> <pre><code>import asyncio\nfrom dimine_python_sdk.conn import open_client\nasync def main():\n async with open_client() as client:\n # \u83b7\u53d6\u6587\u4ef6\u5217\u8868\n files = await client.get_files()\n layers = await client.get_layers(file_id=files[0].id)\n\n # \u83b7\u53d6\u6587\u4ef6\u4e0b\u6240\u6709\u56fe\u5c42\u4e2d\u7684\u6240\u6709\u7c7b\u578b\u7684\u6a21\u578b\n geometries = await client.get_geometry(file_id=files[0].id, layer_id=layers[0].id, entity_types=[\"point\", \"line\"])\n\n for geometry in geometries:\n print(f\"\u7c7b\u578b: {geometry.type}, \u5750\u6807: {geometry.geometry}\")\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"guides/data_get.html#5","title":"5. \u83b7\u53d6\u7279\u5b9a\u8981\u7d20\u7684\u6a21\u578b","text":"<p>\u53ef\u4ee5\u901a\u8fc7<code>features</code>\u53c2\u6570\u8fc7\u6ee4\u83b7\u53d6\u7279\u5b9a\u8981\u7d20\u5173\u8054\u7684\u6a21\u578b\uff1a</p> <pre><code>import asyncio\nfrom dimine_python_sdk.conn import open_client\nasync def main():\n async with open_client() as client:\n # \u83b7\u53d6\u6587\u4ef6\u5217\u8868\n files = await client.get_files()\n layers = await client.get_layers(file_id=files[0].id)\n features = await client.get_features(files[0].id)\n\n # \u83b7\u53d6\u7279\u5b9a\u8981\u7d20\u7684\u6a21\u578b\n geometries = await client.get_geometry(\n file_id=files[0].id,\n layer_id=layers[0].id,\n entity_types=[\"point\", \"line\", \"shell\"],\n features=[features[0].name] # \u53ea\u83b7\u53d6\u7b2c\u4e00\u4e2a\u8981\u7d20\u7684\u6a21\u578b\n )\n\n for geometry in geometries:\n print(f\"\u8981\u7d20: {geometry.feature}, \u7c7b\u578b: {geometry.type}\")\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"guides/data_get.html#5_1","title":"5. \u83b7\u53d6\u8981\u7d20\u4fe1\u606f","text":"<p>\u83b7\u53d6\u6587\u4ef6\u4e2d\u7684\u8981\u7d20\u5b9a\u4e49\uff0c\u5305\u62ec\u8981\u7d20\u540d\u79f0\u548c\u5c5e\u6027\u5b9a\u4e49\uff1a</p> <pre><code>import asyncio\nfrom dimine_python_sdk.conn import open_client\nfrom dimine_python_sdk.models.types import FeatureInfo, PropertyInfo\n\nasync def main():\n async with open_client() as client:\n # \u83b7\u53d6\u6587\u4ef6\u5217\u8868\n files = await client.get_files()\n features = await client.get_features(files[0].id)\n\n for feature in features:\n print(f\"\u8981\u7d20\u540d\u79f0: {feature.name}\")\n print(\"\u5c5e\u6027\u5b9a\u4e49:\")\n for prop in feature.properties:\n print(f\" - {prop.name}: {prop.type}\")\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"guides/data_get.html#6","title":"6. \u83b7\u53d6\u7279\u5b9a\u7c7b\u578b\u7684\u6a21\u578b","text":"<p>\u53ef\u4ee5\u901a\u8fc7<code>entity_types</code>\u53c2\u6570\u8fc7\u6ee4\u83b7\u53d6\u7279\u5b9a\u7c7b\u578b\u7684\u6a21\u578b\uff1a</p> <pre><code>import asyncio\nfrom dimine_python_sdk.conn import open_client\nasync def main():\n async with open_client() as client:\n # \u83b7\u53d6\u6587\u4ef6\u5217\u8868\n files = await client.get_files()\n layers = await client.get_layers(file_id=files[0].id)\n\n # \u83b7\u53d6\u6587\u4ef6\u4e0b\u6240\u6709\u56fe\u5c42\u4e2d\u7684\u6240\u6709\u7c7b\u578b\u7684\u6a21\u578b\n geometries = await client.get_geometry(file_id=files[0].id, layer_id=layers[0].id, entity_types=[\"point\", \"line\"])\n\n for geometry in geometries:\n print(f\"\u7c7b\u578b: {geometry.type}, \u5750\u6807: {geometry.geometry}\")\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"guides/data_get.html#7","title":"7. \u83b7\u53d6\u7279\u5b9a\u8981\u7d20\u7684\u6a21\u578b","text":"<p>\u53ef\u4ee5\u901a\u8fc7<code>features</code>\u53c2\u6570\u8fc7\u6ee4\u83b7\u53d6\u7279\u5b9a\u8981\u7d20\u5173\u8054\u7684\u6a21\u578b\uff1a</p> <pre><code>import asyncio\nfrom dimine_python_sdk.conn import open_client\nasync def main():\n async with open_client() as client:\n # \u83b7\u53d6\u6587\u4ef6\u5217\u8868\n files = await client.get_files()\n layers = await client.get_layers(file_id=files[0].id)\n features = await client.get_features(files[0].id)\n\n # \u83b7\u53d6\u7279\u5b9a\u8981\u7d20\u7684\u6a21\u578b\n geometries = await client.get_geometry(\n file_id=files[0].id,\n layer_id=layers[0].id,\n entity_types=[\"point\", \"line\", \"shell\"],\n features=[features[0].name] # \u53ea\u83b7\u53d6\u7b2c\u4e00\u4e2a\u8981\u7d20\u7684\u6a21\u578b\n )\n\n for geometry in geometries:\n print(f\"\u8981\u7d20: {geometry.feature}, \u7c7b\u578b: {geometry.type}\")\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"guides/data_get.html#8-shell","title":"8. \u83b7\u53d6\u5b9e\u4f53\uff08Shell\uff09\u6a21\u578b\u4fe1\u606f","text":"<p>\u5b9e\u4f53\u6a21\u578b\u4f7f\u7528\u4e09\u89d2\u7f51\uff08TIN\uff09\u8868\u793a\uff0c\u5305\u542b\u9876\u70b9\u548c\u9762\u7247\u4fe1\u606f\uff1a</p> <pre><code>import asyncio\nfrom dimine_python_sdk.conn import open_client\nfrom dimine_python_sdk.models.types import Shell\n\nasync def main():\n async with open_client() as client:\n # \u83b7\u53d6\u6587\u4ef6\u5217\u8868\n files = await client.get_files()\n layers = await client.get_layers(file_id=files[0].id)\n\n # \u83b7\u53d6\u6240\u6709\u5b9e\u4f53\u6a21\u578b\n geometries = await client.get_geometry(\n file_id=files[0].id,\n layer_id=layers[0].id,\n entity_types=[\"shell\"]\n )\n\n for geometry in geometries:\n if isinstance(geometry, Shell):\n print(f\"\u5b9e\u4f53ID: {geometry.id}\")\n print(f\"\u9876\u70b9\u6570: {geometry.geometry.points.shape[0]}\")\n print(f\"\u9762\u7247\u6570: {geometry.geometry.faces.shape[0]}\")\n print(f\"\u9876\u70b9\u5750\u6807: {geometry.geometry.points}\")\n print(f\"\u9762\u7247\u7d22\u5f15: {geometry.geometry.faces}\")\n print(f\"\u989c\u8272: {geometry.color}\")\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"guides/data_types.html","title":"\u6570\u636e\u7c7b\u578b\u8bf4\u660e","text":""},{"location":"guides/data_types.html#_2","title":"\u6570\u91c7\u6587\u4ef6\u4fe1\u606f","text":""},{"location":"guides/data_types.html#_3","title":"\u7c7b\u578b\u5b9a\u4e49","text":"<pre><code>class FileInfo(BaseModel):\n id: str = Field(description='\u6587\u4ef6id') # \n name: str = Field(description='\u6587\u4ef6\u540d') # \n</code></pre>"},{"location":"guides/data_types.html#_4","title":"\u56fe\u5c42\u4fe1\u606f","text":""},{"location":"guides/data_types.html#_5","title":"\u7c7b\u578b\u5b9a\u4e49","text":"<pre><code>class LayerInfo(BaseModel):\n id: str = Field(description='\u56fe\u5c42id') # \n name: str = Field(description='\u56fe\u5c42\u540d\u79f0') # \n</code></pre>"},{"location":"guides/data_types.html#_6","title":"\u5c5e\u6027\u4fe1\u606f","text":"<p>\u5355\u4e2a\u5c5e\u6027\u7684\u5b9a\u4e49\uff0c\u6bd4\u5982\uff1a\u5c5e\u6027\u540d\u79f0\u3001\u6570\u636e\u7c7b\u578b</p>"},{"location":"guides/data_types.html#_7","title":"\u7c7b\u578b\u5b9a\u4e49","text":"<pre><code>class PropertyInfo(BaseModel):\n name: str = Field(description='\u5c5e\u6027\u540d\u79f0') # \n type: Literal['long', 'string', 'int', 'short'] = Field(description='\u6570\u636e\u7c7b\u578b') # \n</code></pre>"},{"location":"guides/data_types.html#_8","title":"\u5c5e\u6027\u4fe1\u606f\u548c\u5c5e\u6027\u503c","text":"<p>\u5728\u5c5e\u6027\u5b9a\u4e49\u7684\u57fa\u7840\u4e0a\u589e\u52a0\u5c5e\u6027\u503c\u5b57\u6bb5</p>"},{"location":"guides/data_types.html#_9","title":"\u7c7b\u578b\u5b9a\u4e49","text":"<pre><code>class PropertyValue(BaseModel):\n value: str | int | float | None = Field(default=None, description='\u5c5e\u6027\u503c') # \n</code></pre>"},{"location":"guides/data_types.html#_10","title":"\u8981\u7d20\u4fe1\u606f","text":"<p>\u8981\u7d20\u5b9a\u4e49\uff0c\u4e5f\u662f\u4e00\u7ec4\u5c5e\u6027\u7684\u5b9a\u4e49\uff0c\u6bd4\u5982\uff1a\u5df7\u9053\u8981\u7d20\uff0c\u5305\u542b\u5c5e\u6027\u5982\u540d\u79f0\u3001\u957f\u5ea6\u3001\u5bbd\u5ea6\u3001\u9ad8\u5ea6\u7b49</p>"},{"location":"guides/data_types.html#_11","title":"\u7c7b\u578b\u5b9a\u4e49","text":"<pre><code>class FeatureInfo(BaseModel):\n name: str = Field(description='\u8981\u7d20\u540d\u79f0', validation_alias='feature_name') # \n properties: List[PropertyInfo] = Field(default_factory=list, description='\u8981\u7d20\u5c5e\u6027', validation_alias='feature_define') # \n</code></pre>"},{"location":"guides/data_types.html#_12","title":"\u51e0\u4f55\u5bf9\u8c61\u57fa\u7840\u7c7b","text":"<p>\u662f\u6240\u6709\u51e0\u4f55\u5bf9\u8c61\u7c7b\u578b\u7684\u57fa\u7c7b</p>"},{"location":"guides/data_types.html#_13","title":"\u7c7b\u578b\u5b9a\u4e49","text":"<pre><code>class BaseGeometry(BaseModel):\n id: str = Field(default='', description='\u70b9id') # \n color: List[int] = Field(default=[0, 0, 0], description='\u989c\u8272') # \n feature: str = Field(default='', description='\u6240\u5c5e\u8981\u7d20\u540d') # \n layer: str = Field(default='', description='\u6240\u5728\u56fe\u5c42id') # \n properties: List[PropertyValue] = Field(default_factory=list, description='\u70b9\u5c5e\u6027') # \n</code></pre>"},{"location":"guides/data_types.html#_14","title":"\u70b9","text":"<p>\u8868\u793a\u4e00\u4e2a\u70b9\u5bf9\u8c61\uff0c\u53ea\u6709\u4e00\u4e2a\u5750\u6807</p>"},{"location":"guides/data_types.html#_15","title":"\u7c7b\u578b\u5b9a\u4e49","text":"<pre><code>class Point(BaseGeometry):\n type: Optional[Literal['point']] = Field(default='point', description='\u70b9\u7c7b\u578b') # \n geometry: np.ndarray = Field(default=np.array([]), description='\u70b9\u5750\u6807, shape=(3,)') # \n</code></pre>"},{"location":"guides/data_types.html#_16","title":"\u7ebf","text":"<p>\u8868\u793a\u4e00\u6761\u76f4\u7ebf\u6216\u8005\u591a\u6bb5\u7ebf</p>"},{"location":"guides/data_types.html#_17","title":"\u7c7b\u578b\u5b9a\u4e49","text":"<pre><code>class Line(BaseModel):\n type: Optional[Literal['line']] = Field(default='line', description='\u7ebf\u7c7b\u578b') # \n geometry: np.ndarray = Field(default=np.array([]), description='\u7ebf\u5750\u6807, shape=(N,3)') # \n</code></pre>"},{"location":"guides/data_types.html#_18","title":"\u5b9e\u4f53\u5bf9\u8c61\u51e0\u4f55\u4fe1\u606f","text":"<p>\u4f7f\u7528\u4e09\u89d2\u7f51\u4f53\u8868\u793a\u4e00\u4e2a\u5b9e\u4f53\u5bf9\u8c61\uff0c \u6bcf\u4e09\u4e2a\u70b9\u6784\u6210\u4e00\u4e2a\u4e09\u89d2\u5f62</p>"},{"location":"guides/data_types.html#_19","title":"\u7c7b\u578b\u5b9a\u4e49","text":"<pre><code>class TINGeometry(BaseType):\n \"\"\"\u4e09\u89d2\u7f51\u6a21\u578b\u5b9a\u4e49\uff0c\"\"\"\n model_config = {\"arbitrary_types_allowed\": True}\n faces: np.ndarray = Field(default=np.array([]), description=\"\u4e09\u89d2\u9762\u7247\uff1a\u6bcf\u884c\u662f\u4e09\u4e2a\u9876\u70b9\u7684\u7d22\u5f15\uff0c\u4e09\u4e2a\u9876\u70b9\u8fde\u63a5\u8d77\u6765\u5f62\u6210\u4e00\u4e2a\u4e09\u89d2\u9762\u3002shape=(N,3)\")\n points: np.ndarray = Field(default=np.array([]), description=\"\u6240\u6709\u9876\u70b9\u5750\u6807, shape=(N,3)\")\n</code></pre>"},{"location":"guides/data_types.html#_20","title":"\u5b9e\u4f53\u5bf9\u8c61","text":"<p>\u5305\u542b\u5b9e\u4f53\u5bf9\u8c61\u51e0\u4f55\u4fe1\u606f\uff0c\u53c2\u8003EntityGeometry</p>"},{"location":"guides/data_types.html#_21","title":"\u7c7b\u578b\u5b9a\u4e49","text":"<pre><code>class Entity(BaseGeometry):\n \"\"\"\u5b9e\u4f53\"\"\"\n type: Optional[Literal[\"entity\"]] = Field(default=\"entity\", description=\"\u4f53\u7c7b\u578b\")\n geometry: TINGeometry = Field(default=None, description=\"\u4e09\u89d2\u7f51\u6a21\u578b\u5bf9\u8c61\uff08TIN\uff09\")\n</code></pre>"},{"location":"guides/data_types.html#geometry","title":"GEOMETRY","text":"<p>GEOMETRY \u662f\u4e00\u4e2a\u8054\u5408\u7c7b\u578b\uff0c\u53ef\u4ee5\u662f\u4ee5\u4e0b\u7c7b\u578b\u4e4b\u4e00\uff1a - Point - Line - Shell</p>"},{"location":"guides/data_types.html#_22","title":"\u7c7b\u578b\u5b9a\u4e49","text":"<pre><code>GEOMETRY = Union[Point, Line, Shell]\n</code></pre>"},{"location":"guides/data_types.html#shell","title":"Shell","text":"<p>\u8868\u793a\u4e00\u4e2a\u4e09\u7ef4\u5b9e\u4f53\u5bf9\u8c61\uff0c\u4f7f\u7528\u4e09\u89d2\u7f51\uff08TIN\uff09\u8868\u793a\u5b9e\u4f53\u51e0\u4f55\u4fe1\u606f\uff0c\u6bcf\u4e2a\u9762\u7531\u4e09\u4e2a\u9876\u70b9\u6784\u6210\u4e09\u89d2\u5f62\u3002</p>"},{"location":"guides/data_types.html#_23","title":"\u7c7b\u578b\u5b9a\u4e49","text":"<pre><code>class Shell(BaseGeometry):\n \"\"\"\u5b9e\u4f53\"\"\"\n type: Optional[Literal[\"shell\"]] = Field(default=\"shell\", description=\"\u4f53\u7c7b\u578b\")\n geometry: TINGeometry = Field(default=None, description=\"\u4e09\u89d2\u7f51\u6a21\u578b\u5bf9\u8c61\uff08TIN\uff09\")\n\nclass TINGeometry(BaseType):\n \"\"\"\u4e09\u89d2\u7f51\u6a21\u578b\u5b9a\u4e49\"\"\"\n model_config = {\"arbitrary_types_allowed\": True}\n faces: np.ndarray = Field(default=np.array([]), description=\"\u4e09\u89d2\u9762\u7247\uff1a\u6bcf\u884c\u662f\u4e09\u4e2a\u9876\u70b9\u7684\u7d22\u5f15\uff0c\u6bcf\u884c\u6784\u6210\u4e00\u4e2a\u4e09\u89d2\u5f62\u9762\u3002shape=(N,3)\")\n points: np.ndarray = Field(default=np.array([]), description=\"\u6240\u6709\u9876\u70b9\u5750\u6807, shape=(N,3)\")\n</code></pre>"},{"location":"guides/features.html","title":"\u8981\u7d20\u7ba1\u7406","text":"<p>\u8981\u7d20\uff08Feature\uff09\u662f\u51e0\u4f55\u6a21\u578b\u7684\u5c5e\u6027\u96c6\u5408\u5b9a\u4e49\u3002\u4f8b\u5982\uff0c\u5df7\u9053\u8981\u7d20\u53ef\u80fd\u5305\u542b\u540d\u79f0\u3001\u957f\u5ea6\u3001\u5bbd\u5ea6\u3001\u9ad8\u5ea6\u7b49\u5c5e\u6027\u3002\u901a\u8fc7\u8981\u7d20\u7ba1\u7406\u7cfb\u7edf\uff0c\u53ef\u4ee5\u521b\u5efa\u3001\u66f4\u65b0\u548c\u5220\u9664\u8981\u7d20\u5b9a\u4e49\u3002</p>"},{"location":"guides/features.html#1","title":"1. \u521b\u5efa\u8981\u7d20","text":"<p>\u4e3a\u6587\u4ef6\u521b\u5efa\u65b0\u7684\u8981\u7d20\u5b9a\u4e49\uff0c\u5305\u542b\u8981\u7d20\u540d\u79f0\u548c\u5c5e\u6027\u5217\u8868\uff1a</p> <pre><code>import asyncio\nfrom dimine_python_sdk.conn import open_client\n\nasync def main():\n async with open_client() as client:\n # \u83b7\u53d6\u6587\u4ef6\u5217\u8868\n files = await client.get_files()\n\n # \u521b\u5efa\u8981\u7d20\u5b9a\u4e49\n await client.create_feature(\n file_id=files[len(files)-1].id,\n feature_name=\"\u5df7\u9053\u8981\u7d20\",\n feature_define=[\n {\"name\": \"\u540d\u79f0\", \"type\": \"string\"},\n {\"name\": \"\u957f\u5ea6\", \"type\": \"double\"},\n {\"name\": \"\u5bbd\u5ea6\", \"type\": \"double\"},\n {\"name\": \"\u9ad8\u5ea6\", \"type\": \"double\"},\n {\"name\": \"\u6750\u8d28\", \"type\": \"string\"},\n {\"name\": \"\u6398\u8fdb\u65e5\u671f\", \"type\": \"string\"}\n ]\n )\n print(\"\u8981\u7d20\u521b\u5efa\u6210\u529f\")\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"guides/features.html#2","title":"2. \u83b7\u53d6\u8981\u7d20\u4fe1\u606f","text":"<p>\u83b7\u53d6\u6587\u4ef6\u4e2d\u6240\u6709\u8981\u7d20\u7684\u5b9a\u4e49\u4fe1\u606f\uff1a</p> <pre><code>import asyncio\nfrom dimine_python_sdk.conn import open_client\nfrom dimine_python_sdk.models.types import FeatureInfo, PropertyInfo\n\nasync def main():\n async with open_client() as client:\n # \u83b7\u53d6\u6587\u4ef6\u5217\u8868\n files = await client.get_files()\n features = await client.get_features(files[0].id)\n\n print(f\"\u6587\u4ef6\u5305\u542b {len(features)} \u4e2a\u8981\u7d20:\")\n for feature in features:\n print(f\"\\n\u8981\u7d20\u540d\u79f0: {feature.name}\")\n print(\"\u5c5e\u6027\u5b9a\u4e49:\")\n for prop in feature.properties:\n print(f\" - {prop.name}: {prop.type}\")\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"guides/features.html#3","title":"3. \u66f4\u65b0\u8981\u7d20","text":"<p>\u66f4\u65b0\u5df2\u5b58\u5728\u7684\u8981\u7d20\u5b9a\u4e49\uff0c\u53ef\u4ee5\u6dfb\u52a0\u3001\u4fee\u6539\u6216\u5220\u9664\u5c5e\u6027\uff1a</p> <pre><code>import asyncio\nfrom dimine_python_sdk.conn import open_client\n\nasync def main():\n async with open_client() as client:\n # \u83b7\u53d6\u6587\u4ef6\u5217\u8868\n files = await client.get_files()\n\n # \u66f4\u65b0\u8981\u7d20\u5b9a\u4e49\n await client.update_feature(\n file_id=files[len(files)-1].id,\n feature_name=\"\u5df7\u9053\u8981\u7d20\",\n feature_define=[\n {\"name\": \"\u540d\u79f0\", \"type\": \"string\"},\n {\"name\": \"\u957f\u5ea6\", \"type\": \"double\"},\n {\"name\": \"\u5bbd\u5ea6\", \"type\": \"double\"},\n {\"name\": \"\u9ad8\u5ea6\", \"type\": \"double\"},\n {\"name\": \"\u6750\u8d28\", \"type\": \"string\"},\n {\"name\": \"\u6398\u8fdb\u65e5\u671f\", \"type\": \"string\"},\n {\"name\": \"\u652f\u62a4\u7c7b\u578b\", \"type\": \"string\"} # \u65b0\u589e\u5c5e\u6027\n ]\n )\n print(\"\u8981\u7d20\u66f4\u65b0\u6210\u529f\")\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"guides/features.html#4","title":"4. \u5220\u9664\u8981\u7d20","text":"<p>\u5220\u9664\u6587\u4ef6\u4e2d\u7684\u6307\u5b9a\u8981\u7d20\uff1a</p> <pre><code>import asyncio\nfrom dimine_python_sdk.conn import open_client\n\nasync def main():\n async with open_client() as client:\n # \u83b7\u53d6\u6587\u4ef6\u5217\u8868\n files = await client.get_files()\n\n # \u5220\u9664\u8981\u7d20\n await client.delete_feature(\n file=files[len(files)-1].id,\n feature_name=\"\u5df7\u9053\u8981\u7d20\"\n )\n print(\"\u8981\u7d20\u5220\u9664\u6210\u529f\")\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"guides/features.html#5","title":"5. \u8981\u7d20\u4e0e\u51e0\u4f55\u6a21\u578b\u7684\u5173\u7cfb","text":"<p>\u8981\u7d20\u5b9a\u4e49\u4e86\u51e0\u4f55\u6a21\u578b\u53ef\u4ee5\u62e5\u6709\u7684\u5c5e\u6027\u3002\u521b\u5efa\u51e0\u4f55\u6a21\u578b\u65f6\uff0c\u9700\u8981\u6307\u5b9a\u6240\u5c5e\u7684\u8981\u7d20\uff1a</p> <pre><code>import asyncio\nimport numpy as np\nfrom dimine_python_sdk.conn import open_client\nfrom dimine_python_sdk.models.types import Point, PropertyValue\n\nasync def main():\n async with open_client() as client:\n # \u83b7\u53d6\u6587\u4ef6\u3001\u56fe\u5c42\u3001\u8981\u7d20\u4fe1\u606f\n files = await client.get_files()\n layers = await client.get_layers(file_id=files[0].id)\n features = await client.get_features(files[0].id)\n\n # \u521b\u5efa\u5e26\u5c5e\u6027\u7684\u70b9\u6a21\u578b\n point = Point(\n file=files[0].id,\n layer=layers[0].id,\n feature=features[0].name, # \u5173\u8054\u5230\u8981\u7d20\n geometry=np.array([100, 200, 300]),\n properties=[\n PropertyValue(name=\"\u540d\u79f0\", value=\"\u94bb\u5b54ZK-001\", type=\"string\"),\n PropertyValue(name=\"\u9ad8\u7a0b\", value=\"1250.5\", type=\"float\"),\n PropertyValue(name=\"\u5b54\u6df1\", value=\"150.0\", type=\"float\")\n ]\n )\n\n await client.create_geometry([point])\n print(\"\u5e26\u5c5e\u6027\u7684\u70b9\u6a21\u578b\u521b\u5efa\u6210\u529f\")\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"guides/features.html#6","title":"6. \u5c5e\u6027\u7c7b\u578b\u8bf4\u660e","text":"<p>\u8981\u7d20\u5c5e\u6027\u652f\u6301\u4ee5\u4e0b\u6570\u636e\u7c7b\u578b\uff1a</p> <ul> <li>string: \u5b57\u7b26\u4e32\u7c7b\u578b</li> <li>int: \u6574\u6570\u7c7b\u578b</li> <li>long: \u957f\u6574\u6570\u7c7b\u578b</li> <li>short: \u77ed\u6574\u6570\u7c7b\u578b</li> <li>double: \u6d6e\u70b9\u6570\u7c7b\u578b</li> </ul>"},{"location":"guides/features.html#_2","title":"\u5c5e\u6027\u4f7f\u7528\u6ce8\u610f\u4e8b\u9879","text":"<ol> <li>\u6570\u636e\u7c7b\u578b\u5339\u914d: \u8bbe\u7f6e\u5c5e\u6027\u503c\u65f6\u9700\u8981\u4e0e\u5b9a\u4e49\u7684\u7c7b\u578b\u5339\u914d</li> <li>\u5c5e\u6027\u540d\u79f0\u552f\u4e00: \u5728\u540c\u4e00\u4e2a\u8981\u7d20\u4e2d\uff0c\u5c5e\u6027\u540d\u79f0\u4e0d\u80fd\u91cd\u590d</li> <li>\u5b57\u6bb5\u547d\u540d: \u5c5e\u6027\u540d\u79f0\u5efa\u8bae\u4f7f\u7528\u4e2d\u6587\uff0c\u4fbf\u4e8e\u5728Dimine\u8f6f\u4ef6\u4e2d\u663e\u793a</li> </ol>"},{"location":"guides/features.html#7","title":"7. \u5b8c\u6574\u793a\u4f8b\uff1a\u521b\u5efa\u548c\u7ba1\u7406\u8981\u7d20","text":"<pre><code>import asyncio\nimport numpy as np\nfrom dimine_python_sdk.conn import open_client\nfrom dimine_python_sdk.models.types import Point, Line, Shell, PropertyValue\n\nasync def main():\n async with open_client() as client:\n # 1. \u83b7\u53d6\u6587\u4ef6\u4fe1\u606f\n files = await client.get_files()\n file_id = files[0].id\n layers = await client.get_layers(file_id=file_id)\n layer_id = layers[0].id\n\n # 2. \u521b\u5efa\u591a\u4e2a\u8981\u7d20\n await client.create_feature(\n file_id=file_id,\n feature_name=\"\u52d8\u63a2\u5b54\",\n feature_define=[\n {\"name\": \"\u5b54\u53f7\", \"type\": \"string\"},\n {\"name\": \"\u5b54\u6df1\", \"type\": \"double\"},\n {\"name\": \"\u503e\u89d2\", \"type\": \"double\"},\n {\"name\": \"\u65b9\u4f4d\u89d2\", \"type\": \"double\"},\n {\"name\": \"\u5ca9\u6027\", \"type\": \"string\"}\n ]\n )\n\n await client.create_feature(\n file_id=file_id,\n feature_name=\"\u6d4b\u70b9\",\n feature_define=[\n {\"name\": \"\u70b9\u53f7\", \"type\": \"string\"},\n {\"name\": \"\u9ad8\u7a0b\", \"type\": \"double\"},\n {\"name\": \"X\u5750\u6807\", \"type\": \"double\"},\n {\"name\": \"Y\u5750\u6807\", \"type\": \"double\"},\n {\"name\": \"Z\u5750\u6807\", \"type\": \"double\"}\n ]\n )\n\n # 3. \u83b7\u53d6\u8981\u7d20\u4fe1\u606f\n features = await client.get_features(file_id)\n print(f\"\u521b\u5efa\u4e86 {len(features)} \u4e2a\u8981\u7d20\")\n\n # 4. \u521b\u5efa\u4e0e\u8981\u7d20\u5173\u8054\u7684\u51e0\u4f55\u6a21\u578b\n \u52d8\u63a2\u5b54\u8981\u7d20 = None\n \u6d4b\u70b9\u8981\u7d20 = None\n\n for feature in features:\n if feature.name == \"\u52d8\u63a2\u5b54\":\n \u52d8\u63a2\u5b54\u8981\u7d20 = feature\n elif feature.name == \"\u6d4b\u70b9\":\n \u6d4b\u70b9\u8981\u7d20 = feature\n\n # \u521b\u5efa\u52d8\u63a2\u5b54\u6a21\u578b\n if \u52d8\u63a2\u5b54\u8981\u7d20:\n drill_hole = Line(\n file=file_id,\n layer=layer_id,\n feature=\u52d8\u63a2\u5b54\u8981\u7d20.name,\n geometry=np.array([[0, 0, 0], [100, 50, -150]]),\n color=[255, 0, 0],\n properties=[\n PropertyValue(name=\"\u5b54\u53f7\", value=\"ZK-001\", type=\"string\"),\n PropertyValue(name=\"\u5b54\u6df1\", value=\"150.0\", type=\"float\"),\n PropertyValue(name=\"\u503e\u89d2\", value=\"56.3\", type=\"float\")\n ]\n )\n await client.create_geometry([drill_hole])\n\n # \u521b\u5efa\u6d4b\u70b9\u6a21\u578b\n if \u6d4b\u70b9\u8981\u7d20:\n survey_point = Point(\n file=file_id,\n layer=layer_id,\n feature=\u6d4b\u70b9\u8981\u7d20.name,\n geometry=np.array([50, 25, -75]),\n color=[0, 255, 0],\n properties=[\n PropertyValue(name=\"\u70b9\u53f7\", value=\"D-001\", type=\"string\"),\n PropertyValue(name=\"\u9ad8\u7a0b\", value=\"1225.0\", type=\"float\")\n ]\n )\n await client.create_geometry([survey_point])\n\n print(\"\u8981\u7d20\u548c\u6a21\u578b\u521b\u5efa\u5b8c\u6210\")\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"guides/features.html#8","title":"8. \u6700\u4f73\u5b9e\u8df5","text":"<ol> <li>\u8981\u7d20\u89c4\u5212: \u5728\u521b\u5efa\u6a21\u578b\u524d\uff0c\u5148\u89c4\u5212\u597d\u9700\u8981\u7684\u8981\u7d20\u7c7b\u578b\u548c\u5c5e\u6027</li> <li>\u547d\u540d\u89c4\u8303: \u4f7f\u7528\u6e05\u6670\u7684\u8981\u7d20\u540d\u79f0\uff0c\u5982\"\u5df7\u9053\"\u3001\"\u94bb\u5b54\"\u3001\"\u6d4b\u70b9\"\u7b49</li> <li>\u5c5e\u6027\u7cbe\u7b80: \u53ea\u5305\u542b\u5fc5\u8981\u7684\u5c5e\u6027\uff0c\u907f\u514d\u8fc7\u5ea6\u8bbe\u8ba1</li> <li>\u7c7b\u578b\u9009\u62e9: \u6839\u636e\u6570\u636e\u7279\u6027\u9009\u62e9\u5408\u9002\u7684\u5c5e\u6027\u7c7b\u578b</li> <li>\u7248\u672c\u7ba1\u7406: \u5982\u679c\u9700\u8981\u4fee\u6539\u8981\u7d20\u5b9a\u4e49\uff0c\u5efa\u8bae\u5148\u5220\u9664\u540e\u91cd\u5efa\uff0c\u907f\u514d\u6570\u636e\u4e0d\u4e00\u81f4</li> </ol>"},{"location":"guides/io.html","title":"IO\u64cd\u4f5c","text":"<p>IO\u64cd\u4f5c\u5305\u62ec\u6587\u4ef6\u7684\u5bfc\u5165\u3001\u5bfc\u51fa\u3001\u6587\u4ef6\u7c7b\u578b\u8f6c\u6362</p>"},{"location":"guides/io.html#1","title":"1. \u6587\u4ef6\u6253\u5f00","text":"<p>\u5c06\u5916\u90e8\u6587\u4ef6\u6253\u5f00\u5230\u6570\u91c7\u8f6f\u4ef6\u5f53\u524d\u573a\u666f\u4e2d\uff1a</p> <pre><code>import asyncio\nfrom dimine_python_sdk.conn import open_client\n\nasync def main():\n async with open_client() as client:\n # \u6253\u5f00\u6587\u4ef6\uff08\u652f\u6301\u591a\u79cd\u683c\u5f0f\uff1admf\u3001dmm\u3001dtm\u3001dwg\u7b49\uff09\n file_path = \"D:/temp/test_export.dtm\"\n file_info = await client.open_file(file_path)\n print(f\"\u6253\u5f00\u6587\u4ef6: {file_info.name}, ID: {file_info.id}\")\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre> <p>\u652f\u6301\u7684\u6253\u5f00\u6587\u4ef6\u683c\u5f0f\uff1a - <code>.dtm</code> - Dimine\u5730\u5f62\u6a21\u578b\u6587\u4ef6 - <code>.dmf</code> - Dimine\u6807\u51c6\u5de5\u7a0b\u6587\u4ef6\u683c\u5f0f - <code>.dmm</code> - Dimine\u6a21\u578b\u6587\u4ef6\u683c\u5f0f - <code>.dwg</code> / <code>.dxf</code> - AutoCAD\u6587\u4ef6\u683c\u5f0f - \u4ee5\u53ca\u5176\u4ed6Dimine\u652f\u6301\u7684\u683c\u5f0f</p>"},{"location":"guides/io.html#2","title":"2. \u6587\u4ef6\u5bfc\u51fa","text":"<p>\u5c06\u6570\u91c7\u8f6f\u4ef6\u573a\u666f\u4e2d\u7684\u6587\u4ef6\u5bfc\u51fa\u4e3a\u6307\u5b9a\u683c\u5f0f\uff1a</p> <pre><code>import asyncio\nfrom dimine_python_sdk.conn import open_client\n\nasync def main():\n async with open_client() as client:\n # \u83b7\u53d6\u6587\u4ef6\u5217\u8868\n files = await client.get_files()\n\n if len(files) > 0:\n # \u5bfc\u51fa\u6587\u4ef6\uff08\u6839\u636e\u6587\u4ef6\u6269\u5c55\u540d\u81ea\u52a8\u8bc6\u522b\u683c\u5f0f\uff09\n await client.export_file(\n file_id=files[0].id,\n file_path=\"D:/temp/test_export.dwg\"\n )\n print(\"\u6587\u4ef6\u5bfc\u51fa\u6210\u529f\")\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre> <p>\u652f\u6301\u7684\u5bfc\u51fa\u6587\u4ef6\u683c\u5f0f\uff1a - <code>.dwg</code> / <code>.dxf</code> - AutoCAD\u683c\u5f0f - <code>.dmf</code> - Dimine\u5de5\u7a0b\u6587\u4ef6 - <code>.dmm</code> - Dimine\u6a21\u578b\u6587\u4ef6 - <code>.dtm</code> - Dimine\u5730\u5f62\u6a21\u578b - \u4ee5\u53ca\u5176\u4ed6Dimine\u652f\u6301\u7684\u683c\u5f0f</p> <p>\u53c2\u6570\u8bf4\u660e\uff1a - <code>file_id</code>: \u6587\u4ef6ID\u6216\u6587\u4ef6\u540d\u79f0 - <code>file_path</code>: \u5bfc\u51fa\u76ee\u6807\u8def\u5f84 - <code>mkdir</code>: \u662f\u5426\u81ea\u52a8\u521b\u5efa\u76ee\u5f55\uff08\u9ed8\u8ba4\u4e3aTrue\uff09</p>"},{"location":"guides/io.html#3","title":"3. \u6587\u4ef6\u5173\u95ed","text":"<p>\u5173\u95ed\u5f53\u524d\u573a\u666f\u4e2d\u7684\u6307\u5b9a\u6587\u4ef6\uff1a</p> <pre><code>import asyncio\nfrom dimine_python_sdk.conn import open_client\n\nasync def main():\n async with open_client() as client:\n # \u83b7\u53d6\u6587\u4ef6\u5217\u8868\n files = await client.get_files()\n\n # \u5173\u95ed\u6587\u4ef6\n await client.close_file(file_id=files[0].id)\n print(\"\u6587\u4ef6\u5df2\u5173\u95ed\")\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"guides/io.html#3_1","title":"3. \u6587\u4ef6\u5173\u95ed","text":"<p>\u5173\u95ed\u5f53\u524d\u573a\u666f\u4e2d\u7684\u6307\u5b9a\u6587\u4ef6\uff1a</p> <pre><code>import asyncio\nfrom dimine_python_sdk.conn import open_client\n\nasync def main():\n async with open_client() as client:\n # \u83b7\u53d6\u6587\u4ef6\u5217\u8868\n files = await client.get_files()\n\n # \u5173\u95ed\u6587\u4ef6\n if len(files) > 0:\n await client.close_file(files[0].id)\n print(\"\u6587\u4ef6\u5df2\u5173\u95ed\")\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"guides/io.html#4","title":"4. \u6587\u4ef6\u64cd\u4f5c\u5b8c\u6574\u793a\u4f8b","text":"<pre><code>import asyncio\nfrom dimine_python_sdk.conn import open_client\n\nasync def main():\n async with open_client() as client:\n # 1. \u6253\u5f00\u6587\u4ef6\n print(\"\u6253\u5f00\u6587\u4ef6...\")\n file_path = \"D:/temp/test.dtm\"\n file_info = await client.open_file(file_path)\n print(f\"\u5df2\u6253\u5f00: {file_info.name}, ID: {file_info.id}\")\n\n # 2. \u83b7\u53d6\u6587\u4ef6\u5217\u8868\n files = await client.get_files()\n print(f\"\\n\u5f53\u524d\u6587\u4ef6\u6570: {len(files)}\")\n\n # 3. \u5bfc\u51fa\u6587\u4ef6\n if len(files) > 0:\n print(\"\u5bfc\u51fa\u6587\u4ef6...\")\n await client.export_file(\n file_id=files[0].id,\n file_path=\"D:/temp/test_export.dwg\"\n )\n print(\"\u5bfc\u51fa\u6210\u529f\")\n\n # 4. \u5173\u95ed\u6587\u4ef6\n if len(files) > 0:\n print(\"\u5173\u95ed\u6587\u4ef6...\")\n await client.close_file(files[0].id)\n\nif __name__ == '__main__':\n asyncio.run(main())\n</code></pre>"},{"location":"guides/io.html#_1","title":"\u652f\u6301\u7684\u6587\u4ef6\u683c\u5f0f","text":"<p>Dimine\u8f6f\u4ef6\u652f\u6301\u591a\u79cd\u6587\u4ef6\u683c\u5f0f\u7684\u5bfc\u5165\u5bfc\u51fa\uff1a</p> <ul> <li>DMF: Dimine\u6807\u51c6\u5de5\u7a0b\u6587\u4ef6\u683c\u5f0f</li> <li>DMM: Dimine\u6a21\u578b\u6587\u4ef6\u683c\u5f0f</li> <li>CAD: AutoCAD\u6587\u4ef6\u683c\u5f0f\uff08.dwg, .dxf\u7b49\uff09</li> <li>DMB: Dimine\u5757\u5b9a\u4e49\u6587\u4ef6</li> <li>DMD: Dimine\u6570\u636e\u6587\u4ef6</li> <li>DMO: Dimine\u5bf9\u8c61\u6587\u4ef6</li> </ul>"},{"location":"reference/SUMMARY.html","title":"API \u53c2\u8003","text":"<ul> <li>logger</li> <li>base_conn_client</li> <li>conn_client</li> <li>model_func</li> <li>file_conversion</li> <li>models</li> <li>project_plotting</li> <li>block_data</li> <li>drill_db</li> <li>models</li> <li>valuation</li> <li>entity</li> <li>line</li> <li>point</li> <li>conn</li> <li>errors</li> <li>types</li> </ul>"},{"location":"reference/logger.html","title":"logger","text":""},{"location":"reference/conn/base_conn_client.html","title":"base_conn_client","text":""},{"location":"reference/conn/base_conn_client.html#dimine_python_sdk.conn.base_conn_client.BaseConnClient","title":"<code>BaseConnClient</code> <code>dataclass</code>","text":"Source code in <code>dimine_python_sdk\\conn\\base_conn_client.py</code> <pre><code>@dataclass\nclass BaseConnClient:\n model_config = {\"arbitrary_types_allowed\": True}\n\n url: Optional[str] = \"ws://localhost:8000\"\n is_connected: Optional[bool] = False\n pending_requests: Dict[str, Tuple[asyncio.Future, Callable]] = field(default_factory=dict)\n event_handlers: Dict[str, List[Callable]] = field(default_factory=dict)\n reconnect_delay: int = 2\n max_reconnect_attempts: int = 5\n reconnect_attempts: int = 0\n websocket: websockets.connect = None\n receive_task: Optional[asyncio.Task] = None\n\n async def _handle_message(self, message: str):\n \"\"\"\u5904\u7406\u63a5\u6536\u5230\u7684\u6d88\u606f\"\"\"\n try:\n data = json.loads(message)\n except json.JSONDecodeError:\n logger.error(f\"unable parse message: {message}\")\n try:\n message_type = data.get(\"type\")\n\n if message_type == \"response\":\n res = ConnResponse(**data)\n # \u5904\u7406\u54cd\u5e94\u6d88\u606f\n request_id = res.request_id\n if request_id in self.pending_requests:\n future,callback = self.pending_requests.pop(request_id)\n future.set_result(res)\n if callback:\n callback(res)\n\n elif message_type == \"event\":\n event = ConnEvent(**data)\n await self._handle_event(event)\n except Exception as e:\n logger.error(f\"error in handle message: {traceback.format_exc()}\")\n\n async def _handle_event(self, event: ConnEvent):\n \"\"\"\u5904\u7406\u4e8b\u4ef6\"\"\"\n if event.event_type in self.event_handlers:\n tasks = []\n for handler in self.event_handlers.get(event.event_type, []):\n if inspect.iscoroutinefunction(handler):\n t_handler = handler(event)\n tasks.append(t_handler)\n else:\n t_handler = asyncio.to_thread(handler, event)\n tasks.append(t_handler)\n await asyncio.gather(*tasks)\n else:\n logger.info(f\"no handler for event type : {event.event_type}\")\n\n\n async def _receive_messages(self):\n while self.is_connected:\n try:\n message = await self.websocket.recv()\n await self._handle_message(message)\n except websockets.exceptions.ConnectionClosed:\n logger.error(\"WebSocket connection closed\")\n self.is_connected = False\n await self._reconnect()\n except Exception as e:\n logger.error(f\"error in receive or handle message: {e}\")\n\n\n async def connect(self)-> bool:\n try:\n self.websocket = await websockets.connect(self.url)\n self.is_connected = True\n self.reconnect_attempts = 0\n logger.info(\"success connected to %s\", self.url)\n if self.receive_task is None or self.receive_task.done():\n self.receive_task = asyncio.create_task(self._receive_messages())\n return True\n except Exception as e:\n logger.error(\"failed to connect to %s: %s\", self.url, e)\n self.is_connected = False\n self.reconnect_attempts += 1\n if self.reconnect_attempts < self.max_reconnect_attempts:\n await asyncio.sleep(self.reconnect_delay)\n return await self.connect()\n return False\n\n\n async def _reconnect(self)->bool:\n \"\"\"\u91cd\u65b0\u8fde\u63a5\u5230\u670d\u52a1\u5668\"\"\"\n if self.reconnect_attempts < self.max_reconnect_attempts:\n self.reconnect_attempts += 1\n logger.info(f\"try to reconnect ({self.reconnect_attempts}/{self.max_reconnect_attempts})...\")\n await asyncio.sleep(self.reconnect_delay)\n return await self.connect()\n else:\n logger.error(\"max reconnect attempts reached\")\n return False\n\n async def _send_request(self, request: ConnRequest, callback: Callable = None)->ConnResponse:\n if not self.is_connected:\n logger.error(\"websocket not connected, try to reconnect\")\n if not await self.connect():\n raise Exception(\"failed to reconnect websocket\")\n future = asyncio.Future()\n self.pending_requests[request.request_id] = (future, callback)\n try:\n # \u53d1\u9001\u8bf7\u6c42\n await self.websocket.send(request.model_dump_json())\n except Exception as e:\n # \u79fb\u9664pending\u8bf7\u6c42\n if request.request_id in self.pending_requests:\n self.pending_requests.pop(request.request_id)\n raise e\n else:\n result = await future\n return result\n\n async def send_request(self, command: CommandType, payload:Optional[Any]=None, callback: Optional[Callable] = None)->ConnResponse:\n \"\"\"\u53d1\u9001\u8bf7\u6c42\u5e76\u7b49\u5f85\u54cd\u5e94\"\"\"\n request = ConnRequest(command=command, payload=payload)\n return await self._send_request(request, callback)\n\n async def close(self):\n \"\"\"\u5173\u95edWebSocket\u8fde\u63a5\"\"\"\n if self.is_connected:\n self.is_connected = False\n if self.websocket:\n try:\n await self.websocket.close()\n except:\n pass\n if self.receive_task and not self.receive_task.done():\n self.receive_task.cancel()\n logger.info(\"WebSocket closed.\")\n\n\n def on_event(self, event_type: str, handler: Optional[Callable] = None):\n \"\"\"\u6ce8\u518c\u4e8b\u4ef6\u5904\u7406\u5668\uff0c\u652f\u6301\u88c5\u9970\u5668\u8bed\u6cd5\"\"\"\n # \u5982\u679c\u63d0\u4f9b\u4e86handler\u53c2\u6570\uff0c\u76f4\u63a5\u6ce8\u518c\n if handler is not None:\n if event_type not in self.event_handlers:\n self.event_handlers[event_type] = []\n self.event_handlers[event_type].append(handler)\n return handler\n\n # \u5426\u5219\u8fd4\u56de\u88c5\u9970\u5668\u51fd\u6570\n def decorator(func: Callable) -> Callable:\n if event_type not in self.event_handlers:\n self.event_handlers[event_type] = []\n self.event_handlers[event_type].append(func)\n return func\n\n return decorator\n</code></pre>"},{"location":"reference/conn/base_conn_client.html#dimine_python_sdk.conn.base_conn_client.BaseConnClient.close","title":"<code>close()</code> <code>async</code>","text":"<p>\u5173\u95edWebSocket\u8fde\u63a5</p> Source code in <code>dimine_python_sdk\\conn\\base_conn_client.py</code> <pre><code>async def close(self):\n \"\"\"\u5173\u95edWebSocket\u8fde\u63a5\"\"\"\n if self.is_connected:\n self.is_connected = False\n if self.websocket:\n try:\n await self.websocket.close()\n except:\n pass\n if self.receive_task and not self.receive_task.done():\n self.receive_task.cancel()\n logger.info(\"WebSocket closed.\")\n</code></pre>"},{"location":"reference/conn/base_conn_client.html#dimine_python_sdk.conn.base_conn_client.BaseConnClient.on_event","title":"<code>on_event(event_type, handler=None)</code>","text":"<p>\u6ce8\u518c\u4e8b\u4ef6\u5904\u7406\u5668\uff0c\u652f\u6301\u88c5\u9970\u5668\u8bed\u6cd5</p> Source code in <code>dimine_python_sdk\\conn\\base_conn_client.py</code> <pre><code>def on_event(self, event_type: str, handler: Optional[Callable] = None):\n \"\"\"\u6ce8\u518c\u4e8b\u4ef6\u5904\u7406\u5668\uff0c\u652f\u6301\u88c5\u9970\u5668\u8bed\u6cd5\"\"\"\n # \u5982\u679c\u63d0\u4f9b\u4e86handler\u53c2\u6570\uff0c\u76f4\u63a5\u6ce8\u518c\n if handler is not None:\n if event_type not in self.event_handlers:\n self.event_handlers[event_type] = []\n self.event_handlers[event_type].append(handler)\n return handler\n\n # \u5426\u5219\u8fd4\u56de\u88c5\u9970\u5668\u51fd\u6570\n def decorator(func: Callable) -> Callable:\n if event_type not in self.event_handlers:\n self.event_handlers[event_type] = []\n self.event_handlers[event_type].append(func)\n return func\n\n return decorator\n</code></pre>"},{"location":"reference/conn/base_conn_client.html#dimine_python_sdk.conn.base_conn_client.BaseConnClient.send_request","title":"<code>send_request(command, payload=None, callback=None)</code> <code>async</code>","text":"<p>\u53d1\u9001\u8bf7\u6c42\u5e76\u7b49\u5f85\u54cd\u5e94</p> Source code in <code>dimine_python_sdk\\conn\\base_conn_client.py</code> <pre><code>async def send_request(self, command: CommandType, payload:Optional[Any]=None, callback: Optional[Callable] = None)->ConnResponse:\n \"\"\"\u53d1\u9001\u8bf7\u6c42\u5e76\u7b49\u5f85\u54cd\u5e94\"\"\"\n request = ConnRequest(command=command, payload=payload)\n return await self._send_request(request, callback)\n</code></pre>"},{"location":"reference/conn/conn_client.html","title":"conn_client","text":""},{"location":"reference/conn/conn_client.html#dimine_python_sdk.conn.conn_client.ConnClient","title":"<code>ConnClient</code> <code>dataclass</code>","text":"<p> Bases: <code>BaseConnClient</code></p> Source code in <code>dimine_python_sdk\\conn\\conn_client.py</code> <pre><code>class ConnClient(BaseConnClient):\n\n async def get_files(self) -> List[FileInfo]:\n \"\"\"\u83b7\u53d6\u6587\u4ef6\u5bf9\u8c61\u6811\"\"\"\n res = await self.send_request(CommandType.GET_FILE_TREE)\n if res.status == ResponseStatus.FAIL:\n raise Exception(res.error)\n return [FileInfo(**item, related=True) for item in res.payload]\n\n async def close_file(self, file_id: str):\n \"\"\"\u5173\u95ed\u6587\u4ef6\"\"\"\n res = await self.send_request(CommandType.FILE_CLOSE, {\"file\": file_id})\n if res.status == ResponseStatus.FAIL:\n raise Exception(res.error)\n\n async def open_file(self, file_path: str| Path) -> FileInfo:\n \"\"\"\u6253\u5f00\u6587\u4ef6\"\"\"\n if isinstance(file_path, str): # \u5982\u679c\u662f str \u5bf9\u8c61\uff0c\u5219\u8f6c\u6362\u4e3a Path\n file_path = Path(file_path)\n if not file_path.exists(): # \u5982\u679c\u6587\u4ef6\u4e0d\u5b58\u5728\uff0c\u62a5\u9519\n raise Exception(f\"file {file_path} not exists\")\n res = await self.send_request(CommandType.FILE_OPEN, {\"file_path\": str(file_path)})\n if res.status == ResponseStatus.FAIL:\n raise Exception(res.error)\n print(\"res.payload: \", res.payload)\n if res.payload:\n return FileInfo(id=res.payload[0].get(\"file_id\"), name=res.payload[0].get(\"file_id\"), related=True)\n else:\n raise Exception(\"file already opened!\")\n\n\n async def export_file(self, file_id: str, file_path: str| Path, mkdir: bool = True):\n \"\"\"\u5bfc\u51fa\u6587\u4ef6\n\n Args:\n file_id: \u6587\u4ef6ID\u6216\u6587\u4ef6\u540d\u79f0\n file_path: \u5bfc\u51fa\u76ee\u6807\u8def\u5f84\n mkdir: \u662f\u5426\u81ea\u52a8\u521b\u5efa\u76ee\u5f55\n Raises:\n Exception: \u5bfc\u51fa\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38\n \"\"\"\n if isinstance(file_path, str): # \u5982\u679c\u662f str \u5bf9\u8c61\uff0c\u5219\u8f6c\u6362\u4e3a Path\n file_path = Path(file_path)\n if not file_path.parent.exists(): # \u5982\u679c\u76ee\u5f55\u4e0d\u5b58\u5728\uff0c\u62a5\u9519\n if mkdir:\n file_path.parent.mkdir(parents=True, exist_ok=True)\n else:\n raise Exception(f\"path {file_path.parent} not exists\")\n res = await self.send_request(CommandType.FILE_EXPORT, {\"file\": file_id, \"file_path\": str(file_path)})\n if res.status == ResponseStatus.FAIL:\n raise Exception(res.error)\n\n# \u6a21\u578b\u76f8\u5173\u65b9\u6cd5\n async def create_geometry(self, geometries: List[GEOMETRY]) -> None:\n \"\"\"\u521b\u5efa\u6a21\u578b\n\n Args:\n geometries: \u6a21\u578b\u5217\u8868\uff0c\u6bcf\u4e2a\u6a21\u578b\u5305\u542b\u4ee5\u4e0b\u5b57\u6bb5:\n - file: \u6587\u4ef6\u540d\u79f0\n - layer: \u56fe\u5c42\u540d\u79f0\n - feature: \u8981\u7d20\u5217\u540d\u79f0\n - entity_type: \"point | line | polyline | shell\"\n - geometry: \u51e0\u4f55\u4fe1\u606f (coordinates)\n - properties: \u5c5e\u6027\u4fe1\u606f\u5217\u8868\n - color: \u989c\u8272 [R, G, B]\n\n Raises:\n Exception: \u521b\u5efa\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38\n \"\"\"\n # \u683c\u5f0f\u5316\u6a21\u578b\u6570\u636e\n formatted_geometries = []\n for geom in geometries:\n formatted_geom = {\n \"file\": geom.file,\n \"layer\": geom.layer,\n \"feature\": geom.feature,\n \"entity_type\": geom.type,\n \"geometry\": geom.geometry.astype(\"str\").tolist() if geom.type!=\"shell\" else {\"indexs\": geom.geometry.faces.tolist(), \"points\": geom.geometry.points.astype(\"str\").tolist()},\n \"color\": geom.color,\n }\n\n # \u5904\u7406\u5c5e\u6027\u4fe1\u606f\n formatted_geom[\"properties\"] = [\n {\"name\": prop.name, \"value\": prop.value}\n for prop in geom.properties\n ]\n\n formatted_geometries.append(formatted_geom)\n response = await self.send_request(CommandType.CREATE_GEOMETRY, formatted_geometries)\n if response.status == ResponseStatus.FAIL:\n raise Exception(response.error)\n # \u66f4\u65b0id\u7b49\u4fe1\u606f\n for i, item in enumerate(response.payload):\n geometries[i].id=item.get(\"id\")\n geometries[i].related=True\n\n\n async def get_geometry(self, file_id: str, layer_id: str, entity_types: List[str]=[], features: Optional[List[str]] = None) -> List[GEOMETRY]:\n \"\"\"\u83b7\u53d6\u6a21\u578b\"\"\"\n # \u5148\u83b7\u53d6\u8981\u7d20\u4fe1\u606f\uff0c\n all_features = await self.get_features(file_id)\n\n def _get_property_type(feature_name:str, name: str)-> str:\n \"\"\"\u83b7\u53d6\u5c5e\u6027\u7c7b\u578b\"\"\"\n for feature in all_features:\n if feature.name == feature_name:\n for property in feature.properties:\n if property.name == name:\n return property.type\n\n payload = {\n \"file\": file_id,\n \"layer\": layer_id,\n \"entity_type\": entity_types\n }\n if features:\n payload[\"feature\"] = features\n\n response = await self.send_request(CommandType.GET_GEOMETRY, payload)\n if response.status == ResponseStatus.FAIL:\n raise Exception(response.error)\n\n def _format_value(type:str, value: Any):\n if value == \"\" and type != \"string\":\n return None\n elif type == \"double\":\n return float(value)\n elif type == \"string\":\n return str(value)\n elif type in [\"int\",\"long\",\"short\"]:\n return int(value)\n else:\n raise Exception(f\"unknown property type: {type}\")\n\n def _handle_property(feature_name:str, properties: List[Dict[str, Any]]):\n for property in properties:\n property[\"type\"] = _get_property_type(feature_name, property.get(\"name\"))\n property[\"value\"] = _format_value(property.get(\"type\"), property.get(\"value\"))\n\n geometries = []\n for item in response.payload:\n _handle_property(item.get(\"feature\"), item.get(\"properties\", []))\n if isinstance(item.get(\"geometry\", []), list):\n tdata = np.asarray(item.get(\"geometry\", [])).astype(np.float64)\n if len(tdata.shape) == 1:\n item[\"geometry\"] = tdata\n geometries.append(Point(**item, related=True))\n elif len(tdata.shape) == 2:\n geometries.append(Line(**item, related=True))\n elif isinstance(item.get(\"geometry\", []), dict):\n item[\"geometry\"][\"faces\"] = item[\"geometry\"].pop(\"indexs\") if \"indexs\" in item[\"geometry\"] else []\n geometries.append(Shell(**item, related=True))\n for geom in geometries:\n geom.file = file_id\n geom.layer = layer_id\n return geometries\n\n async def update_geometry(self, geometries: List[GEOMETRY]) -> None:\n \"\"\"\u66f4\u65b0\u6a21\u578b\n\n Args:\n geometries: \u6a21\u578b\u5217\u8868\uff0c\u6bcf\u4e2a\u6a21\u578b\u5305\u542b\u4ee5\u4e0b\u5b57\u6bb5:\n - id: \u6a21\u578bID (\u53e5\u67c4ID)\n - layer: \u56fe\u5c42\u540d\u79f0\n - entity_type: \"point | line | polyline | shell\"\n - geometry: \u6a21\u578b\u51e0\u4f55\u4fe1\u606f (\u53ef\u9009)\n - properties: \u6a21\u578b\u5c5e\u6027\u4fe1\u606f (\u53ef\u9009)\n - color: \u989c\u8272 [R, G, B] (\u53ef\u9009)\n - feature: \u6a21\u578b\u5173\u8054\u8981\u7d20\u5217\u8868 (\u53ef\u9009)\n\n Raises:\n Exception: \u66f4\u65b0\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38\n \"\"\"\n # \u683c\u5f0f\u5316\u6a21\u578b\u6570\u636e\n formatted_geometries = []\n for geom in geometries:\n formatted_geom = {\n \"id\": geom.id,\n \"file\": geom.file,\n \"layer\": geom.layer,\n \"feature\": geom.feature,\n \"entity_type\": geom.type,\n \"geometry\": geom.geometry.astype(\"str\").tolist() if geom.type!=\"shell\" else {\"indexs\": geom.geometry.faces.tolist(), \"points\": geom.geometry.points.astype(\"str\").tolist()},\n \"color\": geom.color,\n }\n\n # \u5904\u7406\u5c5e\u6027\u4fe1\u606f\n formatted_geom[\"properties\"] = [\n {\"name\": prop.name, \"value\": prop.value}\n for prop in geom.properties\n ]\n formatted_geometries.append(formatted_geom)\n\n response = await self.send_request(CommandType.UPDATE_GEOMETRY, formatted_geometries)\n if response.status == ResponseStatus.FAIL:\n raise Exception(response.error)\n\n async def delete_geometry(self, delete_items: List[Dict[str, str]]) -> None:\n \"\"\"\u5220\u9664\u6a21\u578b\n\n Args:\n delete_items: \u5220\u9664\u9879\u5217\u8868\uff0c\u6bcf\u4e2a\u9879\u5305\u542b:\n - id: \u6a21\u578bID (\u53e5\u67c4ID)\n - file: \u6587\u4ef6ID (\u4ece\u54ea\u4e2a\u6587\u4ef6\u5220\u9664\u6a21\u578b)\n\n Raises:\n Exception: \u5220\u9664\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38\n \"\"\"\n response = await self.send_request(CommandType.DELETE_GEOMETRY, delete_items)\n if response.status == ResponseStatus.FAIL:\n raise Exception(response.error)\n\n\n\n async def update_or_create_geometry(self, geometries: List[GEOMETRY] | GEOMETRY) -> None:\n \"\"\"\u521b\u5efa\u6216\u66f4\u65b0\u591a\u4e2a\u6a21\u578b, \u5982\u679c\u6307\u5b9a\u4e86file_id\u548clayer_id, \u5219\u5c06\u6a21\u578b\u6dfb\u52a0\u5230\u6307\u5b9a\u7684\u6587\u4ef6\u53ca\u56fe\u5c42\u4e2d\"\"\"\n update_geometries = [g for g in geometries if g.related]\n create_geometries = [g for g in geometries if not g.related]\n if update_geometries:\n await self.update_geometry(update_geometries)\n if create_geometries:\n await self.create_geometry(create_geometries)\n\n\n # \u56fe\u5c42\u76f8\u5173\u65b9\u6cd5\n async def create_layer(self, file_id: str, name: str) -> LayerInfo:\n \"\"\"\u521b\u5efa\u56fe\u5c42\n\n Args:\n file_id: \u6587\u4ef6ID\u6216\u6587\u4ef6\u540d\u79f0\n name: \u56fe\u5c42\u540d\u79f0\n\n Returns:\n \u521b\u5efa\u7684\u56fe\u5c42\u4fe1\u606f\n\n Raises:\n Exception: \u521b\u5efa\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38\n \"\"\"\n payload = {\n \"file\": file_id,\n \"name\": name\n }\n response = await self.send_request(CommandType.CREATE_LAYER, payload)\n if response.status == ResponseStatus.FAIL:\n raise Exception(response.error)\n return LayerInfo(id=name, name=name, related=True)\n\n\n async def get_layers(self, file_id: str) -> List[LayerInfo]:\n \"\"\"\u83b7\u53d6\u56fe\u5c42\"\"\"\n response = await self.send_request(CommandType.GET_LAYERS, {\"file\": file_id})\n if response.status == ResponseStatus.FAIL:\n raise Exception(response.error)\n return [LayerInfo(**item, related=True) for item in response.payload]\n\n async def delete_layer(self, file_id: str, layer_name: str) -> None:\n \"\"\"\u5220\u9664\u56fe\u5c42\n\n Args:\n file_id: \u6587\u4ef6ID\u6216\u6587\u4ef6\u540d\u79f0\n layer_name: \u56fe\u5c42\u540d\u79f0\n\n Raises:\n Exception: \u5220\u9664\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38\n \"\"\"\n payload = {\n \"file\": file_id,\n \"name\": layer_name\n }\n response = await self.send_request(CommandType.DELETE_LAYER, payload)\n if response.status == ResponseStatus.FAIL:\n raise Exception(response.error)\n\n # \u8981\u7d20\u76f8\u5173\u65b9\u6cd5\n async def create_feature(self, file_id: str, feature_name: str,\n feature_define: List[Dict[str, str]]) -> None:\n \"\"\"\u6dfb\u52a0\u8981\u7d20\n\n Args:\n file_id: \u6587\u4ef6ID\u3001\u6587\u4ef6\u540d\u79f0\n feature_name: \u8981\u7d20\u540d\u79f0\n feature_define: \u5c5e\u6027\u5b9a\u4e49\u5217\u8868, \u6bcf\u4e2a\u5143\u7d20\u5305\u542b:\n - name: \u5c5e\u6027\u540d\u79f0\n - type: \u5c5e\u6027\u7c7b\u578b (\"string\", \"float\", \"int\", \"long\", \"short\")\n\n Raises:\n Exception: \u521b\u5efa\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38\n \"\"\"\n payload = {\n \"file\": file_id,\n \"feature_name\": feature_name,\n \"feature_define\": feature_define\n }\n response = await self.send_request(CommandType.CREATE_FEATURE, payload)\n if response.status == ResponseStatus.FAIL:\n raise Exception(response.error)\n\n\n async def get_features(self, file_id: str) -> List[FeatureInfo]:\n \"\"\"\u83b7\u53d6\u8981\u7d20\n\n Args:\n file_id: \u6587\u4ef6ID\n\n Returns:\n \u8981\u7d20\u4fe1\u606f\u5217\u8868\n\n Raises:\n Exception: \u83b7\u53d6\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38\n \"\"\"\n response = await self.send_request(CommandType.GET_FEATURES, {\"file\": file_id})\n if response.status == ResponseStatus.FAIL:\n raise Exception(response.error)\n return [FeatureInfo(**item, related=True) for item in response.payload]\n\n async def update_feature(self, file_id: str, feature_name: str,\n feature_define: List[Dict[str, str]]) -> None:\n \"\"\"\u66f4\u65b0\u8981\u7d20\n\n Args:\n file_id: \u6587\u4ef6\u540d\u79f0\u6216\u6587\u4ef6ID\n feature_name: \u8981\u7d20\u540d\u79f0\n feature_define: \u5c5e\u6027\u5b9a\u4e49\u5217\u8868, \u6bcf\u4e2a\u5143\u7d20\u5305\u542b:\n - name: \u5c5e\u6027\u540d\u79f0\n - type: \u5c5e\u6027\u7c7b\u578b (\"string\", \"float\", \"int\", \"long\", \"short\")\n\n Raises:\n Exception: \u66f4\u65b0\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38\n \"\"\"\n payload = {\n \"file\": file_id,\n \"feature_name\": feature_name,\n \"feature_define\": feature_define\n }\n response = await self.send_request(CommandType.UPDATE_FEATURE, payload)\n if response.status == ResponseStatus.FAIL:\n raise Exception(response.error)\n\n async def delete_feature(self, file: str, feature_name: str) -> None:\n \"\"\"\u5220\u9664\u8981\u7d20\n\n Args:\n file: \u6587\u4ef6\u540d\u79f0\n feature_name: \u8981\u7d20\u540d\u79f0\n\n Raises:\n Exception: \u5220\u9664\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38\n \"\"\"\n payload = {\n \"file\": file,\n \"feature_name\": feature_name\n }\n response = await self.send_request(CommandType.DELETE_FEATURE, payload)\n if response.status == ResponseStatus.FAIL:\n raise Exception(response.error)\n\n\n\n async def get_selected(self)->List[GEOMETRY]:\n \"\"\"\u83b7\u53d6\u5f53\u524d\u9009\u4e2d\u7684\u6a21\u578b\"\"\"\n pass\n</code></pre>"},{"location":"reference/conn/conn_client.html#dimine_python_sdk.conn.conn_client.ConnClient.close_file","title":"<code>close_file(file_id)</code> <code>async</code>","text":"<p>\u5173\u95ed\u6587\u4ef6</p> Source code in <code>dimine_python_sdk\\conn\\conn_client.py</code> <pre><code>async def close_file(self, file_id: str):\n \"\"\"\u5173\u95ed\u6587\u4ef6\"\"\"\n res = await self.send_request(CommandType.FILE_CLOSE, {\"file\": file_id})\n if res.status == ResponseStatus.FAIL:\n raise Exception(res.error)\n</code></pre>"},{"location":"reference/conn/conn_client.html#dimine_python_sdk.conn.conn_client.ConnClient.create_feature","title":"<code>create_feature(file_id, feature_name, feature_define)</code> <code>async</code>","text":"<p>\u6dfb\u52a0\u8981\u7d20</p> <p>Parameters:</p> Name Type Description Default <code>file_id</code> <code>str</code> <p>\u6587\u4ef6ID\u3001\u6587\u4ef6\u540d\u79f0</p> required <code>feature_name</code> <code>str</code> <p>\u8981\u7d20\u540d\u79f0</p> required <code>feature_define</code> <code>List[Dict[str, str]]</code> <p>\u5c5e\u6027\u5b9a\u4e49\u5217\u8868, \u6bcf\u4e2a\u5143\u7d20\u5305\u542b: - name: \u5c5e\u6027\u540d\u79f0 - type: \u5c5e\u6027\u7c7b\u578b (\"string\", \"float\", \"int\", \"long\", \"short\")</p> required <p>Raises:</p> Type Description <code>Exception</code> <p>\u521b\u5efa\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38</p> Source code in <code>dimine_python_sdk\\conn\\conn_client.py</code> <pre><code>async def create_feature(self, file_id: str, feature_name: str,\n feature_define: List[Dict[str, str]]) -> None:\n \"\"\"\u6dfb\u52a0\u8981\u7d20\n\n Args:\n file_id: \u6587\u4ef6ID\u3001\u6587\u4ef6\u540d\u79f0\n feature_name: \u8981\u7d20\u540d\u79f0\n feature_define: \u5c5e\u6027\u5b9a\u4e49\u5217\u8868, \u6bcf\u4e2a\u5143\u7d20\u5305\u542b:\n - name: \u5c5e\u6027\u540d\u79f0\n - type: \u5c5e\u6027\u7c7b\u578b (\"string\", \"float\", \"int\", \"long\", \"short\")\n\n Raises:\n Exception: \u521b\u5efa\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38\n \"\"\"\n payload = {\n \"file\": file_id,\n \"feature_name\": feature_name,\n \"feature_define\": feature_define\n }\n response = await self.send_request(CommandType.CREATE_FEATURE, payload)\n if response.status == ResponseStatus.FAIL:\n raise Exception(response.error)\n</code></pre>"},{"location":"reference/conn/conn_client.html#dimine_python_sdk.conn.conn_client.ConnClient.create_geometry","title":"<code>create_geometry(geometries)</code> <code>async</code>","text":"<p>\u521b\u5efa\u6a21\u578b</p> <p>Parameters:</p> Name Type Description Default <code>geometries</code> <code>List[GEOMETRY]</code> <p>\u6a21\u578b\u5217\u8868\uff0c\u6bcf\u4e2a\u6a21\u578b\u5305\u542b\u4ee5\u4e0b\u5b57\u6bb5: - file: \u6587\u4ef6\u540d\u79f0 - layer: \u56fe\u5c42\u540d\u79f0 - feature: \u8981\u7d20\u5217\u540d\u79f0 - entity_type: \"point | line | polyline | shell\" - geometry: \u51e0\u4f55\u4fe1\u606f (coordinates) - properties: \u5c5e\u6027\u4fe1\u606f\u5217\u8868 - color: \u989c\u8272 [R, G, B]</p> required <p>Raises:</p> Type Description <code>Exception</code> <p>\u521b\u5efa\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38</p> Source code in <code>dimine_python_sdk\\conn\\conn_client.py</code> <pre><code>async def create_geometry(self, geometries: List[GEOMETRY]) -> None:\n \"\"\"\u521b\u5efa\u6a21\u578b\n\n Args:\n geometries: \u6a21\u578b\u5217\u8868\uff0c\u6bcf\u4e2a\u6a21\u578b\u5305\u542b\u4ee5\u4e0b\u5b57\u6bb5:\n - file: \u6587\u4ef6\u540d\u79f0\n - layer: \u56fe\u5c42\u540d\u79f0\n - feature: \u8981\u7d20\u5217\u540d\u79f0\n - entity_type: \"point | line | polyline | shell\"\n - geometry: \u51e0\u4f55\u4fe1\u606f (coordinates)\n - properties: \u5c5e\u6027\u4fe1\u606f\u5217\u8868\n - color: \u989c\u8272 [R, G, B]\n\n Raises:\n Exception: \u521b\u5efa\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38\n \"\"\"\n # \u683c\u5f0f\u5316\u6a21\u578b\u6570\u636e\n formatted_geometries = []\n for geom in geometries:\n formatted_geom = {\n \"file\": geom.file,\n \"layer\": geom.layer,\n \"feature\": geom.feature,\n \"entity_type\": geom.type,\n \"geometry\": geom.geometry.astype(\"str\").tolist() if geom.type!=\"shell\" else {\"indexs\": geom.geometry.faces.tolist(), \"points\": geom.geometry.points.astype(\"str\").tolist()},\n \"color\": geom.color,\n }\n\n # \u5904\u7406\u5c5e\u6027\u4fe1\u606f\n formatted_geom[\"properties\"] = [\n {\"name\": prop.name, \"value\": prop.value}\n for prop in geom.properties\n ]\n\n formatted_geometries.append(formatted_geom)\n response = await self.send_request(CommandType.CREATE_GEOMETRY, formatted_geometries)\n if response.status == ResponseStatus.FAIL:\n raise Exception(response.error)\n # \u66f4\u65b0id\u7b49\u4fe1\u606f\n for i, item in enumerate(response.payload):\n geometries[i].id=item.get(\"id\")\n geometries[i].related=True\n</code></pre>"},{"location":"reference/conn/conn_client.html#dimine_python_sdk.conn.conn_client.ConnClient.create_layer","title":"<code>create_layer(file_id, name)</code> <code>async</code>","text":"<p>\u521b\u5efa\u56fe\u5c42</p> <p>Parameters:</p> Name Type Description Default <code>file_id</code> <code>str</code> <p>\u6587\u4ef6ID\u6216\u6587\u4ef6\u540d\u79f0</p> required <code>name</code> <code>str</code> <p>\u56fe\u5c42\u540d\u79f0</p> required <p>Returns:</p> Type Description <code>LayerInfo</code> <p>\u521b\u5efa\u7684\u56fe\u5c42\u4fe1\u606f</p> <p>Raises:</p> Type Description <code>Exception</code> <p>\u521b\u5efa\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38</p> Source code in <code>dimine_python_sdk\\conn\\conn_client.py</code> <pre><code>async def create_layer(self, file_id: str, name: str) -> LayerInfo:\n \"\"\"\u521b\u5efa\u56fe\u5c42\n\n Args:\n file_id: \u6587\u4ef6ID\u6216\u6587\u4ef6\u540d\u79f0\n name: \u56fe\u5c42\u540d\u79f0\n\n Returns:\n \u521b\u5efa\u7684\u56fe\u5c42\u4fe1\u606f\n\n Raises:\n Exception: \u521b\u5efa\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38\n \"\"\"\n payload = {\n \"file\": file_id,\n \"name\": name\n }\n response = await self.send_request(CommandType.CREATE_LAYER, payload)\n if response.status == ResponseStatus.FAIL:\n raise Exception(response.error)\n return LayerInfo(id=name, name=name, related=True)\n</code></pre>"},{"location":"reference/conn/conn_client.html#dimine_python_sdk.conn.conn_client.ConnClient.delete_feature","title":"<code>delete_feature(file, feature_name)</code> <code>async</code>","text":"<p>\u5220\u9664\u8981\u7d20</p> <p>Parameters:</p> Name Type Description Default <code>file</code> <code>str</code> <p>\u6587\u4ef6\u540d\u79f0</p> required <code>feature_name</code> <code>str</code> <p>\u8981\u7d20\u540d\u79f0</p> required <p>Raises:</p> Type Description <code>Exception</code> <p>\u5220\u9664\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38</p> Source code in <code>dimine_python_sdk\\conn\\conn_client.py</code> <pre><code>async def delete_feature(self, file: str, feature_name: str) -> None:\n \"\"\"\u5220\u9664\u8981\u7d20\n\n Args:\n file: \u6587\u4ef6\u540d\u79f0\n feature_name: \u8981\u7d20\u540d\u79f0\n\n Raises:\n Exception: \u5220\u9664\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38\n \"\"\"\n payload = {\n \"file\": file,\n \"feature_name\": feature_name\n }\n response = await self.send_request(CommandType.DELETE_FEATURE, payload)\n if response.status == ResponseStatus.FAIL:\n raise Exception(response.error)\n</code></pre>"},{"location":"reference/conn/conn_client.html#dimine_python_sdk.conn.conn_client.ConnClient.delete_geometry","title":"<code>delete_geometry(delete_items)</code> <code>async</code>","text":"<p>\u5220\u9664\u6a21\u578b</p> <p>Parameters:</p> Name Type Description Default <code>delete_items</code> <code>List[Dict[str, str]]</code> <p>\u5220\u9664\u9879\u5217\u8868\uff0c\u6bcf\u4e2a\u9879\u5305\u542b: - id: \u6a21\u578bID (\u53e5\u67c4ID) - file: \u6587\u4ef6ID (\u4ece\u54ea\u4e2a\u6587\u4ef6\u5220\u9664\u6a21\u578b)</p> required <p>Raises:</p> Type Description <code>Exception</code> <p>\u5220\u9664\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38</p> Source code in <code>dimine_python_sdk\\conn\\conn_client.py</code> <pre><code>async def delete_geometry(self, delete_items: List[Dict[str, str]]) -> None:\n \"\"\"\u5220\u9664\u6a21\u578b\n\n Args:\n delete_items: \u5220\u9664\u9879\u5217\u8868\uff0c\u6bcf\u4e2a\u9879\u5305\u542b:\n - id: \u6a21\u578bID (\u53e5\u67c4ID)\n - file: \u6587\u4ef6ID (\u4ece\u54ea\u4e2a\u6587\u4ef6\u5220\u9664\u6a21\u578b)\n\n Raises:\n Exception: \u5220\u9664\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38\n \"\"\"\n response = await self.send_request(CommandType.DELETE_GEOMETRY, delete_items)\n if response.status == ResponseStatus.FAIL:\n raise Exception(response.error)\n</code></pre>"},{"location":"reference/conn/conn_client.html#dimine_python_sdk.conn.conn_client.ConnClient.delete_layer","title":"<code>delete_layer(file_id, layer_name)</code> <code>async</code>","text":"<p>\u5220\u9664\u56fe\u5c42</p> <p>Parameters:</p> Name Type Description Default <code>file_id</code> <code>str</code> <p>\u6587\u4ef6ID\u6216\u6587\u4ef6\u540d\u79f0</p> required <code>layer_name</code> <code>str</code> <p>\u56fe\u5c42\u540d\u79f0</p> required <p>Raises:</p> Type Description <code>Exception</code> <p>\u5220\u9664\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38</p> Source code in <code>dimine_python_sdk\\conn\\conn_client.py</code> <pre><code>async def delete_layer(self, file_id: str, layer_name: str) -> None:\n \"\"\"\u5220\u9664\u56fe\u5c42\n\n Args:\n file_id: \u6587\u4ef6ID\u6216\u6587\u4ef6\u540d\u79f0\n layer_name: \u56fe\u5c42\u540d\u79f0\n\n Raises:\n Exception: \u5220\u9664\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38\n \"\"\"\n payload = {\n \"file\": file_id,\n \"name\": layer_name\n }\n response = await self.send_request(CommandType.DELETE_LAYER, payload)\n if response.status == ResponseStatus.FAIL:\n raise Exception(response.error)\n</code></pre>"},{"location":"reference/conn/conn_client.html#dimine_python_sdk.conn.conn_client.ConnClient.export_file","title":"<code>export_file(file_id, file_path, mkdir=True)</code> <code>async</code>","text":"<p>\u5bfc\u51fa\u6587\u4ef6</p> <p>Parameters:</p> Name Type Description Default <code>file_id</code> <code>str</code> <p>\u6587\u4ef6ID\u6216\u6587\u4ef6\u540d\u79f0</p> required <code>file_path</code> <code>str | Path</code> <p>\u5bfc\u51fa\u76ee\u6807\u8def\u5f84</p> required <code>mkdir</code> <code>bool</code> <p>\u662f\u5426\u81ea\u52a8\u521b\u5efa\u76ee\u5f55</p> <code>True</code> <p>Raises: Exception: \u5bfc\u51fa\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38</p> Source code in <code>dimine_python_sdk\\conn\\conn_client.py</code> <pre><code>async def export_file(self, file_id: str, file_path: str| Path, mkdir: bool = True):\n \"\"\"\u5bfc\u51fa\u6587\u4ef6\n\n Args:\n file_id: \u6587\u4ef6ID\u6216\u6587\u4ef6\u540d\u79f0\n file_path: \u5bfc\u51fa\u76ee\u6807\u8def\u5f84\n mkdir: \u662f\u5426\u81ea\u52a8\u521b\u5efa\u76ee\u5f55\n Raises:\n Exception: \u5bfc\u51fa\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38\n \"\"\"\n if isinstance(file_path, str): # \u5982\u679c\u662f str \u5bf9\u8c61\uff0c\u5219\u8f6c\u6362\u4e3a Path\n file_path = Path(file_path)\n if not file_path.parent.exists(): # \u5982\u679c\u76ee\u5f55\u4e0d\u5b58\u5728\uff0c\u62a5\u9519\n if mkdir:\n file_path.parent.mkdir(parents=True, exist_ok=True)\n else:\n raise Exception(f\"path {file_path.parent} not exists\")\n res = await self.send_request(CommandType.FILE_EXPORT, {\"file\": file_id, \"file_path\": str(file_path)})\n if res.status == ResponseStatus.FAIL:\n raise Exception(res.error)\n</code></pre>"},{"location":"reference/conn/conn_client.html#dimine_python_sdk.conn.conn_client.ConnClient.get_features","title":"<code>get_features(file_id)</code> <code>async</code>","text":"<p>\u83b7\u53d6\u8981\u7d20</p> <p>Parameters:</p> Name Type Description Default <code>file_id</code> <code>str</code> <p>\u6587\u4ef6ID</p> required <p>Returns:</p> Type Description <code>List[FeatureInfo]</code> <p>\u8981\u7d20\u4fe1\u606f\u5217\u8868</p> <p>Raises:</p> Type Description <code>Exception</code> <p>\u83b7\u53d6\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38</p> Source code in <code>dimine_python_sdk\\conn\\conn_client.py</code> <pre><code>async def get_features(self, file_id: str) -> List[FeatureInfo]:\n \"\"\"\u83b7\u53d6\u8981\u7d20\n\n Args:\n file_id: \u6587\u4ef6ID\n\n Returns:\n \u8981\u7d20\u4fe1\u606f\u5217\u8868\n\n Raises:\n Exception: \u83b7\u53d6\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38\n \"\"\"\n response = await self.send_request(CommandType.GET_FEATURES, {\"file\": file_id})\n if response.status == ResponseStatus.FAIL:\n raise Exception(response.error)\n return [FeatureInfo(**item, related=True) for item in response.payload]\n</code></pre>"},{"location":"reference/conn/conn_client.html#dimine_python_sdk.conn.conn_client.ConnClient.get_files","title":"<code>get_files()</code> <code>async</code>","text":"<p>\u83b7\u53d6\u6587\u4ef6\u5bf9\u8c61\u6811</p> Source code in <code>dimine_python_sdk\\conn\\conn_client.py</code> <pre><code>async def get_files(self) -> List[FileInfo]:\n \"\"\"\u83b7\u53d6\u6587\u4ef6\u5bf9\u8c61\u6811\"\"\"\n res = await self.send_request(CommandType.GET_FILE_TREE)\n if res.status == ResponseStatus.FAIL:\n raise Exception(res.error)\n return [FileInfo(**item, related=True) for item in res.payload]\n</code></pre>"},{"location":"reference/conn/conn_client.html#dimine_python_sdk.conn.conn_client.ConnClient.get_geometry","title":"<code>get_geometry(file_id, layer_id, entity_types=[], features=None)</code> <code>async</code>","text":"<p>\u83b7\u53d6\u6a21\u578b</p> Source code in <code>dimine_python_sdk\\conn\\conn_client.py</code> <pre><code>async def get_geometry(self, file_id: str, layer_id: str, entity_types: List[str]=[], features: Optional[List[str]] = None) -> List[GEOMETRY]:\n \"\"\"\u83b7\u53d6\u6a21\u578b\"\"\"\n # \u5148\u83b7\u53d6\u8981\u7d20\u4fe1\u606f\uff0c\n all_features = await self.get_features(file_id)\n\n def _get_property_type(feature_name:str, name: str)-> str:\n \"\"\"\u83b7\u53d6\u5c5e\u6027\u7c7b\u578b\"\"\"\n for feature in all_features:\n if feature.name == feature_name:\n for property in feature.properties:\n if property.name == name:\n return property.type\n\n payload = {\n \"file\": file_id,\n \"layer\": layer_id,\n \"entity_type\": entity_types\n }\n if features:\n payload[\"feature\"] = features\n\n response = await self.send_request(CommandType.GET_GEOMETRY, payload)\n if response.status == ResponseStatus.FAIL:\n raise Exception(response.error)\n\n def _format_value(type:str, value: Any):\n if value == \"\" and type != \"string\":\n return None\n elif type == \"double\":\n return float(value)\n elif type == \"string\":\n return str(value)\n elif type in [\"int\",\"long\",\"short\"]:\n return int(value)\n else:\n raise Exception(f\"unknown property type: {type}\")\n\n def _handle_property(feature_name:str, properties: List[Dict[str, Any]]):\n for property in properties:\n property[\"type\"] = _get_property_type(feature_name, property.get(\"name\"))\n property[\"value\"] = _format_value(property.get(\"type\"), property.get(\"value\"))\n\n geometries = []\n for item in response.payload:\n _handle_property(item.get(\"feature\"), item.get(\"properties\", []))\n if isinstance(item.get(\"geometry\", []), list):\n tdata = np.asarray(item.get(\"geometry\", [])).astype(np.float64)\n if len(tdata.shape) == 1:\n item[\"geometry\"] = tdata\n geometries.append(Point(**item, related=True))\n elif len(tdata.shape) == 2:\n geometries.append(Line(**item, related=True))\n elif isinstance(item.get(\"geometry\", []), dict):\n item[\"geometry\"][\"faces\"] = item[\"geometry\"].pop(\"indexs\") if \"indexs\" in item[\"geometry\"] else []\n geometries.append(Shell(**item, related=True))\n for geom in geometries:\n geom.file = file_id\n geom.layer = layer_id\n return geometries\n</code></pre>"},{"location":"reference/conn/conn_client.html#dimine_python_sdk.conn.conn_client.ConnClient.get_layers","title":"<code>get_layers(file_id)</code> <code>async</code>","text":"<p>\u83b7\u53d6\u56fe\u5c42</p> Source code in <code>dimine_python_sdk\\conn\\conn_client.py</code> <pre><code>async def get_layers(self, file_id: str) -> List[LayerInfo]:\n \"\"\"\u83b7\u53d6\u56fe\u5c42\"\"\"\n response = await self.send_request(CommandType.GET_LAYERS, {\"file\": file_id})\n if response.status == ResponseStatus.FAIL:\n raise Exception(response.error)\n return [LayerInfo(**item, related=True) for item in response.payload]\n</code></pre>"},{"location":"reference/conn/conn_client.html#dimine_python_sdk.conn.conn_client.ConnClient.get_selected","title":"<code>get_selected()</code> <code>async</code>","text":"<p>\u83b7\u53d6\u5f53\u524d\u9009\u4e2d\u7684\u6a21\u578b</p> Source code in <code>dimine_python_sdk\\conn\\conn_client.py</code> <pre><code>async def get_selected(self)->List[GEOMETRY]:\n \"\"\"\u83b7\u53d6\u5f53\u524d\u9009\u4e2d\u7684\u6a21\u578b\"\"\"\n pass\n</code></pre>"},{"location":"reference/conn/conn_client.html#dimine_python_sdk.conn.conn_client.ConnClient.open_file","title":"<code>open_file(file_path)</code> <code>async</code>","text":"<p>\u6253\u5f00\u6587\u4ef6</p> Source code in <code>dimine_python_sdk\\conn\\conn_client.py</code> <pre><code>async def open_file(self, file_path: str| Path) -> FileInfo:\n \"\"\"\u6253\u5f00\u6587\u4ef6\"\"\"\n if isinstance(file_path, str): # \u5982\u679c\u662f str \u5bf9\u8c61\uff0c\u5219\u8f6c\u6362\u4e3a Path\n file_path = Path(file_path)\n if not file_path.exists(): # \u5982\u679c\u6587\u4ef6\u4e0d\u5b58\u5728\uff0c\u62a5\u9519\n raise Exception(f\"file {file_path} not exists\")\n res = await self.send_request(CommandType.FILE_OPEN, {\"file_path\": str(file_path)})\n if res.status == ResponseStatus.FAIL:\n raise Exception(res.error)\n print(\"res.payload: \", res.payload)\n if res.payload:\n return FileInfo(id=res.payload[0].get(\"file_id\"), name=res.payload[0].get(\"file_id\"), related=True)\n else:\n raise Exception(\"file already opened!\")\n</code></pre>"},{"location":"reference/conn/conn_client.html#dimine_python_sdk.conn.conn_client.ConnClient.update_feature","title":"<code>update_feature(file_id, feature_name, feature_define)</code> <code>async</code>","text":"<p>\u66f4\u65b0\u8981\u7d20</p> <p>Parameters:</p> Name Type Description Default <code>file_id</code> <code>str</code> <p>\u6587\u4ef6\u540d\u79f0\u6216\u6587\u4ef6ID</p> required <code>feature_name</code> <code>str</code> <p>\u8981\u7d20\u540d\u79f0</p> required <code>feature_define</code> <code>List[Dict[str, str]]</code> <p>\u5c5e\u6027\u5b9a\u4e49\u5217\u8868, \u6bcf\u4e2a\u5143\u7d20\u5305\u542b: - name: \u5c5e\u6027\u540d\u79f0 - type: \u5c5e\u6027\u7c7b\u578b (\"string\", \"float\", \"int\", \"long\", \"short\")</p> required <p>Raises:</p> Type Description <code>Exception</code> <p>\u66f4\u65b0\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38</p> Source code in <code>dimine_python_sdk\\conn\\conn_client.py</code> <pre><code>async def update_feature(self, file_id: str, feature_name: str,\n feature_define: List[Dict[str, str]]) -> None:\n \"\"\"\u66f4\u65b0\u8981\u7d20\n\n Args:\n file_id: \u6587\u4ef6\u540d\u79f0\u6216\u6587\u4ef6ID\n feature_name: \u8981\u7d20\u540d\u79f0\n feature_define: \u5c5e\u6027\u5b9a\u4e49\u5217\u8868, \u6bcf\u4e2a\u5143\u7d20\u5305\u542b:\n - name: \u5c5e\u6027\u540d\u79f0\n - type: \u5c5e\u6027\u7c7b\u578b (\"string\", \"float\", \"int\", \"long\", \"short\")\n\n Raises:\n Exception: \u66f4\u65b0\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38\n \"\"\"\n payload = {\n \"file\": file_id,\n \"feature_name\": feature_name,\n \"feature_define\": feature_define\n }\n response = await self.send_request(CommandType.UPDATE_FEATURE, payload)\n if response.status == ResponseStatus.FAIL:\n raise Exception(response.error)\n</code></pre>"},{"location":"reference/conn/conn_client.html#dimine_python_sdk.conn.conn_client.ConnClient.update_geometry","title":"<code>update_geometry(geometries)</code> <code>async</code>","text":"<p>\u66f4\u65b0\u6a21\u578b</p> <p>Parameters:</p> Name Type Description Default <code>geometries</code> <code>List[GEOMETRY]</code> <p>\u6a21\u578b\u5217\u8868\uff0c\u6bcf\u4e2a\u6a21\u578b\u5305\u542b\u4ee5\u4e0b\u5b57\u6bb5: - id: \u6a21\u578bID (\u53e5\u67c4ID) - layer: \u56fe\u5c42\u540d\u79f0 - entity_type: \"point | line | polyline | shell\" - geometry: \u6a21\u578b\u51e0\u4f55\u4fe1\u606f (\u53ef\u9009) - properties: \u6a21\u578b\u5c5e\u6027\u4fe1\u606f (\u53ef\u9009) - color: \u989c\u8272 [R, G, B] (\u53ef\u9009) - feature: \u6a21\u578b\u5173\u8054\u8981\u7d20\u5217\u8868 (\u53ef\u9009)</p> required <p>Raises:</p> Type Description <code>Exception</code> <p>\u66f4\u65b0\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38</p> Source code in <code>dimine_python_sdk\\conn\\conn_client.py</code> <pre><code>async def update_geometry(self, geometries: List[GEOMETRY]) -> None:\n \"\"\"\u66f4\u65b0\u6a21\u578b\n\n Args:\n geometries: \u6a21\u578b\u5217\u8868\uff0c\u6bcf\u4e2a\u6a21\u578b\u5305\u542b\u4ee5\u4e0b\u5b57\u6bb5:\n - id: \u6a21\u578bID (\u53e5\u67c4ID)\n - layer: \u56fe\u5c42\u540d\u79f0\n - entity_type: \"point | line | polyline | shell\"\n - geometry: \u6a21\u578b\u51e0\u4f55\u4fe1\u606f (\u53ef\u9009)\n - properties: \u6a21\u578b\u5c5e\u6027\u4fe1\u606f (\u53ef\u9009)\n - color: \u989c\u8272 [R, G, B] (\u53ef\u9009)\n - feature: \u6a21\u578b\u5173\u8054\u8981\u7d20\u5217\u8868 (\u53ef\u9009)\n\n Raises:\n Exception: \u66f4\u65b0\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38\n \"\"\"\n # \u683c\u5f0f\u5316\u6a21\u578b\u6570\u636e\n formatted_geometries = []\n for geom in geometries:\n formatted_geom = {\n \"id\": geom.id,\n \"file\": geom.file,\n \"layer\": geom.layer,\n \"feature\": geom.feature,\n \"entity_type\": geom.type,\n \"geometry\": geom.geometry.astype(\"str\").tolist() if geom.type!=\"shell\" else {\"indexs\": geom.geometry.faces.tolist(), \"points\": geom.geometry.points.astype(\"str\").tolist()},\n \"color\": geom.color,\n }\n\n # \u5904\u7406\u5c5e\u6027\u4fe1\u606f\n formatted_geom[\"properties\"] = [\n {\"name\": prop.name, \"value\": prop.value}\n for prop in geom.properties\n ]\n formatted_geometries.append(formatted_geom)\n\n response = await self.send_request(CommandType.UPDATE_GEOMETRY, formatted_geometries)\n if response.status == ResponseStatus.FAIL:\n raise Exception(response.error)\n</code></pre>"},{"location":"reference/conn/conn_client.html#dimine_python_sdk.conn.conn_client.ConnClient.update_or_create_geometry","title":"<code>update_or_create_geometry(geometries)</code> <code>async</code>","text":"<p>\u521b\u5efa\u6216\u66f4\u65b0\u591a\u4e2a\u6a21\u578b, \u5982\u679c\u6307\u5b9a\u4e86file_id\u548clayer_id, \u5219\u5c06\u6a21\u578b\u6dfb\u52a0\u5230\u6307\u5b9a\u7684\u6587\u4ef6\u53ca\u56fe\u5c42\u4e2d</p> Source code in <code>dimine_python_sdk\\conn\\conn_client.py</code> <pre><code>async def update_or_create_geometry(self, geometries: List[GEOMETRY] | GEOMETRY) -> None:\n \"\"\"\u521b\u5efa\u6216\u66f4\u65b0\u591a\u4e2a\u6a21\u578b, \u5982\u679c\u6307\u5b9a\u4e86file_id\u548clayer_id, \u5219\u5c06\u6a21\u578b\u6dfb\u52a0\u5230\u6307\u5b9a\u7684\u6587\u4ef6\u53ca\u56fe\u5c42\u4e2d\"\"\"\n update_geometries = [g for g in geometries if g.related]\n create_geometries = [g for g in geometries if not g.related]\n if update_geometries:\n await self.update_geometry(update_geometries)\n if create_geometries:\n await self.create_geometry(create_geometries)\n</code></pre>"},{"location":"reference/lib/algorithm/model_func.html","title":"model_func","text":""},{"location":"reference/lib/algorithm/model_func.html#dimine_python_sdk.lib.algorithm.model_func.ThModelFunc","title":"<code>ThModelFunc</code>","text":"<p>\u6a21\u578b\u5de5\u5177\u51fd\u6570 Python \u4e8c\u6b21\u5c01\u88c5\u7c7b \u5e95\u5c42\u76f4\u63a5\u8c03\u7528\u6e90\u6269\u5c55\u63a5\u53e3\uff0c\u63d0\u4f9b\u9759\u6001\u5de5\u5177\u65b9\u6cd5</p> Source code in <code>dimine_python_sdk\\lib\\algorithm\\model_func.py</code> <pre><code>class ThModelFunc:\n \"\"\"\n \u6a21\u578b\u5de5\u5177\u51fd\u6570 Python \u4e8c\u6b21\u5c01\u88c5\u7c7b\n \u5e95\u5c42\u76f4\u63a5\u8c03\u7528\u6e90\u6269\u5c55\u63a5\u53e3\uff0c\u63d0\u4f9b\u9759\u6001\u5de5\u5177\u65b9\u6cd5\n \"\"\"\n\n @staticmethod\n def distance(point_a: DmDPoint, point_b: DmDPoint) -> float:\n \"\"\"\n \u8ba1\u7b97\u4e24\u70b9\u95f4\u8ddd\u79bb\n :param point_a: \u70b9A\u5bf9\u8c61\n :param point_b: \u70b9B\u5bf9\u8c61\n :return: \u4e24\u70b9\u95f4\u8ddd\u79bb\uff08\u6d6e\u70b9\u6570\uff09\n\n example:\n ```python\n point_a = DmDPoint(0, 0, 0)\n point_b = DmDPoint(1, 1, 1)\n distance = ThModelFunc.distance(point_a, point_b)\n print(distance) # \u8f93\u51fa: 1.7320508075688772\n ```\n \"\"\"\n return Dm.thModelFunc.Distance(point_a._obj, point_b._obj)\n\n @staticmethod\n def calculate_min_rectangle_2d(point_set: list[DmDPoint],d_bounds: list[float]) -> list[DmDPoint]:\n \"\"\"\n \u8ba1\u7b97\u70b9\u96c6\u7684\u6700\u5c0f\u5916\u63a5\u77e9\u5f62\n :param point_set: \u70b9\u96c6\u5217\u8868\n :param d_bounds: \u5305\u56f4\u76d2\n :return: \u6700\u5c0f\u5916\u63a5\u77e9\u5f62\u76844\u4e2a\u89d2\u70b9\u5217\u8868\n\n example:\n ```python\n point_set = [DmDPoint(0, 0, 0), DmDPoint(1, 0, 0), DmDPoint(0, 1, 0), DmDPoint(1, 1, 0)]\n d_bounds = [0, 1, 0, 1, 0, 1]\n min_rect = ThModelFunc.calculate_min_rectangle_2d(point_set, d_bounds)\n print(min_rect) # \u8f93\u51fa: [DmDPoint(0, 0, 0), DmDPoint(1, 0, 0), DmDPoint(0, 1, 0), DmDPoint(1, 1, 0)]\n ```\n \"\"\"\n cpp_points = [p._obj for p in point_set]\n cpp_result = Dm.thModelFunc.CalcultateMinRectangle2D(cpp_points,d_bounds)\n return [DmDPoint._from_obj(p) for p in cpp_result]\n\n @staticmethod\n def cross(vector1: DmDPoint, vector2: DmDPoint) -> DmDPoint:\n \"\"\"\n \u8ba1\u7b97\u4e24\u4e2a\u5411\u91cf\u7684\u53c9\u79ef\n :param vector1: \u5411\u91cf1\n :param vector2: \u5411\u91cf2\n :return: \u53c9\u79ef\u7ed3\u679c\u5411\u91cf\n\n example:\n ```python\n vector1 = DmDPoint(1, 0, 0)\n vector2 = DmDPoint(0, 1, 0)\n cross_product = ThModelFunc.cross(vector1, vector2)\n print(cross_product) # \u8f93\u51fa: DmDPoint(0, 0, 1)\n ```\n \"\"\"\n cpp_result = Dm.thModelFunc.Cross(vector1._obj, vector2._obj)\n return DmDPoint._from_obj(cpp_result)\n\n @staticmethod\n def compute_bounds(point_set: list[DmDPoint]) -> list[float]:\n \"\"\"\n \u8ba1\u7b97\u70b9\u96c6\u7684\u8fb9\u754c\u8303\u56f4\n :param point_set: \u70b9\u96c6\u5217\u8868\n :return: \u8fb9\u754c\u53c2\u6570\u5217\u8868\uff086\u4e2a\u503c\uff09\n\n example:\n ```python\n point_set = [DmDPoint(0, 0, 0), DmDPoint(1, 0, 0), DmDPoint(0, 1, 0), DmDPoint(1, 1, 0)]\n bounds = ThModelFunc.compute_bounds(point_set)\n print(bounds) # \u8f93\u51fa: [0.0, 1.0, 0.0, 1.0, 0.0, 1.0]\n ```\n \"\"\"\n cpp_points = [p._obj for p in point_set]\n return Dm.thModelFunc.ComputeBounds(cpp_points)\n\n @staticmethod\n def cut_model_data(input_data: DmPolyData, origin: DmDPoint, normal: DmDPoint,output_data: DmPolyData,num:int = 1,dist:float = 0) -> int:\n \"\"\"\n \u88c1\u526a\u6a21\u578b\u6570\u636e\n :param input_data: \u8f93\u5165\u6a21\u578b\u6570\u636e\n :param origin: \u88c1\u526a\u5e73\u9762\u539f\u70b9\n :param normal: \u88c1\u526a\u5e73\u9762\u6cd5\u5411\u91cf\n :param output_data: \u8fd4\u56de\u503c\n :param num: \u5207\u9762\u4e2a\u6570\n :param dist: \u5207\u9762\u8ddd\u79bb\n :return: 1\u6210\u529f 0\u5931\u8d25\n\n example:\n ```python\n input_data = DmPolyData()\n origin = DmDPoint(0, 0, 0)\n normal = DmDPoint(0, 0, 1)\n output_data = DmPolyData()\n result = ThModelFunc.cut_model_data(input_data, origin, normal,output_data)\n print(result) # \u8f93\u51fa: 1\n ```\n \"\"\"\n result = Dm.thModelFunc.CutModelData(input_data._obj, origin._obj, normal._obj,output_data._obj, num, dist)\n if result != 1:\n raise ValueError(f\"\u6a21\u578b\u5207\u5272\u5931\u8d25\uff0c\u5e95\u5c42\u8fd4\u56de\u7ed3\u679c\u7801\uff1a{result}\")\n return result\n\n @staticmethod\n def project_point_on_plane(origin: DmDPoint, normal: DmDPoint, point: DmDPoint) -> int:\n \"\"\"\n \u5c06\u70b9\u6295\u5f71\u5230\u5e73\u9762\u4e0a\n :param origin: \u5e73\u9762\u539f\u70b9\n :param normal: \u5e73\u9762\u6cd5\u5411\u91cf\n :param point: \u5f85\u6295\u5f71\u70b9\n :return: 1\u6210\u529f,0\u5931\u8d25\n\n example:\n ```python\n origin = DmDPoint(0, 0, 0)\n normal = DmDPoint(0, 0, 1)\n point = DmDPoint(1, 1, 1)\n result = ThModelFunc.project_point_on_plane(origin, normal, point)\n print(result) # \u8f93\u51fa: 1\n ```\n \"\"\"\n print(point._obj)\n result = Dm.thModelFunc.ProjectPointsOnPlane(origin._obj, normal._obj, point._obj)\n print(point._obj)\n if result != 1:\n raise ValueError(f\"\u6295\u5f71\u5931\u8d25\uff0c\u5e95\u5c42\u8fd4\u56de\u7ed3\u679c\u7801\uff1a{result}\")\n return result\n\n @staticmethod\n def line_x_polyline(start: DmDPoint, end: DmDPoint, point_set: list[DmDPoint], tolerance: float) -> list[DmDPoint]:\n \"\"\"\n \u8ba1\u7b97\u7ebf\u6bb5\u4e0e\u591a\u6bb5\u7ebf\u7684\u4ea4\u70b9\n :param start: \u7ebf\u6bb5\u8d77\u70b9\n :param end: \u7ebf\u6bb5\u7ec8\u70b9\n :param point_set: \u591a\u6bb5\u7ebf\u70b9\u96c6\n :param tolerance: \u5bb9\u5dee\n :return: \u4ea4\u70b9\u5217\u8868\n\n example:\n ```python\n start = DmDPoint(0, 0, 0)\n end = DmDPoint(1, 1, 1)\n point_set = [DmDPoint(0, 0, 0), DmDPoint(1, 0, 0), DmDPoint(0, 1, 0), DmDPoint(1, 1, 0)]\n tolerance = 0.01\n intersections = ThModelFunc.line_x_polyline(start, end, point_set, tolerance)\n print(intersections) # \u8f93\u51fa: [DmDPoint(0.5, 0.5, 0.0)]\n ```\n \"\"\"\n cpp_points = [p._obj for p in point_set]\n cpp_result = Dm.thModelFunc.LineXPolyline(start._obj, end._obj, cpp_points, tolerance)\n return [DmDPoint._from_obj(p) for p in cpp_result]\n\n @staticmethod\n def compute_normal(point_set: list[DmDPoint]) -> DmDPoint:\n \"\"\"\n \u8ba1\u7b97\u70b9\u96c6\u7684\u6cd5\u5411\u91cf\n :param point_set: \u70b9\u96c6\u5217\u8868\n :return: \u6cd5\u5411\u91cf\n\n example:\n ```python\n point_set = [DmDPoint(0, 0, 0), DmDPoint(1, 0, 0), DmDPoint(0, 1, 0)]\n normal = ThModelFunc.compute_normal(point_set)\n print(normal) # \u8f93\u51fa: DmDPoint(0.0, 0.0, 1.0)\n ```\n \"\"\"\n cpp_points = [p._obj for p in point_set]\n cpp_result = Dm.thModelFunc.ComputeNormal(cpp_points)\n return DmDPoint._from_obj(cpp_result)\n</code></pre>"},{"location":"reference/lib/algorithm/model_func.html#dimine_python_sdk.lib.algorithm.model_func.ThModelFunc.calculate_min_rectangle_2d","title":"<code>calculate_min_rectangle_2d(point_set, d_bounds)</code> <code>staticmethod</code>","text":"<p>\u8ba1\u7b97\u70b9\u96c6\u7684\u6700\u5c0f\u5916\u63a5\u77e9\u5f62 :param point_set: \u70b9\u96c6\u5217\u8868 :param d_bounds: \u5305\u56f4\u76d2 :return: \u6700\u5c0f\u5916\u63a5\u77e9\u5f62\u76844\u4e2a\u89d2\u70b9\u5217\u8868</p> <p>example:</p> <pre><code>point_set = [DmDPoint(0, 0, 0), DmDPoint(1, 0, 0), DmDPoint(0, 1, 0), DmDPoint(1, 1, 0)]\nd_bounds = [0, 1, 0, 1, 0, 1]\nmin_rect = ThModelFunc.calculate_min_rectangle_2d(point_set, d_bounds)\nprint(min_rect) # \u8f93\u51fa: [DmDPoint(0, 0, 0), DmDPoint(1, 0, 0), DmDPoint(0, 1, 0), DmDPoint(1, 1, 0)]\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\algorithm\\model_func.py</code> <pre><code>@staticmethod\ndef calculate_min_rectangle_2d(point_set: list[DmDPoint],d_bounds: list[float]) -> list[DmDPoint]:\n \"\"\"\n \u8ba1\u7b97\u70b9\u96c6\u7684\u6700\u5c0f\u5916\u63a5\u77e9\u5f62\n :param point_set: \u70b9\u96c6\u5217\u8868\n :param d_bounds: \u5305\u56f4\u76d2\n :return: \u6700\u5c0f\u5916\u63a5\u77e9\u5f62\u76844\u4e2a\u89d2\u70b9\u5217\u8868\n\n example:\n ```python\n point_set = [DmDPoint(0, 0, 0), DmDPoint(1, 0, 0), DmDPoint(0, 1, 0), DmDPoint(1, 1, 0)]\n d_bounds = [0, 1, 0, 1, 0, 1]\n min_rect = ThModelFunc.calculate_min_rectangle_2d(point_set, d_bounds)\n print(min_rect) # \u8f93\u51fa: [DmDPoint(0, 0, 0), DmDPoint(1, 0, 0), DmDPoint(0, 1, 0), DmDPoint(1, 1, 0)]\n ```\n \"\"\"\n cpp_points = [p._obj for p in point_set]\n cpp_result = Dm.thModelFunc.CalcultateMinRectangle2D(cpp_points,d_bounds)\n return [DmDPoint._from_obj(p) for p in cpp_result]\n</code></pre>"},{"location":"reference/lib/algorithm/model_func.html#dimine_python_sdk.lib.algorithm.model_func.ThModelFunc.compute_bounds","title":"<code>compute_bounds(point_set)</code> <code>staticmethod</code>","text":"<p>\u8ba1\u7b97\u70b9\u96c6\u7684\u8fb9\u754c\u8303\u56f4 :param point_set: \u70b9\u96c6\u5217\u8868 :return: \u8fb9\u754c\u53c2\u6570\u5217\u8868\uff086\u4e2a\u503c\uff09</p> <p>example:</p> <pre><code>point_set = [DmDPoint(0, 0, 0), DmDPoint(1, 0, 0), DmDPoint(0, 1, 0), DmDPoint(1, 1, 0)]\nbounds = ThModelFunc.compute_bounds(point_set)\nprint(bounds) # \u8f93\u51fa: [0.0, 1.0, 0.0, 1.0, 0.0, 1.0]\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\algorithm\\model_func.py</code> <pre><code>@staticmethod\ndef compute_bounds(point_set: list[DmDPoint]) -> list[float]:\n \"\"\"\n \u8ba1\u7b97\u70b9\u96c6\u7684\u8fb9\u754c\u8303\u56f4\n :param point_set: \u70b9\u96c6\u5217\u8868\n :return: \u8fb9\u754c\u53c2\u6570\u5217\u8868\uff086\u4e2a\u503c\uff09\n\n example:\n ```python\n point_set = [DmDPoint(0, 0, 0), DmDPoint(1, 0, 0), DmDPoint(0, 1, 0), DmDPoint(1, 1, 0)]\n bounds = ThModelFunc.compute_bounds(point_set)\n print(bounds) # \u8f93\u51fa: [0.0, 1.0, 0.0, 1.0, 0.0, 1.0]\n ```\n \"\"\"\n cpp_points = [p._obj for p in point_set]\n return Dm.thModelFunc.ComputeBounds(cpp_points)\n</code></pre>"},{"location":"reference/lib/algorithm/model_func.html#dimine_python_sdk.lib.algorithm.model_func.ThModelFunc.compute_normal","title":"<code>compute_normal(point_set)</code> <code>staticmethod</code>","text":"<p>\u8ba1\u7b97\u70b9\u96c6\u7684\u6cd5\u5411\u91cf :param point_set: \u70b9\u96c6\u5217\u8868 :return: \u6cd5\u5411\u91cf</p> <p>example:</p> <pre><code>point_set = [DmDPoint(0, 0, 0), DmDPoint(1, 0, 0), DmDPoint(0, 1, 0)]\nnormal = ThModelFunc.compute_normal(point_set)\nprint(normal) # \u8f93\u51fa: DmDPoint(0.0, 0.0, 1.0)\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\algorithm\\model_func.py</code> <pre><code>@staticmethod\ndef compute_normal(point_set: list[DmDPoint]) -> DmDPoint:\n \"\"\"\n \u8ba1\u7b97\u70b9\u96c6\u7684\u6cd5\u5411\u91cf\n :param point_set: \u70b9\u96c6\u5217\u8868\n :return: \u6cd5\u5411\u91cf\n\n example:\n ```python\n point_set = [DmDPoint(0, 0, 0), DmDPoint(1, 0, 0), DmDPoint(0, 1, 0)]\n normal = ThModelFunc.compute_normal(point_set)\n print(normal) # \u8f93\u51fa: DmDPoint(0.0, 0.0, 1.0)\n ```\n \"\"\"\n cpp_points = [p._obj for p in point_set]\n cpp_result = Dm.thModelFunc.ComputeNormal(cpp_points)\n return DmDPoint._from_obj(cpp_result)\n</code></pre>"},{"location":"reference/lib/algorithm/model_func.html#dimine_python_sdk.lib.algorithm.model_func.ThModelFunc.cross","title":"<code>cross(vector1, vector2)</code> <code>staticmethod</code>","text":"<p>\u8ba1\u7b97\u4e24\u4e2a\u5411\u91cf\u7684\u53c9\u79ef :param vector1: \u5411\u91cf1 :param vector2: \u5411\u91cf2 :return: \u53c9\u79ef\u7ed3\u679c\u5411\u91cf</p> <p>example:</p> <pre><code>vector1 = DmDPoint(1, 0, 0)\nvector2 = DmDPoint(0, 1, 0)\ncross_product = ThModelFunc.cross(vector1, vector2)\nprint(cross_product) # \u8f93\u51fa: DmDPoint(0, 0, 1)\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\algorithm\\model_func.py</code> <pre><code>@staticmethod\ndef cross(vector1: DmDPoint, vector2: DmDPoint) -> DmDPoint:\n \"\"\"\n \u8ba1\u7b97\u4e24\u4e2a\u5411\u91cf\u7684\u53c9\u79ef\n :param vector1: \u5411\u91cf1\n :param vector2: \u5411\u91cf2\n :return: \u53c9\u79ef\u7ed3\u679c\u5411\u91cf\n\n example:\n ```python\n vector1 = DmDPoint(1, 0, 0)\n vector2 = DmDPoint(0, 1, 0)\n cross_product = ThModelFunc.cross(vector1, vector2)\n print(cross_product) # \u8f93\u51fa: DmDPoint(0, 0, 1)\n ```\n \"\"\"\n cpp_result = Dm.thModelFunc.Cross(vector1._obj, vector2._obj)\n return DmDPoint._from_obj(cpp_result)\n</code></pre>"},{"location":"reference/lib/algorithm/model_func.html#dimine_python_sdk.lib.algorithm.model_func.ThModelFunc.cut_model_data","title":"<code>cut_model_data(input_data, origin, normal, output_data, num=1, dist=0)</code> <code>staticmethod</code>","text":"<p>\u88c1\u526a\u6a21\u578b\u6570\u636e :param input_data: \u8f93\u5165\u6a21\u578b\u6570\u636e :param origin: \u88c1\u526a\u5e73\u9762\u539f\u70b9 :param normal: \u88c1\u526a\u5e73\u9762\u6cd5\u5411\u91cf :param output_data: \u8fd4\u56de\u503c :param num: \u5207\u9762\u4e2a\u6570 :param dist: \u5207\u9762\u8ddd\u79bb :return: 1\u6210\u529f 0\u5931\u8d25</p> <p>example:</p> <pre><code>input_data = DmPolyData()\norigin = DmDPoint(0, 0, 0)\nnormal = DmDPoint(0, 0, 1)\noutput_data = DmPolyData()\nresult = ThModelFunc.cut_model_data(input_data, origin, normal,output_data)\nprint(result) # \u8f93\u51fa: 1\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\algorithm\\model_func.py</code> <pre><code>@staticmethod\ndef cut_model_data(input_data: DmPolyData, origin: DmDPoint, normal: DmDPoint,output_data: DmPolyData,num:int = 1,dist:float = 0) -> int:\n \"\"\"\n \u88c1\u526a\u6a21\u578b\u6570\u636e\n :param input_data: \u8f93\u5165\u6a21\u578b\u6570\u636e\n :param origin: \u88c1\u526a\u5e73\u9762\u539f\u70b9\n :param normal: \u88c1\u526a\u5e73\u9762\u6cd5\u5411\u91cf\n :param output_data: \u8fd4\u56de\u503c\n :param num: \u5207\u9762\u4e2a\u6570\n :param dist: \u5207\u9762\u8ddd\u79bb\n :return: 1\u6210\u529f 0\u5931\u8d25\n\n example:\n ```python\n input_data = DmPolyData()\n origin = DmDPoint(0, 0, 0)\n normal = DmDPoint(0, 0, 1)\n output_data = DmPolyData()\n result = ThModelFunc.cut_model_data(input_data, origin, normal,output_data)\n print(result) # \u8f93\u51fa: 1\n ```\n \"\"\"\n result = Dm.thModelFunc.CutModelData(input_data._obj, origin._obj, normal._obj,output_data._obj, num, dist)\n if result != 1:\n raise ValueError(f\"\u6a21\u578b\u5207\u5272\u5931\u8d25\uff0c\u5e95\u5c42\u8fd4\u56de\u7ed3\u679c\u7801\uff1a{result}\")\n return result\n</code></pre>"},{"location":"reference/lib/algorithm/model_func.html#dimine_python_sdk.lib.algorithm.model_func.ThModelFunc.distance","title":"<code>distance(point_a, point_b)</code> <code>staticmethod</code>","text":"<p>\u8ba1\u7b97\u4e24\u70b9\u95f4\u8ddd\u79bb :param point_a: \u70b9A\u5bf9\u8c61 :param point_b: \u70b9B\u5bf9\u8c61 :return: \u4e24\u70b9\u95f4\u8ddd\u79bb\uff08\u6d6e\u70b9\u6570\uff09</p> <p>example:</p> <pre><code>point_a = DmDPoint(0, 0, 0)\npoint_b = DmDPoint(1, 1, 1)\ndistance = ThModelFunc.distance(point_a, point_b)\nprint(distance) # \u8f93\u51fa: 1.7320508075688772\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\algorithm\\model_func.py</code> <pre><code>@staticmethod\ndef distance(point_a: DmDPoint, point_b: DmDPoint) -> float:\n \"\"\"\n \u8ba1\u7b97\u4e24\u70b9\u95f4\u8ddd\u79bb\n :param point_a: \u70b9A\u5bf9\u8c61\n :param point_b: \u70b9B\u5bf9\u8c61\n :return: \u4e24\u70b9\u95f4\u8ddd\u79bb\uff08\u6d6e\u70b9\u6570\uff09\n\n example:\n ```python\n point_a = DmDPoint(0, 0, 0)\n point_b = DmDPoint(1, 1, 1)\n distance = ThModelFunc.distance(point_a, point_b)\n print(distance) # \u8f93\u51fa: 1.7320508075688772\n ```\n \"\"\"\n return Dm.thModelFunc.Distance(point_a._obj, point_b._obj)\n</code></pre>"},{"location":"reference/lib/algorithm/model_func.html#dimine_python_sdk.lib.algorithm.model_func.ThModelFunc.line_x_polyline","title":"<code>line_x_polyline(start, end, point_set, tolerance)</code> <code>staticmethod</code>","text":"<p>\u8ba1\u7b97\u7ebf\u6bb5\u4e0e\u591a\u6bb5\u7ebf\u7684\u4ea4\u70b9 :param start: \u7ebf\u6bb5\u8d77\u70b9 :param end: \u7ebf\u6bb5\u7ec8\u70b9 :param point_set: \u591a\u6bb5\u7ebf\u70b9\u96c6 :param tolerance: \u5bb9\u5dee :return: \u4ea4\u70b9\u5217\u8868</p> <p>example:</p> <pre><code>start = DmDPoint(0, 0, 0)\nend = DmDPoint(1, 1, 1)\npoint_set = [DmDPoint(0, 0, 0), DmDPoint(1, 0, 0), DmDPoint(0, 1, 0), DmDPoint(1, 1, 0)]\ntolerance = 0.01\nintersections = ThModelFunc.line_x_polyline(start, end, point_set, tolerance)\nprint(intersections) # \u8f93\u51fa: [DmDPoint(0.5, 0.5, 0.0)]\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\algorithm\\model_func.py</code> <pre><code>@staticmethod\ndef line_x_polyline(start: DmDPoint, end: DmDPoint, point_set: list[DmDPoint], tolerance: float) -> list[DmDPoint]:\n \"\"\"\n \u8ba1\u7b97\u7ebf\u6bb5\u4e0e\u591a\u6bb5\u7ebf\u7684\u4ea4\u70b9\n :param start: \u7ebf\u6bb5\u8d77\u70b9\n :param end: \u7ebf\u6bb5\u7ec8\u70b9\n :param point_set: \u591a\u6bb5\u7ebf\u70b9\u96c6\n :param tolerance: \u5bb9\u5dee\n :return: \u4ea4\u70b9\u5217\u8868\n\n example:\n ```python\n start = DmDPoint(0, 0, 0)\n end = DmDPoint(1, 1, 1)\n point_set = [DmDPoint(0, 0, 0), DmDPoint(1, 0, 0), DmDPoint(0, 1, 0), DmDPoint(1, 1, 0)]\n tolerance = 0.01\n intersections = ThModelFunc.line_x_polyline(start, end, point_set, tolerance)\n print(intersections) # \u8f93\u51fa: [DmDPoint(0.5, 0.5, 0.0)]\n ```\n \"\"\"\n cpp_points = [p._obj for p in point_set]\n cpp_result = Dm.thModelFunc.LineXPolyline(start._obj, end._obj, cpp_points, tolerance)\n return [DmDPoint._from_obj(p) for p in cpp_result]\n</code></pre>"},{"location":"reference/lib/algorithm/model_func.html#dimine_python_sdk.lib.algorithm.model_func.ThModelFunc.project_point_on_plane","title":"<code>project_point_on_plane(origin, normal, point)</code> <code>staticmethod</code>","text":"<p>\u5c06\u70b9\u6295\u5f71\u5230\u5e73\u9762\u4e0a :param origin: \u5e73\u9762\u539f\u70b9 :param normal: \u5e73\u9762\u6cd5\u5411\u91cf :param point: \u5f85\u6295\u5f71\u70b9 :return: 1\u6210\u529f,0\u5931\u8d25</p> <p>example:</p> <pre><code>origin = DmDPoint(0, 0, 0)\nnormal = DmDPoint(0, 0, 1)\npoint = DmDPoint(1, 1, 1)\nresult = ThModelFunc.project_point_on_plane(origin, normal, point)\nprint(result) # \u8f93\u51fa: 1\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\algorithm\\model_func.py</code> <pre><code>@staticmethod\ndef project_point_on_plane(origin: DmDPoint, normal: DmDPoint, point: DmDPoint) -> int:\n \"\"\"\n \u5c06\u70b9\u6295\u5f71\u5230\u5e73\u9762\u4e0a\n :param origin: \u5e73\u9762\u539f\u70b9\n :param normal: \u5e73\u9762\u6cd5\u5411\u91cf\n :param point: \u5f85\u6295\u5f71\u70b9\n :return: 1\u6210\u529f,0\u5931\u8d25\n\n example:\n ```python\n origin = DmDPoint(0, 0, 0)\n normal = DmDPoint(0, 0, 1)\n point = DmDPoint(1, 1, 1)\n result = ThModelFunc.project_point_on_plane(origin, normal, point)\n print(result) # \u8f93\u51fa: 1\n ```\n \"\"\"\n print(point._obj)\n result = Dm.thModelFunc.ProjectPointsOnPlane(origin._obj, normal._obj, point._obj)\n print(point._obj)\n if result != 1:\n raise ValueError(f\"\u6295\u5f71\u5931\u8d25\uff0c\u5e95\u5c42\u8fd4\u56de\u7ed3\u679c\u7801\uff1a{result}\")\n return result\n</code></pre>"},{"location":"reference/lib/algorithm/model_func.html#dimine_python_sdk.lib.algorithm.model_func.TwModelFunc","title":"<code>TwModelFunc</code>","text":"<p>\u70b9\u96c6\u5904\u7406\u5de5\u5177\u7c7b\uff08Python\u98ce\u683c\u4e8c\u6b21\u5c01\u88c5\uff09</p> Source code in <code>dimine_python_sdk\\lib\\algorithm\\model_func.py</code> <pre><code>class TwModelFunc:\n \"\"\"\u70b9\u96c6\u5904\u7406\u5de5\u5177\u7c7b\uff08Python\u98ce\u683c\u4e8c\u6b21\u5c01\u88c5\uff09\"\"\"\n @staticmethod\n def sort_points(base_point: DmDPoint,points: list[DmDPoint]) -> list[DmDPoint]:\n \"\"\"\n \u6839\u636e\u70b9\u96c6\u548c\u57fa\u70b9\u7684\u8ddd\u79bb\u6309\u4ece\u5c0f\u5230\u5927\u8fdb\u884c\u6392\u5217\uff0c\u5e76\u6e05\u9664\u91cd\u590d\u70b9\n :param base_point: \u57fa\u51c6\u70b9\uff0c\u8ba1\u7b97\u8ddd\u79bb\u7684\u4e2d\u5fc3\n :param points: \u5f85\u6392\u5e8f\u7684\u70b9\u96c6\u5217\u8868\n :return: \u6392\u5e8f\u5e76\u53bb\u91cd\u540e\u7684\u70b9\u96c6\n\n example:\n ```python\n base_point = DmDPoint(0, 0, 0)\n points = [DmDPoint(1, 0, 0), DmDPoint(0, 1, 0), DmDPoint(0, 0, 1)]\n sorted_points = TwModelFunc.sort_points(base_point, points)\n print(sorted_points) # \u8f93\u51fa: [DmDPoint(0.0, 0.0, 1.0), DmDPoint(0.0, 1.0, 0.0), DmDPoint(1.0, 0.0, 0.0)]\n ```\n \"\"\"\n cpp_points = [p._obj for p in points]\n sorted_points = Dm.PointSetSort(base_point._obj, cpp_points)\n return [DmDPoint._from_obj(p) for p in sorted_points]\n\n @staticmethod\n def calculate_theat_phi_psi(vector: DmDPoint,use_radians: bool = True) -> dict:\n \"\"\"\n \u8fd9\u91cc\u7684\u503e\u89d2\u5b9a\u4e49\u4e3a\u4e0e xy \u5e73\u9762\u7684\u5939\u89d2\n \u8ba1\u7b97\u5411\u91cf\u7684\u65b9\u4f4d\u89d2\u3001\u503e\u89d2\u548c\u957f\u5ea6\n :param vector: \u8f93\u5165\u5411\u91cf\n :param use_radians: \u662f\u5426\u8fd4\u56de\u5f27\u5ea6\uff08\u9ed8\u8ba4\u8fd4\u56de\u89d2\u5ea6\uff09\n :return: \u5305\u542b 'azimuth', 'dip'\u7684\u5b57\u5178\n\n example:\n ```python\n vector = DmDPoint(1, 1, 1)\n result = TwModelFunc.calculate_theat_phi_psi(vector,False)\n print(result) # \u8f93\u51fa: {'azimuth': 45.0, 'dip': 35.264389682754654}\n ```\n \"\"\"\n result = Dm.twModelFunc.CalculateTheatPhiPsi(vector._obj, use_radians)\n return result\n</code></pre>"},{"location":"reference/lib/algorithm/model_func.html#dimine_python_sdk.lib.algorithm.model_func.TwModelFunc.calculate_theat_phi_psi","title":"<code>calculate_theat_phi_psi(vector, use_radians=True)</code> <code>staticmethod</code>","text":"<p>\u8fd9\u91cc\u7684\u503e\u89d2\u5b9a\u4e49\u4e3a\u4e0e xy \u5e73\u9762\u7684\u5939\u89d2 \u8ba1\u7b97\u5411\u91cf\u7684\u65b9\u4f4d\u89d2\u3001\u503e\u89d2\u548c\u957f\u5ea6 :param vector: \u8f93\u5165\u5411\u91cf :param use_radians: \u662f\u5426\u8fd4\u56de\u5f27\u5ea6\uff08\u9ed8\u8ba4\u8fd4\u56de\u89d2\u5ea6\uff09 :return: \u5305\u542b 'azimuth', 'dip'\u7684\u5b57\u5178</p> <p>example:</p> <pre><code>vector = DmDPoint(1, 1, 1)\nresult = TwModelFunc.calculate_theat_phi_psi(vector,False)\nprint(result) # \u8f93\u51fa: {'azimuth': 45.0, 'dip': 35.264389682754654}\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\algorithm\\model_func.py</code> <pre><code>@staticmethod\ndef calculate_theat_phi_psi(vector: DmDPoint,use_radians: bool = True) -> dict:\n \"\"\"\n \u8fd9\u91cc\u7684\u503e\u89d2\u5b9a\u4e49\u4e3a\u4e0e xy \u5e73\u9762\u7684\u5939\u89d2\n \u8ba1\u7b97\u5411\u91cf\u7684\u65b9\u4f4d\u89d2\u3001\u503e\u89d2\u548c\u957f\u5ea6\n :param vector: \u8f93\u5165\u5411\u91cf\n :param use_radians: \u662f\u5426\u8fd4\u56de\u5f27\u5ea6\uff08\u9ed8\u8ba4\u8fd4\u56de\u89d2\u5ea6\uff09\n :return: \u5305\u542b 'azimuth', 'dip'\u7684\u5b57\u5178\n\n example:\n ```python\n vector = DmDPoint(1, 1, 1)\n result = TwModelFunc.calculate_theat_phi_psi(vector,False)\n print(result) # \u8f93\u51fa: {'azimuth': 45.0, 'dip': 35.264389682754654}\n ```\n \"\"\"\n result = Dm.twModelFunc.CalculateTheatPhiPsi(vector._obj, use_radians)\n return result\n</code></pre>"},{"location":"reference/lib/algorithm/model_func.html#dimine_python_sdk.lib.algorithm.model_func.TwModelFunc.sort_points","title":"<code>sort_points(base_point, points)</code> <code>staticmethod</code>","text":"<p>\u6839\u636e\u70b9\u96c6\u548c\u57fa\u70b9\u7684\u8ddd\u79bb\u6309\u4ece\u5c0f\u5230\u5927\u8fdb\u884c\u6392\u5217\uff0c\u5e76\u6e05\u9664\u91cd\u590d\u70b9 :param base_point: \u57fa\u51c6\u70b9\uff0c\u8ba1\u7b97\u8ddd\u79bb\u7684\u4e2d\u5fc3 :param points: \u5f85\u6392\u5e8f\u7684\u70b9\u96c6\u5217\u8868 :return: \u6392\u5e8f\u5e76\u53bb\u91cd\u540e\u7684\u70b9\u96c6</p> <p>example:</p> <pre><code>base_point = DmDPoint(0, 0, 0)\npoints = [DmDPoint(1, 0, 0), DmDPoint(0, 1, 0), DmDPoint(0, 0, 1)]\nsorted_points = TwModelFunc.sort_points(base_point, points)\nprint(sorted_points) # \u8f93\u51fa: [DmDPoint(0.0, 0.0, 1.0), DmDPoint(0.0, 1.0, 0.0), DmDPoint(1.0, 0.0, 0.0)]\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\algorithm\\model_func.py</code> <pre><code>@staticmethod\ndef sort_points(base_point: DmDPoint,points: list[DmDPoint]) -> list[DmDPoint]:\n \"\"\"\n \u6839\u636e\u70b9\u96c6\u548c\u57fa\u70b9\u7684\u8ddd\u79bb\u6309\u4ece\u5c0f\u5230\u5927\u8fdb\u884c\u6392\u5217\uff0c\u5e76\u6e05\u9664\u91cd\u590d\u70b9\n :param base_point: \u57fa\u51c6\u70b9\uff0c\u8ba1\u7b97\u8ddd\u79bb\u7684\u4e2d\u5fc3\n :param points: \u5f85\u6392\u5e8f\u7684\u70b9\u96c6\u5217\u8868\n :return: \u6392\u5e8f\u5e76\u53bb\u91cd\u540e\u7684\u70b9\u96c6\n\n example:\n ```python\n base_point = DmDPoint(0, 0, 0)\n points = [DmDPoint(1, 0, 0), DmDPoint(0, 1, 0), DmDPoint(0, 0, 1)]\n sorted_points = TwModelFunc.sort_points(base_point, points)\n print(sorted_points) # \u8f93\u51fa: [DmDPoint(0.0, 0.0, 1.0), DmDPoint(0.0, 1.0, 0.0), DmDPoint(1.0, 0.0, 0.0)]\n ```\n \"\"\"\n cpp_points = [p._obj for p in points]\n sorted_points = Dm.PointSetSort(base_point._obj, cpp_points)\n return [DmDPoint._from_obj(p) for p in sorted_points]\n</code></pre>"},{"location":"reference/lib/io/file_conversion.html","title":"file_conversion","text":""},{"location":"reference/lib/io/file_conversion.html#dimine_python_sdk.lib.io.file_conversion.FileConverter","title":"<code>FileConverter</code>","text":"<p>\u6587\u4ef6\u683c\u5f0f\u8f6c\u6362\u5de5\u5177\u7c7b\uff0c\u652f\u6301AutoCAD\u3001Surpac\u3001MicroMine\u3001DataMine\u3001MapGIS\u4e0eDMF\u683c\u5f0f\u4e92\u8f6c</p> Source code in <code>dimine_python_sdk\\lib\\io\\file_conversion.py</code> <pre><code>class FileConverter:\n \"\"\"\n \u6587\u4ef6\u683c\u5f0f\u8f6c\u6362\u5de5\u5177\u7c7b\uff0c\u652f\u6301AutoCAD\u3001Surpac\u3001MicroMine\u3001DataMine\u3001MapGIS\u4e0eDMF\u683c\u5f0f\u4e92\u8f6c\n \"\"\"\n\n @staticmethod\n def cad_to_dmf(cad_file: Union[str, Path], dmf_file: Union[str, Path]) -> bool:\n \"\"\"\n AutoCAD\u6587\u4ef6\u8f6cDMF\u683c\u5f0f\n :param cad_file: \u8f93\u5165AutoCAD\u6587\u4ef6\u8def\u5f84\n :param dmf_file: \u8f93\u51faDMF\u6587\u4ef6\u8def\u5f84\n :return: \u662f\u5426\u8f6c\u6362\u6210\u529f\n\n example:\n ```python\n FileConverter.cad_to_dmf(\"input.dwg\", \"output.dmf\")\n ```\n \"\"\"\n return Dm.dmIO_CADToDmf(str(cad_file), str(dmf_file))\n\n @staticmethod\n def dmf_to_cad(dmf_file: Union[str, Path], cad_file: Union[str, Path]) -> bool:\n \"\"\"\n DMF\u6587\u4ef6\u8f6cAutoCAD\u683c\u5f0f\n :param dmf_file: \u8f93\u5165DMF\u6587\u4ef6\u8def\u5f84\n :param cad_file: \u8f93\u51faAutoCAD\u6587\u4ef6\u8def\u5f84\n :return: \u662f\u5426\u8f6c\u6362\u6210\u529f\n\n example:\n ```python\n FileConverter.dmf_to_cad(\"input.dmf\", \"output.dwg\")\n ```\n \"\"\"\n return Dm.dmIO_DmfToCAD(str(dmf_file), str(cad_file))\n\n @staticmethod\n def surpac_to_dmf(surpac_file: Union[str, Path], dmf_file: Union[str, Path]) -> bool:\n \"\"\"\n Surpac\u6587\u4ef6\u8f6cDMF\u683c\u5f0f\n :param surpac_file: \u8f93\u5165Surpac\u6587\u4ef6\u8def\u5f84\n :param dmf_file: \u8f93\u51faDMF\u6587\u4ef6\u8def\u5f84\n :return: \u662f\u5426\u8f6c\u6362\u6210\u529f\n\n example:\n ```python\n FileConverter.surpac_to_dmf(\"input.sur\", \"output.dmf\")\n ```\n \"\"\"\n return Dm.dmIO_SurpacToDmf(str(surpac_file), str(dmf_file))\n\n @staticmethod\n def dmf_to_surpac(dmf_file: Union[str, Path], surpac_file: Union[str, Path]) -> bool:\n \"\"\"\n DMF\u6587\u4ef6\u8f6cSurpac\u683c\u5f0f\n :param dmf_file: \u8f93\u5165DMF\u6587\u4ef6\u8def\u5f84\n :param surpac_file: \u8f93\u51faSurpac\u6587\u4ef6\u8def\u5f84\n :return: \u662f\u5426\u8f6c\u6362\u6210\u529f\n\n example:\n ```python\n FileConverter.dmf_to_surpac(\"input.dmf\", \"output.sur\")\n ```\n \"\"\"\n return Dm.dmIO_DmfToSurpac(str(dmf_file), str(surpac_file))\n\n @staticmethod\n def micromine_to_dmf(micromine_file: Union[str, Path], dmf_file: Union[str, Path]) -> bool:\n \"\"\"\n MicroMine\u6587\u4ef6\u8f6cDMF\u683c\u5f0f\n :param micromine_file: \u8f93\u5165MicroMine\u6587\u4ef6\u8def\u5f84\n :param dmf_file: \u8f93\u51faDMF\u6587\u4ef6\u8def\u5f84\n :return: \u662f\u5426\u8f6c\u6362\u6210\u529f\n\n example:\n ```python\n FileConverter.micromine_to_dmf(\"input.mic\", \"output.dmf\")\n ```\n \"\"\"\n return Dm.dmIO_MicroMineToDmf(str(micromine_file), str(dmf_file))\n\n @staticmethod\n def dmf_to_micromine(dmf_file: Union[str, Path], micromine_file: Union[str, Path]) -> bool:\n \"\"\"\n DMF\u6587\u4ef6\u8f6cMicroMine\u683c\u5f0f\n :param dmf_file: \u8f93\u5165DMF\u6587\u4ef6\u8def\u5f84\n :param micromine_file: \u8f93\u51faMicroMine\u6587\u4ef6\u8def\u5f84\n :return: \u662f\u5426\u8f6c\u6362\u6210\u529f\n\n example:\n ```python\n FileConverter.dmf_to_micromine(\"input.dmf\", \"output.mic\")\n ```\n \"\"\"\n return Dm.dmIO_DmfToMicroMine(str(dmf_file), str(micromine_file))\n\n @staticmethod\n def datamine_to_dmf(datamine_file: Union[str, Path], dmf_file: Union[str, Path]) -> bool:\n \"\"\"\n DataMine\u6587\u4ef6\u8f6cDMF\u683c\u5f0f\n :param datamine_file: \u8f93\u5165DataMine\u6587\u4ef6\u8def\u5f84\n :param dmf_file: \u8f93\u51faDMF\u6587\u4ef6\u8def\u5f84\n :return: \u662f\u5426\u8f6c\u6362\u6210\u529f\n\n example:\n ```python\n FileConverter.datamine_to_dmf(\"input.dat\", \"output.dmf\")\n ```\n \"\"\"\n return Dm.dmIO_DataMineToDmf(str(datamine_file), str(dmf_file))\n\n @staticmethod\n def mapgis_to_dmf(mapgis_file: Union[str, Path], dmf_file: Union[str, Path]) -> bool:\n \"\"\"\n MapGIS\u6587\u4ef6\u8f6cDMF\u683c\u5f0f\n :param mapgis_file: \u8f93\u5165MapGIS\u6587\u4ef6\u8def\u5f84\n :param dmf_file: \u8f93\u51faDMF\u6587\u4ef6\u8def\u5f84\n :return: \u662f\u5426\u8f6c\u6362\u6210\u529f\n\n example:\n ```python\n FileConverter.mapgis_to_dmf(\"input.map\", \"output.dmf\")\n ```\n \"\"\"\n return Dm.dmIO_MapGisToDmf(str(mapgis_file), str(dmf_file))\n\n @staticmethod\n def dmf_to_mapgis(dmf_file: Union[str, Path], mapgis_file: Union[str, Path]) -> bool:\n \"\"\"\n DMF\u6587\u4ef6\u8f6cMapGIS\u683c\u5f0f\n :param dmf_file: \u8f93\u5165DMF\u6587\u4ef6\u8def\u5f84\n :param mapgis_file: \u8f93\u51faMapGIS\u6587\u4ef6\u8def\u5f84\n :return: \u662f\u5426\u8f6c\u6362\u6210\u529f\n\n example:\n ```python\n FileConverter.dmf_to_mapgis(\"input.dmf\", \"output.map\")\n ```\n \"\"\"\n return Dm.dmIO_DmfToMapGis(str(dmf_file), str(mapgis_file))\n</code></pre>"},{"location":"reference/lib/io/file_conversion.html#dimine_python_sdk.lib.io.file_conversion.FileConverter.cad_to_dmf","title":"<code>cad_to_dmf(cad_file, dmf_file)</code> <code>staticmethod</code>","text":"<p>AutoCAD\u6587\u4ef6\u8f6cDMF\u683c\u5f0f :param cad_file: \u8f93\u5165AutoCAD\u6587\u4ef6\u8def\u5f84 :param dmf_file: \u8f93\u51faDMF\u6587\u4ef6\u8def\u5f84 :return: \u662f\u5426\u8f6c\u6362\u6210\u529f</p> <p>example:</p> <pre><code>FileConverter.cad_to_dmf(\"input.dwg\", \"output.dmf\")\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\io\\file_conversion.py</code> <pre><code>@staticmethod\ndef cad_to_dmf(cad_file: Union[str, Path], dmf_file: Union[str, Path]) -> bool:\n \"\"\"\n AutoCAD\u6587\u4ef6\u8f6cDMF\u683c\u5f0f\n :param cad_file: \u8f93\u5165AutoCAD\u6587\u4ef6\u8def\u5f84\n :param dmf_file: \u8f93\u51faDMF\u6587\u4ef6\u8def\u5f84\n :return: \u662f\u5426\u8f6c\u6362\u6210\u529f\n\n example:\n ```python\n FileConverter.cad_to_dmf(\"input.dwg\", \"output.dmf\")\n ```\n \"\"\"\n return Dm.dmIO_CADToDmf(str(cad_file), str(dmf_file))\n</code></pre>"},{"location":"reference/lib/io/file_conversion.html#dimine_python_sdk.lib.io.file_conversion.FileConverter.datamine_to_dmf","title":"<code>datamine_to_dmf(datamine_file, dmf_file)</code> <code>staticmethod</code>","text":"<p>DataMine\u6587\u4ef6\u8f6cDMF\u683c\u5f0f :param datamine_file: \u8f93\u5165DataMine\u6587\u4ef6\u8def\u5f84 :param dmf_file: \u8f93\u51faDMF\u6587\u4ef6\u8def\u5f84 :return: \u662f\u5426\u8f6c\u6362\u6210\u529f</p> <p>example:</p> <pre><code>FileConverter.datamine_to_dmf(\"input.dat\", \"output.dmf\")\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\io\\file_conversion.py</code> <pre><code>@staticmethod\ndef datamine_to_dmf(datamine_file: Union[str, Path], dmf_file: Union[str, Path]) -> bool:\n \"\"\"\n DataMine\u6587\u4ef6\u8f6cDMF\u683c\u5f0f\n :param datamine_file: \u8f93\u5165DataMine\u6587\u4ef6\u8def\u5f84\n :param dmf_file: \u8f93\u51faDMF\u6587\u4ef6\u8def\u5f84\n :return: \u662f\u5426\u8f6c\u6362\u6210\u529f\n\n example:\n ```python\n FileConverter.datamine_to_dmf(\"input.dat\", \"output.dmf\")\n ```\n \"\"\"\n return Dm.dmIO_DataMineToDmf(str(datamine_file), str(dmf_file))\n</code></pre>"},{"location":"reference/lib/io/file_conversion.html#dimine_python_sdk.lib.io.file_conversion.FileConverter.dmf_to_cad","title":"<code>dmf_to_cad(dmf_file, cad_file)</code> <code>staticmethod</code>","text":"<p>DMF\u6587\u4ef6\u8f6cAutoCAD\u683c\u5f0f :param dmf_file: \u8f93\u5165DMF\u6587\u4ef6\u8def\u5f84 :param cad_file: \u8f93\u51faAutoCAD\u6587\u4ef6\u8def\u5f84 :return: \u662f\u5426\u8f6c\u6362\u6210\u529f</p> <p>example:</p> <pre><code>FileConverter.dmf_to_cad(\"input.dmf\", \"output.dwg\")\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\io\\file_conversion.py</code> <pre><code>@staticmethod\ndef dmf_to_cad(dmf_file: Union[str, Path], cad_file: Union[str, Path]) -> bool:\n \"\"\"\n DMF\u6587\u4ef6\u8f6cAutoCAD\u683c\u5f0f\n :param dmf_file: \u8f93\u5165DMF\u6587\u4ef6\u8def\u5f84\n :param cad_file: \u8f93\u51faAutoCAD\u6587\u4ef6\u8def\u5f84\n :return: \u662f\u5426\u8f6c\u6362\u6210\u529f\n\n example:\n ```python\n FileConverter.dmf_to_cad(\"input.dmf\", \"output.dwg\")\n ```\n \"\"\"\n return Dm.dmIO_DmfToCAD(str(dmf_file), str(cad_file))\n</code></pre>"},{"location":"reference/lib/io/file_conversion.html#dimine_python_sdk.lib.io.file_conversion.FileConverter.dmf_to_mapgis","title":"<code>dmf_to_mapgis(dmf_file, mapgis_file)</code> <code>staticmethod</code>","text":"<p>DMF\u6587\u4ef6\u8f6cMapGIS\u683c\u5f0f :param dmf_file: \u8f93\u5165DMF\u6587\u4ef6\u8def\u5f84 :param mapgis_file: \u8f93\u51faMapGIS\u6587\u4ef6\u8def\u5f84 :return: \u662f\u5426\u8f6c\u6362\u6210\u529f</p> <p>example:</p> <pre><code>FileConverter.dmf_to_mapgis(\"input.dmf\", \"output.map\")\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\io\\file_conversion.py</code> <pre><code>@staticmethod\ndef dmf_to_mapgis(dmf_file: Union[str, Path], mapgis_file: Union[str, Path]) -> bool:\n \"\"\"\n DMF\u6587\u4ef6\u8f6cMapGIS\u683c\u5f0f\n :param dmf_file: \u8f93\u5165DMF\u6587\u4ef6\u8def\u5f84\n :param mapgis_file: \u8f93\u51faMapGIS\u6587\u4ef6\u8def\u5f84\n :return: \u662f\u5426\u8f6c\u6362\u6210\u529f\n\n example:\n ```python\n FileConverter.dmf_to_mapgis(\"input.dmf\", \"output.map\")\n ```\n \"\"\"\n return Dm.dmIO_DmfToMapGis(str(dmf_file), str(mapgis_file))\n</code></pre>"},{"location":"reference/lib/io/file_conversion.html#dimine_python_sdk.lib.io.file_conversion.FileConverter.dmf_to_micromine","title":"<code>dmf_to_micromine(dmf_file, micromine_file)</code> <code>staticmethod</code>","text":"<p>DMF\u6587\u4ef6\u8f6cMicroMine\u683c\u5f0f :param dmf_file: \u8f93\u5165DMF\u6587\u4ef6\u8def\u5f84 :param micromine_file: \u8f93\u51faMicroMine\u6587\u4ef6\u8def\u5f84 :return: \u662f\u5426\u8f6c\u6362\u6210\u529f</p> <p>example:</p> <pre><code>FileConverter.dmf_to_micromine(\"input.dmf\", \"output.mic\")\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\io\\file_conversion.py</code> <pre><code>@staticmethod\ndef dmf_to_micromine(dmf_file: Union[str, Path], micromine_file: Union[str, Path]) -> bool:\n \"\"\"\n DMF\u6587\u4ef6\u8f6cMicroMine\u683c\u5f0f\n :param dmf_file: \u8f93\u5165DMF\u6587\u4ef6\u8def\u5f84\n :param micromine_file: \u8f93\u51faMicroMine\u6587\u4ef6\u8def\u5f84\n :return: \u662f\u5426\u8f6c\u6362\u6210\u529f\n\n example:\n ```python\n FileConverter.dmf_to_micromine(\"input.dmf\", \"output.mic\")\n ```\n \"\"\"\n return Dm.dmIO_DmfToMicroMine(str(dmf_file), str(micromine_file))\n</code></pre>"},{"location":"reference/lib/io/file_conversion.html#dimine_python_sdk.lib.io.file_conversion.FileConverter.dmf_to_surpac","title":"<code>dmf_to_surpac(dmf_file, surpac_file)</code> <code>staticmethod</code>","text":"<p>DMF\u6587\u4ef6\u8f6cSurpac\u683c\u5f0f :param dmf_file: \u8f93\u5165DMF\u6587\u4ef6\u8def\u5f84 :param surpac_file: \u8f93\u51faSurpac\u6587\u4ef6\u8def\u5f84 :return: \u662f\u5426\u8f6c\u6362\u6210\u529f</p> <p>example:</p> <pre><code>FileConverter.dmf_to_surpac(\"input.dmf\", \"output.sur\")\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\io\\file_conversion.py</code> <pre><code>@staticmethod\ndef dmf_to_surpac(dmf_file: Union[str, Path], surpac_file: Union[str, Path]) -> bool:\n \"\"\"\n DMF\u6587\u4ef6\u8f6cSurpac\u683c\u5f0f\n :param dmf_file: \u8f93\u5165DMF\u6587\u4ef6\u8def\u5f84\n :param surpac_file: \u8f93\u51faSurpac\u6587\u4ef6\u8def\u5f84\n :return: \u662f\u5426\u8f6c\u6362\u6210\u529f\n\n example:\n ```python\n FileConverter.dmf_to_surpac(\"input.dmf\", \"output.sur\")\n ```\n \"\"\"\n return Dm.dmIO_DmfToSurpac(str(dmf_file), str(surpac_file))\n</code></pre>"},{"location":"reference/lib/io/file_conversion.html#dimine_python_sdk.lib.io.file_conversion.FileConverter.mapgis_to_dmf","title":"<code>mapgis_to_dmf(mapgis_file, dmf_file)</code> <code>staticmethod</code>","text":"<p>MapGIS\u6587\u4ef6\u8f6cDMF\u683c\u5f0f :param mapgis_file: \u8f93\u5165MapGIS\u6587\u4ef6\u8def\u5f84 :param dmf_file: \u8f93\u51faDMF\u6587\u4ef6\u8def\u5f84 :return: \u662f\u5426\u8f6c\u6362\u6210\u529f</p> <p>example:</p> <pre><code>FileConverter.mapgis_to_dmf(\"input.map\", \"output.dmf\")\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\io\\file_conversion.py</code> <pre><code>@staticmethod\ndef mapgis_to_dmf(mapgis_file: Union[str, Path], dmf_file: Union[str, Path]) -> bool:\n \"\"\"\n MapGIS\u6587\u4ef6\u8f6cDMF\u683c\u5f0f\n :param mapgis_file: \u8f93\u5165MapGIS\u6587\u4ef6\u8def\u5f84\n :param dmf_file: \u8f93\u51faDMF\u6587\u4ef6\u8def\u5f84\n :return: \u662f\u5426\u8f6c\u6362\u6210\u529f\n\n example:\n ```python\n FileConverter.mapgis_to_dmf(\"input.map\", \"output.dmf\")\n ```\n \"\"\"\n return Dm.dmIO_MapGisToDmf(str(mapgis_file), str(dmf_file))\n</code></pre>"},{"location":"reference/lib/io/file_conversion.html#dimine_python_sdk.lib.io.file_conversion.FileConverter.micromine_to_dmf","title":"<code>micromine_to_dmf(micromine_file, dmf_file)</code> <code>staticmethod</code>","text":"<p>MicroMine\u6587\u4ef6\u8f6cDMF\u683c\u5f0f :param micromine_file: \u8f93\u5165MicroMine\u6587\u4ef6\u8def\u5f84 :param dmf_file: \u8f93\u51faDMF\u6587\u4ef6\u8def\u5f84 :return: \u662f\u5426\u8f6c\u6362\u6210\u529f</p> <p>example:</p> <pre><code>FileConverter.micromine_to_dmf(\"input.mic\", \"output.dmf\")\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\io\\file_conversion.py</code> <pre><code>@staticmethod\ndef micromine_to_dmf(micromine_file: Union[str, Path], dmf_file: Union[str, Path]) -> bool:\n \"\"\"\n MicroMine\u6587\u4ef6\u8f6cDMF\u683c\u5f0f\n :param micromine_file: \u8f93\u5165MicroMine\u6587\u4ef6\u8def\u5f84\n :param dmf_file: \u8f93\u51faDMF\u6587\u4ef6\u8def\u5f84\n :return: \u662f\u5426\u8f6c\u6362\u6210\u529f\n\n example:\n ```python\n FileConverter.micromine_to_dmf(\"input.mic\", \"output.dmf\")\n ```\n \"\"\"\n return Dm.dmIO_MicroMineToDmf(str(micromine_file), str(dmf_file))\n</code></pre>"},{"location":"reference/lib/io/file_conversion.html#dimine_python_sdk.lib.io.file_conversion.FileConverter.surpac_to_dmf","title":"<code>surpac_to_dmf(surpac_file, dmf_file)</code> <code>staticmethod</code>","text":"<p>Surpac\u6587\u4ef6\u8f6cDMF\u683c\u5f0f :param surpac_file: \u8f93\u5165Surpac\u6587\u4ef6\u8def\u5f84 :param dmf_file: \u8f93\u51faDMF\u6587\u4ef6\u8def\u5f84 :return: \u662f\u5426\u8f6c\u6362\u6210\u529f</p> <p>example:</p> <pre><code>FileConverter.surpac_to_dmf(\"input.sur\", \"output.dmf\")\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\io\\file_conversion.py</code> <pre><code>@staticmethod\ndef surpac_to_dmf(surpac_file: Union[str, Path], dmf_file: Union[str, Path]) -> bool:\n \"\"\"\n Surpac\u6587\u4ef6\u8f6cDMF\u683c\u5f0f\n :param surpac_file: \u8f93\u5165Surpac\u6587\u4ef6\u8def\u5f84\n :param dmf_file: \u8f93\u51faDMF\u6587\u4ef6\u8def\u5f84\n :return: \u662f\u5426\u8f6c\u6362\u6210\u529f\n\n example:\n ```python\n FileConverter.surpac_to_dmf(\"input.sur\", \"output.dmf\")\n ```\n \"\"\"\n return Dm.dmIO_SurpacToDmf(str(surpac_file), str(dmf_file))\n</code></pre>"},{"location":"reference/lib/io/models.html","title":"models","text":""},{"location":"reference/lib/io/models.html#dimine_python_sdk.lib.io.models.LayoutParam","title":"<code>LayoutParam</code> <code>dataclass</code>","text":"<p>\u5305\u542b\u539f\u70b9\u5750\u6807\u3001\u6cd5\u5411\u91cf\u3001\u5750\u6807\u8f74\u3001\u539a\u5ea6\u7b49\u6838\u5fc3\u5e03\u5c40\u53c2\u6570</p> Source code in <code>dimine_python_sdk\\lib\\io\\models.py</code> <pre><code>@dataclass\nclass LayoutParam:\n \"\"\"\n \u5305\u542b\u539f\u70b9\u5750\u6807\u3001\u6cd5\u5411\u91cf\u3001\u5750\u6807\u8f74\u3001\u539a\u5ea6\u7b49\u6838\u5fc3\u5e03\u5c40\u53c2\u6570\n \"\"\"\n # \u539f\u70b9\u5750\u6807\n origin_x: float # \u539f\u70b9X\u5750\u6807\n origin_y: float # \u539f\u70b9Y\u5750\u6807\n origin_z: float # \u539f\u70b9Z\u5750\u6807\n\n # \u6cd5\u5411\u91cf\n normal_x: float # \u6cd5\u5411\u91cfX\u5206\u91cf\n normal_y: float # \u6cd5\u5411\u91cfY\u5206\u91cf\n normal_z: float # \u6cd5\u5411\u91cfZ\u5206\u91cf\n\n # X\u8f74\u5411\u91cf\n x_axis_x: float # X\u8f74\u5411\u91cfX\u5206\u91cf\n x_axis_y: float # X\u8f74\u5411\u91cfY\u5206\u91cf\n x_axis_z: float # X\u8f74\u5411\u91cfZ\u5206\u91cf\n\n # Y\u8f74\u5411\u91cf\n y_axis_x: float # Y\u8f74\u5411\u91cfX\u5206\u91cf\n y_axis_y: float # Y\u8f74\u5411\u91cfY\u5206\u91cf\n y_axis_z: float # Y\u8f74\u5411\u91cfZ\u5206\u91cf\n\n # \u539a\u5ea6\u53c2\u6570\n forward_thickness: float # \u6b63\u5411\u539a\u5ea6\n reverse_thickness: float # \u53cd\u5411\u539a\u5ea6\n\n def to_dict(self) -> Dict[str, Any]:\n \"\"\"\u8f6c\u6362\u4e3a\u5b57\u5178\uff0c\u4fbf\u4e8eJSON\u5e8f\u5217\u5316\"\"\"\n return {\n \"origin_x\": self.origin_x,\n \"origin_y\": self.origin_y,\n \"origin_z\": self.origin_z,\n \"normal_x\": self.normal_x,\n \"normal_y\": self.normal_y,\n \"normal_z\": self.normal_z,\n \"x_axis_x\": self.x_axis_x,\n \"x_axis_y\": self.x_axis_y,\n \"x_axis_z\": self.x_axis_z,\n \"y_axis_x\": self.y_axis_x,\n \"y_axis_y\": self.y_axis_y,\n \"y_axis_z\": self.y_axis_z,\n \"forward_thickness\": self.forward_thickness,\n \"reverse_thickness\": self.reverse_thickness\n }\n</code></pre>"},{"location":"reference/lib/io/models.html#dimine_python_sdk.lib.io.models.LayoutParam.to_dict","title":"<code>to_dict()</code>","text":"<p>\u8f6c\u6362\u4e3a\u5b57\u5178\uff0c\u4fbf\u4e8eJSON\u5e8f\u5217\u5316</p> Source code in <code>dimine_python_sdk\\lib\\io\\models.py</code> <pre><code>def to_dict(self) -> Dict[str, Any]:\n \"\"\"\u8f6c\u6362\u4e3a\u5b57\u5178\uff0c\u4fbf\u4e8eJSON\u5e8f\u5217\u5316\"\"\"\n return {\n \"origin_x\": self.origin_x,\n \"origin_y\": self.origin_y,\n \"origin_z\": self.origin_z,\n \"normal_x\": self.normal_x,\n \"normal_y\": self.normal_y,\n \"normal_z\": self.normal_z,\n \"x_axis_x\": self.x_axis_x,\n \"x_axis_y\": self.x_axis_y,\n \"x_axis_z\": self.x_axis_z,\n \"y_axis_x\": self.y_axis_x,\n \"y_axis_y\": self.y_axis_y,\n \"y_axis_z\": self.y_axis_z,\n \"forward_thickness\": self.forward_thickness,\n \"reverse_thickness\": self.reverse_thickness\n }\n</code></pre>"},{"location":"reference/lib/io/models.html#dimine_python_sdk.lib.io.models.PlotBlockParam","title":"<code>PlotBlockParam</code> <code>dataclass</code>","text":"<p>\u5757\u53c2\u6570</p> Source code in <code>dimine_python_sdk\\lib\\io\\models.py</code> <pre><code>@dataclass\nclass PlotBlockParam:\n \"\"\"\u5757\u53c2\u6570\"\"\"\n display_mode: int\n enable: bool\n shrinkage_coefficient: float\n</code></pre>"},{"location":"reference/lib/io/models.html#dimine_python_sdk.lib.io.models.PlotDrillParam","title":"<code>PlotDrillParam</code> <code>dataclass</code>","text":"<p>\u94bb\u5b54\u53c2\u6570</p> Source code in <code>dimine_python_sdk\\lib\\io\\models.py</code> <pre><code>@dataclass\nclass PlotDrillParam:\n \"\"\"\u94bb\u5b54\u53c2\u6570\"\"\"\n AnnotatinoStyle: AnnotatinoStyleParam\n annotation_collar_triangle: bool = False\n annotation_cutting_point_circle: bool = False\n annotation_drill_name: bool = False\n annotation_hole_bottom_line: bool = False\n annotation_position: float = 0.0\n annotation_text_height: float = 0.0\n collar_triangle_ratio: float = 0.0\n cutting_into_point: bool = False\n cutting_point_circle: float = 0.0\n draw_sample_tray: bool = False\n enable: bool = True\n gram_per_ton_field_set: str = \"\"\n have_intersetion_projection_track: bool = False\n hole_bottom_line_length: float = 0.0\n is_multiple_table: bool = False\n negative_thickness: float = 20.0\n no_intersetion_projection_track: bool = False\n other_field_set: str = \"\"\n output_drill_section: bool = False\n output_param_table: bool = False\n output_sample_info_table: bool = False\n percentage_field_set: str = \"\"\n positive_thickness: float = 20.0\n reserve_drill_track_outside_layout: bool = False\n sample_tray_content: str = \"\"\n sample_tray_interval: float = 0.0\n sample_tray_text_height: float = 0.0\n sample_tray_width: float = 0.0\n</code></pre>"},{"location":"reference/lib/io/models.html#dimine_python_sdk.lib.io.models.PlotGirdParam","title":"<code>PlotGirdParam</code> <code>dataclass</code>","text":"<p>\u7f51\u683c\u53c2\u6570</p> Source code in <code>dimine_python_sdk\\lib\\io\\models.py</code> <pre><code>@dataclass\nclass PlotGirdParam:\n \"\"\"\u7f51\u683c\u53c2\u6570\"\"\"\n check_x: bool\n check_y: bool\n check_z: bool\n color: int\n enable: bool\n mode: int\n separated: bool\n text_height: float\n x: float = 50.0\n y: float = 50.0\n z: float = 50.0\n transverse: bool = False\n</code></pre>"},{"location":"reference/lib/io/models.html#dimine_python_sdk.lib.io.models.PlotProjectParam","title":"<code>PlotProjectParam</code> <code>dataclass</code>","text":"<p>\u9879\u76ee\u53c2\u6570\u96c6\u5408</p> Source code in <code>dimine_python_sdk\\lib\\io\\models.py</code> <pre><code>@dataclass\nclass PlotProjectParam:\n \"\"\"\u9879\u76ee\u53c2\u6570\u96c6\u5408\"\"\"\n enable: bool\n file_project_param: List[ProjectHatchItem] = field(default_factory=list)\n type: int = 0\n</code></pre>"},{"location":"reference/lib/io/models.html#dimine_python_sdk.lib.io.models.ProjectHatchItem","title":"<code>ProjectHatchItem</code> <code>dataclass</code>","text":"<p>\u5355\u4e2a\u9879\u76ee\u7684 Hatch \u53c2\u6570</p> Source code in <code>dimine_python_sdk\\lib\\io\\models.py</code> <pre><code>@dataclass\nclass ProjectHatchItem:\n \"\"\"\u5355\u4e2a\u9879\u76ee\u7684 Hatch \u53c2\u6570\"\"\"\n annotation_property: str\n annotation_style: str\n block_hatch: BlockHatch\n pattern_hatch: PatternHatch\n color: int = 0\n line_style: str = \"Continuous\"\n line_style_ratio: float = 1.0\n line_weight: int = 6\n name: str = \"\"\n output_mode: int = 2\n</code></pre>"},{"location":"reference/lib/io/models.html#dimine_python_sdk.lib.io.models.SetupParams","title":"<code>SetupParams</code> <code>dataclass</code>","text":"<p>\u4e3b\u914d\u7f6e\u53c2\u6570\u7c7b</p> Source code in <code>dimine_python_sdk\\lib\\io\\models.py</code> <pre><code>@dataclass\nclass SetupParams:\n \"\"\"\u4e3b\u914d\u7f6e\u53c2\u6570\u7c7b\"\"\"\n current: bool\n name: str\n plot_block_param: PlotBlockParam\n plot_drill_param: PlotDrillParam\n plot_gird_param: PlotGirdParam\n plot_hatch_param: Dict[str, Any] = field(default_factory=lambda: {\"enable\": False})\n plot_project_param: PlotProjectParam = field(default_factory=PlotProjectParam)\n uuid: str = \"\"\n\n def to_dict(self) -> Dict[str, Any]:\n \"\"\"\u8f6c\u6362\u4e3a\u5d4c\u5957\u5b57\u5178\uff0c\u652f\u6301JSON\u5e8f\u5217\u5316\"\"\"\n def dc_to_dict(obj):\n if isinstance(obj, (int, float, str, bool)):\n return obj\n elif hasattr(obj, '__dataclass_fields__'):\n return {k: dc_to_dict(getattr(obj, k)) for k in obj.__dataclass_fields__}\n elif isinstance(obj, list):\n return [dc_to_dict(item) for item in obj]\n elif isinstance(obj, dict):\n return {k: dc_to_dict(v) for k, v in obj.items()}\n return obj\n return dc_to_dict(self)\n</code></pre>"},{"location":"reference/lib/io/models.html#dimine_python_sdk.lib.io.models.SetupParams.to_dict","title":"<code>to_dict()</code>","text":"<p>\u8f6c\u6362\u4e3a\u5d4c\u5957\u5b57\u5178\uff0c\u652f\u6301JSON\u5e8f\u5217\u5316</p> Source code in <code>dimine_python_sdk\\lib\\io\\models.py</code> <pre><code>def to_dict(self) -> Dict[str, Any]:\n \"\"\"\u8f6c\u6362\u4e3a\u5d4c\u5957\u5b57\u5178\uff0c\u652f\u6301JSON\u5e8f\u5217\u5316\"\"\"\n def dc_to_dict(obj):\n if isinstance(obj, (int, float, str, bool)):\n return obj\n elif hasattr(obj, '__dataclass_fields__'):\n return {k: dc_to_dict(getattr(obj, k)) for k in obj.__dataclass_fields__}\n elif isinstance(obj, list):\n return [dc_to_dict(item) for item in obj]\n elif isinstance(obj, dict):\n return {k: dc_to_dict(v) for k, v in obj.items()}\n return obj\n return dc_to_dict(self)\n</code></pre>"},{"location":"reference/lib/io/project_plotting.html","title":"project_plotting","text":""},{"location":"reference/lib/io/project_plotting.html#dimine_python_sdk.lib.io.project_plotting.project_data_plotting","title":"<code>project_data_plotting(input_file, layout_json, setup_json, output_file)</code>","text":"<p>\u5de5\u7a0b\u6570\u636e\u51fa\u56fe\uff08\u5b9e\u4f53/\u94bb\u5b54/\u5757\u6bb5\u6a21\u578b\uff09\uff0c\u6839\u636e\u8f93\u5165\u6587\u4ef6\u6269\u5c55\u540d\u81ea\u52a8\u5207\u6362</p> <p>Parameters:</p> Name Type Description Default <code>input_file</code> <code>str</code> <p>\u8f93\u5165\u6587\u4ef6\u8def\u5f84\uff08\u652f\u6301\u5b9e\u4f53/\u94bb\u5b54/\u5757\u6bb5\u6a21\u578b\u6587\u4ef6\uff09</p> required <code>layout_json</code> <code>LayoutParam</code> <p>\u7ed8\u56fe\u5e03\u5c40\u914d\u7f6e\u53c2\u6570</p> required <code>setup_json</code> <code>SetupParams</code> <p>\u7ed8\u56fe\u8bbe\u7f6e\u53c2\u6570</p> required <code>output_file</code> <code>str</code> <p>\u8f93\u51fa\u6587\u4ef6\u8def\u5f84</p> required <p>Returns:</p> Name Type Description <code>str</code> <code>str</code> <p>\u6210\u529f\u65f6\u8fd4\u56de\u63d0\u793a\u6d88\u606f\uff0c\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38</p> <p>Raises:</p> Type Description <code>ValueError</code> <p>\u51fa\u56fe\u5931\u8d25\u65f6\u629b\u51fa\uff0c\u5305\u542b\u9519\u8bef\u6d88\u606f</p> Source code in <code>dimine_python_sdk\\lib\\io\\project_plotting.py</code> <pre><code>def project_data_plotting(\n input_file: str,\n layout_json: LayoutParam,\n setup_json: SetupParams,\n output_file: str\n) -> str:\n \"\"\"\n \u5de5\u7a0b\u6570\u636e\u51fa\u56fe\uff08\u5b9e\u4f53/\u94bb\u5b54/\u5757\u6bb5\u6a21\u578b\uff09\uff0c\u6839\u636e\u8f93\u5165\u6587\u4ef6\u6269\u5c55\u540d\u81ea\u52a8\u5207\u6362\n\n Args:\n input_file: \u8f93\u5165\u6587\u4ef6\u8def\u5f84\uff08\u652f\u6301\u5b9e\u4f53/\u94bb\u5b54/\u5757\u6bb5\u6a21\u578b\u6587\u4ef6\uff09\n layout_json: \u7ed8\u56fe\u5e03\u5c40\u914d\u7f6e\u53c2\u6570\n setup_json: \u7ed8\u56fe\u8bbe\u7f6e\u53c2\u6570\n output_file: \u8f93\u51fa\u6587\u4ef6\u8def\u5f84\n\n Returns:\n str: \u6210\u529f\u65f6\u8fd4\u56de\u63d0\u793a\u6d88\u606f\uff0c\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38\n\n Raises:\n ValueError: \u51fa\u56fe\u5931\u8d25\u65f6\u629b\u51fa\uff0c\u5305\u542b\u9519\u8bef\u6d88\u606f\n \"\"\"\n success, message = Dm.ProjectDataPlotting(\n input_file,\n layout_json.to_dict(),\n setup_json.to_dict(),\n output_file\n )\n\n # \u9519\u8bef\u5904\u7406\uff1aPython\u98ce\u683c\u7528\u5f02\u5e38\u66ff\u4ee3\u8fd4\u56de\u9519\u8bef\u7801\n if not success:\n raise ValueError(f\"\u51fa\u56fe\u5931\u8d25: {message}\")\n\n return message\n</code></pre>"},{"location":"reference/lib/prospecting/block_data.html","title":"block_data","text":""},{"location":"reference/lib/prospecting/block_data.html#dimine_python_sdk.lib.prospecting.block_data.DmBlockData","title":"<code>DmBlockData</code>","text":"<p>\u4e8c\u6b21\u5c01\u88c5 dmBlockDataNew \u7c7b\uff0c\u63d0\u4f9b Python \u5316\u7684\u5757\u6bb5\u6a21\u578b\u64cd\u4f5c\u63a5\u53e3 \u804c\u8d23\uff1a\u52a0\u8f7d\u5757\u6bb5\u6a21\u578b\u6587\u4ef6\u3001\u83b7\u53d6\u6a21\u578b\u5c5e\u6027\u3001\u904d\u5386\u5757\u6bb5\u6570\u636e</p> Source code in <code>dimine_python_sdk\\lib\\prospecting\\block_data.py</code> <pre><code>class DmBlockData:\n \"\"\"\n \u4e8c\u6b21\u5c01\u88c5 dmBlockDataNew \u7c7b\uff0c\u63d0\u4f9b Python \u5316\u7684\u5757\u6bb5\u6a21\u578b\u64cd\u4f5c\u63a5\u53e3\n \u804c\u8d23\uff1a\u52a0\u8f7d\u5757\u6bb5\u6a21\u578b\u6587\u4ef6\u3001\u83b7\u53d6\u6a21\u578b\u5c5e\u6027\u3001\u904d\u5386\u5757\u6bb5\u6570\u636e\n \"\"\"\n def __init__(self):\n # \u521d\u59cb\u5316\u5e95\u5c42\u5757\u6bb5\u6a21\u578b\u5bf9\u8c61\n self._block_data = Dm.dmBlockDataNew()\n # \u6807\u8bb0\u6a21\u578b\u662f\u5426\u5df2\u6210\u529f\u52a0\u8f7d\n self._is_open = False\n\n def open(self, file_path: str) -> bool:\n \"\"\"\n \u52a0\u8f7d\u5757\u6bb5\u6a21\u578b\u6587\u4ef6\n :param file_path: \u5757\u6bb5\u6a21\u578b\u6587\u4ef6\u8def\u5f84\uff08\u81ea\u52a8\u5904\u7406\u7f16\u7801\u8f6c\u6362\uff09\n :raises RuntimeError: \u52a0\u8f7d\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38\n\n :result: \u662f\u5426\u6210\u529f\u52a0\u8f7d\u6a21\u578b\n\n example:\n ```python\n block_data = DmBlockData()\n success = block_data.open(\"model.dmf\")\n if success:\n print(\"\u6a21\u578b\u52a0\u8f7d\u6210\u529f\")\n else:\n print(\"\u6a21\u578b\u52a0\u8f7d\u5931\u8d25\")\n ```\n \"\"\"\n result = self._block_data.Open(file_path)\n if not result:\n raise RuntimeError(f\"\u52a0\u8f7d\u5757\u6bb5\u6a21\u578b\u5931\u8d25: {file_path}\")\n self._is_open = True\n return result\n\n def _check_open(self) -> None:\n \"\"\"\u5185\u90e8\u6821\u9a8c\uff1a\u786e\u4fdd\u6a21\u578b\u5df2\u6210\u529f\u52a0\u8f7d\"\"\"\n if not self._is_open:\n raise RuntimeError(\"\u8bf7\u5148\u8c03\u7528 open() \u52a0\u8f7d\u5757\u6bb5\u6a21\u578b\")\n\n def get_origin(self) -> DmDPoint:\n \"\"\"\n \u83b7\u53d6\u6a21\u578b\u539f\u70b9\u5750\u6807 (x, y, z)\n :return: \u6a21\u578b\u539f\u70b9\u5750\u6807\u70b9\u5bf9\u8c61\n example:\n ```python\n block_data = DmBlockData()\n block_data.open(\"model.dmf\")\n origin = block_data.get_origin()\n print(f\"\u6a21\u578b\u539f\u70b9\u5750\u6807: {origin}\")\n ```\n \"\"\"\n self._check_open()\n cpp_result = self._block_data.GetOrigin()\n return DmDPoint._from_obj(cpp_result)\n\n def get_xyz_length(self) -> List[float]:\n \"\"\"\n \u83b7\u53d6\u6a21\u578b\u5728 X/Y/Z \u4e09\u4e2a\u65b9\u5411\u7684\u603b\u957f\u5ea6\n :return: \u5305\u542b X/Y/Z \u65b9\u5411\u603b\u957f\u5ea6\u7684\u5217\u8868 [x_len, y_len, z_len]\n\n example:\n ```python\n block_data = DmBlockData()\n block_data.open(\"model.dmf\")\n xyz_len = block_data.get_xyz_length()\n print(f\"\u6a21\u578b\u5728 X/Y/Z \u65b9\u5411\u7684\u603b\u957f\u5ea6: {xyz_len}\")\n ```\n \"\"\"\n self._check_open()\n return self._block_data.GetXYZLen()\n\n def get_max_level(self) -> int:\n \"\"\"\n \u83b7\u53d6\u6a21\u578b\u7684\u6700\u5927\u7cbe\u5ea6\u5c42\u7ea7\n :return: \u6a21\u578b\u7684\u6700\u5927\u7cbe\u5ea6\u5c42\u7ea7\u6574\u6570\n\n example:\n ```python\n block_data = DmBlockData()\n block_data.open(\"model.dmf\")\n max_level = block_data.get_max_level()\n print(f\"\u6a21\u578b\u6700\u5927\u7cbe\u5ea6\u5c42\u7ea7: {max_level}\")\n ```\n \"\"\"\n self._check_open()\n return self._block_data.GetMaxLevel()\n\n def get_min_size(self) -> List[float]:\n \"\"\"\n \u83b7\u53d6\u6a21\u578b\u6700\u5c0f\u5757\u6bb5\u7684\u5c3a\u5bf8 (x, y, z)\n :return: \u5305\u542b\u6700\u5c0f\u5757\u6bb5\u5c3a\u5bf8\u7684\u5217\u8868 [x_size, y_size, z_size]\n\n example:\n ```python\n block_data = DmBlockData()\n block_data.open(\"model.dmf\")\n min_size = block_data.get_min_size()\n print(f\"\u6a21\u578b\u6700\u5c0f\u5757\u6bb5\u5c3a\u5bf8: {min_size}\")\n ```\n \"\"\"\n self._check_open()\n return self._block_data.GetMinSize()\n\n def get_rotation(self) -> List[float]:\n \"\"\"\n \u83b7\u53d6\u6a21\u578b\u7684\u65cb\u8f6c\u89d2\u5ea6 (x, y, z)\n :return: \u5305\u542b\u65cb\u8f6c\u89d2\u5ea6\u7684\u5217\u8868 [x_angle, y_angle, z_angle]\n\n example:\n ```python\n block_data = DmBlockData()\n block_data.open(\"model.dmf\")\n rotation = block_data.get_rotation()\n print(f\"\u6a21\u578b\u65cb\u8f6c\u89d2\u5ea6: {rotation}\")\n ```\n \"\"\"\n self._check_open()\n return self._block_data.GetRotation()\n\n def get_field_definitions(self) -> List[Dict[str, Any]]:\n \"\"\"\n \u83b7\u53d6\u6a21\u578b\u7684\u5b57\u6bb5\u5b9a\u4e49\u5217\u8868\uff0c\u6bcf\u4e2a\u5b57\u6bb5\u5305\u542b name/type/size \u4fe1\u606f\n :return: \u5305\u542b\u5b57\u6bb5\u5b9a\u4e49\u7684\u5217\u8868\uff0c\u6bcf\u4e2a\u5143\u7d20\u4e3a\u5b57\u5178 {\"name\": str, \"type\": str, \"size\": int}\n\n example:\n ```python\n block_data = DmBlockData()\n block_data.open(\"model.dmf\")\n field_defs = block_data.get_field_definitions()\n print(f\"\u6a21\u578b\u5b57\u6bb5\u5b9a\u4e49: {field_defs}\")\n ```\n \"\"\"\n self._check_open()\n return self._block_data.GetFieldDefine()\n\n def get_total_block_count(self) -> int:\n \"\"\"\n \u83b7\u53d6\u6a21\u578b\u4e2d\u5757\u6bb5\u7684\u603b\u6570\u91cf\n :return: \u6a21\u578b\u4e2d\u5757\u6bb5\u7684\u603b\u6570\u91cf\u6574\u6570\n\n example:\n ```python\n block_data = DmBlockData()\n block_data.open(\"model.dmf\")\n total_count = block_data.get_total_block_count()\n print(f\"\u6a21\u578b\u4e2d\u5757\u6bb5\u603b\u6570\u91cf: {total_count}\")\n ```\n \"\"\"\n self._check_open()\n return self._block_data.GetTotalBlockCount()\n\n def init_cursor(self) -> int:\n \"\"\"\n \u521d\u59cb\u5316\u5757\u6bb5\u904d\u5386\u6e38\u6807\uff0c\u7528\u4e8e\u904d\u5386\u6240\u6709\u5757\u6bb5\n :return: \u521d\u59cb\u5316\u7ed3\u679c\u6574\u6570\uff080 \u8868\u793a\u6210\u529f\uff09\n\n example:\n ```python\n block_data = DmBlockData()\n block_data.open(\"model.dmf\")\n cursor = block_data.init_cursor()\n print(f\"\u521d\u59cb\u5316\u6e38\u6807\u7ed3\u679c: {cursor}\")\n ```\n \"\"\"\n self._check_open()\n return self._block_data.InitCursor()\n\n def advance_cursor(self) -> bool:\n \"\"\"\u5c06\u6e38\u6807\u79fb\u52a8\u5230\u4e0b\u4e00\u4e2a\u5757\u6bb5\n :return: \u662f\u5426\u6210\u529f\u79fb\u52a8\uff08False \u8868\u793a\u5df2\u904d\u5386\u7ed3\u675f\uff09\n\n example:\n ```python\n block_data = DmBlockData()\n block_data.open(\"model.dmf\")\n cursor = block_data.init_cursor()\n while block_data.advance_cursor():\n # \u5904\u7406\u5f53\u524d\u5757\u6bb5\u6570\u636e\n pass\n ```\n \"\"\"\n self._check_open()\n return self._block_data.AdvCursor()\n\n def get_cursor_data(self, field_name: str) -> Tuple[bool, str]:\n \"\"\"\u83b7\u53d6\u5f53\u524d\u6e38\u6807\u6307\u5411\u5757\u6bb5\u7684\u6307\u5b9a\u5b57\u6bb5\u503c\n :param field_name: \u5b57\u6bb5\u540d\u79f0\n :return: (\u662f\u5426\u6210\u529f, \u5b57\u6bb5\u503cJSON\u5b57\u7b26\u4e32)\n\n example:\n ```python\n block_data = DmBlockData()\n block_data.open(\"model.dmf\")\n cursor = block_data.init_cursor()\n while block_data.advance_cursor():\n success, data = block_data.get_cursor_data(\"field_name\")\n if success:\n print(f\"\u5f53\u524d\u5757\u6bb5\u5b57\u6bb5\u503c: {data}\")\n ```\n \"\"\"\n self._check_open()\n return self._block_data.GetCursorData(field_name)\n\n def is_beyond_boundary(self) -> bool:\n \"\"\"\n \u68c0\u67e5\u5f53\u524d\u6e38\u6807\u662f\u5426\u8d85\u51fa\u6a21\u578b\u8fb9\u754c\n :return: \u662f\u5426\u8d85\u51fa\u8fb9\u754c\uff08True/False\uff09\n\n example:\n ```python\n block_data = DmBlockData()\n block_data.open(\"model.dmf\")\n cursor = block_data.init_cursor()\n while block_data.advance_cursor():\n if block_data.is_beyond_boundary():\n print(\"\u6e38\u6807\u8d85\u51fa\u6a21\u578b\u8fb9\u754c\")\n break\n ```\n \"\"\"\n self._check_open()\n return self._block_data.IsBeyondBoundaryNode()\n\n # \u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\uff0c\u652f\u6301 with \u8bed\u53e5\n # def __enter__(self) -> \"BlockModelCore\":\n # return self\n #\n # def __exit__(self, exc_type, exc_val, exc_tb) -> None:\n # \"\"\"\u8d44\u6e90\u91ca\u653e\u903b\u8f91\"\"\"\n # self._is_open = False\n @staticmethod\n def create_block_model(params: ModelTransformParams) -> dict:\n \"\"\"\n \u521b\u5efa\u7a7a\u5757\u6bb5\u6a21\u578b\n :param params: Python\u5b57\u5178\uff0c\u5305\u542b\u6837\u957f\u7ec4\u5408\u6240\u9700\u7684\u53c2\u6570\n :return: \u5904\u7406\u7ed3\u679c\uff0c\u6210\u529f\u8fd4\u56de{\"state\": \"ok\", \"message\": \"...\"}\uff0c\u5931\u8d25\u629b\u51fa\u5f02\u5e38\n\n example:\n ```python\n params = ModelTransformParams(\n file_name: \"123\",\n # \u539f\u70b9\n origin_x = 3.0,origin_y = 3.0,origin_z = 3.0,\n # \u65cb\u8f6c\u89d2\u5ea6\n rotate_x = 0.0,rotate_y = 0.0,rotate_z = 0.0,\n # \u5355\u5143\u5757\u5c3a\u5bf8\n size_x = 1.0,size_y = 1.0,size_z = 1.0,\n # \u5ef6\u4f38\u957f\u5ea6\n length_x = 10.0,length_y = 10.0,length_z = 10.0,\n )\n response = DmBlockData.create_block_model(params)\n print(f\"\u521b\u5efa\u7a7a\u5757\u6bb5\u6a21\u578b\u7ed3\u679c: {response}\")\n ```\n \"\"\"\n json_param = json.dumps(params.to_dict(), ensure_ascii=False)\n raw_response = Dm.CreateBlockModel(json_param)\n response = json.loads(raw_response)\n if response[\"state\"] == \"failed\":\n raise RuntimeError(f\"\u6837\u957f\u7ec4\u5408\u5931\u8d25: {response['message']}\")\n return response\n\n @staticmethod\n def block_constrain_to_dmc_file(block_model_file: str,constrain_json_param:BlockModelConstraint,constrain_result_file:str) -> bool:\n \"\"\"\n \u5757\u7ea6\u675f\u4fdd\u5b58\u5230\u7ea6\u675f\u7ed3\u679cdmc\u6587\u4ef6\n :param block_model_file:\n :param constrain_json_param:\n :param constrain_result_file:\n :return: \u5904\u7406\u7ed3\u679c\uff0c\u8fd4\u56deTrue/False\n\n example:\n ```python\n params = BlockModelConstraint(\n type = 0,file = \"model.dmf\",range = 0,inside_level = 0,boundary_level = 0,bool_operate = \"and\",\n )\n response = DmBlockData.block_constrain_to_dmc_file(\"model.dmf\",params,\"constrain.dmc\")\n print(f\"\u5757\u7ea6\u675f\u4fdd\u5b58\u5230\u7ea6\u675f\u7ed3\u679cdmc\u6587\u4ef6\u7ed3\u679c: {response}\")\n ```\n \"\"\"\n json_param = json.dumps(constrain_json_param.to_dict(), ensure_ascii=False)\n raw_response = Dm.BlockConstrainToDmcFile(block_model_file,json_param,constrain_result_file)\n return raw_response\n</code></pre>"},{"location":"reference/lib/prospecting/block_data.html#dimine_python_sdk.lib.prospecting.block_data.DmBlockData.advance_cursor","title":"<code>advance_cursor()</code>","text":"<p>\u5c06\u6e38\u6807\u79fb\u52a8\u5230\u4e0b\u4e00\u4e2a\u5757\u6bb5 :return: \u662f\u5426\u6210\u529f\u79fb\u52a8\uff08False \u8868\u793a\u5df2\u904d\u5386\u7ed3\u675f\uff09</p> <p>example:</p> <pre><code>block_data = DmBlockData()\nblock_data.open(\"model.dmf\")\ncursor = block_data.init_cursor()\nwhile block_data.advance_cursor():\n # \u5904\u7406\u5f53\u524d\u5757\u6bb5\u6570\u636e\n pass\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\block_data.py</code> <pre><code>def advance_cursor(self) -> bool:\n \"\"\"\u5c06\u6e38\u6807\u79fb\u52a8\u5230\u4e0b\u4e00\u4e2a\u5757\u6bb5\n :return: \u662f\u5426\u6210\u529f\u79fb\u52a8\uff08False \u8868\u793a\u5df2\u904d\u5386\u7ed3\u675f\uff09\n\n example:\n ```python\n block_data = DmBlockData()\n block_data.open(\"model.dmf\")\n cursor = block_data.init_cursor()\n while block_data.advance_cursor():\n # \u5904\u7406\u5f53\u524d\u5757\u6bb5\u6570\u636e\n pass\n ```\n \"\"\"\n self._check_open()\n return self._block_data.AdvCursor()\n</code></pre>"},{"location":"reference/lib/prospecting/block_data.html#dimine_python_sdk.lib.prospecting.block_data.DmBlockData.block_constrain_to_dmc_file","title":"<code>block_constrain_to_dmc_file(block_model_file, constrain_json_param, constrain_result_file)</code> <code>staticmethod</code>","text":"<p>\u5757\u7ea6\u675f\u4fdd\u5b58\u5230\u7ea6\u675f\u7ed3\u679cdmc\u6587\u4ef6 :param block_model_file: :param constrain_json_param: :param constrain_result_file: :return: \u5904\u7406\u7ed3\u679c\uff0c\u8fd4\u56deTrue/False</p> <p>example:</p> <pre><code>params = BlockModelConstraint(\ntype = 0,file = \"model.dmf\",range = 0,inside_level = 0,boundary_level = 0,bool_operate = \"and\",\n)\nresponse = DmBlockData.block_constrain_to_dmc_file(\"model.dmf\",params,\"constrain.dmc\")\nprint(f\"\u5757\u7ea6\u675f\u4fdd\u5b58\u5230\u7ea6\u675f\u7ed3\u679cdmc\u6587\u4ef6\u7ed3\u679c: {response}\")\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\block_data.py</code> <pre><code>@staticmethod\ndef block_constrain_to_dmc_file(block_model_file: str,constrain_json_param:BlockModelConstraint,constrain_result_file:str) -> bool:\n \"\"\"\n \u5757\u7ea6\u675f\u4fdd\u5b58\u5230\u7ea6\u675f\u7ed3\u679cdmc\u6587\u4ef6\n :param block_model_file:\n :param constrain_json_param:\n :param constrain_result_file:\n :return: \u5904\u7406\u7ed3\u679c\uff0c\u8fd4\u56deTrue/False\n\n example:\n ```python\n params = BlockModelConstraint(\n type = 0,file = \"model.dmf\",range = 0,inside_level = 0,boundary_level = 0,bool_operate = \"and\",\n )\n response = DmBlockData.block_constrain_to_dmc_file(\"model.dmf\",params,\"constrain.dmc\")\n print(f\"\u5757\u7ea6\u675f\u4fdd\u5b58\u5230\u7ea6\u675f\u7ed3\u679cdmc\u6587\u4ef6\u7ed3\u679c: {response}\")\n ```\n \"\"\"\n json_param = json.dumps(constrain_json_param.to_dict(), ensure_ascii=False)\n raw_response = Dm.BlockConstrainToDmcFile(block_model_file,json_param,constrain_result_file)\n return raw_response\n</code></pre>"},{"location":"reference/lib/prospecting/block_data.html#dimine_python_sdk.lib.prospecting.block_data.DmBlockData.create_block_model","title":"<code>create_block_model(params)</code> <code>staticmethod</code>","text":"<p>\u521b\u5efa\u7a7a\u5757\u6bb5\u6a21\u578b :param params: Python\u5b57\u5178\uff0c\u5305\u542b\u6837\u957f\u7ec4\u5408\u6240\u9700\u7684\u53c2\u6570 :return: \u5904\u7406\u7ed3\u679c\uff0c\u6210\u529f\u8fd4\u56de{\"state\": \"ok\", \"message\": \"...\"}\uff0c\u5931\u8d25\u629b\u51fa\u5f02\u5e38</p> <p>example:</p> <pre><code>params = ModelTransformParams(\nfile_name: \"123\",\n# \u539f\u70b9\norigin_x = 3.0,origin_y = 3.0,origin_z = 3.0,\n# \u65cb\u8f6c\u89d2\u5ea6\nrotate_x = 0.0,rotate_y = 0.0,rotate_z = 0.0,\n# \u5355\u5143\u5757\u5c3a\u5bf8\nsize_x = 1.0,size_y = 1.0,size_z = 1.0,\n# \u5ef6\u4f38\u957f\u5ea6\nlength_x = 10.0,length_y = 10.0,length_z = 10.0,\n)\nresponse = DmBlockData.create_block_model(params)\nprint(f\"\u521b\u5efa\u7a7a\u5757\u6bb5\u6a21\u578b\u7ed3\u679c: {response}\")\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\block_data.py</code> <pre><code>@staticmethod\ndef create_block_model(params: ModelTransformParams) -> dict:\n \"\"\"\n \u521b\u5efa\u7a7a\u5757\u6bb5\u6a21\u578b\n :param params: Python\u5b57\u5178\uff0c\u5305\u542b\u6837\u957f\u7ec4\u5408\u6240\u9700\u7684\u53c2\u6570\n :return: \u5904\u7406\u7ed3\u679c\uff0c\u6210\u529f\u8fd4\u56de{\"state\": \"ok\", \"message\": \"...\"}\uff0c\u5931\u8d25\u629b\u51fa\u5f02\u5e38\n\n example:\n ```python\n params = ModelTransformParams(\n file_name: \"123\",\n # \u539f\u70b9\n origin_x = 3.0,origin_y = 3.0,origin_z = 3.0,\n # \u65cb\u8f6c\u89d2\u5ea6\n rotate_x = 0.0,rotate_y = 0.0,rotate_z = 0.0,\n # \u5355\u5143\u5757\u5c3a\u5bf8\n size_x = 1.0,size_y = 1.0,size_z = 1.0,\n # \u5ef6\u4f38\u957f\u5ea6\n length_x = 10.0,length_y = 10.0,length_z = 10.0,\n )\n response = DmBlockData.create_block_model(params)\n print(f\"\u521b\u5efa\u7a7a\u5757\u6bb5\u6a21\u578b\u7ed3\u679c: {response}\")\n ```\n \"\"\"\n json_param = json.dumps(params.to_dict(), ensure_ascii=False)\n raw_response = Dm.CreateBlockModel(json_param)\n response = json.loads(raw_response)\n if response[\"state\"] == \"failed\":\n raise RuntimeError(f\"\u6837\u957f\u7ec4\u5408\u5931\u8d25: {response['message']}\")\n return response\n</code></pre>"},{"location":"reference/lib/prospecting/block_data.html#dimine_python_sdk.lib.prospecting.block_data.DmBlockData.get_cursor_data","title":"<code>get_cursor_data(field_name)</code>","text":"<p>\u83b7\u53d6\u5f53\u524d\u6e38\u6807\u6307\u5411\u5757\u6bb5\u7684\u6307\u5b9a\u5b57\u6bb5\u503c :param field_name: \u5b57\u6bb5\u540d\u79f0 :return: (\u662f\u5426\u6210\u529f, \u5b57\u6bb5\u503cJSON\u5b57\u7b26\u4e32)</p> <p>example:</p> <pre><code>block_data = DmBlockData()\nblock_data.open(\"model.dmf\")\ncursor = block_data.init_cursor()\nwhile block_data.advance_cursor():\n success, data = block_data.get_cursor_data(\"field_name\")\n if success:\n print(f\"\u5f53\u524d\u5757\u6bb5\u5b57\u6bb5\u503c: {data}\")\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\block_data.py</code> <pre><code>def get_cursor_data(self, field_name: str) -> Tuple[bool, str]:\n \"\"\"\u83b7\u53d6\u5f53\u524d\u6e38\u6807\u6307\u5411\u5757\u6bb5\u7684\u6307\u5b9a\u5b57\u6bb5\u503c\n :param field_name: \u5b57\u6bb5\u540d\u79f0\n :return: (\u662f\u5426\u6210\u529f, \u5b57\u6bb5\u503cJSON\u5b57\u7b26\u4e32)\n\n example:\n ```python\n block_data = DmBlockData()\n block_data.open(\"model.dmf\")\n cursor = block_data.init_cursor()\n while block_data.advance_cursor():\n success, data = block_data.get_cursor_data(\"field_name\")\n if success:\n print(f\"\u5f53\u524d\u5757\u6bb5\u5b57\u6bb5\u503c: {data}\")\n ```\n \"\"\"\n self._check_open()\n return self._block_data.GetCursorData(field_name)\n</code></pre>"},{"location":"reference/lib/prospecting/block_data.html#dimine_python_sdk.lib.prospecting.block_data.DmBlockData.get_field_definitions","title":"<code>get_field_definitions()</code>","text":"<p>\u83b7\u53d6\u6a21\u578b\u7684\u5b57\u6bb5\u5b9a\u4e49\u5217\u8868\uff0c\u6bcf\u4e2a\u5b57\u6bb5\u5305\u542b name/type/size \u4fe1\u606f :return: \u5305\u542b\u5b57\u6bb5\u5b9a\u4e49\u7684\u5217\u8868\uff0c\u6bcf\u4e2a\u5143\u7d20\u4e3a\u5b57\u5178 {\"name\": str, \"type\": str, \"size\": int}</p> <p>example:</p> <pre><code>block_data = DmBlockData()\nblock_data.open(\"model.dmf\")\nfield_defs = block_data.get_field_definitions()\nprint(f\"\u6a21\u578b\u5b57\u6bb5\u5b9a\u4e49: {field_defs}\")\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\block_data.py</code> <pre><code>def get_field_definitions(self) -> List[Dict[str, Any]]:\n \"\"\"\n \u83b7\u53d6\u6a21\u578b\u7684\u5b57\u6bb5\u5b9a\u4e49\u5217\u8868\uff0c\u6bcf\u4e2a\u5b57\u6bb5\u5305\u542b name/type/size \u4fe1\u606f\n :return: \u5305\u542b\u5b57\u6bb5\u5b9a\u4e49\u7684\u5217\u8868\uff0c\u6bcf\u4e2a\u5143\u7d20\u4e3a\u5b57\u5178 {\"name\": str, \"type\": str, \"size\": int}\n\n example:\n ```python\n block_data = DmBlockData()\n block_data.open(\"model.dmf\")\n field_defs = block_data.get_field_definitions()\n print(f\"\u6a21\u578b\u5b57\u6bb5\u5b9a\u4e49: {field_defs}\")\n ```\n \"\"\"\n self._check_open()\n return self._block_data.GetFieldDefine()\n</code></pre>"},{"location":"reference/lib/prospecting/block_data.html#dimine_python_sdk.lib.prospecting.block_data.DmBlockData.get_max_level","title":"<code>get_max_level()</code>","text":"<p>\u83b7\u53d6\u6a21\u578b\u7684\u6700\u5927\u7cbe\u5ea6\u5c42\u7ea7 :return: \u6a21\u578b\u7684\u6700\u5927\u7cbe\u5ea6\u5c42\u7ea7\u6574\u6570</p> <p>example:</p> <pre><code>block_data = DmBlockData()\nblock_data.open(\"model.dmf\")\nmax_level = block_data.get_max_level()\nprint(f\"\u6a21\u578b\u6700\u5927\u7cbe\u5ea6\u5c42\u7ea7: {max_level}\")\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\block_data.py</code> <pre><code>def get_max_level(self) -> int:\n \"\"\"\n \u83b7\u53d6\u6a21\u578b\u7684\u6700\u5927\u7cbe\u5ea6\u5c42\u7ea7\n :return: \u6a21\u578b\u7684\u6700\u5927\u7cbe\u5ea6\u5c42\u7ea7\u6574\u6570\n\n example:\n ```python\n block_data = DmBlockData()\n block_data.open(\"model.dmf\")\n max_level = block_data.get_max_level()\n print(f\"\u6a21\u578b\u6700\u5927\u7cbe\u5ea6\u5c42\u7ea7: {max_level}\")\n ```\n \"\"\"\n self._check_open()\n return self._block_data.GetMaxLevel()\n</code></pre>"},{"location":"reference/lib/prospecting/block_data.html#dimine_python_sdk.lib.prospecting.block_data.DmBlockData.get_min_size","title":"<code>get_min_size()</code>","text":"<p>\u83b7\u53d6\u6a21\u578b\u6700\u5c0f\u5757\u6bb5\u7684\u5c3a\u5bf8 (x, y, z) :return: \u5305\u542b\u6700\u5c0f\u5757\u6bb5\u5c3a\u5bf8\u7684\u5217\u8868 [x_size, y_size, z_size]</p> <p>example:</p> <pre><code>block_data = DmBlockData()\nblock_data.open(\"model.dmf\")\nmin_size = block_data.get_min_size()\nprint(f\"\u6a21\u578b\u6700\u5c0f\u5757\u6bb5\u5c3a\u5bf8: {min_size}\")\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\block_data.py</code> <pre><code>def get_min_size(self) -> List[float]:\n \"\"\"\n \u83b7\u53d6\u6a21\u578b\u6700\u5c0f\u5757\u6bb5\u7684\u5c3a\u5bf8 (x, y, z)\n :return: \u5305\u542b\u6700\u5c0f\u5757\u6bb5\u5c3a\u5bf8\u7684\u5217\u8868 [x_size, y_size, z_size]\n\n example:\n ```python\n block_data = DmBlockData()\n block_data.open(\"model.dmf\")\n min_size = block_data.get_min_size()\n print(f\"\u6a21\u578b\u6700\u5c0f\u5757\u6bb5\u5c3a\u5bf8: {min_size}\")\n ```\n \"\"\"\n self._check_open()\n return self._block_data.GetMinSize()\n</code></pre>"},{"location":"reference/lib/prospecting/block_data.html#dimine_python_sdk.lib.prospecting.block_data.DmBlockData.get_origin","title":"<code>get_origin()</code>","text":"<p>\u83b7\u53d6\u6a21\u578b\u539f\u70b9\u5750\u6807 (x, y, z) :return: \u6a21\u578b\u539f\u70b9\u5750\u6807\u70b9\u5bf9\u8c61 example:</p> <pre><code>block_data = DmBlockData()\nblock_data.open(\"model.dmf\")\norigin = block_data.get_origin()\nprint(f\"\u6a21\u578b\u539f\u70b9\u5750\u6807: {origin}\")\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\block_data.py</code> <pre><code>def get_origin(self) -> DmDPoint:\n \"\"\"\n \u83b7\u53d6\u6a21\u578b\u539f\u70b9\u5750\u6807 (x, y, z)\n :return: \u6a21\u578b\u539f\u70b9\u5750\u6807\u70b9\u5bf9\u8c61\n example:\n ```python\n block_data = DmBlockData()\n block_data.open(\"model.dmf\")\n origin = block_data.get_origin()\n print(f\"\u6a21\u578b\u539f\u70b9\u5750\u6807: {origin}\")\n ```\n \"\"\"\n self._check_open()\n cpp_result = self._block_data.GetOrigin()\n return DmDPoint._from_obj(cpp_result)\n</code></pre>"},{"location":"reference/lib/prospecting/block_data.html#dimine_python_sdk.lib.prospecting.block_data.DmBlockData.get_rotation","title":"<code>get_rotation()</code>","text":"<p>\u83b7\u53d6\u6a21\u578b\u7684\u65cb\u8f6c\u89d2\u5ea6 (x, y, z) :return: \u5305\u542b\u65cb\u8f6c\u89d2\u5ea6\u7684\u5217\u8868 [x_angle, y_angle, z_angle]</p> <p>example:</p> <pre><code>block_data = DmBlockData()\nblock_data.open(\"model.dmf\")\nrotation = block_data.get_rotation()\nprint(f\"\u6a21\u578b\u65cb\u8f6c\u89d2\u5ea6: {rotation}\")\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\block_data.py</code> <pre><code>def get_rotation(self) -> List[float]:\n \"\"\"\n \u83b7\u53d6\u6a21\u578b\u7684\u65cb\u8f6c\u89d2\u5ea6 (x, y, z)\n :return: \u5305\u542b\u65cb\u8f6c\u89d2\u5ea6\u7684\u5217\u8868 [x_angle, y_angle, z_angle]\n\n example:\n ```python\n block_data = DmBlockData()\n block_data.open(\"model.dmf\")\n rotation = block_data.get_rotation()\n print(f\"\u6a21\u578b\u65cb\u8f6c\u89d2\u5ea6: {rotation}\")\n ```\n \"\"\"\n self._check_open()\n return self._block_data.GetRotation()\n</code></pre>"},{"location":"reference/lib/prospecting/block_data.html#dimine_python_sdk.lib.prospecting.block_data.DmBlockData.get_total_block_count","title":"<code>get_total_block_count()</code>","text":"<p>\u83b7\u53d6\u6a21\u578b\u4e2d\u5757\u6bb5\u7684\u603b\u6570\u91cf :return: \u6a21\u578b\u4e2d\u5757\u6bb5\u7684\u603b\u6570\u91cf\u6574\u6570</p> <p>example:</p> <pre><code>block_data = DmBlockData()\nblock_data.open(\"model.dmf\")\ntotal_count = block_data.get_total_block_count()\nprint(f\"\u6a21\u578b\u4e2d\u5757\u6bb5\u603b\u6570\u91cf: {total_count}\")\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\block_data.py</code> <pre><code>def get_total_block_count(self) -> int:\n \"\"\"\n \u83b7\u53d6\u6a21\u578b\u4e2d\u5757\u6bb5\u7684\u603b\u6570\u91cf\n :return: \u6a21\u578b\u4e2d\u5757\u6bb5\u7684\u603b\u6570\u91cf\u6574\u6570\n\n example:\n ```python\n block_data = DmBlockData()\n block_data.open(\"model.dmf\")\n total_count = block_data.get_total_block_count()\n print(f\"\u6a21\u578b\u4e2d\u5757\u6bb5\u603b\u6570\u91cf: {total_count}\")\n ```\n \"\"\"\n self._check_open()\n return self._block_data.GetTotalBlockCount()\n</code></pre>"},{"location":"reference/lib/prospecting/block_data.html#dimine_python_sdk.lib.prospecting.block_data.DmBlockData.get_xyz_length","title":"<code>get_xyz_length()</code>","text":"<p>\u83b7\u53d6\u6a21\u578b\u5728 X/Y/Z \u4e09\u4e2a\u65b9\u5411\u7684\u603b\u957f\u5ea6 :return: \u5305\u542b X/Y/Z \u65b9\u5411\u603b\u957f\u5ea6\u7684\u5217\u8868 [x_len, y_len, z_len]</p> <p>example:</p> <pre><code>block_data = DmBlockData()\nblock_data.open(\"model.dmf\")\nxyz_len = block_data.get_xyz_length()\nprint(f\"\u6a21\u578b\u5728 X/Y/Z \u65b9\u5411\u7684\u603b\u957f\u5ea6: {xyz_len}\")\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\block_data.py</code> <pre><code>def get_xyz_length(self) -> List[float]:\n \"\"\"\n \u83b7\u53d6\u6a21\u578b\u5728 X/Y/Z \u4e09\u4e2a\u65b9\u5411\u7684\u603b\u957f\u5ea6\n :return: \u5305\u542b X/Y/Z \u65b9\u5411\u603b\u957f\u5ea6\u7684\u5217\u8868 [x_len, y_len, z_len]\n\n example:\n ```python\n block_data = DmBlockData()\n block_data.open(\"model.dmf\")\n xyz_len = block_data.get_xyz_length()\n print(f\"\u6a21\u578b\u5728 X/Y/Z \u65b9\u5411\u7684\u603b\u957f\u5ea6: {xyz_len}\")\n ```\n \"\"\"\n self._check_open()\n return self._block_data.GetXYZLen()\n</code></pre>"},{"location":"reference/lib/prospecting/block_data.html#dimine_python_sdk.lib.prospecting.block_data.DmBlockData.init_cursor","title":"<code>init_cursor()</code>","text":"<p>\u521d\u59cb\u5316\u5757\u6bb5\u904d\u5386\u6e38\u6807\uff0c\u7528\u4e8e\u904d\u5386\u6240\u6709\u5757\u6bb5 :return: \u521d\u59cb\u5316\u7ed3\u679c\u6574\u6570\uff080 \u8868\u793a\u6210\u529f\uff09</p> <p>example:</p> <pre><code>block_data = DmBlockData()\nblock_data.open(\"model.dmf\")\ncursor = block_data.init_cursor()\nprint(f\"\u521d\u59cb\u5316\u6e38\u6807\u7ed3\u679c: {cursor}\")\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\block_data.py</code> <pre><code>def init_cursor(self) -> int:\n \"\"\"\n \u521d\u59cb\u5316\u5757\u6bb5\u904d\u5386\u6e38\u6807\uff0c\u7528\u4e8e\u904d\u5386\u6240\u6709\u5757\u6bb5\n :return: \u521d\u59cb\u5316\u7ed3\u679c\u6574\u6570\uff080 \u8868\u793a\u6210\u529f\uff09\n\n example:\n ```python\n block_data = DmBlockData()\n block_data.open(\"model.dmf\")\n cursor = block_data.init_cursor()\n print(f\"\u521d\u59cb\u5316\u6e38\u6807\u7ed3\u679c: {cursor}\")\n ```\n \"\"\"\n self._check_open()\n return self._block_data.InitCursor()\n</code></pre>"},{"location":"reference/lib/prospecting/block_data.html#dimine_python_sdk.lib.prospecting.block_data.DmBlockData.is_beyond_boundary","title":"<code>is_beyond_boundary()</code>","text":"<p>\u68c0\u67e5\u5f53\u524d\u6e38\u6807\u662f\u5426\u8d85\u51fa\u6a21\u578b\u8fb9\u754c :return: \u662f\u5426\u8d85\u51fa\u8fb9\u754c\uff08True/False\uff09</p> <p>example:</p> <pre><code>block_data = DmBlockData()\nblock_data.open(\"model.dmf\")\ncursor = block_data.init_cursor()\nwhile block_data.advance_cursor():\n if block_data.is_beyond_boundary():\n print(\"\u6e38\u6807\u8d85\u51fa\u6a21\u578b\u8fb9\u754c\")\n break\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\block_data.py</code> <pre><code>def is_beyond_boundary(self) -> bool:\n \"\"\"\n \u68c0\u67e5\u5f53\u524d\u6e38\u6807\u662f\u5426\u8d85\u51fa\u6a21\u578b\u8fb9\u754c\n :return: \u662f\u5426\u8d85\u51fa\u8fb9\u754c\uff08True/False\uff09\n\n example:\n ```python\n block_data = DmBlockData()\n block_data.open(\"model.dmf\")\n cursor = block_data.init_cursor()\n while block_data.advance_cursor():\n if block_data.is_beyond_boundary():\n print(\"\u6e38\u6807\u8d85\u51fa\u6a21\u578b\u8fb9\u754c\")\n break\n ```\n \"\"\"\n self._check_open()\n return self._block_data.IsBeyondBoundaryNode()\n</code></pre>"},{"location":"reference/lib/prospecting/block_data.html#dimine_python_sdk.lib.prospecting.block_data.DmBlockData.open","title":"<code>open(file_path)</code>","text":"<p>\u52a0\u8f7d\u5757\u6bb5\u6a21\u578b\u6587\u4ef6 :param file_path: \u5757\u6bb5\u6a21\u578b\u6587\u4ef6\u8def\u5f84\uff08\u81ea\u52a8\u5904\u7406\u7f16\u7801\u8f6c\u6362\uff09 :raises RuntimeError: \u52a0\u8f7d\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38</p> <p>:result: \u662f\u5426\u6210\u529f\u52a0\u8f7d\u6a21\u578b</p> <p>example:</p> <pre><code>block_data = DmBlockData()\nsuccess = block_data.open(\"model.dmf\")\nif success:\n print(\"\u6a21\u578b\u52a0\u8f7d\u6210\u529f\")\nelse:\n print(\"\u6a21\u578b\u52a0\u8f7d\u5931\u8d25\")\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\block_data.py</code> <pre><code>def open(self, file_path: str) -> bool:\n \"\"\"\n \u52a0\u8f7d\u5757\u6bb5\u6a21\u578b\u6587\u4ef6\n :param file_path: \u5757\u6bb5\u6a21\u578b\u6587\u4ef6\u8def\u5f84\uff08\u81ea\u52a8\u5904\u7406\u7f16\u7801\u8f6c\u6362\uff09\n :raises RuntimeError: \u52a0\u8f7d\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38\n\n :result: \u662f\u5426\u6210\u529f\u52a0\u8f7d\u6a21\u578b\n\n example:\n ```python\n block_data = DmBlockData()\n success = block_data.open(\"model.dmf\")\n if success:\n print(\"\u6a21\u578b\u52a0\u8f7d\u6210\u529f\")\n else:\n print(\"\u6a21\u578b\u52a0\u8f7d\u5931\u8d25\")\n ```\n \"\"\"\n result = self._block_data.Open(file_path)\n if not result:\n raise RuntimeError(f\"\u52a0\u8f7d\u5757\u6bb5\u6a21\u578b\u5931\u8d25: {file_path}\")\n self._is_open = True\n return result\n</code></pre>"},{"location":"reference/lib/prospecting/drill_db.html","title":"drill_db","text":""},{"location":"reference/lib/prospecting/drill_db.html#dimine_python_sdk.lib.prospecting.drill_db.DmGeoDrillData","title":"<code>DmGeoDrillData</code>","text":"<p>\u4e8c\u6b21\u5c01\u88c5 CGeoDrillDataNew (dmGeoDrillData) \u7c7b</p> Source code in <code>dimine_python_sdk\\lib\\prospecting\\drill_db.py</code> <pre><code>class DmGeoDrillData:\n \"\"\"\n \u4e8c\u6b21\u5c01\u88c5 CGeoDrillDataNew (dmGeoDrillData) \u7c7b\n \"\"\"\n def __init__(self):\n # \u521d\u59cb\u5316\u5e95\u5c42\u5bf9\u8c61\n self._geo_drill = Dm.dmGeoDrillData()\n\n def load(self, file_path: Union[str, Path]) -> bool:\n \"\"\"\n \u52a0\u8f7d\u94bb\u5b54\u6570\u636e\u5e93\u6587\u4ef6\n :param file_path: DMF \u6587\u4ef6\u8def\u5f84\uff08\u81ea\u52a8\u5904\u7406\u7f16\u7801\u8f6c\u6362\uff09\n :raises RuntimeError: \u52a0\u8f7d\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38\n\n :return: \u662f\u5426\u6210\u529f\u52a0\u8f7d\n\n example:\n ```python\n drill_db = DmGeoDrillData()\n success = drill_db.load(\"model.dmf\")\n if success:\n print(\"\u6210\u529f\u52a0\u8f7d\u94bb\u5b54\u6570\u636e\u5e93\")\n ```\n \"\"\"\n result = self._geo_drill.Load(file_path)\n if not result:\n raise RuntimeError(f\"\u52a0\u8f7d\u94bb\u5b54\u6570\u636e\u5e93\u5931\u8d25: {file_path}\")\n return result\n\n def save(self, file_path: Union[str, Path]) -> bool:\n \"\"\"\n \u4fdd\u5b58\u94bb\u5b54\u6570\u636e\u5e93\u5230\u6587\u4ef6\n :param file_path: \u4fdd\u5b58\u8def\u5f84\uff08\u81ea\u52a8\u5904\u7406\u7f16\u7801\u8f6c\u6362\uff09\n :raises RuntimeError: \u4fdd\u5b58\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38\n :return: \u662f\u5426\u6210\u529f\u4fdd\u5b58\n\n example:\n ```python\n drill_db = DmGeoDrillData()\n success = drill_db.load(\"model.dmf\")\n if success:\n print(\"\u6210\u529f\u52a0\u8f7d\u94bb\u5b54\u6570\u636e\u5e93\")\n success = drill_db.save(\"model.dmf\")\n if success:\n print(\"\u6210\u529f\u4fdd\u5b58\u94bb\u5b54\u6570\u636e\u5e93\")\n ```\n \"\"\"\n result = self._geo_drill.Save(file_path)\n if not result:\n raise RuntimeError(f\"\u4fdd\u5b58\u94bb\u5b54\u6570\u636e\u5e93\u5931\u8d25: {file_path}\")\n return result\n\n def get_drill_db_manager(self) -> DrillDBManager:\n \"\"\"\n \u83b7\u53d6\u94bb\u5b54\u6570\u636e\u5e93\u7ba1\u7406\u5668\u5b9e\u4f8b\n :return: DrillDBManager\u5b9e\u4f8b\n\n example:\n ```python\n drill_db = DmGeoDrillData()\n success = drill_db.load(\"model.dmf\")\n if success:\n print(\"\u6210\u529f\u52a0\u8f7d\u94bb\u5b54\u6570\u636e\u5e93\")\n db_manager = drill_db.get_drill_db_manager()\n print(f\"\u94bb\u5b54\u6570\u91cf: {db_manager.get_drill_count()}\")\n ```\n \"\"\"\n db_manager = self._geo_drill.GetDrillDBManager()\n if not db_manager:\n raise RuntimeError(\"\u94bb\u5b54\u6570\u636e\u5e93\u7ba1\u7406\u5668\u83b7\u53d6\u5931\u8d25\")\n return DrillDBManager._from_obj(db_manager)\n\n def get_collar_table(self) -> DmDataTable:\n \"\"\"\u83b7\u53d6\u94bb\u5b54\u5b54\u53e3\u8868 (Collar Table)\n :return: \u5b54\u53e3\u8868\u6570\u636e\uff08DmDataTable\u5b9e\u4f8b\uff09\n\n example:\n ```python\n drill_db = DmGeoDrillData()\n success = drill_db.load(\"model.dmf\")\n if success:\n print(\"\u6210\u529f\u52a0\u8f7d\u94bb\u5b54\u6570\u636e\u5e93\")\n collar_table = drill_db.get_collar_table()\n print(f\"\u5b54\u53e3\u8868\u5b57\u6bb5\u6570: {collar_table.get_field_count()}\")\n ```\n \"\"\"\n if not self._geo_drill:\n raise RuntimeError(\"\u6570\u636e\u5e93\u672a\u52a0\u8f7d\")\n cpp_result = self._geo_drill.GetCollarTable()\n return DmDataTable._from_obj(cpp_result)\n\n def get_survey_table(self) -> DmDataTable:\n \"\"\"\u83b7\u53d6\u94bb\u5b54\u6d4b\u659c\u8868 (Survey Table)\n :return: \u6d4b\u659c\u8868\u6570\u636e\uff08DmDataTable\u5b9e\u4f8b\uff09\n\n example:\n ```python\n drill_db = DmGeoDrillData()\n success = drill_db.load(\"model.dmf\")\n if success:\n print(\"\u6210\u529f\u52a0\u8f7d\u94bb\u5b54\u6570\u636e\u5e93\")\n survey_table = drill_db.get_survey_table()\n print(f\"\u6d4b\u659c\u8868\u5b57\u6bb5\u6570: {survey_table.get_field_count()}\")\n ```\n \"\"\"\n if not self._geo_drill:\n raise RuntimeError(\"\u6570\u636e\u5e93\u672a\u52a0\u8f7d\")\n cpp_result = self._geo_drill.GetSurveyTable()\n return DmDataTable._from_obj(cpp_result)\n\n def get_lithology_table(self) -> DmDataTable:\n \"\"\"\u83b7\u53d6\u94bb\u5b54\u5ca9\u6027\u8868 (Lithology Table)\n :return: \u5ca9\u6027\u8868\u6570\u636e\uff08DmDataTable\u5b9e\u4f8b\uff09\n\n example:\n ```python\n drill_db = DmGeoDrillData()\n success = drill_db.load(\"model.dmf\")\n if success:\n print(\"\u6210\u529f\u52a0\u8f7d\u94bb\u5b54\u6570\u636e\u5e93\")\n lithology_table = drill_db.get_lithology_table()\n print(f\"\u5ca9\u6027\u8868\u5b57\u6bb5\u6570: {lithology_table.get_field_count()}\")\n ```\n \"\"\"\n if not self._geo_drill:\n raise RuntimeError(\"\u6570\u636e\u5e93\u672a\u52a0\u8f7d\")\n cpp_result = self._geo_drill.GetLithologyTable()\n return DmDataTable._from_obj(cpp_result)\n</code></pre>"},{"location":"reference/lib/prospecting/drill_db.html#dimine_python_sdk.lib.prospecting.drill_db.DmGeoDrillData.get_collar_table","title":"<code>get_collar_table()</code>","text":"<p>\u83b7\u53d6\u94bb\u5b54\u5b54\u53e3\u8868 (Collar Table) :return: \u5b54\u53e3\u8868\u6570\u636e\uff08DmDataTable\u5b9e\u4f8b\uff09</p> <p>example:</p> <pre><code>drill_db = DmGeoDrillData()\nsuccess = drill_db.load(\"model.dmf\")\nif success:\n print(\"\u6210\u529f\u52a0\u8f7d\u94bb\u5b54\u6570\u636e\u5e93\")\n collar_table = drill_db.get_collar_table()\n print(f\"\u5b54\u53e3\u8868\u5b57\u6bb5\u6570: {collar_table.get_field_count()}\")\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\drill_db.py</code> <pre><code>def get_collar_table(self) -> DmDataTable:\n \"\"\"\u83b7\u53d6\u94bb\u5b54\u5b54\u53e3\u8868 (Collar Table)\n :return: \u5b54\u53e3\u8868\u6570\u636e\uff08DmDataTable\u5b9e\u4f8b\uff09\n\n example:\n ```python\n drill_db = DmGeoDrillData()\n success = drill_db.load(\"model.dmf\")\n if success:\n print(\"\u6210\u529f\u52a0\u8f7d\u94bb\u5b54\u6570\u636e\u5e93\")\n collar_table = drill_db.get_collar_table()\n print(f\"\u5b54\u53e3\u8868\u5b57\u6bb5\u6570: {collar_table.get_field_count()}\")\n ```\n \"\"\"\n if not self._geo_drill:\n raise RuntimeError(\"\u6570\u636e\u5e93\u672a\u52a0\u8f7d\")\n cpp_result = self._geo_drill.GetCollarTable()\n return DmDataTable._from_obj(cpp_result)\n</code></pre>"},{"location":"reference/lib/prospecting/drill_db.html#dimine_python_sdk.lib.prospecting.drill_db.DmGeoDrillData.get_drill_db_manager","title":"<code>get_drill_db_manager()</code>","text":"<p>\u83b7\u53d6\u94bb\u5b54\u6570\u636e\u5e93\u7ba1\u7406\u5668\u5b9e\u4f8b :return: DrillDBManager\u5b9e\u4f8b</p> <p>example:</p> <pre><code>drill_db = DmGeoDrillData()\nsuccess = drill_db.load(\"model.dmf\")\nif success:\n print(\"\u6210\u529f\u52a0\u8f7d\u94bb\u5b54\u6570\u636e\u5e93\")\n db_manager = drill_db.get_drill_db_manager()\n print(f\"\u94bb\u5b54\u6570\u91cf: {db_manager.get_drill_count()}\")\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\drill_db.py</code> <pre><code>def get_drill_db_manager(self) -> DrillDBManager:\n \"\"\"\n \u83b7\u53d6\u94bb\u5b54\u6570\u636e\u5e93\u7ba1\u7406\u5668\u5b9e\u4f8b\n :return: DrillDBManager\u5b9e\u4f8b\n\n example:\n ```python\n drill_db = DmGeoDrillData()\n success = drill_db.load(\"model.dmf\")\n if success:\n print(\"\u6210\u529f\u52a0\u8f7d\u94bb\u5b54\u6570\u636e\u5e93\")\n db_manager = drill_db.get_drill_db_manager()\n print(f\"\u94bb\u5b54\u6570\u91cf: {db_manager.get_drill_count()}\")\n ```\n \"\"\"\n db_manager = self._geo_drill.GetDrillDBManager()\n if not db_manager:\n raise RuntimeError(\"\u94bb\u5b54\u6570\u636e\u5e93\u7ba1\u7406\u5668\u83b7\u53d6\u5931\u8d25\")\n return DrillDBManager._from_obj(db_manager)\n</code></pre>"},{"location":"reference/lib/prospecting/drill_db.html#dimine_python_sdk.lib.prospecting.drill_db.DmGeoDrillData.get_lithology_table","title":"<code>get_lithology_table()</code>","text":"<p>\u83b7\u53d6\u94bb\u5b54\u5ca9\u6027\u8868 (Lithology Table) :return: \u5ca9\u6027\u8868\u6570\u636e\uff08DmDataTable\u5b9e\u4f8b\uff09</p> <p>example:</p> <pre><code>drill_db = DmGeoDrillData()\nsuccess = drill_db.load(\"model.dmf\")\nif success:\n print(\"\u6210\u529f\u52a0\u8f7d\u94bb\u5b54\u6570\u636e\u5e93\")\n lithology_table = drill_db.get_lithology_table()\n print(f\"\u5ca9\u6027\u8868\u5b57\u6bb5\u6570: {lithology_table.get_field_count()}\")\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\drill_db.py</code> <pre><code>def get_lithology_table(self) -> DmDataTable:\n \"\"\"\u83b7\u53d6\u94bb\u5b54\u5ca9\u6027\u8868 (Lithology Table)\n :return: \u5ca9\u6027\u8868\u6570\u636e\uff08DmDataTable\u5b9e\u4f8b\uff09\n\n example:\n ```python\n drill_db = DmGeoDrillData()\n success = drill_db.load(\"model.dmf\")\n if success:\n print(\"\u6210\u529f\u52a0\u8f7d\u94bb\u5b54\u6570\u636e\u5e93\")\n lithology_table = drill_db.get_lithology_table()\n print(f\"\u5ca9\u6027\u8868\u5b57\u6bb5\u6570: {lithology_table.get_field_count()}\")\n ```\n \"\"\"\n if not self._geo_drill:\n raise RuntimeError(\"\u6570\u636e\u5e93\u672a\u52a0\u8f7d\")\n cpp_result = self._geo_drill.GetLithologyTable()\n return DmDataTable._from_obj(cpp_result)\n</code></pre>"},{"location":"reference/lib/prospecting/drill_db.html#dimine_python_sdk.lib.prospecting.drill_db.DmGeoDrillData.get_survey_table","title":"<code>get_survey_table()</code>","text":"<p>\u83b7\u53d6\u94bb\u5b54\u6d4b\u659c\u8868 (Survey Table) :return: \u6d4b\u659c\u8868\u6570\u636e\uff08DmDataTable\u5b9e\u4f8b\uff09</p> <p>example:</p> <pre><code>drill_db = DmGeoDrillData()\nsuccess = drill_db.load(\"model.dmf\")\nif success:\n print(\"\u6210\u529f\u52a0\u8f7d\u94bb\u5b54\u6570\u636e\u5e93\")\n survey_table = drill_db.get_survey_table()\n print(f\"\u6d4b\u659c\u8868\u5b57\u6bb5\u6570: {survey_table.get_field_count()}\")\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\drill_db.py</code> <pre><code>def get_survey_table(self) -> DmDataTable:\n \"\"\"\u83b7\u53d6\u94bb\u5b54\u6d4b\u659c\u8868 (Survey Table)\n :return: \u6d4b\u659c\u8868\u6570\u636e\uff08DmDataTable\u5b9e\u4f8b\uff09\n\n example:\n ```python\n drill_db = DmGeoDrillData()\n success = drill_db.load(\"model.dmf\")\n if success:\n print(\"\u6210\u529f\u52a0\u8f7d\u94bb\u5b54\u6570\u636e\u5e93\")\n survey_table = drill_db.get_survey_table()\n print(f\"\u6d4b\u659c\u8868\u5b57\u6bb5\u6570: {survey_table.get_field_count()}\")\n ```\n \"\"\"\n if not self._geo_drill:\n raise RuntimeError(\"\u6570\u636e\u5e93\u672a\u52a0\u8f7d\")\n cpp_result = self._geo_drill.GetSurveyTable()\n return DmDataTable._from_obj(cpp_result)\n</code></pre>"},{"location":"reference/lib/prospecting/drill_db.html#dimine_python_sdk.lib.prospecting.drill_db.DmGeoDrillData.load","title":"<code>load(file_path)</code>","text":"<p>\u52a0\u8f7d\u94bb\u5b54\u6570\u636e\u5e93\u6587\u4ef6 :param file_path: DMF \u6587\u4ef6\u8def\u5f84\uff08\u81ea\u52a8\u5904\u7406\u7f16\u7801\u8f6c\u6362\uff09 :raises RuntimeError: \u52a0\u8f7d\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38</p> <p>:return: \u662f\u5426\u6210\u529f\u52a0\u8f7d</p> <p>example:</p> <pre><code>drill_db = DmGeoDrillData()\nsuccess = drill_db.load(\"model.dmf\")\nif success:\n print(\"\u6210\u529f\u52a0\u8f7d\u94bb\u5b54\u6570\u636e\u5e93\")\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\drill_db.py</code> <pre><code>def load(self, file_path: Union[str, Path]) -> bool:\n \"\"\"\n \u52a0\u8f7d\u94bb\u5b54\u6570\u636e\u5e93\u6587\u4ef6\n :param file_path: DMF \u6587\u4ef6\u8def\u5f84\uff08\u81ea\u52a8\u5904\u7406\u7f16\u7801\u8f6c\u6362\uff09\n :raises RuntimeError: \u52a0\u8f7d\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38\n\n :return: \u662f\u5426\u6210\u529f\u52a0\u8f7d\n\n example:\n ```python\n drill_db = DmGeoDrillData()\n success = drill_db.load(\"model.dmf\")\n if success:\n print(\"\u6210\u529f\u52a0\u8f7d\u94bb\u5b54\u6570\u636e\u5e93\")\n ```\n \"\"\"\n result = self._geo_drill.Load(file_path)\n if not result:\n raise RuntimeError(f\"\u52a0\u8f7d\u94bb\u5b54\u6570\u636e\u5e93\u5931\u8d25: {file_path}\")\n return result\n</code></pre>"},{"location":"reference/lib/prospecting/drill_db.html#dimine_python_sdk.lib.prospecting.drill_db.DmGeoDrillData.save","title":"<code>save(file_path)</code>","text":"<p>\u4fdd\u5b58\u94bb\u5b54\u6570\u636e\u5e93\u5230\u6587\u4ef6 :param file_path: \u4fdd\u5b58\u8def\u5f84\uff08\u81ea\u52a8\u5904\u7406\u7f16\u7801\u8f6c\u6362\uff09 :raises RuntimeError: \u4fdd\u5b58\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38 :return: \u662f\u5426\u6210\u529f\u4fdd\u5b58</p> <p>example:</p> <pre><code>drill_db = DmGeoDrillData()\nsuccess = drill_db.load(\"model.dmf\")\nif success:\n print(\"\u6210\u529f\u52a0\u8f7d\u94bb\u5b54\u6570\u636e\u5e93\")\n success = drill_db.save(\"model.dmf\")\n if success:\n print(\"\u6210\u529f\u4fdd\u5b58\u94bb\u5b54\u6570\u636e\u5e93\")\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\drill_db.py</code> <pre><code>def save(self, file_path: Union[str, Path]) -> bool:\n \"\"\"\n \u4fdd\u5b58\u94bb\u5b54\u6570\u636e\u5e93\u5230\u6587\u4ef6\n :param file_path: \u4fdd\u5b58\u8def\u5f84\uff08\u81ea\u52a8\u5904\u7406\u7f16\u7801\u8f6c\u6362\uff09\n :raises RuntimeError: \u4fdd\u5b58\u5931\u8d25\u65f6\u629b\u51fa\u5f02\u5e38\n :return: \u662f\u5426\u6210\u529f\u4fdd\u5b58\n\n example:\n ```python\n drill_db = DmGeoDrillData()\n success = drill_db.load(\"model.dmf\")\n if success:\n print(\"\u6210\u529f\u52a0\u8f7d\u94bb\u5b54\u6570\u636e\u5e93\")\n success = drill_db.save(\"model.dmf\")\n if success:\n print(\"\u6210\u529f\u4fdd\u5b58\u94bb\u5b54\u6570\u636e\u5e93\")\n ```\n \"\"\"\n result = self._geo_drill.Save(file_path)\n if not result:\n raise RuntimeError(f\"\u4fdd\u5b58\u94bb\u5b54\u6570\u636e\u5e93\u5931\u8d25: {file_path}\")\n return result\n</code></pre>"},{"location":"reference/lib/prospecting/drill_db.html#dimine_python_sdk.lib.prospecting.drill_db.DrillDBManager","title":"<code>DrillDBManager</code>","text":"<p>\u4e8c\u6b21\u5c01\u88c5 CDrillDBManager \u7c7b\uff0c\u63d0\u4f9b Python \u5316\u7684\u94bb\u5b54\u6570\u636e\u5e93\u7ba1\u7406\u63a5\u53e3</p> Source code in <code>dimine_python_sdk\\lib\\prospecting\\drill_db.py</code> <pre><code>class DrillDBManager:\n \"\"\"\n \u4e8c\u6b21\u5c01\u88c5 CDrillDBManager \u7c7b\uff0c\u63d0\u4f9b Python \u5316\u7684\u94bb\u5b54\u6570\u636e\u5e93\u7ba1\u7406\u63a5\u53e3\n \"\"\"\n\n @classmethod\n def _from_obj(cls, obj):\n \"\"\"\n \u539f\u751fCDrillDBManager\u5bf9\u8c61\u521b\u5efa\u5c01\u88c5\u5b9e\u4f8b\n :param obj: \u539f\u751fCDrillDBManager\u5bf9\u8c61\uff08bind11\u5c01\u88c5\u540e\uff09\n :return: CDrillDBManager\u5b9e\u4f8b\n \"\"\"\n instance = cls.__new__(cls)\n instance._manager = obj\n return instance\n\n def get_drill_count(self) -> int:\n \"\"\"\n \u83b7\u53d6\u94bb\u5b54\u6570\u91cf\n :return: \u94bb\u5b54\u6570\u91cf\n\n example:\n ```python\n drill_manager = drill_db.get_drill_db_manager()\n print(\"\u94bb\u5b54\u6570\u91cf:\", drill_manager.get_drill_count())\n ```\n \"\"\"\n return self._manager.GetDrillCount()\n\n def get_total_length(self) -> float:\n \"\"\"\n \u83b7\u53d6\u94bb\u5b54\u603b\u957f\u5ea6\n :return: \u94bb\u5b54\u603b\u957f\u5ea6\n\n example:\n ```python\n drill_manager = drill_db.get_drill_db_manager()\n print(\"\u94bb\u5b54\u603b\u957f\u5ea6:\", drill_manager.get_total_length())\n ```\n \"\"\"\n return self._manager.GetTotalLength()\n\n def get_base_table(self, table_mark: str) -> DmDataTable:\n \"\"\"\n \u83b7\u53d6\u57fa\u7840\u8868\n :param table_mark: \u8868\u6807\u8bc6\uff08\u4f8b\u5982 \"collar\", \"survey\", \"lithology\"\uff09\n :return: \u57fa\u7840\u8868\u6570\u636e\uff08DmDataTable\u5b9e\u4f8b\uff09\n\n example:\n ```python\n drill_manager = drill_db.get_drill_db_manager()\n collar_table = drill_manager.get_base_table(\"collar\")\n ```\n \"\"\"\n cpp_result = self._manager.GetBaseTable(table_mark)\n return DmDataTable._from_obj(cpp_result)\n\n def get_added_table(self, table_mark: str) -> DmDataTable:\n \"\"\"\n \u83b7\u53d6\u9644\u52a0\u8868\n :param table_mark: \u8868\u6807\u8bc6\uff08\u4f8b\u5982 \"collar\", \"survey\", \"lithology\"\uff09\n :return: \u9644\u52a0\u8868\u6570\u636e\uff08DmDataTable\u5b9e\u4f8b\uff09\n\n example:\n ```python\n drill_manager = drill_db.get_drill_db_manager()\n survey_table = drill_manager.get_added_table(\"survey\")\n ```\n \"\"\"\n cpp_result = self._manager.GetAddedTable(table_mark)\n return DmDataTable._from_obj(cpp_result)\n\n def get_added_table_count(self) -> int:\n \"\"\"\n \u83b7\u53d6\u9644\u52a0\u8868\u6570\u91cf\n :return: \u9644\u52a0\u8868\u6570\u91cf\n\n example:\n ```python\n drill_manager = drill_db.get_drill_db_manager()\n print(\"\u9644\u52a0\u8868\u6570\u91cf:\", drill_manager.get_added_table_count())\n ```\n \"\"\"\n return self._manager.GetAddedTableCount()\n\n def get_collar_table_def(self) -> Dict[str, Any]:\n \"\"\"\n \u83b7\u53d6\u5b54\u53e3\u8868\u7ed3\u6784\u5b9a\u4e49\n :return: \u5b54\u53e3\u8868\u7ed3\u6784\u5b9a\u4e49\uff08\u5b57\u5178\uff09\n\n example:\n ```python\n drill_manager = drill_db.get_drill_db_manager()\n collar_def = drill_manager.get_collar_table_def()\n print(\"\u5b54\u53e3\u8868\u5b57\u6bb5\u6570:\", collar_def)\n ```\n \"\"\"\n return self._manager.GetCollarTableDefine()\n\n def get_survey_table_def(self) -> Dict[str, Any]:\n \"\"\"\n \u83b7\u53d6\u6d4b\u659c\u8868\u7ed3\u6784\u5b9a\u4e49\n :return: \u6d4b\u659c\u8868\u7ed3\u6784\u5b9a\u4e49\uff08\u5b57\u5178\uff09\n\n example:\n ```python\n drill_manager = drill_db.get_drill_db_manager()\n survey_def = drill_manager.get_survey_table_def()\n print(\"\u6d4b\u659c\u8868\u5b57\u6bb5\u6570:\",survey_def)\n ```\n \"\"\"\n return self._manager.GetSurveryTableDefine()\n\n def get_lithology_table_def(self) -> Dict[str, Any]:\n \"\"\"\n \u83b7\u53d6\u5ca9\u6027\u8868\u7ed3\u6784\u5b9a\u4e49\n :return: \u5ca9\u6027\u8868\u7ed3\u6784\u5b9a\u4e49\uff08\u5b57\u5178\uff09\n\n example:\n ```python\n drill_manager = drill_db.get_drill_db_manager()\n lithology_def = drill_manager.get_lithology_table_def()\n print(\"\u5ca9\u6027\u8868\u5b57\u6bb5\u6570:\", lithology_def)\n ```\n \"\"\"\n return self._manager.GetLithologyTableDefine()\n</code></pre>"},{"location":"reference/lib/prospecting/drill_db.html#dimine_python_sdk.lib.prospecting.drill_db.DrillDBManager.get_added_table","title":"<code>get_added_table(table_mark)</code>","text":"<p>\u83b7\u53d6\u9644\u52a0\u8868 :param table_mark: \u8868\u6807\u8bc6\uff08\u4f8b\u5982 \"collar\", \"survey\", \"lithology\"\uff09 :return: \u9644\u52a0\u8868\u6570\u636e\uff08DmDataTable\u5b9e\u4f8b\uff09</p> <p>example:</p> <pre><code>drill_manager = drill_db.get_drill_db_manager()\nsurvey_table = drill_manager.get_added_table(\"survey\")\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\drill_db.py</code> <pre><code>def get_added_table(self, table_mark: str) -> DmDataTable:\n \"\"\"\n \u83b7\u53d6\u9644\u52a0\u8868\n :param table_mark: \u8868\u6807\u8bc6\uff08\u4f8b\u5982 \"collar\", \"survey\", \"lithology\"\uff09\n :return: \u9644\u52a0\u8868\u6570\u636e\uff08DmDataTable\u5b9e\u4f8b\uff09\n\n example:\n ```python\n drill_manager = drill_db.get_drill_db_manager()\n survey_table = drill_manager.get_added_table(\"survey\")\n ```\n \"\"\"\n cpp_result = self._manager.GetAddedTable(table_mark)\n return DmDataTable._from_obj(cpp_result)\n</code></pre>"},{"location":"reference/lib/prospecting/drill_db.html#dimine_python_sdk.lib.prospecting.drill_db.DrillDBManager.get_added_table_count","title":"<code>get_added_table_count()</code>","text":"<p>\u83b7\u53d6\u9644\u52a0\u8868\u6570\u91cf :return: \u9644\u52a0\u8868\u6570\u91cf</p> <p>example:</p> <pre><code>drill_manager = drill_db.get_drill_db_manager()\nprint(\"\u9644\u52a0\u8868\u6570\u91cf:\", drill_manager.get_added_table_count())\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\drill_db.py</code> <pre><code>def get_added_table_count(self) -> int:\n \"\"\"\n \u83b7\u53d6\u9644\u52a0\u8868\u6570\u91cf\n :return: \u9644\u52a0\u8868\u6570\u91cf\n\n example:\n ```python\n drill_manager = drill_db.get_drill_db_manager()\n print(\"\u9644\u52a0\u8868\u6570\u91cf:\", drill_manager.get_added_table_count())\n ```\n \"\"\"\n return self._manager.GetAddedTableCount()\n</code></pre>"},{"location":"reference/lib/prospecting/drill_db.html#dimine_python_sdk.lib.prospecting.drill_db.DrillDBManager.get_base_table","title":"<code>get_base_table(table_mark)</code>","text":"<p>\u83b7\u53d6\u57fa\u7840\u8868 :param table_mark: \u8868\u6807\u8bc6\uff08\u4f8b\u5982 \"collar\", \"survey\", \"lithology\"\uff09 :return: \u57fa\u7840\u8868\u6570\u636e\uff08DmDataTable\u5b9e\u4f8b\uff09</p> <p>example:</p> <pre><code>drill_manager = drill_db.get_drill_db_manager()\ncollar_table = drill_manager.get_base_table(\"collar\")\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\drill_db.py</code> <pre><code>def get_base_table(self, table_mark: str) -> DmDataTable:\n \"\"\"\n \u83b7\u53d6\u57fa\u7840\u8868\n :param table_mark: \u8868\u6807\u8bc6\uff08\u4f8b\u5982 \"collar\", \"survey\", \"lithology\"\uff09\n :return: \u57fa\u7840\u8868\u6570\u636e\uff08DmDataTable\u5b9e\u4f8b\uff09\n\n example:\n ```python\n drill_manager = drill_db.get_drill_db_manager()\n collar_table = drill_manager.get_base_table(\"collar\")\n ```\n \"\"\"\n cpp_result = self._manager.GetBaseTable(table_mark)\n return DmDataTable._from_obj(cpp_result)\n</code></pre>"},{"location":"reference/lib/prospecting/drill_db.html#dimine_python_sdk.lib.prospecting.drill_db.DrillDBManager.get_collar_table_def","title":"<code>get_collar_table_def()</code>","text":"<p>\u83b7\u53d6\u5b54\u53e3\u8868\u7ed3\u6784\u5b9a\u4e49 :return: \u5b54\u53e3\u8868\u7ed3\u6784\u5b9a\u4e49\uff08\u5b57\u5178\uff09</p> <p>example:</p> <pre><code>drill_manager = drill_db.get_drill_db_manager()\ncollar_def = drill_manager.get_collar_table_def()\nprint(\"\u5b54\u53e3\u8868\u5b57\u6bb5\u6570:\", collar_def)\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\drill_db.py</code> <pre><code>def get_collar_table_def(self) -> Dict[str, Any]:\n \"\"\"\n \u83b7\u53d6\u5b54\u53e3\u8868\u7ed3\u6784\u5b9a\u4e49\n :return: \u5b54\u53e3\u8868\u7ed3\u6784\u5b9a\u4e49\uff08\u5b57\u5178\uff09\n\n example:\n ```python\n drill_manager = drill_db.get_drill_db_manager()\n collar_def = drill_manager.get_collar_table_def()\n print(\"\u5b54\u53e3\u8868\u5b57\u6bb5\u6570:\", collar_def)\n ```\n \"\"\"\n return self._manager.GetCollarTableDefine()\n</code></pre>"},{"location":"reference/lib/prospecting/drill_db.html#dimine_python_sdk.lib.prospecting.drill_db.DrillDBManager.get_drill_count","title":"<code>get_drill_count()</code>","text":"<p>\u83b7\u53d6\u94bb\u5b54\u6570\u91cf :return: \u94bb\u5b54\u6570\u91cf</p> <p>example:</p> <pre><code>drill_manager = drill_db.get_drill_db_manager()\nprint(\"\u94bb\u5b54\u6570\u91cf:\", drill_manager.get_drill_count())\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\drill_db.py</code> <pre><code>def get_drill_count(self) -> int:\n \"\"\"\n \u83b7\u53d6\u94bb\u5b54\u6570\u91cf\n :return: \u94bb\u5b54\u6570\u91cf\n\n example:\n ```python\n drill_manager = drill_db.get_drill_db_manager()\n print(\"\u94bb\u5b54\u6570\u91cf:\", drill_manager.get_drill_count())\n ```\n \"\"\"\n return self._manager.GetDrillCount()\n</code></pre>"},{"location":"reference/lib/prospecting/drill_db.html#dimine_python_sdk.lib.prospecting.drill_db.DrillDBManager.get_lithology_table_def","title":"<code>get_lithology_table_def()</code>","text":"<p>\u83b7\u53d6\u5ca9\u6027\u8868\u7ed3\u6784\u5b9a\u4e49 :return: \u5ca9\u6027\u8868\u7ed3\u6784\u5b9a\u4e49\uff08\u5b57\u5178\uff09</p> <p>example:</p> <pre><code>drill_manager = drill_db.get_drill_db_manager()\nlithology_def = drill_manager.get_lithology_table_def()\nprint(\"\u5ca9\u6027\u8868\u5b57\u6bb5\u6570:\", lithology_def)\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\drill_db.py</code> <pre><code>def get_lithology_table_def(self) -> Dict[str, Any]:\n \"\"\"\n \u83b7\u53d6\u5ca9\u6027\u8868\u7ed3\u6784\u5b9a\u4e49\n :return: \u5ca9\u6027\u8868\u7ed3\u6784\u5b9a\u4e49\uff08\u5b57\u5178\uff09\n\n example:\n ```python\n drill_manager = drill_db.get_drill_db_manager()\n lithology_def = drill_manager.get_lithology_table_def()\n print(\"\u5ca9\u6027\u8868\u5b57\u6bb5\u6570:\", lithology_def)\n ```\n \"\"\"\n return self._manager.GetLithologyTableDefine()\n</code></pre>"},{"location":"reference/lib/prospecting/drill_db.html#dimine_python_sdk.lib.prospecting.drill_db.DrillDBManager.get_survey_table_def","title":"<code>get_survey_table_def()</code>","text":"<p>\u83b7\u53d6\u6d4b\u659c\u8868\u7ed3\u6784\u5b9a\u4e49 :return: \u6d4b\u659c\u8868\u7ed3\u6784\u5b9a\u4e49\uff08\u5b57\u5178\uff09</p> <p>example:</p> <pre><code>drill_manager = drill_db.get_drill_db_manager()\nsurvey_def = drill_manager.get_survey_table_def()\nprint(\"\u6d4b\u659c\u8868\u5b57\u6bb5\u6570:\",survey_def)\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\drill_db.py</code> <pre><code>def get_survey_table_def(self) -> Dict[str, Any]:\n \"\"\"\n \u83b7\u53d6\u6d4b\u659c\u8868\u7ed3\u6784\u5b9a\u4e49\n :return: \u6d4b\u659c\u8868\u7ed3\u6784\u5b9a\u4e49\uff08\u5b57\u5178\uff09\n\n example:\n ```python\n drill_manager = drill_db.get_drill_db_manager()\n survey_def = drill_manager.get_survey_table_def()\n print(\"\u6d4b\u659c\u8868\u5b57\u6bb5\u6570:\",survey_def)\n ```\n \"\"\"\n return self._manager.GetSurveryTableDefine()\n</code></pre>"},{"location":"reference/lib/prospecting/drill_db.html#dimine_python_sdk.lib.prospecting.drill_db.DrillDBManager.get_total_length","title":"<code>get_total_length()</code>","text":"<p>\u83b7\u53d6\u94bb\u5b54\u603b\u957f\u5ea6 :return: \u94bb\u5b54\u603b\u957f\u5ea6</p> <p>example:</p> <pre><code>drill_manager = drill_db.get_drill_db_manager()\nprint(\"\u94bb\u5b54\u603b\u957f\u5ea6:\", drill_manager.get_total_length())\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\drill_db.py</code> <pre><code>def get_total_length(self) -> float:\n \"\"\"\n \u83b7\u53d6\u94bb\u5b54\u603b\u957f\u5ea6\n :return: \u94bb\u5b54\u603b\u957f\u5ea6\n\n example:\n ```python\n drill_manager = drill_db.get_drill_db_manager()\n print(\"\u94bb\u5b54\u603b\u957f\u5ea6:\", drill_manager.get_total_length())\n ```\n \"\"\"\n return self._manager.GetTotalLength()\n</code></pre>"},{"location":"reference/lib/prospecting/drill_db.html#dimine_python_sdk.lib.prospecting.drill_db.DrillFunctionWrapper","title":"<code>DrillFunctionWrapper</code>","text":"<p>\u4e8c\u6b21\u5c01\u88c5\u94bb\u5b54\u76f8\u5173\u51fd\u6570\uff0c\u63d0\u4f9b\u66f4Python\u5316\u7684\u63a5\u53e3</p> Source code in <code>dimine_python_sdk\\lib\\prospecting\\drill_db.py</code> <pre><code>class DrillFunctionWrapper:\n \"\"\"\n \u4e8c\u6b21\u5c01\u88c5\u94bb\u5b54\u76f8\u5173\u51fd\u6570\uff0c\u63d0\u4f9b\u66f4Python\u5316\u7684\u63a5\u53e3\n \"\"\"\n @staticmethod\n def sample_length_combine(params: SampleLengthCombineParam) -> dict:\n \"\"\"\n \u6837\u957f\u7ec4\u5408\u529f\u80fd\u7684\u4e8c\u6b21\u5c01\u88c5\n :param params: Python\u5b57\u5178\uff0c\u5305\u542b\u6837\u957f\u7ec4\u5408\u6240\u9700\u7684\u53c2\u6570\n :return: \u5904\u7406\u7ed3\u679c\uff0c\u6210\u529f\u8fd4\u56de{\"state\": \"ok\", \"message\": \"...\"}\uff0c\u5931\u8d25\u629b\u51fa\u5f02\u5e38\n\n example:\n ```python\n params = SampleLengthCombineParam(\n )\n result = DrillFunctionWrapper.sample_length_combine(params)\n ```\n \"\"\"\n # \u5c06Python\u5b57\u5178\u5e8f\u5217\u5316\u4e3aJSON\u5b57\u7b26\u4e32\n json_param = json.dumps(params.to_dict(), ensure_ascii=False)\n raw_response = Dm.SampleLengthCombine(json_param)\n # 3. \u89e3\u6790\u8fd4\u56de\u7684JSON\u5b57\u7b26\u4e32\u4e3aPython\u5b57\u5178\n response = json.loads(raw_response)\n # 4. \u9519\u8bef\u5904\u7406\uff1a\u5982\u679c\u5931\u8d25\uff0c\u629b\u51fa\u5f02\u5e38\n if response[\"state\"] == \"failed\":\n raise RuntimeError(f\"\u6837\u957f\u7ec4\u5408\u5931\u8d25: {response['message']}\")\n return response\n\n @staticmethod\n def step_combine(params: StepCombineParam) -> dict:\n \"\"\"\n \u53f0\u9636\u7ec4\u5408\u529f\u80fd\u7684\u4e8c\u6b21\u5c01\u88c5\n :param params: Python\u5b57\u5178\uff0c\u5305\u542b\u53f0\u9636\u7ec4\u5408\u6240\u9700\u7684\u53c2\u6570\n :return: \u5904\u7406\u7ed3\u679c\uff0c\u6210\u529f\u8fd4\u56de{\"state\": \"ok\", \"message\": \"...\"}\uff0c\u5931\u8d25\u629b\u51fa\u5f02\u5e38\n\n example:\n ```python\n params = StepCombineParam(\n )\n result = DrillFunctionWrapper.step_combine(params)\n ```\n \"\"\"\n json_param = json.dumps(params.to_dict(), ensure_ascii=False)\n raw_response = Dm.StepCombine(json_param)\n response = json.loads(raw_response)\n if response[\"state\"] == \"failed\":\n raise RuntimeError(f\"\u53f0\u9636\u7ec4\u5408\u5931\u8d25: {response['message']}\")\n return response\n\n @staticmethod\n def extra_high_grade_process(params: HighGradeProcessParam) -> dict:\n \"\"\"\n \u7279\u9ad8\u54c1\u4f4d\u5904\u7406\u529f\u80fd\u7684\u4e8c\u6b21\u5c01\u88c5\n :param params: Python\u5b57\u5178\uff0c\u5305\u542b\u53f0\u9636\u7ec4\u5408\u6240\u9700\u7684\u53c2\u6570\n :return: \u5904\u7406\u7ed3\u679c\uff0c\u6210\u529f\u8fd4\u56de{\"state\": \"ok\", \"message\": \"...\"}\uff0c\u5931\u8d25\u629b\u51fa\u5f02\u5e38\n\n example:\n ```python\n params = HighGradeProcessParam(\n )\n result = DrillFunctionWrapper.extra_high_grade_process(params)\n ```\n \"\"\"\n json_param = json.dumps(params.to_dict(), ensure_ascii=False)\n raw_response = Dm.ExtraHighGradeProcess(json_param)\n response = json.loads(raw_response)\n if response[\"state\"] == \"failed\":\n raise RuntimeError(f\"\u7279\u9ad8\u54c1\u4f4d\u5904\u7406\u5931\u8d25: {response['message']}\")\n return response\n</code></pre>"},{"location":"reference/lib/prospecting/drill_db.html#dimine_python_sdk.lib.prospecting.drill_db.DrillFunctionWrapper.extra_high_grade_process","title":"<code>extra_high_grade_process(params)</code> <code>staticmethod</code>","text":"<p>\u7279\u9ad8\u54c1\u4f4d\u5904\u7406\u529f\u80fd\u7684\u4e8c\u6b21\u5c01\u88c5 :param params: Python\u5b57\u5178\uff0c\u5305\u542b\u53f0\u9636\u7ec4\u5408\u6240\u9700\u7684\u53c2\u6570 :return: \u5904\u7406\u7ed3\u679c\uff0c\u6210\u529f\u8fd4\u56de{\"state\": \"ok\", \"message\": \"...\"}\uff0c\u5931\u8d25\u629b\u51fa\u5f02\u5e38</p> <p>example:</p> <pre><code>params = HighGradeProcessParam(\n)\nresult = DrillFunctionWrapper.extra_high_grade_process(params)\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\drill_db.py</code> <pre><code>@staticmethod\ndef extra_high_grade_process(params: HighGradeProcessParam) -> dict:\n \"\"\"\n \u7279\u9ad8\u54c1\u4f4d\u5904\u7406\u529f\u80fd\u7684\u4e8c\u6b21\u5c01\u88c5\n :param params: Python\u5b57\u5178\uff0c\u5305\u542b\u53f0\u9636\u7ec4\u5408\u6240\u9700\u7684\u53c2\u6570\n :return: \u5904\u7406\u7ed3\u679c\uff0c\u6210\u529f\u8fd4\u56de{\"state\": \"ok\", \"message\": \"...\"}\uff0c\u5931\u8d25\u629b\u51fa\u5f02\u5e38\n\n example:\n ```python\n params = HighGradeProcessParam(\n )\n result = DrillFunctionWrapper.extra_high_grade_process(params)\n ```\n \"\"\"\n json_param = json.dumps(params.to_dict(), ensure_ascii=False)\n raw_response = Dm.ExtraHighGradeProcess(json_param)\n response = json.loads(raw_response)\n if response[\"state\"] == \"failed\":\n raise RuntimeError(f\"\u7279\u9ad8\u54c1\u4f4d\u5904\u7406\u5931\u8d25: {response['message']}\")\n return response\n</code></pre>"},{"location":"reference/lib/prospecting/drill_db.html#dimine_python_sdk.lib.prospecting.drill_db.DrillFunctionWrapper.sample_length_combine","title":"<code>sample_length_combine(params)</code> <code>staticmethod</code>","text":"<p>\u6837\u957f\u7ec4\u5408\u529f\u80fd\u7684\u4e8c\u6b21\u5c01\u88c5 :param params: Python\u5b57\u5178\uff0c\u5305\u542b\u6837\u957f\u7ec4\u5408\u6240\u9700\u7684\u53c2\u6570 :return: \u5904\u7406\u7ed3\u679c\uff0c\u6210\u529f\u8fd4\u56de{\"state\": \"ok\", \"message\": \"...\"}\uff0c\u5931\u8d25\u629b\u51fa\u5f02\u5e38</p> <p>example:</p> <pre><code>params = SampleLengthCombineParam(\n)\nresult = DrillFunctionWrapper.sample_length_combine(params)\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\drill_db.py</code> <pre><code>@staticmethod\ndef sample_length_combine(params: SampleLengthCombineParam) -> dict:\n \"\"\"\n \u6837\u957f\u7ec4\u5408\u529f\u80fd\u7684\u4e8c\u6b21\u5c01\u88c5\n :param params: Python\u5b57\u5178\uff0c\u5305\u542b\u6837\u957f\u7ec4\u5408\u6240\u9700\u7684\u53c2\u6570\n :return: \u5904\u7406\u7ed3\u679c\uff0c\u6210\u529f\u8fd4\u56de{\"state\": \"ok\", \"message\": \"...\"}\uff0c\u5931\u8d25\u629b\u51fa\u5f02\u5e38\n\n example:\n ```python\n params = SampleLengthCombineParam(\n )\n result = DrillFunctionWrapper.sample_length_combine(params)\n ```\n \"\"\"\n # \u5c06Python\u5b57\u5178\u5e8f\u5217\u5316\u4e3aJSON\u5b57\u7b26\u4e32\n json_param = json.dumps(params.to_dict(), ensure_ascii=False)\n raw_response = Dm.SampleLengthCombine(json_param)\n # 3. \u89e3\u6790\u8fd4\u56de\u7684JSON\u5b57\u7b26\u4e32\u4e3aPython\u5b57\u5178\n response = json.loads(raw_response)\n # 4. \u9519\u8bef\u5904\u7406\uff1a\u5982\u679c\u5931\u8d25\uff0c\u629b\u51fa\u5f02\u5e38\n if response[\"state\"] == \"failed\":\n raise RuntimeError(f\"\u6837\u957f\u7ec4\u5408\u5931\u8d25: {response['message']}\")\n return response\n</code></pre>"},{"location":"reference/lib/prospecting/drill_db.html#dimine_python_sdk.lib.prospecting.drill_db.DrillFunctionWrapper.step_combine","title":"<code>step_combine(params)</code> <code>staticmethod</code>","text":"<p>\u53f0\u9636\u7ec4\u5408\u529f\u80fd\u7684\u4e8c\u6b21\u5c01\u88c5 :param params: Python\u5b57\u5178\uff0c\u5305\u542b\u53f0\u9636\u7ec4\u5408\u6240\u9700\u7684\u53c2\u6570 :return: \u5904\u7406\u7ed3\u679c\uff0c\u6210\u529f\u8fd4\u56de{\"state\": \"ok\", \"message\": \"...\"}\uff0c\u5931\u8d25\u629b\u51fa\u5f02\u5e38</p> <p>example:</p> <pre><code>params = StepCombineParam(\n)\nresult = DrillFunctionWrapper.step_combine(params)\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\drill_db.py</code> <pre><code>@staticmethod\ndef step_combine(params: StepCombineParam) -> dict:\n \"\"\"\n \u53f0\u9636\u7ec4\u5408\u529f\u80fd\u7684\u4e8c\u6b21\u5c01\u88c5\n :param params: Python\u5b57\u5178\uff0c\u5305\u542b\u53f0\u9636\u7ec4\u5408\u6240\u9700\u7684\u53c2\u6570\n :return: \u5904\u7406\u7ed3\u679c\uff0c\u6210\u529f\u8fd4\u56de{\"state\": \"ok\", \"message\": \"...\"}\uff0c\u5931\u8d25\u629b\u51fa\u5f02\u5e38\n\n example:\n ```python\n params = StepCombineParam(\n )\n result = DrillFunctionWrapper.step_combine(params)\n ```\n \"\"\"\n json_param = json.dumps(params.to_dict(), ensure_ascii=False)\n raw_response = Dm.StepCombine(json_param)\n response = json.loads(raw_response)\n if response[\"state\"] == \"failed\":\n raise RuntimeError(f\"\u53f0\u9636\u7ec4\u5408\u5931\u8d25: {response['message']}\")\n return response\n</code></pre>"},{"location":"reference/lib/prospecting/models.html","title":"models","text":""},{"location":"reference/lib/prospecting/models.html#dimine_python_sdk.lib.prospecting.models.BlockModelCommonParams","title":"<code>BlockModelCommonParams</code>","text":"<p>\u5757\u6bb5\u6a21\u578b\u4f30\u503c\u901a\u7528\u53c2\u6570\u57fa\u7c7b\uff08\u8ddd\u79bb\u5e42/\u514b\u91cc\u683c\u5171\u7528\uff09</p> Source code in <code>dimine_python_sdk\\lib\\prospecting\\models.py</code> <pre><code>class BlockModelCommonParams:\n \"\"\"\u5757\u6bb5\u6a21\u578b\u4f30\u503c\u901a\u7528\u53c2\u6570\u57fa\u7c7b\uff08\u8ddd\u79bb\u5e42/\u514b\u91cc\u683c\u5171\u7528\uff09\"\"\"\n # \u57fa\u7840\u914d\u7f6e\n sample_file: str # \u6837\u54c1\u6570\u636e\u6587\u4ef6\u8def\u5f84\n variable: str # \u4f30\u503c\u53d8\u91cf\uff08\u5982\u54c1\u4f4d\u5b57\u6bb5\u540d\uff09\n extra_attribute: str # \u989d\u5916\u5c5e\u6027\u5b57\u6bb5\uff08\u5982\u5ca9\u6027\u3001\u539a\u5ea6\u7b49\uff09\n # \u4f30\u503c\u8303\u56f4\n min_value: float # \u4f30\u503c\u6700\u5c0f\u503c\n max_value: float # \u4f30\u503c\u6700\u5927\u503c\n # \u5757\u6bb5\u5c3a\u5bf8\n single_block_min: float # \u5355\u5757\u6700\u5c0f\u5c3a\u5bf8\n single_block_max: float # \u5355\u5757\u6700\u5927\u5c3a\u5bf8\n sub_block_main: float # \u5b50\u5757\u4e3b\u65b9\u5411\u5c3a\u5bf8\n sub_block_second: float # \u5b50\u5757\u6b21\u65b9\u5411\u5c3a\u5bf8\n sub_block_short: float # \u5b50\u5757\u77ed\u65b9\u5411\u5c3a\u5bf8\n # \u89d2\u5ea6\u53c2\u6570\n angle_main: float # \u4e3b\u65b9\u5411\u89d2\u5ea6\uff08\u5ea6\uff09\n angle_second: float # \u6b21\u65b9\u5411\u89d2\u5ea6\uff08\u5ea6\uff09\n angle_short: float # \u77ed\u65b9\u5411\u89d2\u5ea6\uff08\u5ea6\uff09\n # \u641c\u7d22\u534a\u5f84\n main_radius: float # \u4e3b\u65b9\u5411\u641c\u7d22\u534a\u5f84\n second_main_rate: float # \u6b21\u65b9\u5411\u641c\u7d22\u534a\u5f84\u6bd4\u4f8b\uff08\u76f8\u5bf9\u4e8e\u4e3b\u65b9\u5411\uff09\n short_main_rate: float # \u77ed\u65b9\u5411\u641c\u7d22\u534a\u5f84\u6bd4\u4f8b\uff08\u76f8\u5bf9\u4e8e\u4e3b\u65b9\u5411\uff09\n # \u641c\u7d22\u7b56\u7565\n octant_max: int # \u6bcf\u4e2a\u516b\u8c61\u9650\u6700\u5927\u6837\u54c1\u6570\n project_count_min: int # \u6700\u5c0f\u6295\u5f71\u65b9\u5411\u6570\u91cf\n single_project_sample_max: int # \u5355\u4e2a\u6295\u5f71\u65b9\u5411\u6700\u5927\u6837\u54c1\u6570\n\n def __init__(self, sample_file: str, variable: str, extra_attribute: str,\n min_value: float, max_value: float,\n single_block_min: float, single_block_max: float,\n sub_block_main: float, sub_block_second: float, sub_block_short: float,\n angle_main: float, angle_second: float, angle_short: float,\n main_radius: float, second_main_rate: float, short_main_rate: float,\n octant_max: int, project_count_min: int, single_project_sample_max: int):\n # \u6279\u91cf\u8d4b\u503c\u901a\u7528\u5c5e\u6027\n self.sample_file = sample_file\n self.variable = variable\n self.extra_attribute = extra_attribute\n self.min_value = min_value\n self.max_value = max_value\n self.single_block_min = single_block_min\n self.single_block_max = single_block_max\n self.sub_block_main = sub_block_main\n self.sub_block_second = sub_block_second\n self.sub_block_short = sub_block_short\n self.angle_main = angle_main\n self.angle_second = angle_second\n self.angle_short = angle_short\n self.main_radius = main_radius\n self.second_main_rate = second_main_rate\n self.short_main_rate = short_main_rate\n self.octant_max = octant_max\n self.project_count_min = project_count_min\n self.single_project_sample_max = single_project_sample_max\n</code></pre>"},{"location":"reference/lib/prospecting/models.html#dimine_python_sdk.lib.prospecting.models.BlockModelConstraint","title":"<code>BlockModelConstraint</code> <code>dataclass</code>","text":"<p>\u5757\u6bb5\u6a21\u578b\u7ea6\u675f\u53c2\u6570\u7ed3\u6784 \u7528\u4e8e\u5b9a\u4e49\u6a21\u578b\u8ba1\u7b97\u65f6\u7684\u8fb9\u754c\u7ea6\u675f\u3001\u8303\u56f4\u8fc7\u6ee4\u7b49\u6761\u4ef6</p> Source code in <code>dimine_python_sdk\\lib\\prospecting\\models.py</code> <pre><code>@dataclass\nclass BlockModelConstraint:\n \"\"\"\n \u5757\u6bb5\u6a21\u578b\u7ea6\u675f\u53c2\u6570\u7ed3\u6784\n \u7528\u4e8e\u5b9a\u4e49\u6a21\u578b\u8ba1\u7b97\u65f6\u7684\u8fb9\u754c\u7ea6\u675f\u3001\u8303\u56f4\u8fc7\u6ee4\u7b49\u6761\u4ef6\n \"\"\"\n type: int # \u7ea6\u675f\u7c7b\u578b\uff0c0 \u901a\u5e38\u8868\u793a\u201c\u5b9e\u4f53\u7ea6\u675f\u201d\n file: str # \u7ea6\u675f\u5b9e\u4f53\u6587\u4ef6\u8def\u5f84\uff08\u5982 DMF \u6587\u4ef6\uff09\n range: int # \u7ea6\u675f\u8303\u56f4\uff0c0 \u8868\u793a\u4f7f\u7528\u5b8c\u6574\u5b9e\u4f53\u8303\u56f4\n inside_level: int # \u5185\u90e8\u7cbe\u5ea6\u5c42\u7ea7\uff08\u63a7\u5236\u7ea6\u675f\u7684\u7cbe\u7ec6\u5ea6\uff09\n boundary_level: int # \u8fb9\u754c\u7cbe\u5ea6\u5c42\u7ea7\uff08\u63a7\u5236\u8fb9\u754c\u7684\u7cbe\u7ec6\u5ea6\uff09\n bool_operate: str # \u5e03\u5c14\u8fd0\u7b97\u65b9\u5f0f\uff0c\"and\" \u8868\u793a\u4e0e\u5176\u4ed6\u7ea6\u675f\u53e0\u52a0\n\n def to_dict(self) -> Dict[str, Any]:\n \"\"\"\n \u5c06\u53c2\u6570\u8f6c\u6362\u4e3a\u5b57\u5178\uff0c\u7528\u4e8e\u5e8f\u5217\u5316\u4e3aJSON\n \"\"\"\n return {\n \"type\": self.type,\n \"file\": self.file,\n \"range\": self.range,\n \"inside_level\": self.inside_level,\n \"boundary_level\": self.boundary_level,\n \"bool_operate\": self.bool_operate\n }\n</code></pre>"},{"location":"reference/lib/prospecting/models.html#dimine_python_sdk.lib.prospecting.models.BlockModelConstraint.to_dict","title":"<code>to_dict()</code>","text":"<p>\u5c06\u53c2\u6570\u8f6c\u6362\u4e3a\u5b57\u5178\uff0c\u7528\u4e8e\u5e8f\u5217\u5316\u4e3aJSON</p> Source code in <code>dimine_python_sdk\\lib\\prospecting\\models.py</code> <pre><code>def to_dict(self) -> Dict[str, Any]:\n \"\"\"\n \u5c06\u53c2\u6570\u8f6c\u6362\u4e3a\u5b57\u5178\uff0c\u7528\u4e8e\u5e8f\u5217\u5316\u4e3aJSON\n \"\"\"\n return {\n \"type\": self.type,\n \"file\": self.file,\n \"range\": self.range,\n \"inside_level\": self.inside_level,\n \"boundary_level\": self.boundary_level,\n \"bool_operate\": self.bool_operate\n }\n</code></pre>"},{"location":"reference/lib/prospecting/models.html#dimine_python_sdk.lib.prospecting.models.BlockModelDistancePowerParams","title":"<code>BlockModelDistancePowerParams</code>","text":"<p> Bases: <code>BlockModelCommonParams</code></p> <p>\u8ddd\u79bb\u5e42\u4f30\u503c\u4e13\u5c5e\u53c2\u6570\u7c7b\uff08\u7ee7\u627f\u901a\u7528\u53c2\u6570+\u65b0\u589e\u8ddd\u79bb\u5e42\u7279\u6709\u53c2\u6570\uff09</p> Source code in <code>dimine_python_sdk\\lib\\prospecting\\models.py</code> <pre><code>class BlockModelDistancePowerParams(BlockModelCommonParams):\n \"\"\"\u8ddd\u79bb\u5e42\u4f30\u503c\u4e13\u5c5e\u53c2\u6570\u7c7b\uff08\u7ee7\u627f\u901a\u7528\u53c2\u6570+\u65b0\u589e\u8ddd\u79bb\u5e42\u7279\u6709\u53c2\u6570\uff09\"\"\"\n power: int # \u8ddd\u79bb\u5e42\u6b21\uff08\u59822.0\uff0c\u8ddd\u79bb\u5e42\u4e13\u5c5e\uff09\n\n def __init__(self, power: int, *args, **kwargs):\n super().__init__(*args, **kwargs)\n self.power = power\n</code></pre>"},{"location":"reference/lib/prospecting/models.html#dimine_python_sdk.lib.prospecting.models.BlockModelKrigingParams","title":"<code>BlockModelKrigingParams</code>","text":"<p> Bases: <code>BlockModelCommonParams</code></p> <p>\u514b\u91cc\u683c\u4f30\u503c\u4e13\u5c5e\u53c2\u6570\u7c7b\uff08\u7ee7\u627f\u901a\u7528\u53c2\u6570+\u65b0\u589e\u514b\u91cc\u683c\u7279\u6709\u53c2\u6570\uff09</p> Source code in <code>dimine_python_sdk\\lib\\prospecting\\models.py</code> <pre><code>class BlockModelKrigingParams(BlockModelCommonParams):\n \"\"\"\u514b\u91cc\u683c\u4f30\u503c\u4e13\u5c5e\u53c2\u6570\u7c7b\uff08\u7ee7\u627f\u901a\u7528\u53c2\u6570+\u65b0\u589e\u514b\u91cc\u683c\u7279\u6709\u53c2\u6570\uff09\"\"\"\n krig_type: int # \u514b\u91cc\u683c\u7c7b\u578b\n sk: int # \u514b\u91cc\u683c\u76f8\u5173\u53c2\u6570\n c0: int # \u5757\u91d1\u503c\n variational_function: list = [{\n \"type\":0,\n \"range\":22,\n \"cc\":0.162586\n }]\n\n def __init__(self, krig_type: int, sk: int, c0: int, variational_function:dict[str,int],*args, **kwargs):\n super().__init__(*args, **kwargs)\n self.krig_type = krig_type\n self.sk = sk\n self.c0 = c0\n self.variational_function = variational_function\n</code></pre>"},{"location":"reference/lib/prospecting/models.html#dimine_python_sdk.lib.prospecting.models.HighGradeProcessParam","title":"<code>HighGradeProcessParam</code> <code>dataclass</code>","text":"Source code in <code>dimine_python_sdk\\lib\\prospecting\\models.py</code> <pre><code>@dataclass\nclass HighGradeProcessParam:\n # \u7279\u9ad8\u54c1\u4f4d\u5904\u7406\u53c2\u6570\n input_file: str # \u8f93\u5165\u6587\u4ef6\u8def\u5f84\uff08\u6570\u636e\u6587\u4ef6\u7684\u5b8c\u6574\u8def\u5f84/\u76f8\u5bf9\u8def\u5f84\uff09\n grade_field: str # \u54c1\u4f4d\u5b57\u6bb5\u540d\uff08\u5f85\u5904\u7406\u7684\u54c1\u4f4d\u6570\u636e\u5217\u540d\uff09\n process_mode: int # \u5904\u7406\u6a21\u5f0f\uff080:\u56fd\u5185\u7279\u9ad8\u54c1\u4f4d\u5224\u5b9a\uff1b1:\u56fd\u5916\u7279\u9ad8\u54c1\u4f4d\u5224\u5b9a\uff09\n average_multiple: float # \u5e73\u5747\u500d\u6570\uff08\u54c1\u4f4d\u8ba1\u7b97\u7684\u500d\u6570\u7cfb\u6570\uff09\n frequency: float # \u9891\u7387\u9608\u503c\uff080-1\u4e4b\u95f4\uff09\n replace_method: int # \u66ff\u6362\u65b9\u5f0f\uff080:\u5254\u9664\u6cd5\uff0c1:\u7ed9\u5b9a\u503c\uff0c2:\u76f8\u90bb\u6837\u54c1\u5e73\u5747\u503c\uff0c3:\u77ff\u4f53\u5e73\u5747\u54c1\u4f4d\u6cd5\uff0c4:\u5355\u4e00\u5de5\u7a0b\u6cd5\uff0c5:\u622a\u6b62\u54c1\u4f4d\u6cd5\uff09\n assign_value: float # \u7ed9\u5b9a\u503c\u65b9\u6cd5\u5bf9\u5e94\u7684\u503c\n adjoin_average: float # \u76f8\u90bb\u6837\u54c1\u5e73\u5747\u503c\uff09\n average_method: int # \u5e73\u5747\u503c\u8ba1\u7b97\u7684\u65b9\u5f0f\uff0c0:\u7b97\u6570\u5e73\u5747\uff0c1:\u957f\u5ea6\u52a0\u6743\u5e73\u5747\n contain_mode: int # \u5305\u542b\u6a21\u5f0f\uff080:\u5305\u542b\u7279\u9ad8\u54c1\u4f4d\uff0c1:\u4e0d\u5305\u542b\u7279\u9ad8\u54c1\u4f4d\uff09\n result_field: str # \u7ed3\u679c\u5b57\u6bb5\u540d\uff08\u5904\u7406\u540e\u54c1\u4f4d\u6570\u636e\u7684\u8f93\u51fa\u5217\u540d\uff09\n\n def __post_init__(self) -> None:\n \"\"\"\n \u53c2\u6570\u5408\u6cd5\u6027\u6821\u9a8c\n \u6821\u9a8c\u5931\u8d25\u65f6\u629b\u51fa\u660e\u786e\u7684ValueError\uff0c\u5305\u542b\u975e\u6cd5\u53c2\u6570\u540d\u548c\u9519\u8bef\u539f\u56e0\n \"\"\"\n # \u5404\u53c2\u6570\u7684\u5408\u6cd5\u53d6\u503c\u8303\u56f4\n valid_ranges = {\n \"process_mode\": {0, 1},\n \"replace_method\": {0, 1, 2, 3, 4, 5},\n \"average_method\": {0, 1},\n \"contain_mode\": {0, 1}\n }\n\n # 1. \u6821\u9a8c\u679a\u4e3e\u578b\u53c2\u6570\uff08\u53ea\u80fd\u53d6\u6307\u5b9a\u6574\u6570\u503c\uff09\n for param_name, valid_vals in valid_ranges.items():\n current_val = getattr(self, param_name)\n if current_val not in valid_vals:\n raise ValueError(\n f\"\u53c2\u6570{param_name}\u53d6\u503c\u975e\u6cd5\uff01\u5408\u6cd5\u503c\uff1a{sorted(valid_vals)}\uff0c\u5f53\u524d\u503c\uff1a{current_val}\"\n )\n\n # 2. \u6821\u9a8c\u9891\u7387\u9608\u503c\uff08\u5fc5\u987b\u57280-1\u4e4b\u95f4\uff0c\u5305\u542b\u8fb9\u754c\uff09\n if not 0 <= self.frequency <= 1:\n raise ValueError(\n f\"\u53c2\u6570frequency\u53d6\u503c\u975e\u6cd5\uff01\u5fc5\u987b\u4e3a0-1\u4e4b\u95f4\u7684\u6570\u503c\uff0c\u5f53\u524d\u503c\uff1a{self.frequency}\"\n )\n\n def to_dict(self) -> dict:\n \"\"\"\u5c06\u5b9e\u4f8b\u7684\u6240\u6709\u5c5e\u6027\u8f6c\u6362\u4e3a\u952e\u503c\u5bf9\u5b57\u5178\uff0c\u952e\u4e3a\u5c5e\u6027\u540d\uff0c\u503c\u4e3a\u5c5e\u6027\u5f53\u524d\u503c\"\"\"\n return {\n \"input_file\": self.input_file,\n \"grade_field\": self.grade_field,\n \"process_mode\": self.process_mode,\n \"average_multiple\": self.average_multiple,\n \"frequency\": self.frequency,\n \"replace_method\": self.replace_method,\n \"assign_value\": self.assign_value,\n \"adjoin_average\": self.adjoin_average,\n \"average_method\": self.average_method,\n \"contain_mode\": self.contain_mode,\n \"result_field\": self.result_field\n }\n</code></pre>"},{"location":"reference/lib/prospecting/models.html#dimine_python_sdk.lib.prospecting.models.HighGradeProcessParam.__post_init__","title":"<code>__post_init__()</code>","text":"<p>\u53c2\u6570\u5408\u6cd5\u6027\u6821\u9a8c \u6821\u9a8c\u5931\u8d25\u65f6\u629b\u51fa\u660e\u786e\u7684ValueError\uff0c\u5305\u542b\u975e\u6cd5\u53c2\u6570\u540d\u548c\u9519\u8bef\u539f\u56e0</p> Source code in <code>dimine_python_sdk\\lib\\prospecting\\models.py</code> <pre><code>def __post_init__(self) -> None:\n \"\"\"\n \u53c2\u6570\u5408\u6cd5\u6027\u6821\u9a8c\n \u6821\u9a8c\u5931\u8d25\u65f6\u629b\u51fa\u660e\u786e\u7684ValueError\uff0c\u5305\u542b\u975e\u6cd5\u53c2\u6570\u540d\u548c\u9519\u8bef\u539f\u56e0\n \"\"\"\n # \u5404\u53c2\u6570\u7684\u5408\u6cd5\u53d6\u503c\u8303\u56f4\n valid_ranges = {\n \"process_mode\": {0, 1},\n \"replace_method\": {0, 1, 2, 3, 4, 5},\n \"average_method\": {0, 1},\n \"contain_mode\": {0, 1}\n }\n\n # 1. \u6821\u9a8c\u679a\u4e3e\u578b\u53c2\u6570\uff08\u53ea\u80fd\u53d6\u6307\u5b9a\u6574\u6570\u503c\uff09\n for param_name, valid_vals in valid_ranges.items():\n current_val = getattr(self, param_name)\n if current_val not in valid_vals:\n raise ValueError(\n f\"\u53c2\u6570{param_name}\u53d6\u503c\u975e\u6cd5\uff01\u5408\u6cd5\u503c\uff1a{sorted(valid_vals)}\uff0c\u5f53\u524d\u503c\uff1a{current_val}\"\n )\n\n # 2. \u6821\u9a8c\u9891\u7387\u9608\u503c\uff08\u5fc5\u987b\u57280-1\u4e4b\u95f4\uff0c\u5305\u542b\u8fb9\u754c\uff09\n if not 0 <= self.frequency <= 1:\n raise ValueError(\n f\"\u53c2\u6570frequency\u53d6\u503c\u975e\u6cd5\uff01\u5fc5\u987b\u4e3a0-1\u4e4b\u95f4\u7684\u6570\u503c\uff0c\u5f53\u524d\u503c\uff1a{self.frequency}\"\n )\n</code></pre>"},{"location":"reference/lib/prospecting/models.html#dimine_python_sdk.lib.prospecting.models.HighGradeProcessParam.to_dict","title":"<code>to_dict()</code>","text":"<p>\u5c06\u5b9e\u4f8b\u7684\u6240\u6709\u5c5e\u6027\u8f6c\u6362\u4e3a\u952e\u503c\u5bf9\u5b57\u5178\uff0c\u952e\u4e3a\u5c5e\u6027\u540d\uff0c\u503c\u4e3a\u5c5e\u6027\u5f53\u524d\u503c</p> Source code in <code>dimine_python_sdk\\lib\\prospecting\\models.py</code> <pre><code>def to_dict(self) -> dict:\n \"\"\"\u5c06\u5b9e\u4f8b\u7684\u6240\u6709\u5c5e\u6027\u8f6c\u6362\u4e3a\u952e\u503c\u5bf9\u5b57\u5178\uff0c\u952e\u4e3a\u5c5e\u6027\u540d\uff0c\u503c\u4e3a\u5c5e\u6027\u5f53\u524d\u503c\"\"\"\n return {\n \"input_file\": self.input_file,\n \"grade_field\": self.grade_field,\n \"process_mode\": self.process_mode,\n \"average_multiple\": self.average_multiple,\n \"frequency\": self.frequency,\n \"replace_method\": self.replace_method,\n \"assign_value\": self.assign_value,\n \"adjoin_average\": self.adjoin_average,\n \"average_method\": self.average_method,\n \"contain_mode\": self.contain_mode,\n \"result_field\": self.result_field\n }\n</code></pre>"},{"location":"reference/lib/prospecting/models.html#dimine_python_sdk.lib.prospecting.models.ModelTransformParams","title":"<code>ModelTransformParams</code> <code>dataclass</code>","text":"<p>\u521b\u5efa\u7a7a\u5757\u6bb5\u6a21\u578b\u53c2\u6570</p> Source code in <code>dimine_python_sdk\\lib\\prospecting\\models.py</code> <pre><code>@dataclass\nclass ModelTransformParams:\n \"\"\"\n \u521b\u5efa\u7a7a\u5757\u6bb5\u6a21\u578b\u53c2\u6570\n \"\"\"\n\n file_name: str\n # \u539f\u70b9\n origin_x: float\n origin_y: float\n origin_z: float\n # \u65cb\u8f6c\u89d2\u5ea6\n rotate_x: float\n rotate_y: float\n rotate_z: float\n # \u5355\u5143\u5757\u5c3a\u5bf8\n size_x: float\n size_y: float\n size_z: float\n # \u5ef6\u4f38\u957f\u5ea6\n length_x: float\n length_y: float\n length_z: float\n\n def to_dict(self) -> Dict[str, Any]:\n \"\"\"\n \u5c06\u53c2\u6570\u8f6c\u6362\u4e3a\u5b57\u5178\uff0c\u7528\u4e8e\u5e8f\u5217\u5316\u4e3aJSON\n \"\"\"\n return {\n \"file_name\": self.file_name,\n \"origin_x\": self.origin_x,\n \"origin_y\": self.origin_y,\n \"origin_z\": self.origin_z,\n \"rotate_x\": self.rotate_x,\n \"rotate_y\": self.rotate_y,\n \"rotate_z\": self.rotate_z,\n \"size_x\": self.size_x,\n \"size_y\": self.size_y,\n \"size_z\": self.size_z,\n \"length_x\": self.length_x,\n \"length_y\": self.length_y,\n \"length_z\": self.length_z\n }\n</code></pre>"},{"location":"reference/lib/prospecting/models.html#dimine_python_sdk.lib.prospecting.models.ModelTransformParams.to_dict","title":"<code>to_dict()</code>","text":"<p>\u5c06\u53c2\u6570\u8f6c\u6362\u4e3a\u5b57\u5178\uff0c\u7528\u4e8e\u5e8f\u5217\u5316\u4e3aJSON</p> Source code in <code>dimine_python_sdk\\lib\\prospecting\\models.py</code> <pre><code>def to_dict(self) -> Dict[str, Any]:\n \"\"\"\n \u5c06\u53c2\u6570\u8f6c\u6362\u4e3a\u5b57\u5178\uff0c\u7528\u4e8e\u5e8f\u5217\u5316\u4e3aJSON\n \"\"\"\n return {\n \"file_name\": self.file_name,\n \"origin_x\": self.origin_x,\n \"origin_y\": self.origin_y,\n \"origin_z\": self.origin_z,\n \"rotate_x\": self.rotate_x,\n \"rotate_y\": self.rotate_y,\n \"rotate_z\": self.rotate_z,\n \"size_x\": self.size_x,\n \"size_y\": self.size_y,\n \"size_z\": self.size_z,\n \"length_x\": self.length_x,\n \"length_y\": self.length_y,\n \"length_z\": self.length_z\n }\n</code></pre>"},{"location":"reference/lib/prospecting/models.html#dimine_python_sdk.lib.prospecting.models.ReservesCalculateParam","title":"<code>ReservesCalculateParam</code> <code>dataclass</code>","text":"<p>\u4f30\u503c\u7b97\u91cf\u53c2\u6570</p> Source code in <code>dimine_python_sdk\\lib\\prospecting\\models.py</code> <pre><code>@dataclass\nclass ReservesCalculateParam:\n \"\"\"\u4f30\u503c\u7b97\u91cf\u53c2\u6570\"\"\"\n weight_field:str#\u4f53\u91cd\u5b57\u6bb5\n default_weight:float#\u9ed8\u8ba4\u4f53\u91cd\n main_field:str#\u4e3b\u7edf\u8ba1\u5b57\u6bb5\n other_field:str#\u5176\u4ed6\u7edf\u8ba1\u5b57\u6bb5\n\n def to_dict(self) -> Dict[str, Any]:\n \"\"\"\n \u5c06\u53c2\u6570\u8f6c\u6362\u4e3a\u5b57\u5178\uff0c\u7528\u4e8e\u5e8f\u5217\u5316\u4e3aJSON\n \"\"\"\n return {\n \"weight_field\":self.weight_field,\n \"default_weight\": self.default_weight,\n \"main_field\": self.main_field,\n \"other_field\": self.other_field\n }\n</code></pre>"},{"location":"reference/lib/prospecting/models.html#dimine_python_sdk.lib.prospecting.models.ReservesCalculateParam.to_dict","title":"<code>to_dict()</code>","text":"<p>\u5c06\u53c2\u6570\u8f6c\u6362\u4e3a\u5b57\u5178\uff0c\u7528\u4e8e\u5e8f\u5217\u5316\u4e3aJSON</p> Source code in <code>dimine_python_sdk\\lib\\prospecting\\models.py</code> <pre><code>def to_dict(self) -> Dict[str, Any]:\n \"\"\"\n \u5c06\u53c2\u6570\u8f6c\u6362\u4e3a\u5b57\u5178\uff0c\u7528\u4e8e\u5e8f\u5217\u5316\u4e3aJSON\n \"\"\"\n return {\n \"weight_field\":self.weight_field,\n \"default_weight\": self.default_weight,\n \"main_field\": self.main_field,\n \"other_field\": self.other_field\n }\n</code></pre>"},{"location":"reference/lib/prospecting/models.html#dimine_python_sdk.lib.prospecting.models.SampleLengthCombineParam","title":"<code>SampleLengthCombineParam</code> <code>dataclass</code>","text":"Source code in <code>dimine_python_sdk\\lib\\prospecting\\models.py</code> <pre><code>@dataclass\nclass SampleLengthCombineParam:#\u6837\u957f\u7ec4\u5408\u53c2\u6570\n input_file:str#\u8f93\u5165\u6587\u4ef6\n combine_length:float#\u7ec4\u5408\u957f\u5ea6\n combine_percent:float#\u7ec4\u5408\u767e\u5206\u6bd4\n output_file:str#\u8f93\u51fa\u6587\u4ef6\n\n def to_dict(self) -> Dict[str, Any]:\n \"\"\"\n \u5c06\u53c2\u6570\u8f6c\u6362\u4e3a\u5b57\u5178\uff0c\u7528\u4e8e\u5e8f\u5217\u5316\u4e3aJSON\n \"\"\"\n return {\n \"input_file\": self.input_file,\n \"combine_length\": self.combine_length,\n \"combine_percent\": self.combine_percent,\n \"output_file\": self.output_file\n }\n</code></pre>"},{"location":"reference/lib/prospecting/models.html#dimine_python_sdk.lib.prospecting.models.SampleLengthCombineParam.to_dict","title":"<code>to_dict()</code>","text":"<p>\u5c06\u53c2\u6570\u8f6c\u6362\u4e3a\u5b57\u5178\uff0c\u7528\u4e8e\u5e8f\u5217\u5316\u4e3aJSON</p> Source code in <code>dimine_python_sdk\\lib\\prospecting\\models.py</code> <pre><code>def to_dict(self) -> Dict[str, Any]:\n \"\"\"\n \u5c06\u53c2\u6570\u8f6c\u6362\u4e3a\u5b57\u5178\uff0c\u7528\u4e8e\u5e8f\u5217\u5316\u4e3aJSON\n \"\"\"\n return {\n \"input_file\": self.input_file,\n \"combine_length\": self.combine_length,\n \"combine_percent\": self.combine_percent,\n \"output_file\": self.output_file\n }\n</code></pre>"},{"location":"reference/lib/prospecting/models.html#dimine_python_sdk.lib.prospecting.models.StepCombineParam","title":"<code>StepCombineParam</code> <code>dataclass</code>","text":"Source code in <code>dimine_python_sdk\\lib\\prospecting\\models.py</code> <pre><code>@dataclass\nclass StepCombineParam:#\u53f0\u9636\u7ec4\u5408\u53c2\u6570\n input_file:str#\u8f93\u5165\u6587\u4ef6\n step_height:float#\u53f0\u9636\u9ad8\u5ea6\n start_height:float#\u5f00\u59cb\u9ad8\u7a0b\n end_height:float#\u7ed3\u675f\u9ad8\u7a0b\n calculate_model:int#\u8ba1\u7b97\u65b9\u5f0f\n low_dip:float#\u5ffd\u7565\u7684\u6700\u5c0f\u503e\u89d2\n output_file:str#\u8f93\u51fa\u6587\u4ef6\n\n def to_dict(self) -> Dict[str, Any]:\n \"\"\"\n \u5c06\u53c2\u6570\u8f6c\u6362\u4e3a\u5b57\u5178\uff0c\u7528\u4e8e\u5e8f\u5217\u5316\u4e3aJSON\n \"\"\"\n return {\n \"input_file\": self.input_file,\n \"step_height\": self.step_height,\n \"start_height\": self.start_height,\n \"end_height\": self.end_height,\n \"calculate_model\": self.calculate_model,\n \"low_dip\": self.low_dip,\n \"output_file\": self.output_file\n }\n</code></pre>"},{"location":"reference/lib/prospecting/models.html#dimine_python_sdk.lib.prospecting.models.StepCombineParam.to_dict","title":"<code>to_dict()</code>","text":"<p>\u5c06\u53c2\u6570\u8f6c\u6362\u4e3a\u5b57\u5178\uff0c\u7528\u4e8e\u5e8f\u5217\u5316\u4e3aJSON</p> Source code in <code>dimine_python_sdk\\lib\\prospecting\\models.py</code> <pre><code>def to_dict(self) -> Dict[str, Any]:\n \"\"\"\n \u5c06\u53c2\u6570\u8f6c\u6362\u4e3a\u5b57\u5178\uff0c\u7528\u4e8e\u5e8f\u5217\u5316\u4e3aJSON\n \"\"\"\n return {\n \"input_file\": self.input_file,\n \"step_height\": self.step_height,\n \"start_height\": self.start_height,\n \"end_height\": self.end_height,\n \"calculate_model\": self.calculate_model,\n \"low_dip\": self.low_dip,\n \"output_file\": self.output_file\n }\n</code></pre>"},{"location":"reference/lib/prospecting/valuation.html","title":"valuation","text":""},{"location":"reference/lib/prospecting/valuation.html#dimine_python_sdk.lib.prospecting.valuation.BlockModelEvaluator","title":"<code>BlockModelEvaluator</code>","text":"<p>\u4e8c\u6b21\u5c01\u88c5\u5757\u6bb5\u6a21\u578b\u8bc4\u4f30\u4e0e\u50a8\u91cf\u8ba1\u7b97\u76f8\u5173\u51fd\u6570 \u63d0\u4f9b\u8ddd\u79bb\u5e42\u4f30\u503c\u3001\u514b\u91cc\u683c\u4f30\u503c\u3001\u50a8\u91cf\u8ba1\u7b97\u7b49\u529f\u80fd</p> Source code in <code>dimine_python_sdk\\lib\\prospecting\\valuation.py</code> <pre><code>class BlockModelEvaluator:\n \"\"\"\n \u4e8c\u6b21\u5c01\u88c5\u5757\u6bb5\u6a21\u578b\u8bc4\u4f30\u4e0e\u50a8\u91cf\u8ba1\u7b97\u76f8\u5173\u51fd\u6570\n \u63d0\u4f9b\u8ddd\u79bb\u5e42\u4f30\u503c\u3001\u514b\u91cc\u683c\u4f30\u503c\u3001\u50a8\u91cf\u8ba1\u7b97\u7b49\u529f\u80fd\n \"\"\"\n\n @staticmethod\n def distance_power_evaluation(\n block_model_file: str,\n constraint_params: BlockModelConstraint,\n evaluation_params: BlockModelDistancePowerParams,\n overwrite_result: bool = True\n ) -> Tuple[bool, str]:\n \"\"\"\n \u8ddd\u79bb\u5e42\u4f30\u503c\u8ba1\u7b97\n :param block_model_file: \u5757\u6bb5\u6a21\u578b\u6587\u4ef6\u8def\u5f84\n :param constraint_params: \u7ea6\u675f\u6761\u4ef6\u53c2\u6570\uff08\u5b57\u5178\uff09\n :param evaluation_params: \u4f30\u503c\u8ba1\u7b97\u53c2\u6570\uff08\u5b57\u5178\uff09\n :param overwrite_result: \u662f\u5426\u8986\u76d6\u5df2\u6709\u7ed3\u679c\n :return: (\u662f\u5426\u6210\u529f, \u7ed3\u679c\u4fe1\u606f)\n\n example:\n ```python\n success, message = BlockModelEvaluator.distance_power_evaluation(\n \"model.dmf\",\n constraint_params,\n evaluation_params\n )\n ```\n \"\"\"\n # \u5c06\u53c2\u6570\u5e8f\u5217\u5316\u4e3aJSON\u5b57\u7b26\u4e32\n constraint_json = json.dumps(constraint_params.to_dict(), ensure_ascii=False)\n evaluation_json = json.dumps(evaluation_params.__dict__, ensure_ascii=False)\n\n b_res, message = Dm.DistancePowerEvaluationValue(\n block_model_file,\n constraint_json,\n evaluation_json,\n overwrite_result\n )\n return b_res, message\n\n @staticmethod\n def kriging_evaluation(\n block_model_file: str,\n constraint_params: BlockModelConstraint,\n evaluation_params: BlockModelKrigingParams,\n overwrite_result: bool = True\n ) -> Tuple[bool, str]:\n \"\"\"\n \u514b\u91cc\u683c\u4f30\u503c\u8ba1\u7b97\n :param block_model_file: \u5757\u6bb5\u6a21\u578b\u6587\u4ef6\u8def\u5f84\n :param constraint_params: \u7ea6\u675f\u6761\u4ef6\u53c2\u6570\n :param evaluation_params: \u4f30\u503c\u8ba1\u7b97\u53c2\u6570\n :param overwrite_result: \u662f\u5426\u8986\u76d6\u5df2\u6709\u7ed3\u679c\n :return: (\u662f\u5426\u6210\u529f, \u7ed3\u679c\u4fe1\u606f)\n\n example:\n ```python\n success, message = BlockModelEvaluator.kriging_evaluation(\n \"model.dmf\",\n constraint_params,\n evaluation_params\n )\n ```\n \"\"\"\n constraint_json = json.dumps(constraint_params.to_dict(), ensure_ascii=False)\n evaluation_json = json.dumps(evaluation_params.__dict__, ensure_ascii=False)\n b_res, message = Dm.KrigEvaluationValue(\n block_model_file,\n constraint_json,\n evaluation_json,\n overwrite_result\n )\n return b_res, message\n\n @staticmethod\n def calculate_reserves(\n block_model_file: str,\n constraint_params: BlockModelConstraint,\n reserve_params: ReservesCalculateParam\n ) -> Tuple[bool, str]:\n \"\"\"\n \u50a8\u91cf\u8ba1\u7b97\n :param block_model_file: \u5757\u6bb5\u6a21\u578b\u6587\u4ef6\u8def\u5f84\n :param constraint_params: \u7ea6\u675f\u6761\u4ef6\u53c2\u6570\uff08\u5b57\u5178\uff09\n :param reserve_params: \u50a8\u91cf\u8ba1\u7b97\u53c2\u6570\uff08\u5b57\u5178\uff09\n :return: (\u662f\u5426\u6210\u529f, \u7ed3\u679c\u4fe1\u606f)\n\n example:\n ```python\n success, message = BlockModelEvaluator.calculate_reserves(\n \"model.dmf\",\n constraint_params,\n reserve_params\n )\n ```\n \"\"\"\n constraint_json = json.dumps(constraint_params.to_dict(), ensure_ascii=False)\n reserve_json = json.dumps(reserve_params.to_dict(), ensure_ascii=False)\n\n b_res, message = Dm.ReservesCalculate(\n block_model_file,\n constraint_json,\n reserve_json\n )\n return b_res, message\n</code></pre>"},{"location":"reference/lib/prospecting/valuation.html#dimine_python_sdk.lib.prospecting.valuation.BlockModelEvaluator.calculate_reserves","title":"<code>calculate_reserves(block_model_file, constraint_params, reserve_params)</code> <code>staticmethod</code>","text":"<p>\u50a8\u91cf\u8ba1\u7b97 :param block_model_file: \u5757\u6bb5\u6a21\u578b\u6587\u4ef6\u8def\u5f84 :param constraint_params: \u7ea6\u675f\u6761\u4ef6\u53c2\u6570\uff08\u5b57\u5178\uff09 :param reserve_params: \u50a8\u91cf\u8ba1\u7b97\u53c2\u6570\uff08\u5b57\u5178\uff09 :return: (\u662f\u5426\u6210\u529f, \u7ed3\u679c\u4fe1\u606f)</p> <p>example:</p> <pre><code>success, message = BlockModelEvaluator.calculate_reserves(\n \"model.dmf\",\n constraint_params,\n reserve_params\n)\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\valuation.py</code> <pre><code>@staticmethod\ndef calculate_reserves(\n block_model_file: str,\n constraint_params: BlockModelConstraint,\n reserve_params: ReservesCalculateParam\n) -> Tuple[bool, str]:\n \"\"\"\n \u50a8\u91cf\u8ba1\u7b97\n :param block_model_file: \u5757\u6bb5\u6a21\u578b\u6587\u4ef6\u8def\u5f84\n :param constraint_params: \u7ea6\u675f\u6761\u4ef6\u53c2\u6570\uff08\u5b57\u5178\uff09\n :param reserve_params: \u50a8\u91cf\u8ba1\u7b97\u53c2\u6570\uff08\u5b57\u5178\uff09\n :return: (\u662f\u5426\u6210\u529f, \u7ed3\u679c\u4fe1\u606f)\n\n example:\n ```python\n success, message = BlockModelEvaluator.calculate_reserves(\n \"model.dmf\",\n constraint_params,\n reserve_params\n )\n ```\n \"\"\"\n constraint_json = json.dumps(constraint_params.to_dict(), ensure_ascii=False)\n reserve_json = json.dumps(reserve_params.to_dict(), ensure_ascii=False)\n\n b_res, message = Dm.ReservesCalculate(\n block_model_file,\n constraint_json,\n reserve_json\n )\n return b_res, message\n</code></pre>"},{"location":"reference/lib/prospecting/valuation.html#dimine_python_sdk.lib.prospecting.valuation.BlockModelEvaluator.distance_power_evaluation","title":"<code>distance_power_evaluation(block_model_file, constraint_params, evaluation_params, overwrite_result=True)</code> <code>staticmethod</code>","text":"<p>\u8ddd\u79bb\u5e42\u4f30\u503c\u8ba1\u7b97 :param block_model_file: \u5757\u6bb5\u6a21\u578b\u6587\u4ef6\u8def\u5f84 :param constraint_params: \u7ea6\u675f\u6761\u4ef6\u53c2\u6570\uff08\u5b57\u5178\uff09 :param evaluation_params: \u4f30\u503c\u8ba1\u7b97\u53c2\u6570\uff08\u5b57\u5178\uff09 :param overwrite_result: \u662f\u5426\u8986\u76d6\u5df2\u6709\u7ed3\u679c :return: (\u662f\u5426\u6210\u529f, \u7ed3\u679c\u4fe1\u606f)</p> <p>example:</p> <pre><code>success, message = BlockModelEvaluator.distance_power_evaluation(\n \"model.dmf\",\n constraint_params,\n evaluation_params\n)\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\valuation.py</code> <pre><code>@staticmethod\ndef distance_power_evaluation(\n block_model_file: str,\n constraint_params: BlockModelConstraint,\n evaluation_params: BlockModelDistancePowerParams,\n overwrite_result: bool = True\n) -> Tuple[bool, str]:\n \"\"\"\n \u8ddd\u79bb\u5e42\u4f30\u503c\u8ba1\u7b97\n :param block_model_file: \u5757\u6bb5\u6a21\u578b\u6587\u4ef6\u8def\u5f84\n :param constraint_params: \u7ea6\u675f\u6761\u4ef6\u53c2\u6570\uff08\u5b57\u5178\uff09\n :param evaluation_params: \u4f30\u503c\u8ba1\u7b97\u53c2\u6570\uff08\u5b57\u5178\uff09\n :param overwrite_result: \u662f\u5426\u8986\u76d6\u5df2\u6709\u7ed3\u679c\n :return: (\u662f\u5426\u6210\u529f, \u7ed3\u679c\u4fe1\u606f)\n\n example:\n ```python\n success, message = BlockModelEvaluator.distance_power_evaluation(\n \"model.dmf\",\n constraint_params,\n evaluation_params\n )\n ```\n \"\"\"\n # \u5c06\u53c2\u6570\u5e8f\u5217\u5316\u4e3aJSON\u5b57\u7b26\u4e32\n constraint_json = json.dumps(constraint_params.to_dict(), ensure_ascii=False)\n evaluation_json = json.dumps(evaluation_params.__dict__, ensure_ascii=False)\n\n b_res, message = Dm.DistancePowerEvaluationValue(\n block_model_file,\n constraint_json,\n evaluation_json,\n overwrite_result\n )\n return b_res, message\n</code></pre>"},{"location":"reference/lib/prospecting/valuation.html#dimine_python_sdk.lib.prospecting.valuation.BlockModelEvaluator.kriging_evaluation","title":"<code>kriging_evaluation(block_model_file, constraint_params, evaluation_params, overwrite_result=True)</code> <code>staticmethod</code>","text":"<p>\u514b\u91cc\u683c\u4f30\u503c\u8ba1\u7b97 :param block_model_file: \u5757\u6bb5\u6a21\u578b\u6587\u4ef6\u8def\u5f84 :param constraint_params: \u7ea6\u675f\u6761\u4ef6\u53c2\u6570 :param evaluation_params: \u4f30\u503c\u8ba1\u7b97\u53c2\u6570 :param overwrite_result: \u662f\u5426\u8986\u76d6\u5df2\u6709\u7ed3\u679c :return: (\u662f\u5426\u6210\u529f, \u7ed3\u679c\u4fe1\u606f)</p> <p>example:</p> <pre><code>success, message = BlockModelEvaluator.kriging_evaluation(\n \"model.dmf\",\n constraint_params,\n evaluation_params\n)\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\prospecting\\valuation.py</code> <pre><code>@staticmethod\ndef kriging_evaluation(\n block_model_file: str,\n constraint_params: BlockModelConstraint,\n evaluation_params: BlockModelKrigingParams,\n overwrite_result: bool = True\n) -> Tuple[bool, str]:\n \"\"\"\n \u514b\u91cc\u683c\u4f30\u503c\u8ba1\u7b97\n :param block_model_file: \u5757\u6bb5\u6a21\u578b\u6587\u4ef6\u8def\u5f84\n :param constraint_params: \u7ea6\u675f\u6761\u4ef6\u53c2\u6570\n :param evaluation_params: \u4f30\u503c\u8ba1\u7b97\u53c2\u6570\n :param overwrite_result: \u662f\u5426\u8986\u76d6\u5df2\u6709\u7ed3\u679c\n :return: (\u662f\u5426\u6210\u529f, \u7ed3\u679c\u4fe1\u606f)\n\n example:\n ```python\n success, message = BlockModelEvaluator.kriging_evaluation(\n \"model.dmf\",\n constraint_params,\n evaluation_params\n )\n ```\n \"\"\"\n constraint_json = json.dumps(constraint_params.to_dict(), ensure_ascii=False)\n evaluation_json = json.dumps(evaluation_params.__dict__, ensure_ascii=False)\n b_res, message = Dm.KrigEvaluationValue(\n block_model_file,\n constraint_json,\n evaluation_json,\n overwrite_result\n )\n return b_res, message\n</code></pre>"},{"location":"reference/lib/types/entity.html","title":"entity","text":""},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDataTable","title":"<code>DmDataTable</code>","text":"<p>\u6570\u636e\u8868 Python \u4e8c\u6b21\u5c01\u88c5\u7c7b</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>class DmDataTable:\n \"\"\"\n \u6570\u636e\u8868 Python \u4e8c\u6b21\u5c01\u88c5\u7c7b\n \"\"\"\n\n def __init__(self):\n self._obj = Dm.CDataTable()\n\n def load(self, file_path: str) -> bool | int:\n \"\"\"\n \u52a0\u8f7d\u6570\u636e\u8868\u6587\u4ef6\n :param file_path: UTF-8 \u7f16\u7801\u7684\u6570\u636e\u8868\u6587\u4ef6\u8def\u5f84\n :return: \u52a0\u8f7d\u7ed3\u679c\uff08\u6210\u529f\u8fd4\u56de True/0\uff0c\u5931\u8d25\u8fd4\u56de False/\u9519\u8bef\u7801\uff09\n\n example:\n ```python\n dt = DmDataTable()\n dt.load(\"E:/dassistant/tests/123.dmd\")\n print(\"\u5b57\u6bb5\u603b\u6570:\",dt.get_field_count())\n ```\n \"\"\"\n if not isinstance(file_path, str) or not file_path.strip():\n raise ValueError(\"\u6587\u4ef6\u8def\u5f84\u4e0d\u80fd\u4e3a\u7a7a\u5b57\u7b26\u4e32\")\n return self._obj.Load(file_path)\n\n def get_field_count(self) -> int:\n \"\"\"\u83b7\u53d6\u5b57\u6bb5\u603b\u6570\"\"\"\n return self._obj.Get_Field_Count()\n\n def get_record_count(self) -> int:\n \"\"\"\u83b7\u53d6\u8bb0\u5f55\u603b\u6570\"\"\"\n return self._obj.Get_Record_Count()\n\n def get_record_data(self, record_index: int) -> dict:\n \"\"\"\n \u901a\u8fc7\u7d22\u5f15\u83b7\u53d6\u5355\u6761\u8bb0\u5f55\u7684\u5b8c\u6574\u6570\u636e\n :param record_index: \u8bb0\u5f55\u7d22\u5f15\uff08\u4ece0\u5f00\u59cb\uff09\n :return: \u8bb0\u5f55\u6570\u636e\u5b57\u5178\uff0c\u952e\u4e3a\u5b57\u6bb5\u540d\uff0c\u503c\u4e3a\u5b57\u6bb5\u503c\n \"\"\"\n return self._obj.Get_Record_Data(record_index)\n\n def get_field_id(self, field_name: str) -> int:\n \"\"\"\n \u901a\u8fc7\u5b57\u6bb5\u540d\u83b7\u53d6\u5b57\u6bb5ID\n :param field_name: UTF-8 \u7f16\u7801\u7684\u5b57\u6bb5\u540d\n :return: \u5b57\u6bb5ID\n \"\"\"\n if not isinstance(field_name, str) or not field_name.strip():\n raise ValueError(\"\u5b57\u6bb5\u540d\u4e0d\u80fd\u4e3a\u7a7a\u5b57\u7b26\u4e32\")\n return self._obj.Get_Field_Id(field_name)\n\n def get_field_name(self, field_index: int) -> str:\n \"\"\"\n \u901a\u8fc7\u7d22\u5f15\u83b7\u53d6\u5b57\u6bb5\u540d\n :param field_index: \u5b57\u6bb5\u7d22\u5f15\uff08\u4ece0\u5f00\u59cb\uff09\n :return: UTF-8 \u7f16\u7801\u7684\u5b57\u6bb5\u540d\n \"\"\"\n # if not isinstance(field_index, int) or field_index < 0:\n # raise ValueError(\"\u5b57\u6bb5\u7d22\u5f15\u5fc5\u987b\u4e3a\u975e\u8d1f\u6574\u6570\")\n # if field_index >= self.get_field_count():\n # raise IndexError(\"\u5b57\u6bb5\u7d22\u5f15\u8d85\u51fa\u8303\u56f4\")\n return self._obj.Get_Field_Name(field_index)\n\n def get_field_display_name(self, field_index: int) -> str:\n \"\"\"\n \u901a\u8fc7\u7d22\u5f15\u83b7\u53d6\u5b57\u6bb5\u663e\u793a\u540d\n :param field_index: \u5b57\u6bb5\u7d22\u5f15\uff08\u4ece0\u5f00\u59cb\uff09\n :return: UTF-8 \u7f16\u7801\u7684\u5b57\u6bb5\u663e\u793a\u540d\n \"\"\"\n # if not isinstance(field_index, int) or field_index < 0:\n # raise ValueError(\"\u5b57\u6bb5\u7d22\u5f15\u5fc5\u987b\u4e3a\u975e\u8d1f\u6574\u6570\")\n # if field_index >= self.get_field_count():\n # raise IndexError(\"\u5b57\u6bb5\u7d22\u5f15\u8d85\u51fa\u8303\u56f4\")\n return self._obj.Get_Field_DisplayName(field_index)\n\n def get_field_type(self, field_index: int) -> int:\n \"\"\"\n \u901a\u8fc7\u7d22\u5f15\u83b7\u53d6\u5b57\u6bb5\u7c7b\u578b\n :param field_index: \u5b57\u6bb5\u7d22\u5f15\uff08\u4ece0\u5f00\u59cb\uff09\n :return: \u5b57\u6bb5\u7c7b\u578b\u679a\u4e3e\u503c\n \"\"\"\n # if not isinstance(field_index, int) or field_index < 0:\n # raise ValueError(\"\u5b57\u6bb5\u7d22\u5f15\u5fc5\u987b\u4e3a\u975e\u8d1f\u6574\u6570\")\n # if field_index >= self.get_field_count():\n # raise IndexError(\"\u5b57\u6bb5\u7d22\u5f15\u8d85\u51fa\u8303\u56f4\")\n return self._obj.Get_Field_Type(field_index)\n\n def get_record_from_index(self, record_index: int) -> DmDataTableRecord:\n \"\"\"\n \u901a\u8fc7\u7d22\u5f15\u83b7\u53d6\u539f\u59cb\u8bb0\u5f55\u5bf9\u8c61\n :param record_index: \u8bb0\u5f55\u7d22\u5f15\uff08\u4ece0\u5f00\u59cb\uff09\n :return: \u539f\u59cb\u8bb0\u5f55\u5bf9\u8c61\n \"\"\"\n # if not isinstance(record_index, int) or record_index < 0:\n # raise ValueError(\"\u8bb0\u5f55\u7d22\u5f15\u5fc5\u987b\u4e3a\u975e\u8d1f\u6574\u6570\")\n # if record_index >= self.get_record_count():\n # raise IndexError(\"\u8bb0\u5f55\u7d22\u5f15\u8d85\u51fa\u8303\u56f4\")\n cpp_result = self._obj.Get_Record_From_Index(record_index)\n return DmDataTableRecord._from_obj(cpp_result)\n\n def get_record_count_by_condition(self, field_name: str, field_value: str) -> int:\n \"\"\"\n \u6839\u636e\u5b57\u6bb5\u540d\u548c\u503c\u7b5b\u9009\u8bb0\u5f55\u6570\u91cf\n :param field_name: UTF-8 \u7f16\u7801\u7684\u5b57\u6bb5\u540d\n :param field_value: UTF-8 \u7f16\u7801\u7684\u5b57\u6bb5\u503c\n :return: \u7b26\u5408\u6761\u4ef6\u7684\u8bb0\u5f55\u6570\u91cf\n \"\"\"\n if not isinstance(field_name, str) or not field_name.strip():\n raise ValueError(\"\u5b57\u6bb5\u540d\u4e0d\u80fd\u4e3a\u7a7a\u5b57\u7b26\u4e32\")\n if not isinstance(field_value, str):\n raise ValueError(\"\u5b57\u6bb5\u503c\u5fc5\u987b\u4e3a\u5b57\u7b26\u4e32\")\n return self._obj.GetRecordCountByCondition(field_name, field_value)\n\n def add_record(self) -> bool | int:\n \"\"\"\u6dfb\u52a0\u4e00\u6761\u65b0\u8bb0\u5f55\"\"\"\n return self._obj.Add_Record()\n\n def save(self) -> bool | int:\n \"\"\"\u4fdd\u5b58\u6570\u636e\u8868\"\"\"\n return self._obj.Save()\n\n @classmethod\n def _from_obj(cls, obj):\n \"\"\"\n \u539f\u751fdmDataTable\u5bf9\u8c61\u521b\u5efa\u5c01\u88c5\u5b9e\u4f8b\n :param obj: \u539f\u751fdmDataTable\u5bf9\u8c61\uff08bind11\u5c01\u88c5\u540e\uff09\n :return: DmDataTable\u5b9e\u4f8b\n \"\"\"\n instance = cls.__new__(cls)\n instance._obj = obj\n return instance\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDataTable.add_record","title":"<code>add_record()</code>","text":"<p>\u6dfb\u52a0\u4e00\u6761\u65b0\u8bb0\u5f55</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def add_record(self) -> bool | int:\n \"\"\"\u6dfb\u52a0\u4e00\u6761\u65b0\u8bb0\u5f55\"\"\"\n return self._obj.Add_Record()\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDataTable.get_field_count","title":"<code>get_field_count()</code>","text":"<p>\u83b7\u53d6\u5b57\u6bb5\u603b\u6570</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def get_field_count(self) -> int:\n \"\"\"\u83b7\u53d6\u5b57\u6bb5\u603b\u6570\"\"\"\n return self._obj.Get_Field_Count()\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDataTable.get_field_display_name","title":"<code>get_field_display_name(field_index)</code>","text":"<p>\u901a\u8fc7\u7d22\u5f15\u83b7\u53d6\u5b57\u6bb5\u663e\u793a\u540d :param field_index: \u5b57\u6bb5\u7d22\u5f15\uff08\u4ece0\u5f00\u59cb\uff09 :return: UTF-8 \u7f16\u7801\u7684\u5b57\u6bb5\u663e\u793a\u540d</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def get_field_display_name(self, field_index: int) -> str:\n \"\"\"\n \u901a\u8fc7\u7d22\u5f15\u83b7\u53d6\u5b57\u6bb5\u663e\u793a\u540d\n :param field_index: \u5b57\u6bb5\u7d22\u5f15\uff08\u4ece0\u5f00\u59cb\uff09\n :return: UTF-8 \u7f16\u7801\u7684\u5b57\u6bb5\u663e\u793a\u540d\n \"\"\"\n # if not isinstance(field_index, int) or field_index < 0:\n # raise ValueError(\"\u5b57\u6bb5\u7d22\u5f15\u5fc5\u987b\u4e3a\u975e\u8d1f\u6574\u6570\")\n # if field_index >= self.get_field_count():\n # raise IndexError(\"\u5b57\u6bb5\u7d22\u5f15\u8d85\u51fa\u8303\u56f4\")\n return self._obj.Get_Field_DisplayName(field_index)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDataTable.get_field_id","title":"<code>get_field_id(field_name)</code>","text":"<p>\u901a\u8fc7\u5b57\u6bb5\u540d\u83b7\u53d6\u5b57\u6bb5ID :param field_name: UTF-8 \u7f16\u7801\u7684\u5b57\u6bb5\u540d :return: \u5b57\u6bb5ID</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def get_field_id(self, field_name: str) -> int:\n \"\"\"\n \u901a\u8fc7\u5b57\u6bb5\u540d\u83b7\u53d6\u5b57\u6bb5ID\n :param field_name: UTF-8 \u7f16\u7801\u7684\u5b57\u6bb5\u540d\n :return: \u5b57\u6bb5ID\n \"\"\"\n if not isinstance(field_name, str) or not field_name.strip():\n raise ValueError(\"\u5b57\u6bb5\u540d\u4e0d\u80fd\u4e3a\u7a7a\u5b57\u7b26\u4e32\")\n return self._obj.Get_Field_Id(field_name)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDataTable.get_field_name","title":"<code>get_field_name(field_index)</code>","text":"<p>\u901a\u8fc7\u7d22\u5f15\u83b7\u53d6\u5b57\u6bb5\u540d :param field_index: \u5b57\u6bb5\u7d22\u5f15\uff08\u4ece0\u5f00\u59cb\uff09 :return: UTF-8 \u7f16\u7801\u7684\u5b57\u6bb5\u540d</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def get_field_name(self, field_index: int) -> str:\n \"\"\"\n \u901a\u8fc7\u7d22\u5f15\u83b7\u53d6\u5b57\u6bb5\u540d\n :param field_index: \u5b57\u6bb5\u7d22\u5f15\uff08\u4ece0\u5f00\u59cb\uff09\n :return: UTF-8 \u7f16\u7801\u7684\u5b57\u6bb5\u540d\n \"\"\"\n # if not isinstance(field_index, int) or field_index < 0:\n # raise ValueError(\"\u5b57\u6bb5\u7d22\u5f15\u5fc5\u987b\u4e3a\u975e\u8d1f\u6574\u6570\")\n # if field_index >= self.get_field_count():\n # raise IndexError(\"\u5b57\u6bb5\u7d22\u5f15\u8d85\u51fa\u8303\u56f4\")\n return self._obj.Get_Field_Name(field_index)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDataTable.get_field_type","title":"<code>get_field_type(field_index)</code>","text":"<p>\u901a\u8fc7\u7d22\u5f15\u83b7\u53d6\u5b57\u6bb5\u7c7b\u578b :param field_index: \u5b57\u6bb5\u7d22\u5f15\uff08\u4ece0\u5f00\u59cb\uff09 :return: \u5b57\u6bb5\u7c7b\u578b\u679a\u4e3e\u503c</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def get_field_type(self, field_index: int) -> int:\n \"\"\"\n \u901a\u8fc7\u7d22\u5f15\u83b7\u53d6\u5b57\u6bb5\u7c7b\u578b\n :param field_index: \u5b57\u6bb5\u7d22\u5f15\uff08\u4ece0\u5f00\u59cb\uff09\n :return: \u5b57\u6bb5\u7c7b\u578b\u679a\u4e3e\u503c\n \"\"\"\n # if not isinstance(field_index, int) or field_index < 0:\n # raise ValueError(\"\u5b57\u6bb5\u7d22\u5f15\u5fc5\u987b\u4e3a\u975e\u8d1f\u6574\u6570\")\n # if field_index >= self.get_field_count():\n # raise IndexError(\"\u5b57\u6bb5\u7d22\u5f15\u8d85\u51fa\u8303\u56f4\")\n return self._obj.Get_Field_Type(field_index)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDataTable.get_record_count","title":"<code>get_record_count()</code>","text":"<p>\u83b7\u53d6\u8bb0\u5f55\u603b\u6570</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def get_record_count(self) -> int:\n \"\"\"\u83b7\u53d6\u8bb0\u5f55\u603b\u6570\"\"\"\n return self._obj.Get_Record_Count()\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDataTable.get_record_count_by_condition","title":"<code>get_record_count_by_condition(field_name, field_value)</code>","text":"<p>\u6839\u636e\u5b57\u6bb5\u540d\u548c\u503c\u7b5b\u9009\u8bb0\u5f55\u6570\u91cf :param field_name: UTF-8 \u7f16\u7801\u7684\u5b57\u6bb5\u540d :param field_value: UTF-8 \u7f16\u7801\u7684\u5b57\u6bb5\u503c :return: \u7b26\u5408\u6761\u4ef6\u7684\u8bb0\u5f55\u6570\u91cf</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def get_record_count_by_condition(self, field_name: str, field_value: str) -> int:\n \"\"\"\n \u6839\u636e\u5b57\u6bb5\u540d\u548c\u503c\u7b5b\u9009\u8bb0\u5f55\u6570\u91cf\n :param field_name: UTF-8 \u7f16\u7801\u7684\u5b57\u6bb5\u540d\n :param field_value: UTF-8 \u7f16\u7801\u7684\u5b57\u6bb5\u503c\n :return: \u7b26\u5408\u6761\u4ef6\u7684\u8bb0\u5f55\u6570\u91cf\n \"\"\"\n if not isinstance(field_name, str) or not field_name.strip():\n raise ValueError(\"\u5b57\u6bb5\u540d\u4e0d\u80fd\u4e3a\u7a7a\u5b57\u7b26\u4e32\")\n if not isinstance(field_value, str):\n raise ValueError(\"\u5b57\u6bb5\u503c\u5fc5\u987b\u4e3a\u5b57\u7b26\u4e32\")\n return self._obj.GetRecordCountByCondition(field_name, field_value)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDataTable.get_record_data","title":"<code>get_record_data(record_index)</code>","text":"<p>\u901a\u8fc7\u7d22\u5f15\u83b7\u53d6\u5355\u6761\u8bb0\u5f55\u7684\u5b8c\u6574\u6570\u636e :param record_index: \u8bb0\u5f55\u7d22\u5f15\uff08\u4ece0\u5f00\u59cb\uff09 :return: \u8bb0\u5f55\u6570\u636e\u5b57\u5178\uff0c\u952e\u4e3a\u5b57\u6bb5\u540d\uff0c\u503c\u4e3a\u5b57\u6bb5\u503c</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def get_record_data(self, record_index: int) -> dict:\n \"\"\"\n \u901a\u8fc7\u7d22\u5f15\u83b7\u53d6\u5355\u6761\u8bb0\u5f55\u7684\u5b8c\u6574\u6570\u636e\n :param record_index: \u8bb0\u5f55\u7d22\u5f15\uff08\u4ece0\u5f00\u59cb\uff09\n :return: \u8bb0\u5f55\u6570\u636e\u5b57\u5178\uff0c\u952e\u4e3a\u5b57\u6bb5\u540d\uff0c\u503c\u4e3a\u5b57\u6bb5\u503c\n \"\"\"\n return self._obj.Get_Record_Data(record_index)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDataTable.get_record_from_index","title":"<code>get_record_from_index(record_index)</code>","text":"<p>\u901a\u8fc7\u7d22\u5f15\u83b7\u53d6\u539f\u59cb\u8bb0\u5f55\u5bf9\u8c61 :param record_index: \u8bb0\u5f55\u7d22\u5f15\uff08\u4ece0\u5f00\u59cb\uff09 :return: \u539f\u59cb\u8bb0\u5f55\u5bf9\u8c61</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def get_record_from_index(self, record_index: int) -> DmDataTableRecord:\n \"\"\"\n \u901a\u8fc7\u7d22\u5f15\u83b7\u53d6\u539f\u59cb\u8bb0\u5f55\u5bf9\u8c61\n :param record_index: \u8bb0\u5f55\u7d22\u5f15\uff08\u4ece0\u5f00\u59cb\uff09\n :return: \u539f\u59cb\u8bb0\u5f55\u5bf9\u8c61\n \"\"\"\n # if not isinstance(record_index, int) or record_index < 0:\n # raise ValueError(\"\u8bb0\u5f55\u7d22\u5f15\u5fc5\u987b\u4e3a\u975e\u8d1f\u6574\u6570\")\n # if record_index >= self.get_record_count():\n # raise IndexError(\"\u8bb0\u5f55\u7d22\u5f15\u8d85\u51fa\u8303\u56f4\")\n cpp_result = self._obj.Get_Record_From_Index(record_index)\n return DmDataTableRecord._from_obj(cpp_result)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDataTable.load","title":"<code>load(file_path)</code>","text":"<p>\u52a0\u8f7d\u6570\u636e\u8868\u6587\u4ef6 :param file_path: UTF-8 \u7f16\u7801\u7684\u6570\u636e\u8868\u6587\u4ef6\u8def\u5f84 :return: \u52a0\u8f7d\u7ed3\u679c\uff08\u6210\u529f\u8fd4\u56de True/0\uff0c\u5931\u8d25\u8fd4\u56de False/\u9519\u8bef\u7801\uff09</p> <p>example:</p> <pre><code>dt = DmDataTable()\ndt.load(\"E:/dassistant/tests/123.dmd\")\nprint(\"\u5b57\u6bb5\u603b\u6570:\",dt.get_field_count())\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def load(self, file_path: str) -> bool | int:\n \"\"\"\n \u52a0\u8f7d\u6570\u636e\u8868\u6587\u4ef6\n :param file_path: UTF-8 \u7f16\u7801\u7684\u6570\u636e\u8868\u6587\u4ef6\u8def\u5f84\n :return: \u52a0\u8f7d\u7ed3\u679c\uff08\u6210\u529f\u8fd4\u56de True/0\uff0c\u5931\u8d25\u8fd4\u56de False/\u9519\u8bef\u7801\uff09\n\n example:\n ```python\n dt = DmDataTable()\n dt.load(\"E:/dassistant/tests/123.dmd\")\n print(\"\u5b57\u6bb5\u603b\u6570:\",dt.get_field_count())\n ```\n \"\"\"\n if not isinstance(file_path, str) or not file_path.strip():\n raise ValueError(\"\u6587\u4ef6\u8def\u5f84\u4e0d\u80fd\u4e3a\u7a7a\u5b57\u7b26\u4e32\")\n return self._obj.Load(file_path)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDataTable.save","title":"<code>save()</code>","text":"<p>\u4fdd\u5b58\u6570\u636e\u8868</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def save(self) -> bool | int:\n \"\"\"\u4fdd\u5b58\u6570\u636e\u8868\"\"\"\n return self._obj.Save()\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDataTableRecord","title":"<code>DmDataTableRecord</code>","text":"<p>\u6570\u636e\u8868\u8bb0\u5f55\u7c7b</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>class DmDataTableRecord:\n \"\"\"\n \u6570\u636e\u8868\u8bb0\u5f55\u7c7b\n \"\"\"\n\n # def __init__(self, record_obj: Dm.CDataTableRecord):\n # self._obj = record_obj # \u63a5\u6536\u5e95\u5c42\u8bb0\u5f55\u5bf9\u8c61\n\n @classmethod\n def _from_obj(cls, obj):\n \"\"\"\n \u539f\u751fdmDataTableRecord\u5bf9\u8c61\u521b\u5efa\u5c01\u88c5\u5b9e\u4f8b\n :param obj: \u539f\u751fdmDataTableRecord\u5bf9\u8c61\uff08bind11\u5c01\u88c5\u540e\uff09\n :return: DmDataTableRecord\u5b9e\u4f8b\n \"\"\"\n instance = cls.__new__(cls)\n instance._obj = obj\n return instance\n\n def as_string(self, field_name: str) -> str:\n \"\"\"\n \u83b7\u53d6\u5b57\u6bb5\u503c\uff08\u5b57\u7b26\u4e32\u5f62\u5f0f\uff09\n :param field_name: UTF-8 \u7f16\u7801\u7684\u5b57\u6bb5\u540d\n :return: \u5b57\u6bb5\u503c\u5b57\u7b26\u4e32\n \"\"\"\n if not isinstance(field_name, str) or not field_name.strip():\n raise ValueError(\"\u5b57\u6bb5\u540d\u4e0d\u80fd\u4e3a\u7a7a\u5b57\u7b26\u4e32\")\n return self._obj.asString(field_name)\n\n def as_double(self, field_name: str) -> float:\n \"\"\"\n \u83b7\u53d6\u5b57\u6bb5\u503c\uff08\u6d6e\u70b9\u5f62\u5f0f\uff09\n :param field_name: UTF-8 \u7f16\u7801\u7684\u5b57\u6bb5\u540d\n :return: \u5b57\u6bb5\u503c\u6d6e\u70b9\u6570\n \"\"\"\n if not isinstance(field_name, str) or not field_name.strip():\n raise ValueError(\"\u5b57\u6bb5\u540d\u4e0d\u80fd\u4e3a\u7a7a\u5b57\u7b26\u4e32\")\n return self._obj.asDouble(field_name)\n\n def set_value(self, field_name: str, value: str | float) -> None:\n \"\"\"\n \u8bbe\u7f6e\u5b57\u6bb5\u503c\uff08\u652f\u6301\u5b57\u7b26\u4e32/\u6d6e\u70b9\u6570\uff09\n :param field_name: UTF-8 \u7f16\u7801\u7684\u5b57\u6bb5\u540d\n :param value: \u5b57\u6bb5\u503c\uff08\u5b57\u7b26\u4e32\u6216\u6d6e\u70b9\u6570\uff09\n \"\"\"\n if not isinstance(field_name, str) or not field_name.strip():\n raise ValueError(\"\u5b57\u6bb5\u540d\u4e0d\u80fd\u4e3a\u7a7a\u5b57\u7b26\u4e32\")\n if isinstance(value, str):\n self._obj.Set_Value(field_name, value)\n elif isinstance(value, (int, float)):\n self._obj.Set_Value(field_name, float(value))\n else:\n raise TypeError(\"\u5b57\u6bb5\u503c\u4ec5\u652f\u6301\u5b57\u7b26\u4e32\u6216\u6570\u5b57\u7c7b\u578b\")\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDataTableRecord.as_double","title":"<code>as_double(field_name)</code>","text":"<p>\u83b7\u53d6\u5b57\u6bb5\u503c\uff08\u6d6e\u70b9\u5f62\u5f0f\uff09 :param field_name: UTF-8 \u7f16\u7801\u7684\u5b57\u6bb5\u540d :return: \u5b57\u6bb5\u503c\u6d6e\u70b9\u6570</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def as_double(self, field_name: str) -> float:\n \"\"\"\n \u83b7\u53d6\u5b57\u6bb5\u503c\uff08\u6d6e\u70b9\u5f62\u5f0f\uff09\n :param field_name: UTF-8 \u7f16\u7801\u7684\u5b57\u6bb5\u540d\n :return: \u5b57\u6bb5\u503c\u6d6e\u70b9\u6570\n \"\"\"\n if not isinstance(field_name, str) or not field_name.strip():\n raise ValueError(\"\u5b57\u6bb5\u540d\u4e0d\u80fd\u4e3a\u7a7a\u5b57\u7b26\u4e32\")\n return self._obj.asDouble(field_name)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDataTableRecord.as_string","title":"<code>as_string(field_name)</code>","text":"<p>\u83b7\u53d6\u5b57\u6bb5\u503c\uff08\u5b57\u7b26\u4e32\u5f62\u5f0f\uff09 :param field_name: UTF-8 \u7f16\u7801\u7684\u5b57\u6bb5\u540d :return: \u5b57\u6bb5\u503c\u5b57\u7b26\u4e32</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def as_string(self, field_name: str) -> str:\n \"\"\"\n \u83b7\u53d6\u5b57\u6bb5\u503c\uff08\u5b57\u7b26\u4e32\u5f62\u5f0f\uff09\n :param field_name: UTF-8 \u7f16\u7801\u7684\u5b57\u6bb5\u540d\n :return: \u5b57\u6bb5\u503c\u5b57\u7b26\u4e32\n \"\"\"\n if not isinstance(field_name, str) or not field_name.strip():\n raise ValueError(\"\u5b57\u6bb5\u540d\u4e0d\u80fd\u4e3a\u7a7a\u5b57\u7b26\u4e32\")\n return self._obj.asString(field_name)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDataTableRecord.set_value","title":"<code>set_value(field_name, value)</code>","text":"<p>\u8bbe\u7f6e\u5b57\u6bb5\u503c\uff08\u652f\u6301\u5b57\u7b26\u4e32/\u6d6e\u70b9\u6570\uff09 :param field_name: UTF-8 \u7f16\u7801\u7684\u5b57\u6bb5\u540d :param value: \u5b57\u6bb5\u503c\uff08\u5b57\u7b26\u4e32\u6216\u6d6e\u70b9\u6570\uff09</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def set_value(self, field_name: str, value: str | float) -> None:\n \"\"\"\n \u8bbe\u7f6e\u5b57\u6bb5\u503c\uff08\u652f\u6301\u5b57\u7b26\u4e32/\u6d6e\u70b9\u6570\uff09\n :param field_name: UTF-8 \u7f16\u7801\u7684\u5b57\u6bb5\u540d\n :param value: \u5b57\u6bb5\u503c\uff08\u5b57\u7b26\u4e32\u6216\u6d6e\u70b9\u6570\uff09\n \"\"\"\n if not isinstance(field_name, str) or not field_name.strip():\n raise ValueError(\"\u5b57\u6bb5\u540d\u4e0d\u80fd\u4e3a\u7a7a\u5b57\u7b26\u4e32\")\n if isinstance(value, str):\n self._obj.Set_Value(field_name, value)\n elif isinstance(value, (int, float)):\n self._obj.Set_Value(field_name, float(value))\n else:\n raise TypeError(\"\u5b57\u6bb5\u503c\u4ec5\u652f\u6301\u5b57\u7b26\u4e32\u6216\u6570\u5b57\u7c7b\u578b\")\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbDatabase","title":"<code>DmDbDatabase</code>","text":"<p>\u51e0\u4f55\u6570\u636e\u5e93</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>class DmDbDatabase:\n \"\"\"\n \u51e0\u4f55\u6570\u636e\u5e93\n \"\"\"\n\n def __init__(self):\n # \u521d\u59cb\u5316\u6e90\u6269\u5c55\u7684\u6838\u5fc3\u5bf9\u8c61\uff0c\u4f5c\u4e3a\u5e95\u5c42\u64cd\u4f5c\u5165\u53e3\n self._db = Dm.dmDbDatabase()\n\n def load(self, file_path: str) -> bool | int:\n \"\"\"\n \u52a0\u8f7d\u672c\u5730\u6570\u636e\u5e93\u6587\u4ef6\uff08\u5e95\u5c42\u8c03\u7528\u6e90Load\u63a5\u53e3\uff09\n :param file_path: \u6570\u636e\u5e93\u6587\u4ef6\u8def\u5f84\uff08UTF-8\u7f16\u7801\uff0c\u5e95\u5c42\u5df2\u5904\u7406\u7f16\u7801\u8f6c\u6362\uff09\n :return: \u52a0\u8f7d\u7ed3\u679c\uff0c\u6210\u529f\u8fd4\u56deTrue/0\uff0c\u5931\u8d25\u8fd4\u56deFalse/\u9519\u8bef\u7801\n\n example:\n ```python\n dmf = DmDbDatabase()\n db = dmf.load('E:/dassistant/tests/123.dmf')\n print(db)\n ```\n \"\"\"\n if not isinstance(file_path, str) or not file_path.strip():\n raise ValueError(\"\u6587\u4ef6\u8def\u5f84\u4e0d\u80fd\u4e3a\u7a7a\u5b57\u7b26\u4e32\")\n return self._db.Load(file_path)\n\n def get_layers_count(self) -> int:\n \"\"\"\n \u83b7\u53d6\u6570\u636e\u5e93\u56fe\u5c42\u603b\u6570\uff08\u5e95\u5c42\u8c03\u7528\u6e90GetLayersCount\u63a5\u53e3\uff09\n :return: \u975e\u8d1f\u6574\u6570\uff0c\u56fe\u5c42\u603b\u6570\u91cf\n\n example:\n ```python\n dmf = DmDbDatabase()\n db = dmf.load('E:/dassistant/tests/123.dmf')\n print(\"\u83b7\u53d6\u56fe\u5c42\u6570\u91cf:\",dmf.get_layers_count())\n ```\n \"\"\"\n return self._db.GetLayersCount()\n\n def get_layer_by_index(self, layer_index: int) -> DmDbLayer | None:\n \"\"\"\n \u901a\u8fc7\u7d22\u5f15\u83b7\u53d6\u56fe\u5c42\u5bf9\u8c61\uff08\u5e95\u5c42\u8c03\u7528\u6e90GetLayerFromIndex\u63a5\u53e3\uff09\n :param layer_index: \u56fe\u5c42\u7d22\u5f15\uff0c\u4ece0\u5f00\u59cb\n :return: \u56fe\u5c42\u5bf9\u8c61\uff0c\u7d22\u5f15\u65e0\u6548\u65f6\u8fd4\u56deNone\n \"\"\"\n if not isinstance(layer_index, int) or layer_index < 0:\n raise ValueError(\"\u56fe\u5c42\u7d22\u5f15\u5fc5\u987b\u4e3a\u975e\u8d1f\u6574\u6570\")\n cpp_result = self._db.GetLayerFromIndex(layer_index)\n return DmDbLayer._from_obj(cpp_result)\n\n def set_file_name(self, file_path: str) -> None:\n \"\"\"\n \u8bbe\u7f6e\u6570\u636e\u5e93\u6587\u4ef6\u8def\u5f84\uff08\u5e95\u5c42\u8c03\u7528\u6e90SetFileName\u63a5\u53e3\uff09\n :param file_path: \u6570\u636e\u5e93\u6587\u4ef6\u8def\u5f84\uff08UTF-8\u7f16\u7801\uff09\n \"\"\"\n if not isinstance(file_path, str) or not file_path.strip():\n raise ValueError(\"\u6587\u4ef6\u8def\u5f84\u4e0d\u80fd\u4e3a\u7a7a\u5b57\u7b26\u4e32\")\n self._db.SetFileName(file_path)\n\n def insert_layer(self, layer_name: str) -> DmDbLayer:\n \"\"\"\n \u63d2\u5165\u65b0\u56fe\u5c42\uff08\u5e95\u5c42\u8c03\u7528\u6e90InsertLayer\u63a5\u53e3\uff09\n :param layer_name: \u56fe\u5c42\u540d\u79f0\uff08UTF-8\u7f16\u7801\uff09\n :return: \u65b0\u521b\u5efa\u7684\u56fe\u5c42\u5bf9\u8c61\n\n example:\n ```python\n dmf = DmDbDatabase()\n db = dmf.load('E:/dassistant/tests/123.dmf')\n layer = dmf.insert_layer(\"\u65b0\u56fe\u5c42\")\n print(\"\u63d2\u5165\u65b0\u56fe\u5c42:\",layer)\n ```\n \"\"\"\n if not isinstance(layer_name, str) or not layer_name.strip():\n raise ValueError(\"\u56fe\u5c42\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a\u5b57\u7b26\u4e32\")\n cpp_result = self._db.InsertLayer(layer_name.strip())\n return DmDbLayer._from_obj(cpp_result)\n\n def save(self, file_path: str | None = None) -> bool | int:\n \"\"\"\n \u4fdd\u5b58\u6570\u636e\u5e93\uff08\u5e95\u5c42\u8c03\u7528\u6e90Save\u91cd\u8f7d\u63a5\u53e3\uff0c\u81ea\u52a8\u9002\u914d\u65e0\u53c2/\u6709\u53c2\uff09\n :param file_path: \u53ef\u9009\u4fdd\u5b58\u8def\u5f84\uff0c\u4e3aNone\u65f6\u4fdd\u5b58\u5230\u5f53\u524d\u8def\u5f84\n :return: \u4fdd\u5b58\u7ed3\u679c\uff0c\u6210\u529f\u8fd4\u56deTrue/0\uff0c\u5931\u8d25\u8fd4\u56deFalse/\u9519\u8bef\u7801\n\n example:\n ```python\n dmf = DmDbDatabase()\n db = dmf.load('E:/dassistant/tests/123.dmf')\n layer = dmf.insert_layer(\"\u65b0\u56fe\u5c42\")\n print(\"\u63d2\u5165\u65b0\u56fe\u5c42:\",layer)\n dmf.save(\"E:/dassistant/tests/123_1.dmf\")\n ```\n \"\"\"\n if file_path is None:\n return self._db.Save()\n if not isinstance(file_path, str) or not file_path.strip():\n raise ValueError(\"\u4fdd\u5b58\u8def\u5f84\u4e0d\u80fd\u4e3a\u7a7a\u5b57\u7b26\u4e32\")\n return self._db.Save(file_path)\n\n def switch_to_local_storage(self) -> None:\n \"\"\"\u5207\u6362\u5230\u672c\u5730\u5b58\u50a8\u6a21\u5f0f\uff08\u5e95\u5c42\u8c03\u7528\u6e90SetToLocalStorage\u63a5\u53e3\uff09\"\"\"\n self._db.SetToLocalStorage()\n\n def get_active_layer(self) -> DmDbLayer | None:\n \"\"\"\n \u83b7\u53d6\u5f53\u524d\u6fc0\u6d3b\u56fe\u5c42\uff08\u5e95\u5c42\u8c03\u7528\u6e90GetActiveLayer\u63a5\u53e3\uff09\n :return: \u6fc0\u6d3b\u56fe\u5c42\u5bf9\u8c61\uff0c\u65e0\u6fc0\u6d3b\u56fe\u5c42\u65f6\u8fd4\u56deNone\n\n example:\n ```python\n dmf = DmDbDatabase()\n db = dmf.load('E:/dassistant/tests/123.dmf')\n layer = dmf.get_active_layer()\n print(\"\u5f53\u524d\u6d3b\u52a8\u56fe\u5c42:\",layer)\n ```\n \"\"\"\n cpp_result = self._db.GetActiveLayer()\n return DmDbLayer._from_obj(cpp_result)\n\n @staticmethod\n def create_local_db() -> \"DmDbDatabase\":\n \"\"\"\n \u521b\u5efa\u672c\u5730\u6570\u636e\u5e93\uff08\u5e95\u5c42\u8c03\u7528\u6e90CreateLocalDB\u9759\u6001\u63a5\u53e3\uff09\n :return: \u65b0\u521b\u5efa\u7684\u6570\u636e\u5e93\u5bf9\u8c61\n \"\"\"\n cpp_db = Dm.dmDbDatabase.CreateLocalDB()\n return DmDbDatabase._from_obj(cpp_db)\n\n def close_polyline(self) -> bool | int:\n \"\"\"\n \u95ed\u5408\u591a\u6bb5\u7ebf\uff08\u5e95\u5c42\u8c03\u7528\u6e90ClosePolyline\u63a5\u53e3\uff09\n :return: \u64cd\u4f5c\u7ed3\u679c\n \"\"\"\n return self._db.ClosePolyline()\n\n def set_color(self, red: int, green: int, blue: int) -> None:\n \"\"\"\n \u8bbe\u7f6e\u989c\u8272\uff08\u5e95\u5c42\u8c03\u7528\u6e90SetColor\u63a5\u53e3\uff09\n :param red: \u7ea2\u8272\u901a\u9053\u503c\uff080-255\uff09\n :param green: \u7eff\u8272\u901a\u9053\u503c\uff080-255\uff09\n :param blue: \u84dd\u8272\u901a\u9053\u503c\uff080-255\uff09\n \"\"\"\n if not (0 <= red <= 255) or not (0 <= green <= 255) or not (0 <= blue <= 255):\n raise ValueError(\"\u989c\u8272\u503c\u5fc5\u987b\u57280-255\u4e4b\u95f4\")\n self._db.SetColor(red, green, blue)\n\n def add_property(self, property_name: str, property_type: str) -> tuple[bool, str]:\n \"\"\"\n \u6dfb\u52a0\u5c5e\u6027\uff08\u5e95\u5c42\u8c03\u7528\u6e90AddProperty\u63a5\u53e3\uff09\n :param property_name: \u5c5e\u6027\u540d\u79f0\uff08UTF-8\u7f16\u7801\uff09\n :param property_type: \u5c5e\u6027\u7c7b\u578b\uff08UTF-8\u7f16\u7801\uff09\n :return: \u64cd\u4f5c\u7ed3\u679c\uff08\u662f\u5426\u6210\u529f\uff0c\u63d0\u793a\u4fe1\u606f\uff09\n \"\"\"\n if not isinstance(property_name, str) or not property_name.strip():\n raise ValueError(\"\u5c5e\u6027\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a\")\n if not isinstance(property_type, str):\n raise ValueError(\"\u5c5e\u6027\u7c7b\u578b\u5fc5\u987b\u4e3a\u5b57\u7b26\u4e32\")\n return self._db.AddProperty(property_name, property_type)\n\n @classmethod\n def _from_obj(cls, obj):\n \"\"\"\n \u539f\u751fdmDbDatabase\u5bf9\u8c61\u521b\u5efa\u5c01\u88c5\u5b9e\u4f8b\n :param obj: \u539f\u751fdmDbDatabase\u5bf9\u8c61\uff08bind11\u5c01\u88c5\u540e\uff09\n :return: DmDbDatabase\u5b9e\u4f8b\n \"\"\"\n instance = cls.__new__(cls)\n instance._obj = obj\n return instance\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbDatabase.add_property","title":"<code>add_property(property_name, property_type)</code>","text":"<p>\u6dfb\u52a0\u5c5e\u6027\uff08\u5e95\u5c42\u8c03\u7528\u6e90AddProperty\u63a5\u53e3\uff09 :param property_name: \u5c5e\u6027\u540d\u79f0\uff08UTF-8\u7f16\u7801\uff09 :param property_type: \u5c5e\u6027\u7c7b\u578b\uff08UTF-8\u7f16\u7801\uff09 :return: \u64cd\u4f5c\u7ed3\u679c\uff08\u662f\u5426\u6210\u529f\uff0c\u63d0\u793a\u4fe1\u606f\uff09</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def add_property(self, property_name: str, property_type: str) -> tuple[bool, str]:\n \"\"\"\n \u6dfb\u52a0\u5c5e\u6027\uff08\u5e95\u5c42\u8c03\u7528\u6e90AddProperty\u63a5\u53e3\uff09\n :param property_name: \u5c5e\u6027\u540d\u79f0\uff08UTF-8\u7f16\u7801\uff09\n :param property_type: \u5c5e\u6027\u7c7b\u578b\uff08UTF-8\u7f16\u7801\uff09\n :return: \u64cd\u4f5c\u7ed3\u679c\uff08\u662f\u5426\u6210\u529f\uff0c\u63d0\u793a\u4fe1\u606f\uff09\n \"\"\"\n if not isinstance(property_name, str) or not property_name.strip():\n raise ValueError(\"\u5c5e\u6027\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a\")\n if not isinstance(property_type, str):\n raise ValueError(\"\u5c5e\u6027\u7c7b\u578b\u5fc5\u987b\u4e3a\u5b57\u7b26\u4e32\")\n return self._db.AddProperty(property_name, property_type)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbDatabase.close_polyline","title":"<code>close_polyline()</code>","text":"<p>\u95ed\u5408\u591a\u6bb5\u7ebf\uff08\u5e95\u5c42\u8c03\u7528\u6e90ClosePolyline\u63a5\u53e3\uff09 :return: \u64cd\u4f5c\u7ed3\u679c</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def close_polyline(self) -> bool | int:\n \"\"\"\n \u95ed\u5408\u591a\u6bb5\u7ebf\uff08\u5e95\u5c42\u8c03\u7528\u6e90ClosePolyline\u63a5\u53e3\uff09\n :return: \u64cd\u4f5c\u7ed3\u679c\n \"\"\"\n return self._db.ClosePolyline()\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbDatabase.create_local_db","title":"<code>create_local_db()</code> <code>staticmethod</code>","text":"<p>\u521b\u5efa\u672c\u5730\u6570\u636e\u5e93\uff08\u5e95\u5c42\u8c03\u7528\u6e90CreateLocalDB\u9759\u6001\u63a5\u53e3\uff09 :return: \u65b0\u521b\u5efa\u7684\u6570\u636e\u5e93\u5bf9\u8c61</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>@staticmethod\ndef create_local_db() -> \"DmDbDatabase\":\n \"\"\"\n \u521b\u5efa\u672c\u5730\u6570\u636e\u5e93\uff08\u5e95\u5c42\u8c03\u7528\u6e90CreateLocalDB\u9759\u6001\u63a5\u53e3\uff09\n :return: \u65b0\u521b\u5efa\u7684\u6570\u636e\u5e93\u5bf9\u8c61\n \"\"\"\n cpp_db = Dm.dmDbDatabase.CreateLocalDB()\n return DmDbDatabase._from_obj(cpp_db)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbDatabase.get_active_layer","title":"<code>get_active_layer()</code>","text":"<p>\u83b7\u53d6\u5f53\u524d\u6fc0\u6d3b\u56fe\u5c42\uff08\u5e95\u5c42\u8c03\u7528\u6e90GetActiveLayer\u63a5\u53e3\uff09 :return: \u6fc0\u6d3b\u56fe\u5c42\u5bf9\u8c61\uff0c\u65e0\u6fc0\u6d3b\u56fe\u5c42\u65f6\u8fd4\u56deNone</p> <p>example:</p> <pre><code>dmf = DmDbDatabase()\ndb = dmf.load('E:/dassistant/tests/123.dmf')\nlayer = dmf.get_active_layer()\nprint(\"\u5f53\u524d\u6d3b\u52a8\u56fe\u5c42:\",layer)\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def get_active_layer(self) -> DmDbLayer | None:\n \"\"\"\n \u83b7\u53d6\u5f53\u524d\u6fc0\u6d3b\u56fe\u5c42\uff08\u5e95\u5c42\u8c03\u7528\u6e90GetActiveLayer\u63a5\u53e3\uff09\n :return: \u6fc0\u6d3b\u56fe\u5c42\u5bf9\u8c61\uff0c\u65e0\u6fc0\u6d3b\u56fe\u5c42\u65f6\u8fd4\u56deNone\n\n example:\n ```python\n dmf = DmDbDatabase()\n db = dmf.load('E:/dassistant/tests/123.dmf')\n layer = dmf.get_active_layer()\n print(\"\u5f53\u524d\u6d3b\u52a8\u56fe\u5c42:\",layer)\n ```\n \"\"\"\n cpp_result = self._db.GetActiveLayer()\n return DmDbLayer._from_obj(cpp_result)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbDatabase.get_layer_by_index","title":"<code>get_layer_by_index(layer_index)</code>","text":"<p>\u901a\u8fc7\u7d22\u5f15\u83b7\u53d6\u56fe\u5c42\u5bf9\u8c61\uff08\u5e95\u5c42\u8c03\u7528\u6e90GetLayerFromIndex\u63a5\u53e3\uff09 :param layer_index: \u56fe\u5c42\u7d22\u5f15\uff0c\u4ece0\u5f00\u59cb :return: \u56fe\u5c42\u5bf9\u8c61\uff0c\u7d22\u5f15\u65e0\u6548\u65f6\u8fd4\u56deNone</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def get_layer_by_index(self, layer_index: int) -> DmDbLayer | None:\n \"\"\"\n \u901a\u8fc7\u7d22\u5f15\u83b7\u53d6\u56fe\u5c42\u5bf9\u8c61\uff08\u5e95\u5c42\u8c03\u7528\u6e90GetLayerFromIndex\u63a5\u53e3\uff09\n :param layer_index: \u56fe\u5c42\u7d22\u5f15\uff0c\u4ece0\u5f00\u59cb\n :return: \u56fe\u5c42\u5bf9\u8c61\uff0c\u7d22\u5f15\u65e0\u6548\u65f6\u8fd4\u56deNone\n \"\"\"\n if not isinstance(layer_index, int) or layer_index < 0:\n raise ValueError(\"\u56fe\u5c42\u7d22\u5f15\u5fc5\u987b\u4e3a\u975e\u8d1f\u6574\u6570\")\n cpp_result = self._db.GetLayerFromIndex(layer_index)\n return DmDbLayer._from_obj(cpp_result)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbDatabase.get_layers_count","title":"<code>get_layers_count()</code>","text":"<p>\u83b7\u53d6\u6570\u636e\u5e93\u56fe\u5c42\u603b\u6570\uff08\u5e95\u5c42\u8c03\u7528\u6e90GetLayersCount\u63a5\u53e3\uff09 :return: \u975e\u8d1f\u6574\u6570\uff0c\u56fe\u5c42\u603b\u6570\u91cf</p> <p>example:</p> <pre><code>dmf = DmDbDatabase()\ndb = dmf.load('E:/dassistant/tests/123.dmf')\nprint(\"\u83b7\u53d6\u56fe\u5c42\u6570\u91cf:\",dmf.get_layers_count())\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def get_layers_count(self) -> int:\n \"\"\"\n \u83b7\u53d6\u6570\u636e\u5e93\u56fe\u5c42\u603b\u6570\uff08\u5e95\u5c42\u8c03\u7528\u6e90GetLayersCount\u63a5\u53e3\uff09\n :return: \u975e\u8d1f\u6574\u6570\uff0c\u56fe\u5c42\u603b\u6570\u91cf\n\n example:\n ```python\n dmf = DmDbDatabase()\n db = dmf.load('E:/dassistant/tests/123.dmf')\n print(\"\u83b7\u53d6\u56fe\u5c42\u6570\u91cf:\",dmf.get_layers_count())\n ```\n \"\"\"\n return self._db.GetLayersCount()\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbDatabase.insert_layer","title":"<code>insert_layer(layer_name)</code>","text":"<p>\u63d2\u5165\u65b0\u56fe\u5c42\uff08\u5e95\u5c42\u8c03\u7528\u6e90InsertLayer\u63a5\u53e3\uff09 :param layer_name: \u56fe\u5c42\u540d\u79f0\uff08UTF-8\u7f16\u7801\uff09 :return: \u65b0\u521b\u5efa\u7684\u56fe\u5c42\u5bf9\u8c61</p> <p>example:</p> <pre><code>dmf = DmDbDatabase()\ndb = dmf.load('E:/dassistant/tests/123.dmf')\nlayer = dmf.insert_layer(\"\u65b0\u56fe\u5c42\")\nprint(\"\u63d2\u5165\u65b0\u56fe\u5c42:\",layer)\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def insert_layer(self, layer_name: str) -> DmDbLayer:\n \"\"\"\n \u63d2\u5165\u65b0\u56fe\u5c42\uff08\u5e95\u5c42\u8c03\u7528\u6e90InsertLayer\u63a5\u53e3\uff09\n :param layer_name: \u56fe\u5c42\u540d\u79f0\uff08UTF-8\u7f16\u7801\uff09\n :return: \u65b0\u521b\u5efa\u7684\u56fe\u5c42\u5bf9\u8c61\n\n example:\n ```python\n dmf = DmDbDatabase()\n db = dmf.load('E:/dassistant/tests/123.dmf')\n layer = dmf.insert_layer(\"\u65b0\u56fe\u5c42\")\n print(\"\u63d2\u5165\u65b0\u56fe\u5c42:\",layer)\n ```\n \"\"\"\n if not isinstance(layer_name, str) or not layer_name.strip():\n raise ValueError(\"\u56fe\u5c42\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a\u5b57\u7b26\u4e32\")\n cpp_result = self._db.InsertLayer(layer_name.strip())\n return DmDbLayer._from_obj(cpp_result)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbDatabase.load","title":"<code>load(file_path)</code>","text":"<p>\u52a0\u8f7d\u672c\u5730\u6570\u636e\u5e93\u6587\u4ef6\uff08\u5e95\u5c42\u8c03\u7528\u6e90Load\u63a5\u53e3\uff09 :param file_path: \u6570\u636e\u5e93\u6587\u4ef6\u8def\u5f84\uff08UTF-8\u7f16\u7801\uff0c\u5e95\u5c42\u5df2\u5904\u7406\u7f16\u7801\u8f6c\u6362\uff09 :return: \u52a0\u8f7d\u7ed3\u679c\uff0c\u6210\u529f\u8fd4\u56deTrue/0\uff0c\u5931\u8d25\u8fd4\u56deFalse/\u9519\u8bef\u7801</p> <p>example:</p> <pre><code>dmf = DmDbDatabase()\ndb = dmf.load('E:/dassistant/tests/123.dmf')\nprint(db)\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def load(self, file_path: str) -> bool | int:\n \"\"\"\n \u52a0\u8f7d\u672c\u5730\u6570\u636e\u5e93\u6587\u4ef6\uff08\u5e95\u5c42\u8c03\u7528\u6e90Load\u63a5\u53e3\uff09\n :param file_path: \u6570\u636e\u5e93\u6587\u4ef6\u8def\u5f84\uff08UTF-8\u7f16\u7801\uff0c\u5e95\u5c42\u5df2\u5904\u7406\u7f16\u7801\u8f6c\u6362\uff09\n :return: \u52a0\u8f7d\u7ed3\u679c\uff0c\u6210\u529f\u8fd4\u56deTrue/0\uff0c\u5931\u8d25\u8fd4\u56deFalse/\u9519\u8bef\u7801\n\n example:\n ```python\n dmf = DmDbDatabase()\n db = dmf.load('E:/dassistant/tests/123.dmf')\n print(db)\n ```\n \"\"\"\n if not isinstance(file_path, str) or not file_path.strip():\n raise ValueError(\"\u6587\u4ef6\u8def\u5f84\u4e0d\u80fd\u4e3a\u7a7a\u5b57\u7b26\u4e32\")\n return self._db.Load(file_path)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbDatabase.save","title":"<code>save(file_path=None)</code>","text":"<p>\u4fdd\u5b58\u6570\u636e\u5e93\uff08\u5e95\u5c42\u8c03\u7528\u6e90Save\u91cd\u8f7d\u63a5\u53e3\uff0c\u81ea\u52a8\u9002\u914d\u65e0\u53c2/\u6709\u53c2\uff09 :param file_path: \u53ef\u9009\u4fdd\u5b58\u8def\u5f84\uff0c\u4e3aNone\u65f6\u4fdd\u5b58\u5230\u5f53\u524d\u8def\u5f84 :return: \u4fdd\u5b58\u7ed3\u679c\uff0c\u6210\u529f\u8fd4\u56deTrue/0\uff0c\u5931\u8d25\u8fd4\u56deFalse/\u9519\u8bef\u7801</p> <p>example:</p> <pre><code>dmf = DmDbDatabase()\ndb = dmf.load('E:/dassistant/tests/123.dmf')\nlayer = dmf.insert_layer(\"\u65b0\u56fe\u5c42\")\nprint(\"\u63d2\u5165\u65b0\u56fe\u5c42:\",layer)\ndmf.save(\"E:/dassistant/tests/123_1.dmf\")\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def save(self, file_path: str | None = None) -> bool | int:\n \"\"\"\n \u4fdd\u5b58\u6570\u636e\u5e93\uff08\u5e95\u5c42\u8c03\u7528\u6e90Save\u91cd\u8f7d\u63a5\u53e3\uff0c\u81ea\u52a8\u9002\u914d\u65e0\u53c2/\u6709\u53c2\uff09\n :param file_path: \u53ef\u9009\u4fdd\u5b58\u8def\u5f84\uff0c\u4e3aNone\u65f6\u4fdd\u5b58\u5230\u5f53\u524d\u8def\u5f84\n :return: \u4fdd\u5b58\u7ed3\u679c\uff0c\u6210\u529f\u8fd4\u56deTrue/0\uff0c\u5931\u8d25\u8fd4\u56deFalse/\u9519\u8bef\u7801\n\n example:\n ```python\n dmf = DmDbDatabase()\n db = dmf.load('E:/dassistant/tests/123.dmf')\n layer = dmf.insert_layer(\"\u65b0\u56fe\u5c42\")\n print(\"\u63d2\u5165\u65b0\u56fe\u5c42:\",layer)\n dmf.save(\"E:/dassistant/tests/123_1.dmf\")\n ```\n \"\"\"\n if file_path is None:\n return self._db.Save()\n if not isinstance(file_path, str) or not file_path.strip():\n raise ValueError(\"\u4fdd\u5b58\u8def\u5f84\u4e0d\u80fd\u4e3a\u7a7a\u5b57\u7b26\u4e32\")\n return self._db.Save(file_path)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbDatabase.set_color","title":"<code>set_color(red, green, blue)</code>","text":"<p>\u8bbe\u7f6e\u989c\u8272\uff08\u5e95\u5c42\u8c03\u7528\u6e90SetColor\u63a5\u53e3\uff09 :param red: \u7ea2\u8272\u901a\u9053\u503c\uff080-255\uff09 :param green: \u7eff\u8272\u901a\u9053\u503c\uff080-255\uff09 :param blue: \u84dd\u8272\u901a\u9053\u503c\uff080-255\uff09</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def set_color(self, red: int, green: int, blue: int) -> None:\n \"\"\"\n \u8bbe\u7f6e\u989c\u8272\uff08\u5e95\u5c42\u8c03\u7528\u6e90SetColor\u63a5\u53e3\uff09\n :param red: \u7ea2\u8272\u901a\u9053\u503c\uff080-255\uff09\n :param green: \u7eff\u8272\u901a\u9053\u503c\uff080-255\uff09\n :param blue: \u84dd\u8272\u901a\u9053\u503c\uff080-255\uff09\n \"\"\"\n if not (0 <= red <= 255) or not (0 <= green <= 255) or not (0 <= blue <= 255):\n raise ValueError(\"\u989c\u8272\u503c\u5fc5\u987b\u57280-255\u4e4b\u95f4\")\n self._db.SetColor(red, green, blue)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbDatabase.set_file_name","title":"<code>set_file_name(file_path)</code>","text":"<p>\u8bbe\u7f6e\u6570\u636e\u5e93\u6587\u4ef6\u8def\u5f84\uff08\u5e95\u5c42\u8c03\u7528\u6e90SetFileName\u63a5\u53e3\uff09 :param file_path: \u6570\u636e\u5e93\u6587\u4ef6\u8def\u5f84\uff08UTF-8\u7f16\u7801\uff09</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def set_file_name(self, file_path: str) -> None:\n \"\"\"\n \u8bbe\u7f6e\u6570\u636e\u5e93\u6587\u4ef6\u8def\u5f84\uff08\u5e95\u5c42\u8c03\u7528\u6e90SetFileName\u63a5\u53e3\uff09\n :param file_path: \u6570\u636e\u5e93\u6587\u4ef6\u8def\u5f84\uff08UTF-8\u7f16\u7801\uff09\n \"\"\"\n if not isinstance(file_path, str) or not file_path.strip():\n raise ValueError(\"\u6587\u4ef6\u8def\u5f84\u4e0d\u80fd\u4e3a\u7a7a\u5b57\u7b26\u4e32\")\n self._db.SetFileName(file_path)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbDatabase.switch_to_local_storage","title":"<code>switch_to_local_storage()</code>","text":"<p>\u5207\u6362\u5230\u672c\u5730\u5b58\u50a8\u6a21\u5f0f\uff08\u5e95\u5c42\u8c03\u7528\u6e90SetToLocalStorage\u63a5\u53e3\uff09</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def switch_to_local_storage(self) -> None:\n \"\"\"\u5207\u6362\u5230\u672c\u5730\u5b58\u50a8\u6a21\u5f0f\uff08\u5e95\u5c42\u8c03\u7528\u6e90SetToLocalStorage\u63a5\u53e3\uff09\"\"\"\n self._db.SetToLocalStorage()\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbEntity","title":"<code>DmDbEntity</code>","text":"<p>\u6240\u6709\u5b9e\u4f53\u5bf9\u8c61\u90fd\u7ee7\u627f\u81ea\u8be5\u7c7b\uff0c\u5305\u62ec\u83b7\u53d6\u5b9e\u4f53\u7c7b\u578b\u51fd\u6570GetType\u3001 \u5c06\u4e09\u7ef4\u5b9e\u4f53\u8f6c\u6362\u5230dmPolyData\u5bf9\u8c61\u51fd\u6570ToPolyData\u3001 \u5c06\u5bf9\u8c61\u8f6c\u6362\u4e3a\u4e09\u7ef4\u5b9e\u4f53\u5bf9\u8c61\u51fd\u6570ConvertToShell\u3001 \u5c06\u5bf9\u8c61\u8f6c\u6362\u4e3a\u4e09\u7ef4\u591a\u6bb5\u7ebf\u5bf9\u8c61\u51fd\u6570ConvertToPolyline\u3001 \u5c06\u5bf9\u8c61\u8f6c\u6362\u4e3a\u76f4\u7ebf\u5bf9\u8c61\u51fd\u6570ConvertToLine\u3001 \u5c06\u5bf9\u8c61\u8f6c\u6362\u4e3a\u70b9\u5bf9\u8c61\u51fd\u6570ConvertToPoint\u3001 \u8bbe\u7f6e\u5b9e\u4f53\u989c\u8272\u51fd\u6570SetColor\u3001 \u83b7\u53d6\u5b9e\u4f53\u7c7b\u578b\u540d\u79f0\u51fd\u6570GetEntityTypeName\u3001 \u83b7\u53d6\u5b9e\u4f53\u540d\u79f0\u51fd\u6570GetEntityName\u7b49</p> <p>example:</p> <pre><code>dmf = DmDbDatabase()\ndb = dmf.load('E:/dassistant/tests/123.dmf')\nprint(\"\u83b7\u53d6\u56fe\u5c42\u6570\u91cf:\",dmf.get_layers_count())\nact_layer = dmf.get_active_layer()\n\nlayerCount = dmf.get_layers_count()\nfor i in range(layerCount):\n layer = dmf.get_layer_by_index(i)\n if layer is None:\n continue\n\n print(\"\u56fe\u5c42\u5b9e\u4f53\u6570\u91cf:\",layer.get_entities_count())\n\n layer.start_query_entity()\n entity = layer.open_next_entity()\n while entity is not None:\n nType = entity.get_type()\n #print(\"\u5b9e\u4f53\u7c7b\u578b:\",nType)\n if nType == EntityType.ETT_POLYLINE:\n print(\"\u5b9e\u4f53\u7c7b\u578b\u540d\u79f0:\", entity.get_entity_type_name())\n polydata = entity.to_poly_data()\n print(\"\u83b7\u53d6\u591a\u8fb9\u5f62\u70b9\u96c6:\",polydata.get_dm_points())\n print(\"\u83b7\u53d6\u591a\u8fb9\u5f62\u5305\u56f4\u76d2:\",polydata.get_bounds())\n elif nType == EntityType.ETT_POINT:\n print(\"\u5b9e\u4f53\u7c7b\u578b\u540d\u79f0:\", entity.get_entity_type_name())\n point = entity.convert_to_point().get_graph_data()\n print(type(point))\n print(\"\u83b7\u53d6\u70b9\u6570\u636e:\",point)\n elif nType == EntityType.ETT_LINE:\n print(\"\u5b9e\u4f53\u7c7b\u578b\u540d\u79f0:\", entity.get_entity_type_name())\n line = entity.convert_to_line()\n print(type(line))\n print(\"\u83b7\u53d6\u7ebf\u6570\u636e:\",line)\n entity.set_color(255,0,0)\n entity = layer.open_next_entity()\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>class DmDbEntity:\n \"\"\"\u6240\u6709\u5b9e\u4f53\u5bf9\u8c61\u90fd\u7ee7\u627f\u81ea\u8be5\u7c7b\uff0c\u5305\u62ec\u83b7\u53d6\u5b9e\u4f53\u7c7b\u578b\u51fd\u6570GetType\u3001\n \u5c06\u4e09\u7ef4\u5b9e\u4f53\u8f6c\u6362\u5230dmPolyData\u5bf9\u8c61\u51fd\u6570ToPolyData\u3001\n \u5c06\u5bf9\u8c61\u8f6c\u6362\u4e3a\u4e09\u7ef4\u5b9e\u4f53\u5bf9\u8c61\u51fd\u6570ConvertToShell\u3001\n \u5c06\u5bf9\u8c61\u8f6c\u6362\u4e3a\u4e09\u7ef4\u591a\u6bb5\u7ebf\u5bf9\u8c61\u51fd\u6570ConvertToPolyline\u3001\n \u5c06\u5bf9\u8c61\u8f6c\u6362\u4e3a\u76f4\u7ebf\u5bf9\u8c61\u51fd\u6570ConvertToLine\u3001\n \u5c06\u5bf9\u8c61\u8f6c\u6362\u4e3a\u70b9\u5bf9\u8c61\u51fd\u6570ConvertToPoint\u3001\n \u8bbe\u7f6e\u5b9e\u4f53\u989c\u8272\u51fd\u6570SetColor\u3001\n \u83b7\u53d6\u5b9e\u4f53\u7c7b\u578b\u540d\u79f0\u51fd\u6570GetEntityTypeName\u3001\n \u83b7\u53d6\u5b9e\u4f53\u540d\u79f0\u51fd\u6570GetEntityName\u7b49\n\n example:\n ```python\n dmf = DmDbDatabase()\n db = dmf.load('E:/dassistant/tests/123.dmf')\n print(\"\u83b7\u53d6\u56fe\u5c42\u6570\u91cf:\",dmf.get_layers_count())\n act_layer = dmf.get_active_layer()\n\n layerCount = dmf.get_layers_count()\n for i in range(layerCount):\n layer = dmf.get_layer_by_index(i)\n if layer is None:\n continue\n\n print(\"\u56fe\u5c42\u5b9e\u4f53\u6570\u91cf:\",layer.get_entities_count())\n\n layer.start_query_entity()\n entity = layer.open_next_entity()\n while entity is not None:\n nType = entity.get_type()\n #print(\"\u5b9e\u4f53\u7c7b\u578b:\",nType)\n if nType == EntityType.ETT_POLYLINE:\n print(\"\u5b9e\u4f53\u7c7b\u578b\u540d\u79f0:\", entity.get_entity_type_name())\n polydata = entity.to_poly_data()\n print(\"\u83b7\u53d6\u591a\u8fb9\u5f62\u70b9\u96c6:\",polydata.get_dm_points())\n print(\"\u83b7\u53d6\u591a\u8fb9\u5f62\u5305\u56f4\u76d2:\",polydata.get_bounds())\n elif nType == EntityType.ETT_POINT:\n print(\"\u5b9e\u4f53\u7c7b\u578b\u540d\u79f0:\", entity.get_entity_type_name())\n point = entity.convert_to_point().get_graph_data()\n print(type(point))\n print(\"\u83b7\u53d6\u70b9\u6570\u636e:\",point)\n elif nType == EntityType.ETT_LINE:\n print(\"\u5b9e\u4f53\u7c7b\u578b\u540d\u79f0:\", entity.get_entity_type_name())\n line = entity.convert_to_line()\n print(type(line))\n print(\"\u83b7\u53d6\u7ebf\u6570\u636e:\",line)\n entity.set_color(255,0,0)\n entity = layer.open_next_entity()\n ```\n \"\"\"\n\n # def __init__(self):\n # self._obj = None\n\n\n @classmethod\n def _from_obj(cls, obj):\n \"\"\"\n \u539f\u751fDmDbEntity\u5bf9\u8c61\u521b\u5efa\u5c01\u88c5\u5b9e\u4f8b\n :param obj: \u539f\u751fDmDbEntity\u5bf9\u8c61\uff08bind11\u5c01\u88c5\u540e\uff09\n :return: DmDbEntity\u5b9e\u4f8b\n \"\"\"\n instance = cls.__new__(cls)\n instance._obj = obj\n return instance\n\n def get_type(self) -> int:\n \"\"\"\n \u83b7\u53d6\u5b9e\u4f53\u7c7b\u578b\u7f16\u7801\n :return: \u5b9e\u4f53\u7c7b\u578b\u7684\u6574\u6570\u7f16\u7801\n \"\"\"\n return self._obj.GetType()\n\n def to_poly_data(self) -> DmPolyData:\n \"\"\"\n \u5c06\u5b9e\u4f53\u8f6c\u6362\u4e3a\u591a\u8fb9\u5f62\u6570\u636e\n :return: \u8f6c\u6362\u540e\u7684DmPolyData\u5b9e\u4f8b\uff08\u9700\u63d0\u524d\u5b9e\u73b0\u8be5\u7c7b\u53ca_from_obj\u65b9\u6cd5\uff09\n \"\"\"\n cpp_result = self._obj.ToPolyData()\n return DmPolyData._from_obj(cpp_result)\n\n def convert_to_shell(self) -> DmDbShell:\n \"\"\"\n \u5c06\u5b9e\u4f53\u8f6c\u6362\u4e3aShell\u5bf9\u8c61\n :return: \u8f6c\u6362\u540e\u7684DmDbShell\u5b9e\u4f8b\n \"\"\"\n cpp_result = self._obj.ConvertToShell()\n return DmDbShell._from_obj(cpp_result)\n\n def convert_to_polyline(self) -> DmDbPolyline:\n \"\"\"\n \u5c06\u5b9e\u4f53\u8f6c\u6362\u4e3a\u591a\u6bb5\u7ebf\u5bf9\u8c61\n :return: \u8f6c\u6362\u540e\u7684DmDbPolyline\u5b9e\u4f8b\n \"\"\"\n cpp_result = self._obj.ConvertToPolyline()\n return DmDbPolyline._from_obj(cpp_result)\n\n def convert_to_line(self) -> DmDbLine:\n \"\"\"\n \u5c06\u5b9e\u4f53\u8f6c\u6362\u4e3a\u7ebf\u5bf9\u8c61\n :return: \u8f6c\u6362\u540e\u7684DmDbLine\u5b9e\u4f8b\n \"\"\"\n cpp_result = self._obj.ConvertToLine()\n return DmDbLine._from_obj(cpp_result)\n\n def convert_to_point(self) -> DmDbPoint:\n \"\"\"\n \u5c06\u5b9e\u4f53\u8f6c\u6362\u4e3a\u70b9\u5bf9\u8c61\n :return: \u8f6c\u6362\u540e\u7684DmDbPoint\u5b9e\u4f8b\n \"\"\"\n cpp_result = self._obj.ConvertToPoint()\n return DmDbPoint._from_obj(cpp_result)\n\n def set_color(self, red: int, green: int, blue: int) -> None:\n \"\"\"\n \u8bbe\u7f6e\u5b9e\u4f53\u989c\u8272\n :param red: \u7ea2\u8272\u5206\u91cf\uff080-255\uff09\n :param green: \u7eff\u8272\u5206\u91cf\uff080-255\uff09\n :param blue: \u84dd\u8272\u5206\u91cf\uff080-255\uff09\n\n example:\n ```python\n entity = DmDbEntity()\n entity.set_color(255, 0, 0)\n ```\n \"\"\"\n self._obj.SetColor(red, green, blue)\n\n def get_entity_type_name(self) -> str:\n \"\"\"\n \u83b7\u53d6\u5b9e\u4f53\u7c7b\u578b\u540d\u79f0\uff08UTF-8\u7f16\u7801\uff09\n :return: \u5b9e\u4f53\u7c7b\u578b\u540d\u79f0\u5b57\u7b26\u4e32\n\n example:\n ```python\n entity = DmDbEntity()\n entity_type_name = entity.get_entity_type_name()\n ```\n \"\"\"\n return self._obj.GetEntityTypeName()\n\n def get_entity_name(self) -> str:\n \"\"\"\n \u83b7\u53d6\u5b9e\u4f53\u540d\u79f0\uff08UTF-8\u7f16\u7801\uff09\n :return: \u5b9e\u4f53\u540d\u79f0\u5b57\u7b26\u4e32\n\n example:\n ```python\n entity = DmDbEntity()\n entity_name = entity.get_entity_name()\n ```\n \"\"\"\n return self._obj.GetEntityName()\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbEntity.convert_to_line","title":"<code>convert_to_line()</code>","text":"<p>\u5c06\u5b9e\u4f53\u8f6c\u6362\u4e3a\u7ebf\u5bf9\u8c61 :return: \u8f6c\u6362\u540e\u7684DmDbLine\u5b9e\u4f8b</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def convert_to_line(self) -> DmDbLine:\n \"\"\"\n \u5c06\u5b9e\u4f53\u8f6c\u6362\u4e3a\u7ebf\u5bf9\u8c61\n :return: \u8f6c\u6362\u540e\u7684DmDbLine\u5b9e\u4f8b\n \"\"\"\n cpp_result = self._obj.ConvertToLine()\n return DmDbLine._from_obj(cpp_result)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbEntity.convert_to_point","title":"<code>convert_to_point()</code>","text":"<p>\u5c06\u5b9e\u4f53\u8f6c\u6362\u4e3a\u70b9\u5bf9\u8c61 :return: \u8f6c\u6362\u540e\u7684DmDbPoint\u5b9e\u4f8b</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def convert_to_point(self) -> DmDbPoint:\n \"\"\"\n \u5c06\u5b9e\u4f53\u8f6c\u6362\u4e3a\u70b9\u5bf9\u8c61\n :return: \u8f6c\u6362\u540e\u7684DmDbPoint\u5b9e\u4f8b\n \"\"\"\n cpp_result = self._obj.ConvertToPoint()\n return DmDbPoint._from_obj(cpp_result)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbEntity.convert_to_polyline","title":"<code>convert_to_polyline()</code>","text":"<p>\u5c06\u5b9e\u4f53\u8f6c\u6362\u4e3a\u591a\u6bb5\u7ebf\u5bf9\u8c61 :return: \u8f6c\u6362\u540e\u7684DmDbPolyline\u5b9e\u4f8b</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def convert_to_polyline(self) -> DmDbPolyline:\n \"\"\"\n \u5c06\u5b9e\u4f53\u8f6c\u6362\u4e3a\u591a\u6bb5\u7ebf\u5bf9\u8c61\n :return: \u8f6c\u6362\u540e\u7684DmDbPolyline\u5b9e\u4f8b\n \"\"\"\n cpp_result = self._obj.ConvertToPolyline()\n return DmDbPolyline._from_obj(cpp_result)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbEntity.convert_to_shell","title":"<code>convert_to_shell()</code>","text":"<p>\u5c06\u5b9e\u4f53\u8f6c\u6362\u4e3aShell\u5bf9\u8c61 :return: \u8f6c\u6362\u540e\u7684DmDbShell\u5b9e\u4f8b</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def convert_to_shell(self) -> DmDbShell:\n \"\"\"\n \u5c06\u5b9e\u4f53\u8f6c\u6362\u4e3aShell\u5bf9\u8c61\n :return: \u8f6c\u6362\u540e\u7684DmDbShell\u5b9e\u4f8b\n \"\"\"\n cpp_result = self._obj.ConvertToShell()\n return DmDbShell._from_obj(cpp_result)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbEntity.get_entity_name","title":"<code>get_entity_name()</code>","text":"<p>\u83b7\u53d6\u5b9e\u4f53\u540d\u79f0\uff08UTF-8\u7f16\u7801\uff09 :return: \u5b9e\u4f53\u540d\u79f0\u5b57\u7b26\u4e32</p> <p>example:</p> <pre><code>entity = DmDbEntity()\nentity_name = entity.get_entity_name()\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def get_entity_name(self) -> str:\n \"\"\"\n \u83b7\u53d6\u5b9e\u4f53\u540d\u79f0\uff08UTF-8\u7f16\u7801\uff09\n :return: \u5b9e\u4f53\u540d\u79f0\u5b57\u7b26\u4e32\n\n example:\n ```python\n entity = DmDbEntity()\n entity_name = entity.get_entity_name()\n ```\n \"\"\"\n return self._obj.GetEntityName()\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbEntity.get_entity_type_name","title":"<code>get_entity_type_name()</code>","text":"<p>\u83b7\u53d6\u5b9e\u4f53\u7c7b\u578b\u540d\u79f0\uff08UTF-8\u7f16\u7801\uff09 :return: \u5b9e\u4f53\u7c7b\u578b\u540d\u79f0\u5b57\u7b26\u4e32</p> <p>example:</p> <pre><code>entity = DmDbEntity()\nentity_type_name = entity.get_entity_type_name()\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def get_entity_type_name(self) -> str:\n \"\"\"\n \u83b7\u53d6\u5b9e\u4f53\u7c7b\u578b\u540d\u79f0\uff08UTF-8\u7f16\u7801\uff09\n :return: \u5b9e\u4f53\u7c7b\u578b\u540d\u79f0\u5b57\u7b26\u4e32\n\n example:\n ```python\n entity = DmDbEntity()\n entity_type_name = entity.get_entity_type_name()\n ```\n \"\"\"\n return self._obj.GetEntityTypeName()\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbEntity.get_type","title":"<code>get_type()</code>","text":"<p>\u83b7\u53d6\u5b9e\u4f53\u7c7b\u578b\u7f16\u7801 :return: \u5b9e\u4f53\u7c7b\u578b\u7684\u6574\u6570\u7f16\u7801</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def get_type(self) -> int:\n \"\"\"\n \u83b7\u53d6\u5b9e\u4f53\u7c7b\u578b\u7f16\u7801\n :return: \u5b9e\u4f53\u7c7b\u578b\u7684\u6574\u6570\u7f16\u7801\n \"\"\"\n return self._obj.GetType()\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbEntity.set_color","title":"<code>set_color(red, green, blue)</code>","text":"<p>\u8bbe\u7f6e\u5b9e\u4f53\u989c\u8272 :param red: \u7ea2\u8272\u5206\u91cf\uff080-255\uff09 :param green: \u7eff\u8272\u5206\u91cf\uff080-255\uff09 :param blue: \u84dd\u8272\u5206\u91cf\uff080-255\uff09</p> <p>example:</p> <pre><code>entity = DmDbEntity()\nentity.set_color(255, 0, 0)\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def set_color(self, red: int, green: int, blue: int) -> None:\n \"\"\"\n \u8bbe\u7f6e\u5b9e\u4f53\u989c\u8272\n :param red: \u7ea2\u8272\u5206\u91cf\uff080-255\uff09\n :param green: \u7eff\u8272\u5206\u91cf\uff080-255\uff09\n :param blue: \u84dd\u8272\u5206\u91cf\uff080-255\uff09\n\n example:\n ```python\n entity = DmDbEntity()\n entity.set_color(255, 0, 0)\n ```\n \"\"\"\n self._obj.SetColor(red, green, blue)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbEntity.to_poly_data","title":"<code>to_poly_data()</code>","text":"<p>\u5c06\u5b9e\u4f53\u8f6c\u6362\u4e3a\u591a\u8fb9\u5f62\u6570\u636e :return: \u8f6c\u6362\u540e\u7684DmPolyData\u5b9e\u4f8b\uff08\u9700\u63d0\u524d\u5b9e\u73b0\u8be5\u7c7b\u53ca_from_obj\u65b9\u6cd5\uff09</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def to_poly_data(self) -> DmPolyData:\n \"\"\"\n \u5c06\u5b9e\u4f53\u8f6c\u6362\u4e3a\u591a\u8fb9\u5f62\u6570\u636e\n :return: \u8f6c\u6362\u540e\u7684DmPolyData\u5b9e\u4f8b\uff08\u9700\u63d0\u524d\u5b9e\u73b0\u8be5\u7c7b\u53ca_from_obj\u65b9\u6cd5\uff09\n \"\"\"\n cpp_result = self._obj.ToPolyData()\n return DmPolyData._from_obj(cpp_result)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbLayer","title":"<code>DmDbLayer</code>","text":"Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>class DmDbLayer:\n def __init__(self):\n self._obj = Dm.dmDbLayer()\n\n def start_query_entity(self) -> None:\n \"\"\"\n \u5f00\u59cb\u67e5\u8be2\u5b9e\u4f53\n\n example:\n ```python\n dmf = DmDbDatabase()\n db = dmf.load('E:/dassistant/tests/123.dmf')\n print(\"\u83b7\u53d6\u56fe\u5c42\u6570\u91cf:\",dmf.get_layers_count())\n act_layer = dmf.get_active_layer()\n\n layerCount = dmf.get_layers_count()\n for i in range(layerCount):\n layer = dmf.get_layer_by_index(i)\n if layer is None:\n continue\n\n print(\"\u56fe\u5c42\u5b9e\u4f53\u6570\u91cf:\",layer.get_entities_count())\n\n layer.start_query_entity()\n entity = layer.open_next_entity()\n while entity is not None:\n nType = entity.get_type()\n #print(\"\u5b9e\u4f53\u7c7b\u578b:\",nType)\n if nType == EntityType.ETT_POLYLINE:\n \u00b7\u00b7\u00b7\n entity = layer.open_next_entity()\n ```\n \"\"\"\n self._obj.StartQueryEntity()\n\n def get_entities_count(self) -> int:\n \"\"\"\u83b7\u53d6\u5b9e\u4f53\u6570\u91cf\"\"\"\n return self._obj.GetEntitiesCount()\n\n def open_next_entity(self) -> Optional[DmDbEntity]:\n \"\"\"\u6253\u5f00\u4e0b\u4e00\u4e2a\u5b9e\u4f53\uff0c\u8fd4\u56de\u5c01\u88c5\u540e\u7684\u5b9e\u4f53\u5bf9\u8c61\uff0c\u65e0\u5b9e\u4f53\u65f6\u8fd4\u56de None\"\"\"\n raw_entity = self._obj.OpenNextEntity()\n if raw_entity:\n return DmDbEntity._from_obj(raw_entity)\n return None\n\n def insert_entity(self, entity: Union[DmDbEntity, DmDbPolyline]) -> None:\n \"\"\"\u63d2\u5165\u5b9e\u4f53\uff0c\u652f\u6301 DmDbEntity \u548c dmDbPolyline \u7c7b\u578b\"\"\"\n self._obj.InsertEntity(entity._obj)\n\n def insert_polyline(self, points: List[DmDPoint]) -> DmDbEntity:\n \"\"\"\u63d2\u5165\u591a\u6bb5\u7ebf\uff0c\u8fd4\u56de\u5c01\u88c5\u540e\u7684\u5b9e\u4f53\u5bf9\u8c61\"\"\"\n cpp_points = [p._obj for p in points]\n raw_entity = self._obj.InsertPolyline(cpp_points)\n return DmDbEntity._from_obj(raw_entity)\n\n def insert_line(self, start: DmDPoint, end: DmDPoint) -> DmDbEntity:\n \"\"\"\u63d2\u5165\u76f4\u7ebf\uff0c\u8fd4\u56de\u5c01\u88c5\u540e\u7684\u5b9e\u4f53\u5bf9\u8c61\"\"\"\n raw_entity = self._obj.InsertLine(start._obj, end._obj)\n return DmDbEntity._from_obj(raw_entity)\n\n def set_work_plane_entity(self, work_plane: DmDbWorkPlane) -> None:\n \"\"\"\u8bbe\u7f6e\u5de5\u4f5c\u5e73\u9762\u5b9e\u4f53\"\"\"\n self._obj.SetWorkPlaneEntity(work_plane._obj)\n\n @classmethod\n def _from_obj(cls, obj):\n \"\"\"\n \u539f\u751fdmDbLayer\u5bf9\u8c61\u521b\u5efa\u5c01\u88c5\u5b9e\u4f8b\n :param obj: \u539f\u751fdmDbLayer\u5bf9\u8c61\uff08bind11\u5c01\u88c5\u540e\uff09\n :return: DmDbLayer\u5b9e\u4f8b\n \"\"\"\n instance = cls.__new__(cls)\n instance._obj = obj\n return instance\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbLayer.get_entities_count","title":"<code>get_entities_count()</code>","text":"<p>\u83b7\u53d6\u5b9e\u4f53\u6570\u91cf</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def get_entities_count(self) -> int:\n \"\"\"\u83b7\u53d6\u5b9e\u4f53\u6570\u91cf\"\"\"\n return self._obj.GetEntitiesCount()\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbLayer.insert_entity","title":"<code>insert_entity(entity)</code>","text":"<p>\u63d2\u5165\u5b9e\u4f53\uff0c\u652f\u6301 DmDbEntity \u548c dmDbPolyline \u7c7b\u578b</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def insert_entity(self, entity: Union[DmDbEntity, DmDbPolyline]) -> None:\n \"\"\"\u63d2\u5165\u5b9e\u4f53\uff0c\u652f\u6301 DmDbEntity \u548c dmDbPolyline \u7c7b\u578b\"\"\"\n self._obj.InsertEntity(entity._obj)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbLayer.insert_line","title":"<code>insert_line(start, end)</code>","text":"<p>\u63d2\u5165\u76f4\u7ebf\uff0c\u8fd4\u56de\u5c01\u88c5\u540e\u7684\u5b9e\u4f53\u5bf9\u8c61</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def insert_line(self, start: DmDPoint, end: DmDPoint) -> DmDbEntity:\n \"\"\"\u63d2\u5165\u76f4\u7ebf\uff0c\u8fd4\u56de\u5c01\u88c5\u540e\u7684\u5b9e\u4f53\u5bf9\u8c61\"\"\"\n raw_entity = self._obj.InsertLine(start._obj, end._obj)\n return DmDbEntity._from_obj(raw_entity)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbLayer.insert_polyline","title":"<code>insert_polyline(points)</code>","text":"<p>\u63d2\u5165\u591a\u6bb5\u7ebf\uff0c\u8fd4\u56de\u5c01\u88c5\u540e\u7684\u5b9e\u4f53\u5bf9\u8c61</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def insert_polyline(self, points: List[DmDPoint]) -> DmDbEntity:\n \"\"\"\u63d2\u5165\u591a\u6bb5\u7ebf\uff0c\u8fd4\u56de\u5c01\u88c5\u540e\u7684\u5b9e\u4f53\u5bf9\u8c61\"\"\"\n cpp_points = [p._obj for p in points]\n raw_entity = self._obj.InsertPolyline(cpp_points)\n return DmDbEntity._from_obj(raw_entity)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbLayer.open_next_entity","title":"<code>open_next_entity()</code>","text":"<p>\u6253\u5f00\u4e0b\u4e00\u4e2a\u5b9e\u4f53\uff0c\u8fd4\u56de\u5c01\u88c5\u540e\u7684\u5b9e\u4f53\u5bf9\u8c61\uff0c\u65e0\u5b9e\u4f53\u65f6\u8fd4\u56de None</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def open_next_entity(self) -> Optional[DmDbEntity]:\n \"\"\"\u6253\u5f00\u4e0b\u4e00\u4e2a\u5b9e\u4f53\uff0c\u8fd4\u56de\u5c01\u88c5\u540e\u7684\u5b9e\u4f53\u5bf9\u8c61\uff0c\u65e0\u5b9e\u4f53\u65f6\u8fd4\u56de None\"\"\"\n raw_entity = self._obj.OpenNextEntity()\n if raw_entity:\n return DmDbEntity._from_obj(raw_entity)\n return None\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbLayer.set_work_plane_entity","title":"<code>set_work_plane_entity(work_plane)</code>","text":"<p>\u8bbe\u7f6e\u5de5\u4f5c\u5e73\u9762\u5b9e\u4f53</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def set_work_plane_entity(self, work_plane: DmDbWorkPlane) -> None:\n \"\"\"\u8bbe\u7f6e\u5de5\u4f5c\u5e73\u9762\u5b9e\u4f53\"\"\"\n self._obj.SetWorkPlaneEntity(work_plane._obj)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbLayer.start_query_entity","title":"<code>start_query_entity()</code>","text":"<p>\u5f00\u59cb\u67e5\u8be2\u5b9e\u4f53</p> <p>example:</p> <pre><code>dmf = DmDbDatabase()\ndb = dmf.load('E:/dassistant/tests/123.dmf')\nprint(\"\u83b7\u53d6\u56fe\u5c42\u6570\u91cf:\",dmf.get_layers_count())\nact_layer = dmf.get_active_layer()\n\nlayerCount = dmf.get_layers_count()\nfor i in range(layerCount):\n layer = dmf.get_layer_by_index(i)\n if layer is None:\n continue\n\n print(\"\u56fe\u5c42\u5b9e\u4f53\u6570\u91cf:\",layer.get_entities_count())\n\n layer.start_query_entity()\n entity = layer.open_next_entity()\n while entity is not None:\n nType = entity.get_type()\n #print(\"\u5b9e\u4f53\u7c7b\u578b:\",nType)\n if nType == EntityType.ETT_POLYLINE:\n \u00b7\u00b7\u00b7\n entity = layer.open_next_entity()\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def start_query_entity(self) -> None:\n \"\"\"\n \u5f00\u59cb\u67e5\u8be2\u5b9e\u4f53\n\n example:\n ```python\n dmf = DmDbDatabase()\n db = dmf.load('E:/dassistant/tests/123.dmf')\n print(\"\u83b7\u53d6\u56fe\u5c42\u6570\u91cf:\",dmf.get_layers_count())\n act_layer = dmf.get_active_layer()\n\n layerCount = dmf.get_layers_count()\n for i in range(layerCount):\n layer = dmf.get_layer_by_index(i)\n if layer is None:\n continue\n\n print(\"\u56fe\u5c42\u5b9e\u4f53\u6570\u91cf:\",layer.get_entities_count())\n\n layer.start_query_entity()\n entity = layer.open_next_entity()\n while entity is not None:\n nType = entity.get_type()\n #print(\"\u5b9e\u4f53\u7c7b\u578b:\",nType)\n if nType == EntityType.ETT_POLYLINE:\n \u00b7\u00b7\u00b7\n entity = layer.open_next_entity()\n ```\n \"\"\"\n self._obj.StartQueryEntity()\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbShell","title":"<code>DmDbShell</code>","text":"<p>shell\u7c7b</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>class DmDbShell:\n \"\"\"shell\u7c7b\"\"\"\n def __init__(self):\n \"\"\"\u6784\u9020\u51fd\u6570\uff0c\u521d\u59cb\u5316Shell\u5bf9\u8c61\"\"\"\n self._obj = Dm.dmDbShell()\n\n @classmethod\n def _from_obj(cls, obj):\n \"\"\"\n \u539f\u751f\u5bf9\u8c61\u521b\u5efa\u5c01\u88c5\u5b9e\u4f8b\n :param obj: \u539f\u751fdmDbShell\u5bf9\u8c61\n :return: DmDbShell\u5b9e\u4f8b\n \"\"\"\n instance = cls.__new__(cls)\n instance._obj = obj\n return instance\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbShell.__init__","title":"<code>__init__()</code>","text":"<p>\u6784\u9020\u51fd\u6570\uff0c\u521d\u59cb\u5316Shell\u5bf9\u8c61</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def __init__(self):\n \"\"\"\u6784\u9020\u51fd\u6570\uff0c\u521d\u59cb\u5316Shell\u5bf9\u8c61\"\"\"\n self._obj = Dm.dmDbShell()\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbWorkPlane","title":"<code>DmDbWorkPlane</code>","text":"Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>class DmDbWorkPlane:\n def __init__(self):\n \"\"\"\n \u6784\u9020\u5de5\u4f5c\u5e73\u9762\n \"\"\"\n self._obj = Dm.dmDbWorkPlane()\n\n def set_normal(self, normal: DmDPoint) -> None:\n \"\"\"\u8bbe\u7f6e\u6cd5\u5411\u91cf\"\"\"\n self._obj.SetNormal(normal._obj)\n\n def set_origin(self, origin: DmDPoint) -> None:\n \"\"\"\u8bbe\u7f6e\u539f\u70b9\"\"\"\n self._obj.SetOrigin(origin._obj)\n\n def set_x_axis(self, x_axis: DmDPoint) -> None:\n \"\"\"\u8bbe\u7f6eX\u8f74\u65b9\u5411\"\"\"\n self._obj.SetXAxis(x_axis._obj)\n\n def set_y_axis(self, y_axis: DmDPoint) -> None:\n \"\"\"\u8bbe\u7f6eY\u8f74\u65b9\u5411\"\"\"\n self._obj.SetYAxis(y_axis._obj)\n\n @classmethod\n def _from_obj(cls, obj):\n \"\"\"\n \u539f\u751fdmDbWorkPlane\u5bf9\u8c61\u521b\u5efa\u5c01\u88c5\u5b9e\u4f8b\n :param obj: \u539f\u751fdmDbWorkPlane\u5bf9\u8c61\uff08bind11\u5c01\u88c5\u540e\uff09\n :return: DmDbWorkPlane\u5b9e\u4f8b\n \"\"\"\n instance = cls.__new__(cls)\n instance._obj = obj\n return instance\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbWorkPlane.__init__","title":"<code>__init__()</code>","text":"<p>\u6784\u9020\u5de5\u4f5c\u5e73\u9762</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def __init__(self):\n \"\"\"\n \u6784\u9020\u5de5\u4f5c\u5e73\u9762\n \"\"\"\n self._obj = Dm.dmDbWorkPlane()\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbWorkPlane.set_normal","title":"<code>set_normal(normal)</code>","text":"<p>\u8bbe\u7f6e\u6cd5\u5411\u91cf</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def set_normal(self, normal: DmDPoint) -> None:\n \"\"\"\u8bbe\u7f6e\u6cd5\u5411\u91cf\"\"\"\n self._obj.SetNormal(normal._obj)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbWorkPlane.set_origin","title":"<code>set_origin(origin)</code>","text":"<p>\u8bbe\u7f6e\u539f\u70b9</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def set_origin(self, origin: DmDPoint) -> None:\n \"\"\"\u8bbe\u7f6e\u539f\u70b9\"\"\"\n self._obj.SetOrigin(origin._obj)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbWorkPlane.set_x_axis","title":"<code>set_x_axis(x_axis)</code>","text":"<p>\u8bbe\u7f6eX\u8f74\u65b9\u5411</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def set_x_axis(self, x_axis: DmDPoint) -> None:\n \"\"\"\u8bbe\u7f6eX\u8f74\u65b9\u5411\"\"\"\n self._obj.SetXAxis(x_axis._obj)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmDbWorkPlane.set_y_axis","title":"<code>set_y_axis(y_axis)</code>","text":"<p>\u8bbe\u7f6eY\u8f74\u65b9\u5411</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def set_y_axis(self, y_axis: DmDPoint) -> None:\n \"\"\"\u8bbe\u7f6eY\u8f74\u65b9\u5411\"\"\"\n self._obj.SetYAxis(y_axis._obj)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmPolyData","title":"<code>DmPolyData</code>","text":"<p>\u591a\u8fb9\u5f62\u6570\u636e\u7c7b</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>class DmPolyData:\n \"\"\"\u591a\u8fb9\u5f62\u6570\u636e\u7c7b\"\"\"\n\n def __init__(self):\n \"\"\"\n \u6784\u9020\u51fd\u6570\uff1a\u521d\u59cb\u5316\u591a\u8fb9\u5f62\u6570\u636e\u5bf9\u8c61\n :return: None\n \"\"\"\n self._obj = Dm.dmPolyData()\n\n # ---------------------- \u57fa\u7840\u5c5e\u6027\u83b7\u53d6 ----------------------\n def get_data_type(self) -> int:\n \"\"\"\n \u83b7\u53d6\u591a\u8fb9\u5f62\u6570\u636e\u7c7b\u578b\n :return: \u6570\u636e\u7c7b\u578b\u7f16\u7801\uff08\u6574\u6570\uff09\n\n example:\n ```python\n poly_data = DmPolyData()\n data_type = poly_data.get_data_type()\n ```\n \"\"\"\n return self._obj.GetDataType()\n\n def get_number_of_cells(self) -> int:\n \"\"\"\n \u83b7\u53d6\u5355\u5143\u683c\u6570\u91cf\n :return: \u5355\u5143\u683c\u6570\u91cf\uff08\u6574\u6570\uff09\n\n example:\n ```python\n poly_data = DmPolyData()\n num_cells = poly_data.get_number_of_cells()\n ```\n \"\"\"\n return self._obj.GetNumberOfCells()\n\n def get_number_of_verts(self) -> int:\n \"\"\"\n \u83b7\u53d6\u9876\u70b9\u6570\u91cf\n :return: \u9876\u70b9\u6570\u91cf\uff08\u6574\u6570\uff09\n\n example:\n ```python\n poly_data = DmPolyData()\n num_verts = poly_data.get_number_of_verts()\n ```\n \"\"\"\n return self._obj.GetNumberOfVerts()\n\n def get_number_of_lines(self) -> int:\n \"\"\"\n \u83b7\u53d6\u7ebf\u6bb5\u6570\u91cf\n :return: \u7ebf\u6bb5\u6570\u91cf\uff08\u6574\u6570\uff09\n\n example:\n ```python\n poly_data = DmPolyData()\n num_lines = poly_data.get_number_of_lines()\n ```\n \"\"\"\n return self._obj.GetNumberOfLines()\n\n def get_number_of_polys(self) -> int:\n \"\"\"\n \u83b7\u53d6\u591a\u8fb9\u5f62\u6570\u91cf\n :return: \u591a\u8fb9\u5f62\u6570\u91cf\uff08\u6574\u6570\uff09\n\n example:\n ```python\n poly_data = DmPolyData()\n num_polys = poly_data.get_number_of_polys()\n ```\n \"\"\"\n return self._obj.GetNumberOfPolys()\n\n def get_number_of_points(self) -> int:\n \"\"\"\n \u83b7\u53d6\u70b9\u7684\u603b\u6570\u91cf\n :return: \u70b9\u6570\u91cf\uff08\u6574\u6570\uff09\n\n example:\n ```python\n poly_data = DmPolyData()\n num_points = poly_data.get_number_of_points()\n ```\n \"\"\"\n return self._obj.GetNumberOfPoints()\n\n def get_bounds(self) -> list[float]:\n \"\"\"\n \u83b7\u53d6\u6570\u636e\u7684\u5305\u56f4\u76d2\n :return: \u5305\u56f4\u76d2\u5750\u6807\u5217\u8868 [min_x, max_x, min_y, max_y, min_z, max_z]\n\n example:\n ```python\n poly_data = DmPolyData()\n bounds = poly_data.get_bounds()\n ```\n \"\"\"\n return self._obj.GetBounds()\n\n # ---------------------- \u5355\u5143\u683c\u63d2\u5165 ----------------------\n def insert_next_vert_cell(self, point_indexes: list[int]) -> None:\n \"\"\"\n \u63d2\u5165\u9876\u70b9\u5355\u5143\u683c\n :param point_indexes: \u70b9\u7d22\u5f15\u5217\u8868\uff08\u6574\u6570\u5217\u8868\uff09\n\n example:\n ```python\n poly_data = DmPolyData()\n poly_data.insert_next_vert_cell([0, 1, 2])\n ```\n \"\"\"\n self._obj.InsertNextVertCell(point_indexes)\n\n def insert_next_line_cell(self, point_indexes: list[int]) -> None:\n \"\"\"\n \u63d2\u5165\u7ebf\u6bb5\u5355\u5143\u683c\n :param point_indexes: \u70b9\u7d22\u5f15\u5217\u8868\uff08\u6574\u6570\u5217\u8868\uff09\n\n example:\n ```python\n poly_data = DmPolyData()\n poly_data.insert_next_line_cell([0, 1, 2])\n ```\n \"\"\"\n self._obj.InsertNextLineCell(point_indexes)\n\n def insert_next_poly_cell(self, point_indexes: list[int]) -> None:\n \"\"\"\n \u63d2\u5165\u591a\u8fb9\u5f62\u5355\u5143\u683c\n :param point_indexes: \u70b9\u7d22\u5f15\u5217\u8868\uff08\u6574\u6570\u5217\u8868\uff09\n\n example:\n ```python\n poly_data = DmPolyData()\n poly_data.insert_next_poly_cell([0, 1, 2])\n ```\n \"\"\"\n self._obj.InsertNextPolyCell(point_indexes)\n\n # ---------------------- \u70b9\u64cd\u4f5c ----------------------\n def insert_unique_point(self, point: DmDPoint) -> int:\n \"\"\"\n \u63d2\u5165\u552f\u4e00\u7684\u70b9\uff08\u81ea\u52a8\u53bb\u91cd\uff09\n :param point: \u5f85\u63d2\u5165\u7684\u70b9\uff08DmDPoint\u5b9e\u4f8b\uff09\n :return: \u70b9\u7684\u552f\u4e00ID\uff08\u6574\u6570\uff09\n\n example:\n ```python\n poly_data = DmPolyData()\n point_id = poly_data.insert_unique_point(DmDPoint(0.0, 0.0, 0.0))\n ```\n \"\"\"\n return self._obj.InsertUniquePoint(point._obj)\n\n def get_point(self, point_id: int) -> DmDPoint:\n \"\"\"\n \u6839\u636eID\u83b7\u53d6\u70b9\n :param point_id: \u70b9\u7684\u552f\u4e00ID\uff08\u6574\u6570\uff09\n :return: \u5bf9\u5e94\u7684DmDPoint\u5b9e\u4f8b\n\n example:\n ```python\n poly_data = DmPolyData()\n point_id = poly_data.insert_unique_point(DmDPoint(0.0, 0.0, 0.0))\n point = poly_data.get_point(point_id)\n ```\n \"\"\"\n cpp_point = self._obj.GetPoint(point_id)\n return DmDPoint._from_obj(cpp_point)\n\n def set_dm_points(self, points: DmPoints) -> None:\n \"\"\"\n \u8bbe\u7f6e\u5173\u8054\u7684\u70b9\u96c6\u5408\n :param points: DmPoints\u5b9e\u4f8b\n\n example:\n ```python\n poly_data = DmPolyData()\n points = DmPoints()\n poly_data.set_dm_points(points)\n ```\n \"\"\"\n self._obj.SetDmPoints(points._obj)\n\n def get_dm_points(self) -> DmPoints:\n \"\"\"\n \u83b7\u53d6\u5173\u8054\u7684\u70b9\u96c6\u5408\n :return: DmPoints\u5b9e\u4f8b\n\n example:\n ```python\n poly_data = DmPolyData()\n points = DmPoints()\n poly_data.set_dm_points(points)\n dm_points = poly_data.get_dm_points()\n ```\n \"\"\"\n cpp_points = self._obj.GetDmPoints()\n return DmPoints._from_obj(cpp_points)\n\n # ---------------------- \u591a\u8fb9\u5f62\u6570\u636e\u83b7\u53d6 ----------------------\n def get_poly_cell(self, cell_index: int) -> list[int]:\n \"\"\"\n \u83b7\u53d6\u6307\u5b9a\u7d22\u5f15\u7684\u591a\u8fb9\u5f62\u5355\u5143\u683c\u7684\u70b9\u7d22\u5f15\n :param cell_index: \u5355\u5143\u683c\u7d22\u5f15\uff08\u6574\u6570\uff09\n :return: \u70b9\u7d22\u5f15\u5217\u8868\uff08\u6574\u6570\u5217\u8868\uff09\n\n example:\n ```python\n poly_data = DmPolyData()\n cell_index = 0\n point_indexes = poly_data.get_poly_cell(cell_index)\n ```\n \"\"\"\n return self._obj.GetPolyCell(cell_index)\n\n # ---------------------- \u63d0\u53d6\u591a\u6bb5\u7ebf ----------------------\n def extract_polylines(self) -> list[DmDbPolyline]:\n \"\"\"\n \u63d0\u53d6\u591a\u6bb5\u7ebf\u5b9e\u4f53\n :return: \u591a\u6bb5\u7ebf\u5217\u8868\uff0c\u6bcf\u4e2a\u5143\u7d20\u4e3aDmDbPolyline\u5b9e\u4f8b\n\n example:\n ```python\n poly_data = DmPolyData()\n polylines = poly_data.extract_polylines()\n ```\n \"\"\"\n cpp_list = self._obj.ExtractPolylines()\n return [DmDbPolyline._from_obj(item) for item in cpp_list]\n\n # ---------------------- \u5b57\u7b26\u4e32\u8868\u793a ----------------------\n def __repr__(self) -> str:\n \"\"\"\n \u5b57\u7b26\u4e32\u8868\u793a\n :return: \u591a\u8fb9\u5f62\u6570\u636e\u7684\u6807\u51c6\u5b57\u7b26\u4e32\u8868\u793a\n \"\"\"\n return self._obj.__repr__()\n\n # ---------------------- \u6865\u63a5\u65b9\u6cd5 ----------------------\n @classmethod\n def _from_obj(cls, obj):\n \"\"\"\n \u539f\u751f\u5bf9\u8c61\u521b\u5efa\u5c01\u88c5\u5b9e\u4f8b\n :param obj: \u539f\u751fdmPolyData\u5bf9\u8c61\n :return: DmPolyData\u5b9e\u4f8b\n \"\"\"\n instance = cls.__new__(cls)\n instance._obj = obj\n return instance\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmPolyData.__init__","title":"<code>__init__()</code>","text":"<p>\u6784\u9020\u51fd\u6570\uff1a\u521d\u59cb\u5316\u591a\u8fb9\u5f62\u6570\u636e\u5bf9\u8c61 :return: None</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def __init__(self):\n \"\"\"\n \u6784\u9020\u51fd\u6570\uff1a\u521d\u59cb\u5316\u591a\u8fb9\u5f62\u6570\u636e\u5bf9\u8c61\n :return: None\n \"\"\"\n self._obj = Dm.dmPolyData()\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmPolyData.__repr__","title":"<code>__repr__()</code>","text":"<p>\u5b57\u7b26\u4e32\u8868\u793a :return: \u591a\u8fb9\u5f62\u6570\u636e\u7684\u6807\u51c6\u5b57\u7b26\u4e32\u8868\u793a</p> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def __repr__(self) -> str:\n \"\"\"\n \u5b57\u7b26\u4e32\u8868\u793a\n :return: \u591a\u8fb9\u5f62\u6570\u636e\u7684\u6807\u51c6\u5b57\u7b26\u4e32\u8868\u793a\n \"\"\"\n return self._obj.__repr__()\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmPolyData.extract_polylines","title":"<code>extract_polylines()</code>","text":"<p>\u63d0\u53d6\u591a\u6bb5\u7ebf\u5b9e\u4f53 :return: \u591a\u6bb5\u7ebf\u5217\u8868\uff0c\u6bcf\u4e2a\u5143\u7d20\u4e3aDmDbPolyline\u5b9e\u4f8b</p> <p>example:</p> <pre><code>poly_data = DmPolyData()\npolylines = poly_data.extract_polylines()\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def extract_polylines(self) -> list[DmDbPolyline]:\n \"\"\"\n \u63d0\u53d6\u591a\u6bb5\u7ebf\u5b9e\u4f53\n :return: \u591a\u6bb5\u7ebf\u5217\u8868\uff0c\u6bcf\u4e2a\u5143\u7d20\u4e3aDmDbPolyline\u5b9e\u4f8b\n\n example:\n ```python\n poly_data = DmPolyData()\n polylines = poly_data.extract_polylines()\n ```\n \"\"\"\n cpp_list = self._obj.ExtractPolylines()\n return [DmDbPolyline._from_obj(item) for item in cpp_list]\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmPolyData.get_bounds","title":"<code>get_bounds()</code>","text":"<p>\u83b7\u53d6\u6570\u636e\u7684\u5305\u56f4\u76d2 :return: \u5305\u56f4\u76d2\u5750\u6807\u5217\u8868 [min_x, max_x, min_y, max_y, min_z, max_z]</p> <p>example:</p> <pre><code>poly_data = DmPolyData()\nbounds = poly_data.get_bounds()\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def get_bounds(self) -> list[float]:\n \"\"\"\n \u83b7\u53d6\u6570\u636e\u7684\u5305\u56f4\u76d2\n :return: \u5305\u56f4\u76d2\u5750\u6807\u5217\u8868 [min_x, max_x, min_y, max_y, min_z, max_z]\n\n example:\n ```python\n poly_data = DmPolyData()\n bounds = poly_data.get_bounds()\n ```\n \"\"\"\n return self._obj.GetBounds()\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmPolyData.get_data_type","title":"<code>get_data_type()</code>","text":"<p>\u83b7\u53d6\u591a\u8fb9\u5f62\u6570\u636e\u7c7b\u578b :return: \u6570\u636e\u7c7b\u578b\u7f16\u7801\uff08\u6574\u6570\uff09</p> <p>example:</p> <pre><code>poly_data = DmPolyData()\ndata_type = poly_data.get_data_type()\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def get_data_type(self) -> int:\n \"\"\"\n \u83b7\u53d6\u591a\u8fb9\u5f62\u6570\u636e\u7c7b\u578b\n :return: \u6570\u636e\u7c7b\u578b\u7f16\u7801\uff08\u6574\u6570\uff09\n\n example:\n ```python\n poly_data = DmPolyData()\n data_type = poly_data.get_data_type()\n ```\n \"\"\"\n return self._obj.GetDataType()\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmPolyData.get_dm_points","title":"<code>get_dm_points()</code>","text":"<p>\u83b7\u53d6\u5173\u8054\u7684\u70b9\u96c6\u5408 :return: DmPoints\u5b9e\u4f8b</p> <p>example:</p> <pre><code>poly_data = DmPolyData()\npoints = DmPoints()\npoly_data.set_dm_points(points)\ndm_points = poly_data.get_dm_points()\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def get_dm_points(self) -> DmPoints:\n \"\"\"\n \u83b7\u53d6\u5173\u8054\u7684\u70b9\u96c6\u5408\n :return: DmPoints\u5b9e\u4f8b\n\n example:\n ```python\n poly_data = DmPolyData()\n points = DmPoints()\n poly_data.set_dm_points(points)\n dm_points = poly_data.get_dm_points()\n ```\n \"\"\"\n cpp_points = self._obj.GetDmPoints()\n return DmPoints._from_obj(cpp_points)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmPolyData.get_number_of_cells","title":"<code>get_number_of_cells()</code>","text":"<p>\u83b7\u53d6\u5355\u5143\u683c\u6570\u91cf :return: \u5355\u5143\u683c\u6570\u91cf\uff08\u6574\u6570\uff09</p> <p>example:</p> <pre><code>poly_data = DmPolyData()\nnum_cells = poly_data.get_number_of_cells()\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def get_number_of_cells(self) -> int:\n \"\"\"\n \u83b7\u53d6\u5355\u5143\u683c\u6570\u91cf\n :return: \u5355\u5143\u683c\u6570\u91cf\uff08\u6574\u6570\uff09\n\n example:\n ```python\n poly_data = DmPolyData()\n num_cells = poly_data.get_number_of_cells()\n ```\n \"\"\"\n return self._obj.GetNumberOfCells()\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmPolyData.get_number_of_lines","title":"<code>get_number_of_lines()</code>","text":"<p>\u83b7\u53d6\u7ebf\u6bb5\u6570\u91cf :return: \u7ebf\u6bb5\u6570\u91cf\uff08\u6574\u6570\uff09</p> <p>example:</p> <pre><code>poly_data = DmPolyData()\nnum_lines = poly_data.get_number_of_lines()\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def get_number_of_lines(self) -> int:\n \"\"\"\n \u83b7\u53d6\u7ebf\u6bb5\u6570\u91cf\n :return: \u7ebf\u6bb5\u6570\u91cf\uff08\u6574\u6570\uff09\n\n example:\n ```python\n poly_data = DmPolyData()\n num_lines = poly_data.get_number_of_lines()\n ```\n \"\"\"\n return self._obj.GetNumberOfLines()\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmPolyData.get_number_of_points","title":"<code>get_number_of_points()</code>","text":"<p>\u83b7\u53d6\u70b9\u7684\u603b\u6570\u91cf :return: \u70b9\u6570\u91cf\uff08\u6574\u6570\uff09</p> <p>example:</p> <pre><code>poly_data = DmPolyData()\nnum_points = poly_data.get_number_of_points()\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def get_number_of_points(self) -> int:\n \"\"\"\n \u83b7\u53d6\u70b9\u7684\u603b\u6570\u91cf\n :return: \u70b9\u6570\u91cf\uff08\u6574\u6570\uff09\n\n example:\n ```python\n poly_data = DmPolyData()\n num_points = poly_data.get_number_of_points()\n ```\n \"\"\"\n return self._obj.GetNumberOfPoints()\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmPolyData.get_number_of_polys","title":"<code>get_number_of_polys()</code>","text":"<p>\u83b7\u53d6\u591a\u8fb9\u5f62\u6570\u91cf :return: \u591a\u8fb9\u5f62\u6570\u91cf\uff08\u6574\u6570\uff09</p> <p>example:</p> <pre><code>poly_data = DmPolyData()\nnum_polys = poly_data.get_number_of_polys()\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def get_number_of_polys(self) -> int:\n \"\"\"\n \u83b7\u53d6\u591a\u8fb9\u5f62\u6570\u91cf\n :return: \u591a\u8fb9\u5f62\u6570\u91cf\uff08\u6574\u6570\uff09\n\n example:\n ```python\n poly_data = DmPolyData()\n num_polys = poly_data.get_number_of_polys()\n ```\n \"\"\"\n return self._obj.GetNumberOfPolys()\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmPolyData.get_number_of_verts","title":"<code>get_number_of_verts()</code>","text":"<p>\u83b7\u53d6\u9876\u70b9\u6570\u91cf :return: \u9876\u70b9\u6570\u91cf\uff08\u6574\u6570\uff09</p> <p>example:</p> <pre><code>poly_data = DmPolyData()\nnum_verts = poly_data.get_number_of_verts()\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def get_number_of_verts(self) -> int:\n \"\"\"\n \u83b7\u53d6\u9876\u70b9\u6570\u91cf\n :return: \u9876\u70b9\u6570\u91cf\uff08\u6574\u6570\uff09\n\n example:\n ```python\n poly_data = DmPolyData()\n num_verts = poly_data.get_number_of_verts()\n ```\n \"\"\"\n return self._obj.GetNumberOfVerts()\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmPolyData.get_point","title":"<code>get_point(point_id)</code>","text":"<p>\u6839\u636eID\u83b7\u53d6\u70b9 :param point_id: \u70b9\u7684\u552f\u4e00ID\uff08\u6574\u6570\uff09 :return: \u5bf9\u5e94\u7684DmDPoint\u5b9e\u4f8b</p> <p>example:</p> <pre><code>poly_data = DmPolyData()\npoint_id = poly_data.insert_unique_point(DmDPoint(0.0, 0.0, 0.0))\npoint = poly_data.get_point(point_id)\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def get_point(self, point_id: int) -> DmDPoint:\n \"\"\"\n \u6839\u636eID\u83b7\u53d6\u70b9\n :param point_id: \u70b9\u7684\u552f\u4e00ID\uff08\u6574\u6570\uff09\n :return: \u5bf9\u5e94\u7684DmDPoint\u5b9e\u4f8b\n\n example:\n ```python\n poly_data = DmPolyData()\n point_id = poly_data.insert_unique_point(DmDPoint(0.0, 0.0, 0.0))\n point = poly_data.get_point(point_id)\n ```\n \"\"\"\n cpp_point = self._obj.GetPoint(point_id)\n return DmDPoint._from_obj(cpp_point)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmPolyData.get_poly_cell","title":"<code>get_poly_cell(cell_index)</code>","text":"<p>\u83b7\u53d6\u6307\u5b9a\u7d22\u5f15\u7684\u591a\u8fb9\u5f62\u5355\u5143\u683c\u7684\u70b9\u7d22\u5f15 :param cell_index: \u5355\u5143\u683c\u7d22\u5f15\uff08\u6574\u6570\uff09 :return: \u70b9\u7d22\u5f15\u5217\u8868\uff08\u6574\u6570\u5217\u8868\uff09</p> <p>example:</p> <pre><code>poly_data = DmPolyData()\ncell_index = 0\npoint_indexes = poly_data.get_poly_cell(cell_index)\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def get_poly_cell(self, cell_index: int) -> list[int]:\n \"\"\"\n \u83b7\u53d6\u6307\u5b9a\u7d22\u5f15\u7684\u591a\u8fb9\u5f62\u5355\u5143\u683c\u7684\u70b9\u7d22\u5f15\n :param cell_index: \u5355\u5143\u683c\u7d22\u5f15\uff08\u6574\u6570\uff09\n :return: \u70b9\u7d22\u5f15\u5217\u8868\uff08\u6574\u6570\u5217\u8868\uff09\n\n example:\n ```python\n poly_data = DmPolyData()\n cell_index = 0\n point_indexes = poly_data.get_poly_cell(cell_index)\n ```\n \"\"\"\n return self._obj.GetPolyCell(cell_index)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmPolyData.insert_next_line_cell","title":"<code>insert_next_line_cell(point_indexes)</code>","text":"<p>\u63d2\u5165\u7ebf\u6bb5\u5355\u5143\u683c :param point_indexes: \u70b9\u7d22\u5f15\u5217\u8868\uff08\u6574\u6570\u5217\u8868\uff09</p> <p>example:</p> <pre><code>poly_data = DmPolyData()\npoly_data.insert_next_line_cell([0, 1, 2])\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def insert_next_line_cell(self, point_indexes: list[int]) -> None:\n \"\"\"\n \u63d2\u5165\u7ebf\u6bb5\u5355\u5143\u683c\n :param point_indexes: \u70b9\u7d22\u5f15\u5217\u8868\uff08\u6574\u6570\u5217\u8868\uff09\n\n example:\n ```python\n poly_data = DmPolyData()\n poly_data.insert_next_line_cell([0, 1, 2])\n ```\n \"\"\"\n self._obj.InsertNextLineCell(point_indexes)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmPolyData.insert_next_poly_cell","title":"<code>insert_next_poly_cell(point_indexes)</code>","text":"<p>\u63d2\u5165\u591a\u8fb9\u5f62\u5355\u5143\u683c :param point_indexes: \u70b9\u7d22\u5f15\u5217\u8868\uff08\u6574\u6570\u5217\u8868\uff09</p> <p>example:</p> <pre><code>poly_data = DmPolyData()\npoly_data.insert_next_poly_cell([0, 1, 2])\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def insert_next_poly_cell(self, point_indexes: list[int]) -> None:\n \"\"\"\n \u63d2\u5165\u591a\u8fb9\u5f62\u5355\u5143\u683c\n :param point_indexes: \u70b9\u7d22\u5f15\u5217\u8868\uff08\u6574\u6570\u5217\u8868\uff09\n\n example:\n ```python\n poly_data = DmPolyData()\n poly_data.insert_next_poly_cell([0, 1, 2])\n ```\n \"\"\"\n self._obj.InsertNextPolyCell(point_indexes)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmPolyData.insert_next_vert_cell","title":"<code>insert_next_vert_cell(point_indexes)</code>","text":"<p>\u63d2\u5165\u9876\u70b9\u5355\u5143\u683c :param point_indexes: \u70b9\u7d22\u5f15\u5217\u8868\uff08\u6574\u6570\u5217\u8868\uff09</p> <p>example:</p> <pre><code>poly_data = DmPolyData()\npoly_data.insert_next_vert_cell([0, 1, 2])\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def insert_next_vert_cell(self, point_indexes: list[int]) -> None:\n \"\"\"\n \u63d2\u5165\u9876\u70b9\u5355\u5143\u683c\n :param point_indexes: \u70b9\u7d22\u5f15\u5217\u8868\uff08\u6574\u6570\u5217\u8868\uff09\n\n example:\n ```python\n poly_data = DmPolyData()\n poly_data.insert_next_vert_cell([0, 1, 2])\n ```\n \"\"\"\n self._obj.InsertNextVertCell(point_indexes)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmPolyData.insert_unique_point","title":"<code>insert_unique_point(point)</code>","text":"<p>\u63d2\u5165\u552f\u4e00\u7684\u70b9\uff08\u81ea\u52a8\u53bb\u91cd\uff09 :param point: \u5f85\u63d2\u5165\u7684\u70b9\uff08DmDPoint\u5b9e\u4f8b\uff09 :return: \u70b9\u7684\u552f\u4e00ID\uff08\u6574\u6570\uff09</p> <p>example:</p> <pre><code>poly_data = DmPolyData()\npoint_id = poly_data.insert_unique_point(DmDPoint(0.0, 0.0, 0.0))\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def insert_unique_point(self, point: DmDPoint) -> int:\n \"\"\"\n \u63d2\u5165\u552f\u4e00\u7684\u70b9\uff08\u81ea\u52a8\u53bb\u91cd\uff09\n :param point: \u5f85\u63d2\u5165\u7684\u70b9\uff08DmDPoint\u5b9e\u4f8b\uff09\n :return: \u70b9\u7684\u552f\u4e00ID\uff08\u6574\u6570\uff09\n\n example:\n ```python\n poly_data = DmPolyData()\n point_id = poly_data.insert_unique_point(DmDPoint(0.0, 0.0, 0.0))\n ```\n \"\"\"\n return self._obj.InsertUniquePoint(point._obj)\n</code></pre>"},{"location":"reference/lib/types/entity.html#dimine_python_sdk.lib.types.entity.DmPolyData.set_dm_points","title":"<code>set_dm_points(points)</code>","text":"<p>\u8bbe\u7f6e\u5173\u8054\u7684\u70b9\u96c6\u5408 :param points: DmPoints\u5b9e\u4f8b</p> <p>example:</p> <pre><code>poly_data = DmPolyData()\npoints = DmPoints()\npoly_data.set_dm_points(points)\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\entity.py</code> <pre><code>def set_dm_points(self, points: DmPoints) -> None:\n \"\"\"\n \u8bbe\u7f6e\u5173\u8054\u7684\u70b9\u96c6\u5408\n :param points: DmPoints\u5b9e\u4f8b\n\n example:\n ```python\n poly_data = DmPolyData()\n points = DmPoints()\n poly_data.set_dm_points(points)\n ```\n \"\"\"\n self._obj.SetDmPoints(points._obj)\n</code></pre>"},{"location":"reference/lib/types/line.html","title":"line","text":""},{"location":"reference/lib/types/line.html#dimine_python_sdk.lib.types.line.DmDbLine","title":"<code>DmDbLine</code>","text":"<p>\u7ebf\u7c7b\u578b</p> Source code in <code>dimine_python_sdk\\lib\\types\\line.py</code> <pre><code>class DmDbLine:\n \"\"\"\u7ebf\u7c7b\u578b\"\"\"\n def __init__(self):\n \"\"\"\u6784\u9020\u51fd\u6570\uff0c\u521d\u59cb\u5316\u6570\u636e\u5e93\u7ebf\u5bf9\u8c61\"\"\"\n self._obj = Dm.dmDbLine()\n\n def get_graph_data(self) -> list[DmDPoint]:\n \"\"\"\n \u83b7\u53d6\u8be5\u7ebf\u7684\u56fe\u5f62\u6570\u636e\uff08\u8d77\u70b9\u548c\u7ec8\u70b9\uff09\n :return: \u5305\u542b\u8d77\u70b9\u548c\u7ec8\u70b9\u7684\u5217\u8868\uff0c\u6bcf\u4e2a\u5143\u7d20\u4e3aDmDPoint\u5b9e\u4f8b\n\n example:\n ```python\n line = DmDbLine()\n graph_data = line.get_graph_data()\n print(\"\u7ebf\u7684\u8d77\u70b9:\", graph_data[0])\n print(\"\u7ebf\u7684\u7ec8\u70b9:\", graph_data[1])\n ```\n \"\"\"\n cpp_list = self._obj.GetGraphData()\n return [DmDPoint._from_obj(item) for item in cpp_list]\n\n @classmethod\n def _from_obj(cls, obj):\n \"\"\"\n :param obj: \u539f\u751fdmDbLine\u5bf9\u8c61\n :return: DmDbLine\u5b9e\u4f8b\n \"\"\"\n instance = cls.__new__(cls)\n instance._obj = obj\n return instance\n</code></pre>"},{"location":"reference/lib/types/line.html#dimine_python_sdk.lib.types.line.DmDbLine.__init__","title":"<code>__init__()</code>","text":"<p>\u6784\u9020\u51fd\u6570\uff0c\u521d\u59cb\u5316\u6570\u636e\u5e93\u7ebf\u5bf9\u8c61</p> Source code in <code>dimine_python_sdk\\lib\\types\\line.py</code> <pre><code>def __init__(self):\n \"\"\"\u6784\u9020\u51fd\u6570\uff0c\u521d\u59cb\u5316\u6570\u636e\u5e93\u7ebf\u5bf9\u8c61\"\"\"\n self._obj = Dm.dmDbLine()\n</code></pre>"},{"location":"reference/lib/types/line.html#dimine_python_sdk.lib.types.line.DmDbLine.get_graph_data","title":"<code>get_graph_data()</code>","text":"<p>\u83b7\u53d6\u8be5\u7ebf\u7684\u56fe\u5f62\u6570\u636e\uff08\u8d77\u70b9\u548c\u7ec8\u70b9\uff09 :return: \u5305\u542b\u8d77\u70b9\u548c\u7ec8\u70b9\u7684\u5217\u8868\uff0c\u6bcf\u4e2a\u5143\u7d20\u4e3aDmDPoint\u5b9e\u4f8b</p> <p>example:</p> <pre><code>line = DmDbLine()\ngraph_data = line.get_graph_data()\nprint(\"\u7ebf\u7684\u8d77\u70b9:\", graph_data[0])\nprint(\"\u7ebf\u7684\u7ec8\u70b9:\", graph_data[1])\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\line.py</code> <pre><code>def get_graph_data(self) -> list[DmDPoint]:\n \"\"\"\n \u83b7\u53d6\u8be5\u7ebf\u7684\u56fe\u5f62\u6570\u636e\uff08\u8d77\u70b9\u548c\u7ec8\u70b9\uff09\n :return: \u5305\u542b\u8d77\u70b9\u548c\u7ec8\u70b9\u7684\u5217\u8868\uff0c\u6bcf\u4e2a\u5143\u7d20\u4e3aDmDPoint\u5b9e\u4f8b\n\n example:\n ```python\n line = DmDbLine()\n graph_data = line.get_graph_data()\n print(\"\u7ebf\u7684\u8d77\u70b9:\", graph_data[0])\n print(\"\u7ebf\u7684\u7ec8\u70b9:\", graph_data[1])\n ```\n \"\"\"\n cpp_list = self._obj.GetGraphData()\n return [DmDPoint._from_obj(item) for item in cpp_list]\n</code></pre>"},{"location":"reference/lib/types/line.html#dimine_python_sdk.lib.types.line.DmDbPolyline","title":"<code>DmDbPolyline</code>","text":"<p>\u4e09\u7ef4\u591a\u6bb5\u7ebf\u7c7b\u578b</p> Source code in <code>dimine_python_sdk\\lib\\types\\line.py</code> <pre><code>class DmDbPolyline:\n \"\"\"\u4e09\u7ef4\u591a\u6bb5\u7ebf\u7c7b\u578b\"\"\"\n\n def __init__(self):\n \"\"\"\n \u6784\u9020\u51fd\u6570\n :return: None\n \"\"\"\n self._obj = Dm.dmDbPolyline()\n\n def get_graph_data(self) -> list[DmDPoint]:\n \"\"\"\n \u83b7\u53d6\u591a\u6bb5\u7ebf\u7684\u6240\u6709\u9876\u70b9\u5750\u6807\n :return: \u9876\u70b9\u5217\u8868\uff0c\u6bcf\u4e2a\u5143\u7d20\u4e3aDmDPoint\u5b9e\u4f8b\n\n example:\n ```python\n polyline = DmDbPolyline()\n graph_data = polyline.get_graph_data()\n for point in graph_data:\n print(point)\n ```\n \"\"\"\n cpp_list = self._obj.GetGraphData()\n return [DmDPoint._from_obj(item) for item in cpp_list]\n\n def __repr__(self) -> str:\n \"\"\"\n \u5b57\u7b26\u4e32\u8868\u793a\n :return: \u591a\u6bb5\u7ebf\u7684\u6807\u51c6\u5b57\u7b26\u4e32\u8868\u793a\n \"\"\"\n return self._obj.__repr__()\n\n def set_color(self, red: int, green: int, blue: int) -> None:\n \"\"\"\n \u8bbe\u7f6e\u591a\u6bb5\u7ebf\u7684\u989c\u8272\n :param red: \u7ea2\u8272\u5206\u91cf\uff080-255\uff09\n :param green: \u7eff\u8272\u5206\u91cf\uff080-255\uff09\n :param blue: \u84dd\u8272\u5206\u91cf\uff080-255\uff09\n :return: None\n\n example:\n ```python\n polyline = DmDbPolyline()\n polyline.set_color(255, 0, 0) # \u8bbe\u7f6e\u4e3a\u7ea2\u8272\n ```\n \"\"\"\n self._obj.SetColor(red, green, blue)\n\n def is_closed(self, tolerance: float = 1e-10) -> bool:\n \"\"\"\n \u5224\u65ad\u591a\u6bb5\u7ebf\u662f\u5426\u95ed\u5408\uff08\u8d77\u70b9\u4e0e\u7ec8\u70b9\u5728\u5bb9\u5dee\u8303\u56f4\u5185\u91cd\u5408\uff09\n :param tolerance: \u6d6e\u70b9\u5bb9\u5dee\u9608\u503c\uff0c\u9ed8\u8ba41e-10\n :return: \u95ed\u5408\u8fd4\u56deTrue\uff0c\u5426\u5219\u8fd4\u56deFalse\n\n example:\n ```python\n polyline = DmDbPolyline()\n is_closed = polyline.is_closed()\n if is_closed:\n print(\"\u591a\u6bb5\u7ebf\u95ed\u5408\")\n else:\n print(\"\u591a\u6bb5\u7ebf\u4e0d\u95ed\u5408\")\n ```\n \"\"\"\n return self._obj.IsClosed(tolerance)\n\n @classmethod\n def _from_obj(cls, obj):\n \"\"\"\n :param obj: \u539f\u751fdmDbPolyline\u5bf9\u8c61\n :return: DmDbPolyline\u5b9e\u4f8b\n \"\"\"\n instance = cls.__new__(cls)\n instance._obj = obj\n return instance\n</code></pre>"},{"location":"reference/lib/types/line.html#dimine_python_sdk.lib.types.line.DmDbPolyline.__init__","title":"<code>__init__()</code>","text":"<p>\u6784\u9020\u51fd\u6570 :return: None</p> Source code in <code>dimine_python_sdk\\lib\\types\\line.py</code> <pre><code>def __init__(self):\n \"\"\"\n \u6784\u9020\u51fd\u6570\n :return: None\n \"\"\"\n self._obj = Dm.dmDbPolyline()\n</code></pre>"},{"location":"reference/lib/types/line.html#dimine_python_sdk.lib.types.line.DmDbPolyline.__repr__","title":"<code>__repr__()</code>","text":"<p>\u5b57\u7b26\u4e32\u8868\u793a :return: \u591a\u6bb5\u7ebf\u7684\u6807\u51c6\u5b57\u7b26\u4e32\u8868\u793a</p> Source code in <code>dimine_python_sdk\\lib\\types\\line.py</code> <pre><code>def __repr__(self) -> str:\n \"\"\"\n \u5b57\u7b26\u4e32\u8868\u793a\n :return: \u591a\u6bb5\u7ebf\u7684\u6807\u51c6\u5b57\u7b26\u4e32\u8868\u793a\n \"\"\"\n return self._obj.__repr__()\n</code></pre>"},{"location":"reference/lib/types/line.html#dimine_python_sdk.lib.types.line.DmDbPolyline.get_graph_data","title":"<code>get_graph_data()</code>","text":"<p>\u83b7\u53d6\u591a\u6bb5\u7ebf\u7684\u6240\u6709\u9876\u70b9\u5750\u6807 :return: \u9876\u70b9\u5217\u8868\uff0c\u6bcf\u4e2a\u5143\u7d20\u4e3aDmDPoint\u5b9e\u4f8b</p> <p>example:</p> <pre><code>polyline = DmDbPolyline()\ngraph_data = polyline.get_graph_data()\nfor point in graph_data:\n print(point)\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\line.py</code> <pre><code>def get_graph_data(self) -> list[DmDPoint]:\n \"\"\"\n \u83b7\u53d6\u591a\u6bb5\u7ebf\u7684\u6240\u6709\u9876\u70b9\u5750\u6807\n :return: \u9876\u70b9\u5217\u8868\uff0c\u6bcf\u4e2a\u5143\u7d20\u4e3aDmDPoint\u5b9e\u4f8b\n\n example:\n ```python\n polyline = DmDbPolyline()\n graph_data = polyline.get_graph_data()\n for point in graph_data:\n print(point)\n ```\n \"\"\"\n cpp_list = self._obj.GetGraphData()\n return [DmDPoint._from_obj(item) for item in cpp_list]\n</code></pre>"},{"location":"reference/lib/types/line.html#dimine_python_sdk.lib.types.line.DmDbPolyline.is_closed","title":"<code>is_closed(tolerance=1e-10)</code>","text":"<p>\u5224\u65ad\u591a\u6bb5\u7ebf\u662f\u5426\u95ed\u5408\uff08\u8d77\u70b9\u4e0e\u7ec8\u70b9\u5728\u5bb9\u5dee\u8303\u56f4\u5185\u91cd\u5408\uff09 :param tolerance: \u6d6e\u70b9\u5bb9\u5dee\u9608\u503c\uff0c\u9ed8\u8ba41e-10 :return: \u95ed\u5408\u8fd4\u56deTrue\uff0c\u5426\u5219\u8fd4\u56deFalse</p> <p>example:</p> <pre><code>polyline = DmDbPolyline()\nis_closed = polyline.is_closed()\nif is_closed:\n print(\"\u591a\u6bb5\u7ebf\u95ed\u5408\")\nelse:\n print(\"\u591a\u6bb5\u7ebf\u4e0d\u95ed\u5408\")\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\line.py</code> <pre><code>def is_closed(self, tolerance: float = 1e-10) -> bool:\n \"\"\"\n \u5224\u65ad\u591a\u6bb5\u7ebf\u662f\u5426\u95ed\u5408\uff08\u8d77\u70b9\u4e0e\u7ec8\u70b9\u5728\u5bb9\u5dee\u8303\u56f4\u5185\u91cd\u5408\uff09\n :param tolerance: \u6d6e\u70b9\u5bb9\u5dee\u9608\u503c\uff0c\u9ed8\u8ba41e-10\n :return: \u95ed\u5408\u8fd4\u56deTrue\uff0c\u5426\u5219\u8fd4\u56deFalse\n\n example:\n ```python\n polyline = DmDbPolyline()\n is_closed = polyline.is_closed()\n if is_closed:\n print(\"\u591a\u6bb5\u7ebf\u95ed\u5408\")\n else:\n print(\"\u591a\u6bb5\u7ebf\u4e0d\u95ed\u5408\")\n ```\n \"\"\"\n return self._obj.IsClosed(tolerance)\n</code></pre>"},{"location":"reference/lib/types/line.html#dimine_python_sdk.lib.types.line.DmDbPolyline.set_color","title":"<code>set_color(red, green, blue)</code>","text":"<p>\u8bbe\u7f6e\u591a\u6bb5\u7ebf\u7684\u989c\u8272 :param red: \u7ea2\u8272\u5206\u91cf\uff080-255\uff09 :param green: \u7eff\u8272\u5206\u91cf\uff080-255\uff09 :param blue: \u84dd\u8272\u5206\u91cf\uff080-255\uff09 :return: None</p> <p>example:</p> <pre><code>polyline = DmDbPolyline()\npolyline.set_color(255, 0, 0) # \u8bbe\u7f6e\u4e3a\u7ea2\u8272\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\line.py</code> <pre><code>def set_color(self, red: int, green: int, blue: int) -> None:\n \"\"\"\n \u8bbe\u7f6e\u591a\u6bb5\u7ebf\u7684\u989c\u8272\n :param red: \u7ea2\u8272\u5206\u91cf\uff080-255\uff09\n :param green: \u7eff\u8272\u5206\u91cf\uff080-255\uff09\n :param blue: \u84dd\u8272\u5206\u91cf\uff080-255\uff09\n :return: None\n\n example:\n ```python\n polyline = DmDbPolyline()\n polyline.set_color(255, 0, 0) # \u8bbe\u7f6e\u4e3a\u7ea2\u8272\n ```\n \"\"\"\n self._obj.SetColor(red, green, blue)\n</code></pre>"},{"location":"reference/lib/types/line.html#dimine_python_sdk.lib.types.line.DmMatrix4x4","title":"<code>DmMatrix4x4</code>","text":"<p>\u4e8c\u6b21\u5c01\u88c5dmMatrix4x4New\u7c7b</p> Source code in <code>dimine_python_sdk\\lib\\types\\line.py</code> <pre><code>class DmMatrix4x4:\n \"\"\"\u4e8c\u6b21\u5c01\u88c5dmMatrix4x4New\u7c7b\"\"\"\n def __init__(self):\n \"\"\"\u6784\u9020\u51fd\u6570\uff0c\u521d\u59cb\u53164x4\u77e9\u9635\"\"\"\n self._obj = Dm.dmMatrix4x4()\n\n def align_coord_sys(\n self,\n from_origin: DmDPoint,\n from_x_axis: DmDPoint,\n from_y_axis: DmDPoint,\n from_z_axis: DmDPoint,\n to_origin: DmDPoint,\n to_x_axis: DmDPoint,\n to_y_axis: DmDPoint,\n to_z_axis: DmDPoint\n ) -> None:\n \"\"\"\n \u5bf9\u9f50\u5750\u6807\u7cfb\uff0c\u5c06\u4e00\u4e2a\u5750\u6807\u7cfb\u6620\u5c04\u5230\u53e6\u4e00\u4e2a\u5750\u6807\u7cfb\n :param from_origin: \u6e90\u5750\u6807\u7cfb\u539f\u70b9\uff08DmDPoint\u5b9e\u4f8b\uff09\n :param from_x_axis: \u6e90\u5750\u6807\u7cfbX\u8f74\u65b9\u5411\uff08DmDPoint\u5b9e\u4f8b\uff09\n :param from_y_axis: \u6e90\u5750\u6807\u7cfbY\u8f74\u65b9\u5411\uff08DmDPoint\u5b9e\u4f8b\uff09\n :param from_z_axis: \u6e90\u5750\u6807\u7cfbZ\u8f74\u65b9\u5411\uff08DmDPoint\u5b9e\u4f8b\uff09\n :param to_origin: \u76ee\u6807\u5750\u6807\u7cfb\u539f\u70b9\uff08DmDPoint\u5b9e\u4f8b\uff09\n :param to_x_axis: \u76ee\u6807\u5750\u6807\u7cfbX\u8f74\u65b9\u5411\uff08DmDPoint\u5b9e\u4f8b\uff09\n :param to_y_axis: \u76ee\u6807\u5750\u6807\u7cfbY\u8f74\u65b9\u5411\uff08DmDPoint\u5b9e\u4f8b\uff09\n :param to_z_axis: \u76ee\u6807\u5750\u6807\u7cfbZ\u8f74\u65b9\u5411\uff08DmDPoint\u5b9e\u4f8b\uff09\n :return: None\n\n example:\n ```python\n matrix = DmMatrix4x4()\n matrix.align_coord_sys(\n from_origin=DmDPoint(0, 0, 0),\n from_x_axis=DmDPoint(1, 0, 0),\n from_y_axis=DmDPoint(0, 1, 0),\n from_z_axis=DmDPoint(0, 0, 1),\n to_origin=DmDPoint(100, 100, 100),\n to_x_axis=DmDPoint(0, 0, 1),\n to_y_axis=DmDPoint(0, 1, 0),\n to_z_axis=DmDPoint(1, 0, 0)\n )\n ```\n \"\"\"\n self._obj.AlignCoordSys(\n from_origin._obj,\n from_x_axis._obj,\n from_y_axis._obj,\n from_z_axis._obj,\n to_origin._obj,\n to_x_axis._obj,\n to_y_axis._obj,\n to_z_axis._obj\n )\n\n def transform_point(self, pt_source: DmDPoint) -> DmDPoint:\n \"\"\"\n \u5bf9\u4e09\u7ef4\u70b9\u5e94\u7528\u77e9\u9635\u53d8\u6362\n :param pt_source: \u5f85\u53d8\u6362\u7684\u6e90\u70b9\uff08DmDPoint\u5b9e\u4f8b\uff09\n :return: \u53d8\u6362\u540e\u7684\u70b9\uff08DmDPoint\u5b9e\u4f8b\uff09\n\n example:\n ```python\n matrix = DmMatrix4x4()\n pt = DmDPoint(1, 2, 3)\n transformed_pt = matrix.transform_point(pt)\n print(\"\u53d8\u6362\u540e\u7684\u70b9:\", transformed_pt)\n ```\n \"\"\"\n cpp_result = self._obj.TransformPoint(pt_source._obj)\n result = DmDPoint()\n result._obj = cpp_result\n return result\n</code></pre>"},{"location":"reference/lib/types/line.html#dimine_python_sdk.lib.types.line.DmMatrix4x4.__init__","title":"<code>__init__()</code>","text":"<p>\u6784\u9020\u51fd\u6570\uff0c\u521d\u59cb\u53164x4\u77e9\u9635</p> Source code in <code>dimine_python_sdk\\lib\\types\\line.py</code> <pre><code>def __init__(self):\n \"\"\"\u6784\u9020\u51fd\u6570\uff0c\u521d\u59cb\u53164x4\u77e9\u9635\"\"\"\n self._obj = Dm.dmMatrix4x4()\n</code></pre>"},{"location":"reference/lib/types/line.html#dimine_python_sdk.lib.types.line.DmMatrix4x4.align_coord_sys","title":"<code>align_coord_sys(from_origin, from_x_axis, from_y_axis, from_z_axis, to_origin, to_x_axis, to_y_axis, to_z_axis)</code>","text":"<p>\u5bf9\u9f50\u5750\u6807\u7cfb\uff0c\u5c06\u4e00\u4e2a\u5750\u6807\u7cfb\u6620\u5c04\u5230\u53e6\u4e00\u4e2a\u5750\u6807\u7cfb :param from_origin: \u6e90\u5750\u6807\u7cfb\u539f\u70b9\uff08DmDPoint\u5b9e\u4f8b\uff09 :param from_x_axis: \u6e90\u5750\u6807\u7cfbX\u8f74\u65b9\u5411\uff08DmDPoint\u5b9e\u4f8b\uff09 :param from_y_axis: \u6e90\u5750\u6807\u7cfbY\u8f74\u65b9\u5411\uff08DmDPoint\u5b9e\u4f8b\uff09 :param from_z_axis: \u6e90\u5750\u6807\u7cfbZ\u8f74\u65b9\u5411\uff08DmDPoint\u5b9e\u4f8b\uff09 :param to_origin: \u76ee\u6807\u5750\u6807\u7cfb\u539f\u70b9\uff08DmDPoint\u5b9e\u4f8b\uff09 :param to_x_axis: \u76ee\u6807\u5750\u6807\u7cfbX\u8f74\u65b9\u5411\uff08DmDPoint\u5b9e\u4f8b\uff09 :param to_y_axis: \u76ee\u6807\u5750\u6807\u7cfbY\u8f74\u65b9\u5411\uff08DmDPoint\u5b9e\u4f8b\uff09 :param to_z_axis: \u76ee\u6807\u5750\u6807\u7cfbZ\u8f74\u65b9\u5411\uff08DmDPoint\u5b9e\u4f8b\uff09 :return: None</p> <p>example:</p> <pre><code>matrix = DmMatrix4x4()\nmatrix.align_coord_sys(\n from_origin=DmDPoint(0, 0, 0),\n from_x_axis=DmDPoint(1, 0, 0),\n from_y_axis=DmDPoint(0, 1, 0),\n from_z_axis=DmDPoint(0, 0, 1),\n to_origin=DmDPoint(100, 100, 100),\n to_x_axis=DmDPoint(0, 0, 1),\n to_y_axis=DmDPoint(0, 1, 0),\n to_z_axis=DmDPoint(1, 0, 0)\n)\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\line.py</code> <pre><code>def align_coord_sys(\n self,\n from_origin: DmDPoint,\n from_x_axis: DmDPoint,\n from_y_axis: DmDPoint,\n from_z_axis: DmDPoint,\n to_origin: DmDPoint,\n to_x_axis: DmDPoint,\n to_y_axis: DmDPoint,\n to_z_axis: DmDPoint\n) -> None:\n \"\"\"\n \u5bf9\u9f50\u5750\u6807\u7cfb\uff0c\u5c06\u4e00\u4e2a\u5750\u6807\u7cfb\u6620\u5c04\u5230\u53e6\u4e00\u4e2a\u5750\u6807\u7cfb\n :param from_origin: \u6e90\u5750\u6807\u7cfb\u539f\u70b9\uff08DmDPoint\u5b9e\u4f8b\uff09\n :param from_x_axis: \u6e90\u5750\u6807\u7cfbX\u8f74\u65b9\u5411\uff08DmDPoint\u5b9e\u4f8b\uff09\n :param from_y_axis: \u6e90\u5750\u6807\u7cfbY\u8f74\u65b9\u5411\uff08DmDPoint\u5b9e\u4f8b\uff09\n :param from_z_axis: \u6e90\u5750\u6807\u7cfbZ\u8f74\u65b9\u5411\uff08DmDPoint\u5b9e\u4f8b\uff09\n :param to_origin: \u76ee\u6807\u5750\u6807\u7cfb\u539f\u70b9\uff08DmDPoint\u5b9e\u4f8b\uff09\n :param to_x_axis: \u76ee\u6807\u5750\u6807\u7cfbX\u8f74\u65b9\u5411\uff08DmDPoint\u5b9e\u4f8b\uff09\n :param to_y_axis: \u76ee\u6807\u5750\u6807\u7cfbY\u8f74\u65b9\u5411\uff08DmDPoint\u5b9e\u4f8b\uff09\n :param to_z_axis: \u76ee\u6807\u5750\u6807\u7cfbZ\u8f74\u65b9\u5411\uff08DmDPoint\u5b9e\u4f8b\uff09\n :return: None\n\n example:\n ```python\n matrix = DmMatrix4x4()\n matrix.align_coord_sys(\n from_origin=DmDPoint(0, 0, 0),\n from_x_axis=DmDPoint(1, 0, 0),\n from_y_axis=DmDPoint(0, 1, 0),\n from_z_axis=DmDPoint(0, 0, 1),\n to_origin=DmDPoint(100, 100, 100),\n to_x_axis=DmDPoint(0, 0, 1),\n to_y_axis=DmDPoint(0, 1, 0),\n to_z_axis=DmDPoint(1, 0, 0)\n )\n ```\n \"\"\"\n self._obj.AlignCoordSys(\n from_origin._obj,\n from_x_axis._obj,\n from_y_axis._obj,\n from_z_axis._obj,\n to_origin._obj,\n to_x_axis._obj,\n to_y_axis._obj,\n to_z_axis._obj\n )\n</code></pre>"},{"location":"reference/lib/types/line.html#dimine_python_sdk.lib.types.line.DmMatrix4x4.transform_point","title":"<code>transform_point(pt_source)</code>","text":"<p>\u5bf9\u4e09\u7ef4\u70b9\u5e94\u7528\u77e9\u9635\u53d8\u6362 :param pt_source: \u5f85\u53d8\u6362\u7684\u6e90\u70b9\uff08DmDPoint\u5b9e\u4f8b\uff09 :return: \u53d8\u6362\u540e\u7684\u70b9\uff08DmDPoint\u5b9e\u4f8b\uff09</p> <p>example:</p> <pre><code>matrix = DmMatrix4x4()\npt = DmDPoint(1, 2, 3)\ntransformed_pt = matrix.transform_point(pt)\nprint(\"\u53d8\u6362\u540e\u7684\u70b9:\", transformed_pt)\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\line.py</code> <pre><code>def transform_point(self, pt_source: DmDPoint) -> DmDPoint:\n \"\"\"\n \u5bf9\u4e09\u7ef4\u70b9\u5e94\u7528\u77e9\u9635\u53d8\u6362\n :param pt_source: \u5f85\u53d8\u6362\u7684\u6e90\u70b9\uff08DmDPoint\u5b9e\u4f8b\uff09\n :return: \u53d8\u6362\u540e\u7684\u70b9\uff08DmDPoint\u5b9e\u4f8b\uff09\n\n example:\n ```python\n matrix = DmMatrix4x4()\n pt = DmDPoint(1, 2, 3)\n transformed_pt = matrix.transform_point(pt)\n print(\"\u53d8\u6362\u540e\u7684\u70b9:\", transformed_pt)\n ```\n \"\"\"\n cpp_result = self._obj.TransformPoint(pt_source._obj)\n result = DmDPoint()\n result._obj = cpp_result\n return result\n</code></pre>"},{"location":"reference/lib/types/point.html","title":"point","text":""},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.DmDPoint","title":"<code>DmDPoint</code>","text":"<p>\u53cc\u7cbe\u5ea6\u70b9</p> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>class DmDPoint:\n \"\"\"\u53cc\u7cbe\u5ea6\u70b9\"\"\"\n\n def __init__(self, x: float = 0.0, y: float = 0.0, z: float = 0.0):\n \"\"\"\n \u6784\u9020\u51fd\u6570\n :param x: \u5411\u91cfx\u5206\u91cf\uff0c\u9ed8\u8ba40.0\n :param y: \u5411\u91cfy\u5206\u91cf\uff0c\u9ed8\u8ba40.0\n :param z: \u5411\u91cfz\u5206\u91cf\uff0c\u9ed8\u8ba40.0\n \"\"\"\n self._obj = Dm.dmDPoint(x, y, z)\n\n @classmethod\n def _from_obj(cls, obj):\n \"\"\"\n :param obj: \u6e90dmDPoint\u5bf9\u8c61\n :return: DmDPoint\u5b9e\u4f8b\n \"\"\"\n instance = cls()\n instance._obj = obj\n return instance\n\n\n # ---------------------- \u5206\u91cf\u5c5e\u6027\u5c01\u88c5 ----------------------\n @property\n def x(self) -> float:\n return self._obj.x\n\n @x.setter\n def x(self, value: float):\n self._obj.x = float(value)\n\n @property\n def y(self) -> float:\n return self._obj.y\n\n @y.setter\n def y(self, value: float):\n self._obj.y = float(value)\n\n @property\n def z(self) -> float:\n return self._obj.z\n\n @z.setter\n def z(self, value: float):\n self._obj.z = float(value)\n\n # ---------------------- \u57fa\u7840\u8fd0\u7b97\u7b26 ----------------------\n def __add__(self, other: \"DmDPoint\") -> \"DmDPoint\":\n \"\"\"\n \u5411\u91cf\u52a0\u6cd5\n :param other: \u5f85\u76f8\u52a0\u7684DmDPoint\u5b9e\u4f8b\n :return: \u76f8\u52a0\u540e\u7684\u65b0DmDPoint\u5b9e\u4f8b\n :raise TypeError: \u975eDmDPoint\u5b9e\u4f8b\u65f6\u629b\u51fa\n \"\"\"\n if not isinstance(other, DmDPoint):\n raise TypeError(f\"\u4ec5\u652f\u6301DmDPoint\u5b9e\u4f8b\u76f8\u52a0\uff0c\u5f53\u524d\u4e3a{type(other)}\")\n res = DmDPoint()\n res._obj = self._obj + other._obj\n return res\n\n def __sub__(self, other: \"DmDPoint\") -> \"DmDPoint\":\n \"\"\"\n \u5411\u91cf\u51cf\u6cd5\n :param other: \u5f85\u76f8\u51cf\u7684DmDPoint\u5b9e\u4f8b\n :return: \u76f8\u51cf\u540e\u7684\u65b0DmDPoint\u5b9e\u4f8b\n :raise TypeError: \u975eDmDPoint\u5b9e\u4f8b\u65f6\u629b\u51fa\n \"\"\"\n if not isinstance(other, DmDPoint):\n raise TypeError(f\"\u4ec5\u652f\u6301DmDPoint\u5b9e\u4f8b\u76f8\u51cf\uff0c\u5f53\u524d\u4e3a{type(other)}\")\n res = DmDPoint()\n res._obj = self._obj - other._obj\n return res\n\n def __mul__(self, scalar: (int, float)) -> \"DmDPoint\":\n \"\"\"\n \u5411\u91cf\u6807\u91cf\u4e58\u6cd5\n :param scalar: \u76f8\u4e58\u7684\u6807\u91cf\uff08int/float\uff09\n :return: \u76f8\u4e58\u540e\u7684\u65b0DmDPoint\u5b9e\u4f8b\n :raise TypeError: \u975e\u6807\u91cf\u7c7b\u578b\u65f6\u629b\u51fa\n \"\"\"\n if not isinstance(scalar, (int, float)):\n raise TypeError(f\"\u4ec5\u652f\u6301\u4e0e\u6807\u91cf(int/float)\u76f8\u4e58\uff0c\u5f53\u524d\u4e3a{type(scalar)}\")\n res = DmDPoint()\n res._obj = self._obj * scalar\n return res\n\n def __truediv__(self, scalar: (int, float)) -> \"DmDPoint\":\n \"\"\"\n \u5411\u91cf\u6807\u91cf\u9664\u6cd5\n :param scalar: \u76f8\u9664\u7684\u6807\u91cf\uff08int/float\uff09\n :return: \u76f8\u9664\u540e\u7684\u65b0DmDPoint\u5b9e\u4f8b\n :raise TypeError: \u975e\u6807\u91cf\u7c7b\u578b\u65f6\u629b\u51fa\n :raise ZeroDivisionError: \u6807\u91cf\u4e3a0\u65f6\u629b\u51fa\n \"\"\"\n if not isinstance(scalar, (int, float)):\n raise TypeError(f\"\u4ec5\u652f\u6301\u4e0e\u6807\u91cf(int/float)\u76f8\u9664\uff0c\u5f53\u524d\u4e3a{type(scalar)}\")\n if scalar == 0:\n raise ZeroDivisionError(\"\u5411\u91cf\u6807\u91cf\u9664\u6cd5\uff0c\u6807\u91cf\u4e0d\u80fd\u4e3a0\")\n res = DmDPoint()\n res._obj = self._obj / scalar\n return res\n\n # ---------------------- \u590d\u5408\u8d4b\u503c\u8fd0\u7b97\u7b26 ----------------------\n def __iadd__(self, other: \"DmDPoint\") -> \"DmDPoint\":\n \"\"\"\n \u5411\u91cf\u52a0\u6cd5\u8d4b\u503c\uff08\u539f\u5730\u4fee\u6539\uff09\n :param other: \u5f85\u76f8\u52a0\u7684DmDPoint\u5b9e\u4f8b\n :return: \u81ea\u8eab\u5b9e\u4f8b\uff08\u652f\u6301\u94fe\u5f0f\u8c03\u7528\uff09\n :raise TypeError: \u975eDmDPoint\u5b9e\u4f8b\u65f6\u629b\u51fa\n \"\"\"\n if not isinstance(other, DmDPoint):\n raise TypeError(f\"\u4ec5\u652f\u6301DmDPoint\u5b9e\u4f8b\u76f8\u52a0\u8d4b\u503c\uff0c\u5f53\u524d\u4e3a{type(other)}\")\n self._obj += other._obj\n return self\n\n def __isub__(self, other: \"DmDPoint\") -> \"DmDPoint\":\n \"\"\"\n \u5411\u91cf\u51cf\u6cd5\u8d4b\u503c\uff08\u539f\u5730\u4fee\u6539\uff09\n :param other: \u5f85\u76f8\u51cf\u7684DmDPoint\u5b9e\u4f8b\n :return: \u81ea\u8eab\u5b9e\u4f8b\uff08\u652f\u6301\u94fe\u5f0f\u8c03\u7528\uff09\n :raise TypeError: \u975eDmDPoint\u5b9e\u4f8b\u65f6\u629b\u51fa\n \"\"\"\n if not isinstance(other, DmDPoint):\n raise TypeError(f\"\u4ec5\u652f\u6301DmDPoint\u5b9e\u4f8b\u76f8\u51cf\u8d4b\u503c\uff0c\u5f53\u524d\u4e3a{type(other)}\")\n self._obj -= other._obj\n return self\n\n def __imul__(self, scalar: (int, float)) -> \"DmDPoint\":\n \"\"\"\n \u5411\u91cf\u6807\u91cf\u4e58\u6cd5\u8d4b\u503c\uff08\u539f\u5730\u4fee\u6539\uff09\n :param scalar: \u76f8\u4e58\u7684\u6807\u91cf\uff08int/float\uff09\n :return: \u81ea\u8eab\u5b9e\u4f8b\uff08\u652f\u6301\u94fe\u5f0f\u8c03\u7528\uff09\n :raise TypeError: \u975e\u6807\u91cf\u7c7b\u578b\u65f6\u629b\u51fa\n \"\"\"\n if not isinstance(scalar, (int, float)):\n raise TypeError(f\"\u4ec5\u652f\u6301\u4e0e\u6807\u91cf(int/float)\u76f8\u4e58\u8d4b\u503c\uff0c\u5f53\u524d\u4e3a{type(scalar)}\")\n self._obj *= scalar\n return self\n\n def __itruediv__(self, scalar: (int, float)) -> \"DmDPoint\":\n \"\"\"\n \u5411\u91cf\u6807\u91cf\u9664\u6cd5\u8d4b\u503c\uff08\u539f\u5730\u4fee\u6539\uff09\n :param scalar: \u76f8\u9664\u7684\u6807\u91cf\uff08int/float\uff09\n :return: \u81ea\u8eab\u5b9e\u4f8b\uff08\u652f\u6301\u94fe\u5f0f\u8c03\u7528\uff09\n :raise TypeError: \u975e\u6807\u91cf\u7c7b\u578b\u65f6\u629b\u51fa\n :raise ZeroDivisionError: \u6807\u91cf\u4e3a0\u65f6\u629b\u51fa\n \"\"\"\n if not isinstance(scalar, (int, float)):\n raise TypeError(f\"\u4ec5\u652f\u6301\u4e0e\u6807\u91cf(int/float)\u76f8\u9664\u8d4b\u503c\uff0c\u5f53\u524d\u4e3a{type(scalar)}\")\n if scalar == 0:\n raise ZeroDivisionError(\"\u5411\u91cf\u6807\u91cf\u9664\u6cd5\u8d4b\u503c\uff0c\u6807\u91cf\u4e0d\u80fd\u4e3a0\")\n self._obj /= scalar\n return self\n\n # ---------------------- \u5355\u76ee/\u6bd4\u8f83\u8fd0\u7b97\u7b26 ----------------------\n def __neg__(self) -> \"DmDPoint\":\n \"\"\"\n \u8d1f\u53f7\u8fd0\u7b97\u7b26\uff08\u53d6\u53cd\u5411\u91cf\uff09\n :return: \u53d6\u53cd\u540e\u7684\u65b0DmDPoint\u5b9e\u4f8b\n \"\"\"\n res = DmDPoint()\n res._obj = -self._obj\n return res\n\n def __eq__(self, other: \"DmDPoint\") -> bool:\n \"\"\"\n \u7b49\u4e8e\u6bd4\u8f83\u8fd0\u7b97\u7b26\n :param other: \u5f85\u6bd4\u8f83\u7684DmDPoint\u5b9e\u4f8b\n :return: \u76f8\u7b49\u8fd4\u56deTrue\uff0c\u5426\u5219\u8fd4\u56deFalse\uff1b\u975eDmDPoint\u5b9e\u4f8b\u76f4\u63a5\u8fd4\u56deFalse\n \"\"\"\n if not isinstance(other, DmDPoint):\n return False\n return self._obj == other._obj\n\n def __ne__(self, other: \"DmDPoint\") -> bool:\n \"\"\"\n \u4e0d\u7b49\u4e8e\u6bd4\u8f83\u8fd0\u7b97\u7b26\n :param other: \u5f85\u6bd4\u8f83\u7684DmDPoint\u5b9e\u4f8b\n :return: \u4e0d\u76f8\u7b49\u8fd4\u56deTrue\uff0c\u5426\u5219\u8fd4\u56deFalse\uff1b\u975eDmDPoint\u5b9e\u4f8b\u76f4\u63a5\u8fd4\u56deTrue\n \"\"\"\n if not isinstance(other, DmDPoint):\n return True\n return self._obj != other._obj\n\n # ---------------------- \u6838\u5fc3\u5de5\u5177\u65b9\u6cd5 ----------------------\n def __getitem__(self, idx: int) -> float:\n \"\"\"\n \u7d22\u5f15\u8bbf\u95ee\u5206\u91cf\uff080=x,1=y,2=z)\n :param idx: \u7d22\u5f15\u503c\uff08\u4ec5\u652f\u63010/1/2\uff09\n :return: \u5bf9\u5e94\u7d22\u5f15\u7684\u5206\u91cf\u503c\uff08float\uff09\n :raise IndexError: \u7d22\u5f15\u975e\u6574\u6570/\u8d85\u51fa0-2\u8303\u56f4\u65f6\u629b\u51fa\n \"\"\"\n if not isinstance(idx, int) or idx < 0 or idx >= 3:\n raise IndexError(\"\u5411\u91cf\u7d22\u5f15\u4ec5\u652f\u63010(x)\u30011(y)\u30012(z)\uff0c\u8d85\u51fa\u8303\u56f4\")\n return self._obj[idx]\n\n def is_zero_length(self, tol: float = 1e-10) -> bool:\n \"\"\"\n \u5224\u65ad\u662f\u5426\u4e3a\u96f6\u5411\u91cf\uff08\u8003\u8651\u6d6e\u70b9\u7cbe\u5ea6\u8bef\u5dee\uff09\n :param tol: \u6d6e\u70b9\u5bb9\u5dee\u9608\u503c\uff0c\u9ed8\u8ba41e-10\uff08\u503c\u8d8a\u5c0f\u7cbe\u5ea6\u8981\u6c42\u8d8a\u9ad8\uff09\n :return: \u5411\u91cf\u957f\u5ea6\u63a5\u8fd10\u8fd4\u56deTrue\uff0c\u5426\u5219\u8fd4\u56deFalse\n\n example:\n ```python\n pt = DmDPoint(0, 0, 0)\n print(pt.is_zero_length())\n ```\n \"\"\"\n return self._obj.IsZeroLength(tol)\n\n def dot_product(self, other: \"DmDPoint\") -> float:\n \"\"\"\n \u8ba1\u7b97\u4e24\u4e2a\u5411\u91cf\u7684\u70b9\u79ef\uff08\u6570\u91cf\u79ef\uff09\n :param other: \u5f85\u8ba1\u7b97\u70b9\u79ef\u7684DmDPoint\u5b9e\u4f8b\n :return: \u70b9\u79ef\u7ed3\u679c\uff08float\uff09\n :raise TypeError: \u975eDmDPoint\u5b9e\u4f8b\u65f6\u629b\u51fa\n\n example:\n ```python\n pt1 = DmDPoint(1, 2, 3)\n pt2 = DmDPoint(4, 5, 6)\n dot = pt1.dot_product(pt2)\n print(dot)\n ```\n \"\"\"\n if not isinstance(other, DmDPoint):\n raise TypeError(f\"\u4ec5\u652f\u6301\u4e0eDmDPoint\u5b9e\u4f8b\u8ba1\u7b97\u70b9\u79ef\uff0c\u5f53\u524d\u4e3a{type(other)}\")\n return self._obj.DotProduct(other._obj)\n\n def cross_product(self, other: \"DmDPoint\") -> \"DmDPoint\":\n \"\"\"\n \u8ba1\u7b97\u4e24\u4e2a\u5411\u91cf\u7684\u53c9\u79ef\uff08\u5411\u91cf\u79ef\uff09\n :param other: \u5f85\u8ba1\u7b97\u53c9\u79ef\u7684DmDPoint\u5b9e\u4f8b\n :return: \u53c9\u79ef\u7ed3\u679c\u7684\u65b0DmDPoint\u5b9e\u4f8b\n :raise TypeError: \u975eDmDPoint\u5b9e\u4f8b\u65f6\u629b\u51fa\n\n example:\n ```python\n pt1 = DmDPoint(1, 2, 3)\n pt2 = DmDPoint(4, 5, 6)\n cross = pt1.cross_product(pt2)\n print(cross)\n ```\n \"\"\"\n if not isinstance(other, DmDPoint):\n raise TypeError(f\"\u4ec5\u652f\u6301\u4e0eDmDPoint\u5b9e\u4f8b\u8ba1\u7b97\u53c9\u79ef\uff0c\u5f53\u524d\u4e3a{type(other)}\")\n res = DmDPoint()\n res._obj = self._obj.CrossProduct(other._obj)\n return res\n\n def norm(self) -> float:\n \"\"\"\n \u8ba1\u7b97\u5411\u91cf\u7684\u6a21\u957f\uff08\u957f\u5ea6\uff09\n :return: \u5411\u91cf\u6a21\u957f\u7ed3\u679c\uff08float\uff09\n\n example:\n ```python\n pt = DmDPoint(3, 4, 0)\n print(pt.norm())\n ```\n \"\"\"\n return self._obj.Norm()\n\n def normalize(self) -> \"DmDPoint\":\n \"\"\"\n \u5411\u91cf\u5f52\u4e00\u5316\uff08\u539f\u5730\u4fee\u6539\uff0c\u8f6c\u4e3a\u5355\u4f4d\u5411\u91cf\uff09\n :return: \u81ea\u8eab\u5b9e\u4f8b\n\n example:\n ```python\n pt = DmDPoint(3, 4, 0)\n pt.normalize()\n print(pt)\n ```\n \"\"\"\n self._obj.Normalize()\n return self\n\n def set(self, x: float, y: float, z: float) -> \"DmDPoint\":\n \"\"\"\n \u4e00\u6b21\u6027\u8bbe\u7f6e\u5411\u91cfx/y/z\u5206\u91cf\uff08\u539f\u5730\u4fee\u6539\uff09\n :param x: \u65b0\u7684x\u5206\u91cf\u503c\uff08float\uff09\n :param y: \u65b0\u7684y\u5206\u91cf\u503c\uff08float\uff09\n :param z: \u65b0\u7684z\u5206\u91cf\u503c\uff08float\uff09\n :return: \u81ea\u8eab\u5b9e\u4f8b\uff08\u652f\u6301\u94fe\u5f0f\u8c03\u7528\uff09\n\n example:\n ```python\n pt = DmDPoint()\n pt.set(1, 2, 3)\n print(pt) # \u8f93\u51fa: (1.0, 2.0, 3.0)\n ```\n \"\"\"\n self._obj.Set(float(x), float(y), float(z))\n return self\n\n # ---------------------- \u5b57\u7b26\u4e32\u8868\u793a ----------------------\n def __repr__(self) -> str:\n \"\"\"\n \u5b57\u7b26\u4e32\u8868\u793a\n :return: \u5411\u91cf\u7684\u6807\u51c6\u5b57\u7b26\u4e32\u8868\u793a\n \"\"\"\n return self._obj.__repr__()\n\n def __str__(self) -> str:\n \"\"\"\n \u6253\u5370\u5b57\u7b26\u4e32\uff0c\u4e0e__repr__\u4fdd\u6301\u4e00\u81f4\uff0c\u786e\u4fdd\u8f93\u51fa\u683c\u5f0f\u7edf\u4e00\n :return: \u5411\u91cf\u7684\u6253\u5370\u5b57\u7b26\u4e32\u8868\u793a\n \"\"\"\n return self._obj.__repr__()\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.DmDPoint.__add__","title":"<code>__add__(other)</code>","text":"<p>\u5411\u91cf\u52a0\u6cd5 :param other: \u5f85\u76f8\u52a0\u7684DmDPoint\u5b9e\u4f8b :return: \u76f8\u52a0\u540e\u7684\u65b0DmDPoint\u5b9e\u4f8b :raise TypeError: \u975eDmDPoint\u5b9e\u4f8b\u65f6\u629b\u51fa</p> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>def __add__(self, other: \"DmDPoint\") -> \"DmDPoint\":\n \"\"\"\n \u5411\u91cf\u52a0\u6cd5\n :param other: \u5f85\u76f8\u52a0\u7684DmDPoint\u5b9e\u4f8b\n :return: \u76f8\u52a0\u540e\u7684\u65b0DmDPoint\u5b9e\u4f8b\n :raise TypeError: \u975eDmDPoint\u5b9e\u4f8b\u65f6\u629b\u51fa\n \"\"\"\n if not isinstance(other, DmDPoint):\n raise TypeError(f\"\u4ec5\u652f\u6301DmDPoint\u5b9e\u4f8b\u76f8\u52a0\uff0c\u5f53\u524d\u4e3a{type(other)}\")\n res = DmDPoint()\n res._obj = self._obj + other._obj\n return res\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.DmDPoint.__eq__","title":"<code>__eq__(other)</code>","text":"<p>\u7b49\u4e8e\u6bd4\u8f83\u8fd0\u7b97\u7b26 :param other: \u5f85\u6bd4\u8f83\u7684DmDPoint\u5b9e\u4f8b :return: \u76f8\u7b49\u8fd4\u56deTrue\uff0c\u5426\u5219\u8fd4\u56deFalse\uff1b\u975eDmDPoint\u5b9e\u4f8b\u76f4\u63a5\u8fd4\u56deFalse</p> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>def __eq__(self, other: \"DmDPoint\") -> bool:\n \"\"\"\n \u7b49\u4e8e\u6bd4\u8f83\u8fd0\u7b97\u7b26\n :param other: \u5f85\u6bd4\u8f83\u7684DmDPoint\u5b9e\u4f8b\n :return: \u76f8\u7b49\u8fd4\u56deTrue\uff0c\u5426\u5219\u8fd4\u56deFalse\uff1b\u975eDmDPoint\u5b9e\u4f8b\u76f4\u63a5\u8fd4\u56deFalse\n \"\"\"\n if not isinstance(other, DmDPoint):\n return False\n return self._obj == other._obj\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.DmDPoint.__getitem__","title":"<code>__getitem__(idx)</code>","text":"<p>\u7d22\u5f15\u8bbf\u95ee\u5206\u91cf\uff080=x,1=y,2=z) :param idx: \u7d22\u5f15\u503c\uff08\u4ec5\u652f\u63010/1/2\uff09 :return: \u5bf9\u5e94\u7d22\u5f15\u7684\u5206\u91cf\u503c\uff08float\uff09 :raise IndexError: \u7d22\u5f15\u975e\u6574\u6570/\u8d85\u51fa0-2\u8303\u56f4\u65f6\u629b\u51fa</p> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>def __getitem__(self, idx: int) -> float:\n \"\"\"\n \u7d22\u5f15\u8bbf\u95ee\u5206\u91cf\uff080=x,1=y,2=z)\n :param idx: \u7d22\u5f15\u503c\uff08\u4ec5\u652f\u63010/1/2\uff09\n :return: \u5bf9\u5e94\u7d22\u5f15\u7684\u5206\u91cf\u503c\uff08float\uff09\n :raise IndexError: \u7d22\u5f15\u975e\u6574\u6570/\u8d85\u51fa0-2\u8303\u56f4\u65f6\u629b\u51fa\n \"\"\"\n if not isinstance(idx, int) or idx < 0 or idx >= 3:\n raise IndexError(\"\u5411\u91cf\u7d22\u5f15\u4ec5\u652f\u63010(x)\u30011(y)\u30012(z)\uff0c\u8d85\u51fa\u8303\u56f4\")\n return self._obj[idx]\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.DmDPoint.__iadd__","title":"<code>__iadd__(other)</code>","text":"<p>\u5411\u91cf\u52a0\u6cd5\u8d4b\u503c\uff08\u539f\u5730\u4fee\u6539\uff09 :param other: \u5f85\u76f8\u52a0\u7684DmDPoint\u5b9e\u4f8b :return: \u81ea\u8eab\u5b9e\u4f8b\uff08\u652f\u6301\u94fe\u5f0f\u8c03\u7528\uff09 :raise TypeError: \u975eDmDPoint\u5b9e\u4f8b\u65f6\u629b\u51fa</p> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>def __iadd__(self, other: \"DmDPoint\") -> \"DmDPoint\":\n \"\"\"\n \u5411\u91cf\u52a0\u6cd5\u8d4b\u503c\uff08\u539f\u5730\u4fee\u6539\uff09\n :param other: \u5f85\u76f8\u52a0\u7684DmDPoint\u5b9e\u4f8b\n :return: \u81ea\u8eab\u5b9e\u4f8b\uff08\u652f\u6301\u94fe\u5f0f\u8c03\u7528\uff09\n :raise TypeError: \u975eDmDPoint\u5b9e\u4f8b\u65f6\u629b\u51fa\n \"\"\"\n if not isinstance(other, DmDPoint):\n raise TypeError(f\"\u4ec5\u652f\u6301DmDPoint\u5b9e\u4f8b\u76f8\u52a0\u8d4b\u503c\uff0c\u5f53\u524d\u4e3a{type(other)}\")\n self._obj += other._obj\n return self\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.DmDPoint.__imul__","title":"<code>__imul__(scalar)</code>","text":"<p>\u5411\u91cf\u6807\u91cf\u4e58\u6cd5\u8d4b\u503c\uff08\u539f\u5730\u4fee\u6539\uff09 :param scalar: \u76f8\u4e58\u7684\u6807\u91cf\uff08int/float\uff09 :return: \u81ea\u8eab\u5b9e\u4f8b\uff08\u652f\u6301\u94fe\u5f0f\u8c03\u7528\uff09 :raise TypeError: \u975e\u6807\u91cf\u7c7b\u578b\u65f6\u629b\u51fa</p> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>def __imul__(self, scalar: (int, float)) -> \"DmDPoint\":\n \"\"\"\n \u5411\u91cf\u6807\u91cf\u4e58\u6cd5\u8d4b\u503c\uff08\u539f\u5730\u4fee\u6539\uff09\n :param scalar: \u76f8\u4e58\u7684\u6807\u91cf\uff08int/float\uff09\n :return: \u81ea\u8eab\u5b9e\u4f8b\uff08\u652f\u6301\u94fe\u5f0f\u8c03\u7528\uff09\n :raise TypeError: \u975e\u6807\u91cf\u7c7b\u578b\u65f6\u629b\u51fa\n \"\"\"\n if not isinstance(scalar, (int, float)):\n raise TypeError(f\"\u4ec5\u652f\u6301\u4e0e\u6807\u91cf(int/float)\u76f8\u4e58\u8d4b\u503c\uff0c\u5f53\u524d\u4e3a{type(scalar)}\")\n self._obj *= scalar\n return self\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.DmDPoint.__init__","title":"<code>__init__(x=0.0, y=0.0, z=0.0)</code>","text":"<p>\u6784\u9020\u51fd\u6570 :param x: \u5411\u91cfx\u5206\u91cf\uff0c\u9ed8\u8ba40.0 :param y: \u5411\u91cfy\u5206\u91cf\uff0c\u9ed8\u8ba40.0 :param z: \u5411\u91cfz\u5206\u91cf\uff0c\u9ed8\u8ba40.0</p> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>def __init__(self, x: float = 0.0, y: float = 0.0, z: float = 0.0):\n \"\"\"\n \u6784\u9020\u51fd\u6570\n :param x: \u5411\u91cfx\u5206\u91cf\uff0c\u9ed8\u8ba40.0\n :param y: \u5411\u91cfy\u5206\u91cf\uff0c\u9ed8\u8ba40.0\n :param z: \u5411\u91cfz\u5206\u91cf\uff0c\u9ed8\u8ba40.0\n \"\"\"\n self._obj = Dm.dmDPoint(x, y, z)\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.DmDPoint.__isub__","title":"<code>__isub__(other)</code>","text":"<p>\u5411\u91cf\u51cf\u6cd5\u8d4b\u503c\uff08\u539f\u5730\u4fee\u6539\uff09 :param other: \u5f85\u76f8\u51cf\u7684DmDPoint\u5b9e\u4f8b :return: \u81ea\u8eab\u5b9e\u4f8b\uff08\u652f\u6301\u94fe\u5f0f\u8c03\u7528\uff09 :raise TypeError: \u975eDmDPoint\u5b9e\u4f8b\u65f6\u629b\u51fa</p> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>def __isub__(self, other: \"DmDPoint\") -> \"DmDPoint\":\n \"\"\"\n \u5411\u91cf\u51cf\u6cd5\u8d4b\u503c\uff08\u539f\u5730\u4fee\u6539\uff09\n :param other: \u5f85\u76f8\u51cf\u7684DmDPoint\u5b9e\u4f8b\n :return: \u81ea\u8eab\u5b9e\u4f8b\uff08\u652f\u6301\u94fe\u5f0f\u8c03\u7528\uff09\n :raise TypeError: \u975eDmDPoint\u5b9e\u4f8b\u65f6\u629b\u51fa\n \"\"\"\n if not isinstance(other, DmDPoint):\n raise TypeError(f\"\u4ec5\u652f\u6301DmDPoint\u5b9e\u4f8b\u76f8\u51cf\u8d4b\u503c\uff0c\u5f53\u524d\u4e3a{type(other)}\")\n self._obj -= other._obj\n return self\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.DmDPoint.__itruediv__","title":"<code>__itruediv__(scalar)</code>","text":"<p>\u5411\u91cf\u6807\u91cf\u9664\u6cd5\u8d4b\u503c\uff08\u539f\u5730\u4fee\u6539\uff09 :param scalar: \u76f8\u9664\u7684\u6807\u91cf\uff08int/float\uff09 :return: \u81ea\u8eab\u5b9e\u4f8b\uff08\u652f\u6301\u94fe\u5f0f\u8c03\u7528\uff09 :raise TypeError: \u975e\u6807\u91cf\u7c7b\u578b\u65f6\u629b\u51fa :raise ZeroDivisionError: \u6807\u91cf\u4e3a0\u65f6\u629b\u51fa</p> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>def __itruediv__(self, scalar: (int, float)) -> \"DmDPoint\":\n \"\"\"\n \u5411\u91cf\u6807\u91cf\u9664\u6cd5\u8d4b\u503c\uff08\u539f\u5730\u4fee\u6539\uff09\n :param scalar: \u76f8\u9664\u7684\u6807\u91cf\uff08int/float\uff09\n :return: \u81ea\u8eab\u5b9e\u4f8b\uff08\u652f\u6301\u94fe\u5f0f\u8c03\u7528\uff09\n :raise TypeError: \u975e\u6807\u91cf\u7c7b\u578b\u65f6\u629b\u51fa\n :raise ZeroDivisionError: \u6807\u91cf\u4e3a0\u65f6\u629b\u51fa\n \"\"\"\n if not isinstance(scalar, (int, float)):\n raise TypeError(f\"\u4ec5\u652f\u6301\u4e0e\u6807\u91cf(int/float)\u76f8\u9664\u8d4b\u503c\uff0c\u5f53\u524d\u4e3a{type(scalar)}\")\n if scalar == 0:\n raise ZeroDivisionError(\"\u5411\u91cf\u6807\u91cf\u9664\u6cd5\u8d4b\u503c\uff0c\u6807\u91cf\u4e0d\u80fd\u4e3a0\")\n self._obj /= scalar\n return self\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.DmDPoint.__mul__","title":"<code>__mul__(scalar)</code>","text":"<p>\u5411\u91cf\u6807\u91cf\u4e58\u6cd5 :param scalar: \u76f8\u4e58\u7684\u6807\u91cf\uff08int/float\uff09 :return: \u76f8\u4e58\u540e\u7684\u65b0DmDPoint\u5b9e\u4f8b :raise TypeError: \u975e\u6807\u91cf\u7c7b\u578b\u65f6\u629b\u51fa</p> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>def __mul__(self, scalar: (int, float)) -> \"DmDPoint\":\n \"\"\"\n \u5411\u91cf\u6807\u91cf\u4e58\u6cd5\n :param scalar: \u76f8\u4e58\u7684\u6807\u91cf\uff08int/float\uff09\n :return: \u76f8\u4e58\u540e\u7684\u65b0DmDPoint\u5b9e\u4f8b\n :raise TypeError: \u975e\u6807\u91cf\u7c7b\u578b\u65f6\u629b\u51fa\n \"\"\"\n if not isinstance(scalar, (int, float)):\n raise TypeError(f\"\u4ec5\u652f\u6301\u4e0e\u6807\u91cf(int/float)\u76f8\u4e58\uff0c\u5f53\u524d\u4e3a{type(scalar)}\")\n res = DmDPoint()\n res._obj = self._obj * scalar\n return res\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.DmDPoint.__ne__","title":"<code>__ne__(other)</code>","text":"<p>\u4e0d\u7b49\u4e8e\u6bd4\u8f83\u8fd0\u7b97\u7b26 :param other: \u5f85\u6bd4\u8f83\u7684DmDPoint\u5b9e\u4f8b :return: \u4e0d\u76f8\u7b49\u8fd4\u56deTrue\uff0c\u5426\u5219\u8fd4\u56deFalse\uff1b\u975eDmDPoint\u5b9e\u4f8b\u76f4\u63a5\u8fd4\u56deTrue</p> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>def __ne__(self, other: \"DmDPoint\") -> bool:\n \"\"\"\n \u4e0d\u7b49\u4e8e\u6bd4\u8f83\u8fd0\u7b97\u7b26\n :param other: \u5f85\u6bd4\u8f83\u7684DmDPoint\u5b9e\u4f8b\n :return: \u4e0d\u76f8\u7b49\u8fd4\u56deTrue\uff0c\u5426\u5219\u8fd4\u56deFalse\uff1b\u975eDmDPoint\u5b9e\u4f8b\u76f4\u63a5\u8fd4\u56deTrue\n \"\"\"\n if not isinstance(other, DmDPoint):\n return True\n return self._obj != other._obj\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.DmDPoint.__neg__","title":"<code>__neg__()</code>","text":"<p>\u8d1f\u53f7\u8fd0\u7b97\u7b26\uff08\u53d6\u53cd\u5411\u91cf\uff09 :return: \u53d6\u53cd\u540e\u7684\u65b0DmDPoint\u5b9e\u4f8b</p> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>def __neg__(self) -> \"DmDPoint\":\n \"\"\"\n \u8d1f\u53f7\u8fd0\u7b97\u7b26\uff08\u53d6\u53cd\u5411\u91cf\uff09\n :return: \u53d6\u53cd\u540e\u7684\u65b0DmDPoint\u5b9e\u4f8b\n \"\"\"\n res = DmDPoint()\n res._obj = -self._obj\n return res\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.DmDPoint.__repr__","title":"<code>__repr__()</code>","text":"<p>\u5b57\u7b26\u4e32\u8868\u793a :return: \u5411\u91cf\u7684\u6807\u51c6\u5b57\u7b26\u4e32\u8868\u793a</p> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>def __repr__(self) -> str:\n \"\"\"\n \u5b57\u7b26\u4e32\u8868\u793a\n :return: \u5411\u91cf\u7684\u6807\u51c6\u5b57\u7b26\u4e32\u8868\u793a\n \"\"\"\n return self._obj.__repr__()\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.DmDPoint.__str__","title":"<code>__str__()</code>","text":"<p>\u6253\u5370\u5b57\u7b26\u4e32\uff0c\u4e0e__repr__\u4fdd\u6301\u4e00\u81f4\uff0c\u786e\u4fdd\u8f93\u51fa\u683c\u5f0f\u7edf\u4e00 :return: \u5411\u91cf\u7684\u6253\u5370\u5b57\u7b26\u4e32\u8868\u793a</p> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>def __str__(self) -> str:\n \"\"\"\n \u6253\u5370\u5b57\u7b26\u4e32\uff0c\u4e0e__repr__\u4fdd\u6301\u4e00\u81f4\uff0c\u786e\u4fdd\u8f93\u51fa\u683c\u5f0f\u7edf\u4e00\n :return: \u5411\u91cf\u7684\u6253\u5370\u5b57\u7b26\u4e32\u8868\u793a\n \"\"\"\n return self._obj.__repr__()\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.DmDPoint.__sub__","title":"<code>__sub__(other)</code>","text":"<p>\u5411\u91cf\u51cf\u6cd5 :param other: \u5f85\u76f8\u51cf\u7684DmDPoint\u5b9e\u4f8b :return: \u76f8\u51cf\u540e\u7684\u65b0DmDPoint\u5b9e\u4f8b :raise TypeError: \u975eDmDPoint\u5b9e\u4f8b\u65f6\u629b\u51fa</p> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>def __sub__(self, other: \"DmDPoint\") -> \"DmDPoint\":\n \"\"\"\n \u5411\u91cf\u51cf\u6cd5\n :param other: \u5f85\u76f8\u51cf\u7684DmDPoint\u5b9e\u4f8b\n :return: \u76f8\u51cf\u540e\u7684\u65b0DmDPoint\u5b9e\u4f8b\n :raise TypeError: \u975eDmDPoint\u5b9e\u4f8b\u65f6\u629b\u51fa\n \"\"\"\n if not isinstance(other, DmDPoint):\n raise TypeError(f\"\u4ec5\u652f\u6301DmDPoint\u5b9e\u4f8b\u76f8\u51cf\uff0c\u5f53\u524d\u4e3a{type(other)}\")\n res = DmDPoint()\n res._obj = self._obj - other._obj\n return res\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.DmDPoint.__truediv__","title":"<code>__truediv__(scalar)</code>","text":"<p>\u5411\u91cf\u6807\u91cf\u9664\u6cd5 :param scalar: \u76f8\u9664\u7684\u6807\u91cf\uff08int/float\uff09 :return: \u76f8\u9664\u540e\u7684\u65b0DmDPoint\u5b9e\u4f8b :raise TypeError: \u975e\u6807\u91cf\u7c7b\u578b\u65f6\u629b\u51fa :raise ZeroDivisionError: \u6807\u91cf\u4e3a0\u65f6\u629b\u51fa</p> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>def __truediv__(self, scalar: (int, float)) -> \"DmDPoint\":\n \"\"\"\n \u5411\u91cf\u6807\u91cf\u9664\u6cd5\n :param scalar: \u76f8\u9664\u7684\u6807\u91cf\uff08int/float\uff09\n :return: \u76f8\u9664\u540e\u7684\u65b0DmDPoint\u5b9e\u4f8b\n :raise TypeError: \u975e\u6807\u91cf\u7c7b\u578b\u65f6\u629b\u51fa\n :raise ZeroDivisionError: \u6807\u91cf\u4e3a0\u65f6\u629b\u51fa\n \"\"\"\n if not isinstance(scalar, (int, float)):\n raise TypeError(f\"\u4ec5\u652f\u6301\u4e0e\u6807\u91cf(int/float)\u76f8\u9664\uff0c\u5f53\u524d\u4e3a{type(scalar)}\")\n if scalar == 0:\n raise ZeroDivisionError(\"\u5411\u91cf\u6807\u91cf\u9664\u6cd5\uff0c\u6807\u91cf\u4e0d\u80fd\u4e3a0\")\n res = DmDPoint()\n res._obj = self._obj / scalar\n return res\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.DmDPoint.cross_product","title":"<code>cross_product(other)</code>","text":"<p>\u8ba1\u7b97\u4e24\u4e2a\u5411\u91cf\u7684\u53c9\u79ef\uff08\u5411\u91cf\u79ef\uff09 :param other: \u5f85\u8ba1\u7b97\u53c9\u79ef\u7684DmDPoint\u5b9e\u4f8b :return: \u53c9\u79ef\u7ed3\u679c\u7684\u65b0DmDPoint\u5b9e\u4f8b :raise TypeError: \u975eDmDPoint\u5b9e\u4f8b\u65f6\u629b\u51fa</p> <p>example:</p> <pre><code>pt1 = DmDPoint(1, 2, 3)\npt2 = DmDPoint(4, 5, 6)\ncross = pt1.cross_product(pt2)\nprint(cross)\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>def cross_product(self, other: \"DmDPoint\") -> \"DmDPoint\":\n \"\"\"\n \u8ba1\u7b97\u4e24\u4e2a\u5411\u91cf\u7684\u53c9\u79ef\uff08\u5411\u91cf\u79ef\uff09\n :param other: \u5f85\u8ba1\u7b97\u53c9\u79ef\u7684DmDPoint\u5b9e\u4f8b\n :return: \u53c9\u79ef\u7ed3\u679c\u7684\u65b0DmDPoint\u5b9e\u4f8b\n :raise TypeError: \u975eDmDPoint\u5b9e\u4f8b\u65f6\u629b\u51fa\n\n example:\n ```python\n pt1 = DmDPoint(1, 2, 3)\n pt2 = DmDPoint(4, 5, 6)\n cross = pt1.cross_product(pt2)\n print(cross)\n ```\n \"\"\"\n if not isinstance(other, DmDPoint):\n raise TypeError(f\"\u4ec5\u652f\u6301\u4e0eDmDPoint\u5b9e\u4f8b\u8ba1\u7b97\u53c9\u79ef\uff0c\u5f53\u524d\u4e3a{type(other)}\")\n res = DmDPoint()\n res._obj = self._obj.CrossProduct(other._obj)\n return res\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.DmDPoint.dot_product","title":"<code>dot_product(other)</code>","text":"<p>\u8ba1\u7b97\u4e24\u4e2a\u5411\u91cf\u7684\u70b9\u79ef\uff08\u6570\u91cf\u79ef\uff09 :param other: \u5f85\u8ba1\u7b97\u70b9\u79ef\u7684DmDPoint\u5b9e\u4f8b :return: \u70b9\u79ef\u7ed3\u679c\uff08float\uff09 :raise TypeError: \u975eDmDPoint\u5b9e\u4f8b\u65f6\u629b\u51fa</p> <p>example:</p> <pre><code>pt1 = DmDPoint(1, 2, 3)\npt2 = DmDPoint(4, 5, 6)\ndot = pt1.dot_product(pt2)\nprint(dot)\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>def dot_product(self, other: \"DmDPoint\") -> float:\n \"\"\"\n \u8ba1\u7b97\u4e24\u4e2a\u5411\u91cf\u7684\u70b9\u79ef\uff08\u6570\u91cf\u79ef\uff09\n :param other: \u5f85\u8ba1\u7b97\u70b9\u79ef\u7684DmDPoint\u5b9e\u4f8b\n :return: \u70b9\u79ef\u7ed3\u679c\uff08float\uff09\n :raise TypeError: \u975eDmDPoint\u5b9e\u4f8b\u65f6\u629b\u51fa\n\n example:\n ```python\n pt1 = DmDPoint(1, 2, 3)\n pt2 = DmDPoint(4, 5, 6)\n dot = pt1.dot_product(pt2)\n print(dot)\n ```\n \"\"\"\n if not isinstance(other, DmDPoint):\n raise TypeError(f\"\u4ec5\u652f\u6301\u4e0eDmDPoint\u5b9e\u4f8b\u8ba1\u7b97\u70b9\u79ef\uff0c\u5f53\u524d\u4e3a{type(other)}\")\n return self._obj.DotProduct(other._obj)\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.DmDPoint.is_zero_length","title":"<code>is_zero_length(tol=1e-10)</code>","text":"<p>\u5224\u65ad\u662f\u5426\u4e3a\u96f6\u5411\u91cf\uff08\u8003\u8651\u6d6e\u70b9\u7cbe\u5ea6\u8bef\u5dee\uff09 :param tol: \u6d6e\u70b9\u5bb9\u5dee\u9608\u503c\uff0c\u9ed8\u8ba41e-10\uff08\u503c\u8d8a\u5c0f\u7cbe\u5ea6\u8981\u6c42\u8d8a\u9ad8\uff09 :return: \u5411\u91cf\u957f\u5ea6\u63a5\u8fd10\u8fd4\u56deTrue\uff0c\u5426\u5219\u8fd4\u56deFalse</p> <p>example:</p> <pre><code>pt = DmDPoint(0, 0, 0)\nprint(pt.is_zero_length())\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>def is_zero_length(self, tol: float = 1e-10) -> bool:\n \"\"\"\n \u5224\u65ad\u662f\u5426\u4e3a\u96f6\u5411\u91cf\uff08\u8003\u8651\u6d6e\u70b9\u7cbe\u5ea6\u8bef\u5dee\uff09\n :param tol: \u6d6e\u70b9\u5bb9\u5dee\u9608\u503c\uff0c\u9ed8\u8ba41e-10\uff08\u503c\u8d8a\u5c0f\u7cbe\u5ea6\u8981\u6c42\u8d8a\u9ad8\uff09\n :return: \u5411\u91cf\u957f\u5ea6\u63a5\u8fd10\u8fd4\u56deTrue\uff0c\u5426\u5219\u8fd4\u56deFalse\n\n example:\n ```python\n pt = DmDPoint(0, 0, 0)\n print(pt.is_zero_length())\n ```\n \"\"\"\n return self._obj.IsZeroLength(tol)\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.DmDPoint.norm","title":"<code>norm()</code>","text":"<p>\u8ba1\u7b97\u5411\u91cf\u7684\u6a21\u957f\uff08\u957f\u5ea6\uff09 :return: \u5411\u91cf\u6a21\u957f\u7ed3\u679c\uff08float\uff09</p> <p>example:</p> <pre><code>pt = DmDPoint(3, 4, 0)\nprint(pt.norm())\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>def norm(self) -> float:\n \"\"\"\n \u8ba1\u7b97\u5411\u91cf\u7684\u6a21\u957f\uff08\u957f\u5ea6\uff09\n :return: \u5411\u91cf\u6a21\u957f\u7ed3\u679c\uff08float\uff09\n\n example:\n ```python\n pt = DmDPoint(3, 4, 0)\n print(pt.norm())\n ```\n \"\"\"\n return self._obj.Norm()\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.DmDPoint.normalize","title":"<code>normalize()</code>","text":"<p>\u5411\u91cf\u5f52\u4e00\u5316\uff08\u539f\u5730\u4fee\u6539\uff0c\u8f6c\u4e3a\u5355\u4f4d\u5411\u91cf\uff09 :return: \u81ea\u8eab\u5b9e\u4f8b</p> <p>example:</p> <pre><code>pt = DmDPoint(3, 4, 0)\npt.normalize()\nprint(pt)\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>def normalize(self) -> \"DmDPoint\":\n \"\"\"\n \u5411\u91cf\u5f52\u4e00\u5316\uff08\u539f\u5730\u4fee\u6539\uff0c\u8f6c\u4e3a\u5355\u4f4d\u5411\u91cf\uff09\n :return: \u81ea\u8eab\u5b9e\u4f8b\n\n example:\n ```python\n pt = DmDPoint(3, 4, 0)\n pt.normalize()\n print(pt)\n ```\n \"\"\"\n self._obj.Normalize()\n return self\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.DmDPoint.set","title":"<code>set(x, y, z)</code>","text":"<p>\u4e00\u6b21\u6027\u8bbe\u7f6e\u5411\u91cfx/y/z\u5206\u91cf\uff08\u539f\u5730\u4fee\u6539\uff09 :param x: \u65b0\u7684x\u5206\u91cf\u503c\uff08float\uff09 :param y: \u65b0\u7684y\u5206\u91cf\u503c\uff08float\uff09 :param z: \u65b0\u7684z\u5206\u91cf\u503c\uff08float\uff09 :return: \u81ea\u8eab\u5b9e\u4f8b\uff08\u652f\u6301\u94fe\u5f0f\u8c03\u7528\uff09</p> <p>example:</p> <pre><code>pt = DmDPoint()\npt.set(1, 2, 3)\nprint(pt) # \u8f93\u51fa: (1.0, 2.0, 3.0)\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>def set(self, x: float, y: float, z: float) -> \"DmDPoint\":\n \"\"\"\n \u4e00\u6b21\u6027\u8bbe\u7f6e\u5411\u91cfx/y/z\u5206\u91cf\uff08\u539f\u5730\u4fee\u6539\uff09\n :param x: \u65b0\u7684x\u5206\u91cf\u503c\uff08float\uff09\n :param y: \u65b0\u7684y\u5206\u91cf\u503c\uff08float\uff09\n :param z: \u65b0\u7684z\u5206\u91cf\u503c\uff08float\uff09\n :return: \u81ea\u8eab\u5b9e\u4f8b\uff08\u652f\u6301\u94fe\u5f0f\u8c03\u7528\uff09\n\n example:\n ```python\n pt = DmDPoint()\n pt.set(1, 2, 3)\n print(pt) # \u8f93\u51fa: (1.0, 2.0, 3.0)\n ```\n \"\"\"\n self._obj.Set(float(x), float(y), float(z))\n return self\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.DmDbPoint","title":"<code>DmDbPoint</code>","text":"<p>\u70b9\u5b9e\u4f53</p> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>class DmDbPoint:\n \"\"\"\u70b9\u5b9e\u4f53\"\"\"\n def __init__(self):\n \"\"\"\u6784\u9020\u51fd\u6570\uff0c\u521d\u59cb\u5316\u6570\u636e\u5e93\u70b9\u5bf9\u8c61\"\"\"\n self._obj = Dm.dmDbPoint()\n\n def get_graph_data(self) -> DmDPoint:\n \"\"\"\n \u83b7\u53d6\u8be5\u70b9\u7684\u56fe\u5f62\u6570\u636e\uff08\u5750\u6807\u4fe1\u606f\uff09\n :return: \u70b9\u7684\u5750\u6807\uff08DmDPoint\u5b9e\u4f8b\uff09\n\n example:\n ```python\n if entity.get_type() == ETT_POINT:\n graph_data = entity.get_graph_data()\n print(graph_data)\n ```\n \"\"\"\n cpp_result = self._obj.GetGraphData()\n return DmDPoint._from_obj(cpp_result)\n\n @classmethod\n def _from_obj(cls, obj):\n \"\"\"\n :param obj: \u539f\u751fdmDbPoint\u5bf9\u8c61\n :return: DmDbPoint\u5b9e\u4f8b\n \"\"\"\n instance = cls.__new__(cls)\n instance._obj = obj\n return instance\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.DmDbPoint.__init__","title":"<code>__init__()</code>","text":"<p>\u6784\u9020\u51fd\u6570\uff0c\u521d\u59cb\u5316\u6570\u636e\u5e93\u70b9\u5bf9\u8c61</p> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>def __init__(self):\n \"\"\"\u6784\u9020\u51fd\u6570\uff0c\u521d\u59cb\u5316\u6570\u636e\u5e93\u70b9\u5bf9\u8c61\"\"\"\n self._obj = Dm.dmDbPoint()\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.DmDbPoint.get_graph_data","title":"<code>get_graph_data()</code>","text":"<p>\u83b7\u53d6\u8be5\u70b9\u7684\u56fe\u5f62\u6570\u636e\uff08\u5750\u6807\u4fe1\u606f\uff09 :return: \u70b9\u7684\u5750\u6807\uff08DmDPoint\u5b9e\u4f8b\uff09</p> <p>example:</p> <pre><code>if entity.get_type() == ETT_POINT:\n graph_data = entity.get_graph_data()\n print(graph_data)\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>def get_graph_data(self) -> DmDPoint:\n \"\"\"\n \u83b7\u53d6\u8be5\u70b9\u7684\u56fe\u5f62\u6570\u636e\uff08\u5750\u6807\u4fe1\u606f\uff09\n :return: \u70b9\u7684\u5750\u6807\uff08DmDPoint\u5b9e\u4f8b\uff09\n\n example:\n ```python\n if entity.get_type() == ETT_POINT:\n graph_data = entity.get_graph_data()\n print(graph_data)\n ```\n \"\"\"\n cpp_result = self._obj.GetGraphData()\n return DmDPoint._from_obj(cpp_result)\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.DmPoints","title":"<code>DmPoints</code>","text":"<p>\u70b9\u96c6\u7c7b</p> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>class DmPoints:\n \"\"\"\u70b9\u96c6\u7c7b\"\"\"\n\n def __init__(self):\n \"\"\"\n \u6784\u9020\u51fd\u6570\uff1a\u521d\u59cb\u5316\u70b9\u96c6\u5408\u5bf9\u8c61\n :return: None\n \"\"\"\n self._obj = Dm.dmPoints()\n\n def insert_point(self, point: DmDPoint, point_id: int) -> None:\n \"\"\"\n \u63d2\u5165\u4e00\u4e2a\u70b9\u5e76\u6307\u5b9aID,ID\u4e0d\u8fde\u7eed\u5219\u4f1a\u5728\u4e2d\u95f4\u63d2\u5165[0,0,0]\n :param point: \u5f85\u63d2\u5165\u7684\u70b9\uff08DmDPoint\u5b9e\u4f8b\uff09\n :param point_id: \u70b9\u7684\u552f\u4e00ID\uff08\u6574\u6570\uff09\n\n example:\n ```python\n points = DmPoints()\n points.insert_point(DmDPoint(1, 2, 3), 0)\n ```\n \"\"\"\n self._obj.InsertPoint(point._obj, point_id)\n\n def insert_next_point(self, point: DmDPoint) -> int:\n \"\"\"\n \u63d2\u5165\u4e0b\u4e00\u4e2a\u70b9\uff0c\u81ea\u52a8\u5206\u914dID\n :param point: \u5f85\u63d2\u5165\u7684\u70b9\uff08DmDPoint\u5b9e\u4f8b\uff09\n :return: \u81ea\u52a8\u5206\u914d\u7684\u70b9\u7d22\u5f15\uff08\u6574\u6570\uff09\n\n example:\n ```python\n points = DmPoints()\n point_id = points.insert_next_point(DmDPoint(1, 2, 3))\n ```\n \"\"\"\n return self._obj.InsertNextPoint(point._obj)\n\n def get_point_data_list(self) -> list[DmDPoint]:\n \"\"\"\n \u83b7\u53d6\u6240\u6709\u70b9\u7684\u5750\u6807\u6570\u636e\n :return: \u70b9\u5217\u8868\uff0c\u6bcf\u4e2a\u5143\u7d20\u4e3aDmDPoint\u5b9e\u4f8b\n\n example:\n ```python\n points = DmPoints()\n points.insert_point(DmDPoint(1, 2, 3), 0)\n points.insert_point(DmDPoint(4, 5, 6), 1)\n point_list = points.get_point_data_list()\n for point in point_list:\n print(point)\n ```\n \"\"\"\n cpp_list = self._obj.GetPointData()\n return [DmDPoint._from_obj(item) for item in cpp_list]\n\n def __repr__(self) -> str:\n \"\"\"\n \u5b57\u7b26\u4e32\u8868\u793a\uff08\u76f4\u63a5\u8c03\u7528\u6e90\u7aef\u5b9e\u73b0\uff0c\u5305\u542b\u70b9\u6570\u91cf\u548c\u5750\u6807\uff09\n :return: \u70b9\u96c6\u5408\u7684\u6807\u51c6\u5b57\u7b26\u4e32\u8868\u793a\n \"\"\"\n return self._obj.__repr__()\n\n @classmethod\n def _from_obj(cls, obj):\n \"\"\"\n :param obj: \u539f\u751fdmPoints\u5bf9\u8c61\n :return: DmPoints\u5b9e\u4f8b\n \"\"\"\n instance = cls.__new__(cls)\n instance._obj = obj\n return instance\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.DmPoints.__init__","title":"<code>__init__()</code>","text":"<p>\u6784\u9020\u51fd\u6570\uff1a\u521d\u59cb\u5316\u70b9\u96c6\u5408\u5bf9\u8c61 :return: None</p> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>def __init__(self):\n \"\"\"\n \u6784\u9020\u51fd\u6570\uff1a\u521d\u59cb\u5316\u70b9\u96c6\u5408\u5bf9\u8c61\n :return: None\n \"\"\"\n self._obj = Dm.dmPoints()\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.DmPoints.__repr__","title":"<code>__repr__()</code>","text":"<p>\u5b57\u7b26\u4e32\u8868\u793a\uff08\u76f4\u63a5\u8c03\u7528\u6e90\u7aef\u5b9e\u73b0\uff0c\u5305\u542b\u70b9\u6570\u91cf\u548c\u5750\u6807\uff09 :return: \u70b9\u96c6\u5408\u7684\u6807\u51c6\u5b57\u7b26\u4e32\u8868\u793a</p> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>def __repr__(self) -> str:\n \"\"\"\n \u5b57\u7b26\u4e32\u8868\u793a\uff08\u76f4\u63a5\u8c03\u7528\u6e90\u7aef\u5b9e\u73b0\uff0c\u5305\u542b\u70b9\u6570\u91cf\u548c\u5750\u6807\uff09\n :return: \u70b9\u96c6\u5408\u7684\u6807\u51c6\u5b57\u7b26\u4e32\u8868\u793a\n \"\"\"\n return self._obj.__repr__()\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.DmPoints.get_point_data_list","title":"<code>get_point_data_list()</code>","text":"<p>\u83b7\u53d6\u6240\u6709\u70b9\u7684\u5750\u6807\u6570\u636e :return: \u70b9\u5217\u8868\uff0c\u6bcf\u4e2a\u5143\u7d20\u4e3aDmDPoint\u5b9e\u4f8b</p> <p>example:</p> <pre><code>points = DmPoints()\npoints.insert_point(DmDPoint(1, 2, 3), 0)\npoints.insert_point(DmDPoint(4, 5, 6), 1)\npoint_list = points.get_point_data_list()\nfor point in point_list:\n print(point)\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>def get_point_data_list(self) -> list[DmDPoint]:\n \"\"\"\n \u83b7\u53d6\u6240\u6709\u70b9\u7684\u5750\u6807\u6570\u636e\n :return: \u70b9\u5217\u8868\uff0c\u6bcf\u4e2a\u5143\u7d20\u4e3aDmDPoint\u5b9e\u4f8b\n\n example:\n ```python\n points = DmPoints()\n points.insert_point(DmDPoint(1, 2, 3), 0)\n points.insert_point(DmDPoint(4, 5, 6), 1)\n point_list = points.get_point_data_list()\n for point in point_list:\n print(point)\n ```\n \"\"\"\n cpp_list = self._obj.GetPointData()\n return [DmDPoint._from_obj(item) for item in cpp_list]\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.DmPoints.insert_next_point","title":"<code>insert_next_point(point)</code>","text":"<p>\u63d2\u5165\u4e0b\u4e00\u4e2a\u70b9\uff0c\u81ea\u52a8\u5206\u914dID :param point: \u5f85\u63d2\u5165\u7684\u70b9\uff08DmDPoint\u5b9e\u4f8b\uff09 :return: \u81ea\u52a8\u5206\u914d\u7684\u70b9\u7d22\u5f15\uff08\u6574\u6570\uff09</p> <p>example:</p> <pre><code>points = DmPoints()\npoint_id = points.insert_next_point(DmDPoint(1, 2, 3))\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>def insert_next_point(self, point: DmDPoint) -> int:\n \"\"\"\n \u63d2\u5165\u4e0b\u4e00\u4e2a\u70b9\uff0c\u81ea\u52a8\u5206\u914dID\n :param point: \u5f85\u63d2\u5165\u7684\u70b9\uff08DmDPoint\u5b9e\u4f8b\uff09\n :return: \u81ea\u52a8\u5206\u914d\u7684\u70b9\u7d22\u5f15\uff08\u6574\u6570\uff09\n\n example:\n ```python\n points = DmPoints()\n point_id = points.insert_next_point(DmDPoint(1, 2, 3))\n ```\n \"\"\"\n return self._obj.InsertNextPoint(point._obj)\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.DmPoints.insert_point","title":"<code>insert_point(point, point_id)</code>","text":"<p>\u63d2\u5165\u4e00\u4e2a\u70b9\u5e76\u6307\u5b9aID,ID\u4e0d\u8fde\u7eed\u5219\u4f1a\u5728\u4e2d\u95f4\u63d2\u5165[0,0,0] :param point: \u5f85\u63d2\u5165\u7684\u70b9\uff08DmDPoint\u5b9e\u4f8b\uff09 :param point_id: \u70b9\u7684\u552f\u4e00ID\uff08\u6574\u6570\uff09</p> <p>example:</p> <pre><code>points = DmPoints()\npoints.insert_point(DmDPoint(1, 2, 3), 0)\n</code></pre> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>def insert_point(self, point: DmDPoint, point_id: int) -> None:\n \"\"\"\n \u63d2\u5165\u4e00\u4e2a\u70b9\u5e76\u6307\u5b9aID,ID\u4e0d\u8fde\u7eed\u5219\u4f1a\u5728\u4e2d\u95f4\u63d2\u5165[0,0,0]\n :param point: \u5f85\u63d2\u5165\u7684\u70b9\uff08DmDPoint\u5b9e\u4f8b\uff09\n :param point_id: \u70b9\u7684\u552f\u4e00ID\uff08\u6574\u6570\uff09\n\n example:\n ```python\n points = DmPoints()\n points.insert_point(DmDPoint(1, 2, 3), 0)\n ```\n \"\"\"\n self._obj.InsertPoint(point._obj, point_id)\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.Point","title":"<code>Point</code>","text":"<p>\u4e8c\u6b21\u5c01\u88c5Point\u7c7b</p> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>class Point:\n \"\"\"\u4e8c\u6b21\u5c01\u88c5Point\u7c7b\"\"\"\n def __init__(self, a: int = 0):\n \"\"\"\n \u6784\u9020\u51fd\u6570\n :param a: \u521d\u59cb\u5316x\u5206\u91cf\u7684\u503c\uff0c\u9ed8\u8ba40\n \"\"\"\n self._obj = Dm.Point(a)\n\n # ---------------------- \u6838\u5fc3\u65b9\u6cd5\u5c01\u88c5 ----------------------\n def get(self) -> int:\n \"\"\"\n \u83b7\u53d6x\u5206\u91cf\u7684\u503c\n :return: x\u5206\u91cf\u7684\u6574\u6570\u503c\n \"\"\"\n return self._obj.get()\n\n def set(self, a: int) -> None:\n \"\"\"\n \u8bbe\u7f6ex\u5206\u91cf\u7684\u503c\n :param a: \u65b0\u7684x\u5206\u91cf\u6574\u6570\u503c\n \"\"\"\n self._obj.set(a)\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.Point.__init__","title":"<code>__init__(a=0)</code>","text":"<p>\u6784\u9020\u51fd\u6570 :param a: \u521d\u59cb\u5316x\u5206\u91cf\u7684\u503c\uff0c\u9ed8\u8ba40</p> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>def __init__(self, a: int = 0):\n \"\"\"\n \u6784\u9020\u51fd\u6570\n :param a: \u521d\u59cb\u5316x\u5206\u91cf\u7684\u503c\uff0c\u9ed8\u8ba40\n \"\"\"\n self._obj = Dm.Point(a)\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.Point.get","title":"<code>get()</code>","text":"<p>\u83b7\u53d6x\u5206\u91cf\u7684\u503c :return: x\u5206\u91cf\u7684\u6574\u6570\u503c</p> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>def get(self) -> int:\n \"\"\"\n \u83b7\u53d6x\u5206\u91cf\u7684\u503c\n :return: x\u5206\u91cf\u7684\u6574\u6570\u503c\n \"\"\"\n return self._obj.get()\n</code></pre>"},{"location":"reference/lib/types/point.html#dimine_python_sdk.lib.types.point.Point.set","title":"<code>set(a)</code>","text":"<p>\u8bbe\u7f6ex\u5206\u91cf\u7684\u503c :param a: \u65b0\u7684x\u5206\u91cf\u6574\u6570\u503c</p> Source code in <code>dimine_python_sdk\\lib\\types\\point.py</code> <pre><code>def set(self, a: int) -> None:\n \"\"\"\n \u8bbe\u7f6ex\u5206\u91cf\u7684\u503c\n :param a: \u65b0\u7684x\u5206\u91cf\u6574\u6570\u503c\n \"\"\"\n self._obj.set(a)\n</code></pre>"},{"location":"reference/models/conn.html","title":"conn","text":""},{"location":"reference/models/errors.html","title":"errors","text":""},{"location":"reference/models/errors.html#dimine_python_sdk.models.errors.ResponseError","title":"<code>ResponseError</code>","text":"<p> Bases: <code>Exception</code></p> <p>Exception raised when an HTTP response is malformed.</p> Source code in <code>dimine_python_sdk\\models\\errors.py</code> <pre><code>class ResponseError(Exception):\n \"\"\"Exception raised when an HTTP response is malformed.\"\"\"\n pass\n</code></pre>"},{"location":"reference/models/types.html","title":"types","text":""},{"location":"reference/models/types.html#dimine_python_sdk.models.types.BaseGeometry","title":"<code>BaseGeometry</code>","text":"<p> Bases: <code>BaseType</code></p> <p>\u57fa\u7840\u51e0\u4f55\u7c7b</p> Source code in <code>dimine_python_sdk\\models\\types.py</code> <pre><code>class BaseGeometry(BaseType):\n \"\"\"\u57fa\u7840\u51e0\u4f55\u7c7b\"\"\"\n model_config = {\"arbitrary_types_allowed\": True}\n id: Optional[str] = Field(default=None, description=\"\u5bf9\u8c61id\")\n file: Optional[str] = Field(default=None, description=\"\u6240\u5c5e\u6587\u4ef6id\")\n layer: Optional[str] = Field(default=None, description=\"\u6240\u5728\u56fe\u5c42id\")\n feature: Optional[str] = Field(default=None, description=\"\u6240\u5c5e\u8981\u7d20\u540d\")\n color: List[int] = Field(default=[0,0,0], description=\"\u989c\u8272\")\n properties: List[PropertyValue] = Field(default_factory=list, description=\"\u70b9\u5c5e\u6027\")\n</code></pre>"},{"location":"reference/models/types.html#dimine_python_sdk.models.types.BaseType","title":"<code>BaseType</code>","text":"<p> Bases: <code>BaseModel</code></p> <p>\u57fa\u7840\u7c7b\u578b</p> Source code in <code>dimine_python_sdk\\models\\types.py</code> <pre><code>class BaseType(BaseModel):\n \"\"\"\u57fa\u7840\u7c7b\u578b\"\"\"\n related: Optional[bool] = Field(default=False, description=\"\u8868\u793a\u6b64python\u7aef\u7684\u5bf9\u8c61\u662f\u5426\u5173\u8054\u5230\u6570\u91c7\u7aef\u5bf9\u8c61\uff0c\u5373\u4fee\u6539\u6570\u503c\u540e\uff0c\u4f1a\u81ea\u52a8\u540c\u6b65\u5230\u6570\u91c7\u7aef\u5bf9\u8c61\u4e2d\")\n</code></pre>"},{"location":"reference/models/types.html#dimine_python_sdk.models.types.FeatureInfo","title":"<code>FeatureInfo</code>","text":"<p> Bases: <code>BaseType</code></p> <p>\u8981\u7d20\u5b9a\u4e49\uff0c\u4e5f\u662f\u4e00\u7ec4\u5c5e\u6027\u7684\u5b9a\u4e49\uff0c\u6bd4\u5982\uff1a\u5df7\u9053\u8981\u7d20\uff0c\u5305\u542b\u5c5e\u6027\u5982\u540d\u79f0\u3001\u957f\u5ea6\u3001\u5bbd\u5ea6\u3001\u9ad8\u5ea6\u7b49</p> Source code in <code>dimine_python_sdk\\models\\types.py</code> <pre><code>class FeatureInfo(BaseType):\n \"\"\"\u8981\u7d20\u5b9a\u4e49\uff0c\u4e5f\u662f\u4e00\u7ec4\u5c5e\u6027\u7684\u5b9a\u4e49\uff0c\u6bd4\u5982\uff1a\u5df7\u9053\u8981\u7d20\uff0c\u5305\u542b\u5c5e\u6027\u5982\u540d\u79f0\u3001\u957f\u5ea6\u3001\u5bbd\u5ea6\u3001\u9ad8\u5ea6\u7b49\"\"\"\n name: str = Field(description=\"\u8981\u7d20\u540d\u79f0\", validation_alias=\"feature_name\")\n properties: List[PropertyInfo] = Field(default_factory=list, description=\"\u8981\u7d20\u5c5e\u6027\", validation_alias=\"feature_define\")\n</code></pre>"},{"location":"reference/models/types.html#dimine_python_sdk.models.types.FileInfo","title":"<code>FileInfo</code>","text":"<p> Bases: <code>BaseType</code></p> <p>\u6570\u91c7\u6587\u4ef6\u4fe1\u606f</p> Source code in <code>dimine_python_sdk\\models\\types.py</code> <pre><code>class FileInfo(BaseType):\n \"\"\"\u6570\u91c7\u6587\u4ef6\u4fe1\u606f\"\"\"\n id: str = Field(description=\"\u6587\u4ef6id\")\n name: str = Field(description=\"\u6587\u4ef6\u540d\")\n\n\n async def close(self):\n \"\"\"\u5173\u95ed\u6587\u4ef6\"\"\"\n from dimine_python_sdk.conn import open_client\n with open_client() as conn:\n await conn.close_file(file_id=self.id)\n</code></pre>"},{"location":"reference/models/types.html#dimine_python_sdk.models.types.FileInfo.close","title":"<code>close()</code> <code>async</code>","text":"<p>\u5173\u95ed\u6587\u4ef6</p> Source code in <code>dimine_python_sdk\\models\\types.py</code> <pre><code>async def close(self):\n \"\"\"\u5173\u95ed\u6587\u4ef6\"\"\"\n from dimine_python_sdk.conn import open_client\n with open_client() as conn:\n await conn.close_file(file_id=self.id)\n</code></pre>"},{"location":"reference/models/types.html#dimine_python_sdk.models.types.LayerInfo","title":"<code>LayerInfo</code>","text":"<p> Bases: <code>BaseType</code></p> <p>\u56fe\u5c42\u4fe1\u606f</p> Source code in <code>dimine_python_sdk\\models\\types.py</code> <pre><code>class LayerInfo(BaseType):\n \"\"\"\u56fe\u5c42\u4fe1\u606f\"\"\"\n id: str = Field(description=\"\u56fe\u5c42id\")\n name: str = Field(description=\"\u56fe\u5c42\u540d\u79f0\")\n</code></pre>"},{"location":"reference/models/types.html#dimine_python_sdk.models.types.Line","title":"<code>Line</code>","text":"<p> Bases: <code>BaseGeometry</code></p> <p>\u7ebf\uff1a\u8868\u793a\u4e00\u6761\u76f4\u7ebf\u6216\u8005\u591a\u6bb5\u7ebf</p> Source code in <code>dimine_python_sdk\\models\\types.py</code> <pre><code>class Line(BaseGeometry):\n \"\"\"\u7ebf\uff1a\u8868\u793a\u4e00\u6761\u76f4\u7ebf\u6216\u8005\u591a\u6bb5\u7ebf\"\"\"\n type: Optional[Literal[\"line\"]] = Field(default=\"line\", description=\"\u7ebf\u7c7b\u578b\")\n geometry: np.ndarray = Field(default=np.array([]), description=\"\u7ebf\u5750\u6807, shape=(N,3)\")\n\n\n @field_validator(\"geometry\", mode=\"before\")\n @classmethod\n def validate_geometry(cls, v):\n if isinstance(v, list): \n return np.array(v).astype(np.float32)\n return v\n</code></pre>"},{"location":"reference/models/types.html#dimine_python_sdk.models.types.Point","title":"<code>Point</code>","text":"<p> Bases: <code>BaseGeometry</code></p> <p>\u70b9</p> Source code in <code>dimine_python_sdk\\models\\types.py</code> <pre><code>class Point(BaseGeometry):\n \"\"\"\u70b9\"\"\"\n type: Optional[Literal[\"point\"]] = Field(default=\"point\", description=\"\u70b9\u7c7b\u578b\")\n geometry: np.ndarray = Field(default=np.array([]), description=\"\u70b9\u5750\u6807, shape=(3,)\")\n\n\n @field_validator(\"geometry\", mode=\"before\")\n @classmethod\n def validate_geometry(cls, v):\n if isinstance(v, list): \n return np.array(v).astype(np.float32)\n return v\n\n\n def to_dmdpoint(self) -> DmDPoint:\n if self.geometry.shape != (3,): \n raise ValueError(\"geometry shape must be (3,)\")\n return DmDPoint(x=self.geometry[0], y=self.geometry[1], z=self.geometry[2])\n</code></pre>"},{"location":"reference/models/types.html#dimine_python_sdk.models.types.PropertyInfo","title":"<code>PropertyInfo</code>","text":"<p> Bases: <code>BaseType</code></p> <p>\u5c5e\u6027\u5b9a\u4e49\u4fe1\u606f\uff1a\u5355\u4e2a\u5c5e\u6027\u7684\u5b9a\u4e49\uff0c\u6bd4\u5982\uff1a\u5c5e\u6027\u540d\u79f0\u3001\u6570\u636e\u7c7b\u578b</p> Source code in <code>dimine_python_sdk\\models\\types.py</code> <pre><code>class PropertyInfo(BaseType):\n \"\"\"\u5c5e\u6027\u5b9a\u4e49\u4fe1\u606f\uff1a\u5355\u4e2a\u5c5e\u6027\u7684\u5b9a\u4e49\uff0c\u6bd4\u5982\uff1a\u5c5e\u6027\u540d\u79f0\u3001\u6570\u636e\u7c7b\u578b\"\"\"\n name: str = Field(description=\"\u5c5e\u6027\u540d\u79f0\")\n type: Literal[\"long\",\"string\",\"int\", \"short\"] = Field(description=\"\u6570\u636e\u7c7b\u578b\")\n</code></pre>"},{"location":"reference/models/types.html#dimine_python_sdk.models.types.PropertyValue","title":"<code>PropertyValue</code>","text":"<p> Bases: <code>PropertyInfo</code></p> <p>\u5c5e\u6027\u503c\u4fe1\u606f</p> Source code in <code>dimine_python_sdk\\models\\types.py</code> <pre><code>class PropertyValue(PropertyInfo):\n \"\"\"\u5c5e\u6027\u503c\u4fe1\u606f\"\"\"\n value: str|int|float|None = Field(default=None, description=\"\u5c5e\u6027\u503c\")\n\n def to_dict(self):\n return {\n \"name\": self.name,\n \"value\": self.value\n }\n</code></pre>"},{"location":"reference/models/types.html#dimine_python_sdk.models.types.Shell","title":"<code>Shell</code>","text":"<p> Bases: <code>BaseGeometry</code></p> <p>\u5b9e\u4f53</p> Source code in <code>dimine_python_sdk\\models\\types.py</code> <pre><code>class Shell(BaseGeometry):\n \"\"\"\u5b9e\u4f53\"\"\"\n type: Optional[Literal[\"shell\"]] = Field(default=\"shell\", description=\"\u4f53\u7c7b\u578b\")\n geometry: TINGeometry = Field(default=None, description=\"\u4e09\u89d2\u7f51\u6a21\u578b\u5bf9\u8c61\uff08TIN\uff09\")\n</code></pre>"},{"location":"reference/models/types.html#dimine_python_sdk.models.types.TINGeometry","title":"<code>TINGeometry</code>","text":"<p> Bases: <code>BaseType</code></p> <p>\u4e09\u89d2\u7f51\u6a21\u578b\u5b9a\u4e49\uff0c</p> Source code in <code>dimine_python_sdk\\models\\types.py</code> <pre><code>class TINGeometry(BaseType):\n \"\"\"\u4e09\u89d2\u7f51\u6a21\u578b\u5b9a\u4e49\uff0c\"\"\"\n model_config = {\"arbitrary_types_allowed\": True}\n faces: np.ndarray = Field(default=np.array([]), description=\"\u4e09\u89d2\u9762\u7247\uff1a\u6bcf\u884c\u662f\u4e09\u4e2a\u9876\u70b9\u7684\u7d22\u5f15\uff0c\u4e09\u4e2a\u9876\u70b9\u8fde\u63a5\u8d77\u6765\u5f62\u6210\u4e00\u4e2a\u4e09\u89d2\u9762\u3002shape=(N,3)\")\n points: np.ndarray = Field(default=np.array([]), description=\"\u6240\u6709\u9876\u70b9\u5750\u6807, shape=(N,3)\")\n\n @field_validator(\"faces\", mode=\"before\")\n @classmethod\n def validate_faces(cls, v):\n if isinstance(v, list): \n return np.array(v).astype(np.int32)\n return v\n\n @field_validator(\"points\", mode=\"before\")\n @classmethod\n def validate_points(cls, v):\n if isinstance(v, list): \n return np.array(v).astype(np.float32)\n return v\n</code></pre>"}]}
|