tin_renderer
TIN 三角网 PyVista 渲染引擎
纯 Python 实现,不依赖 DmPyBindInterface.pyd。 PyVista 为可选依赖,通过懒加载方式导入。
render_tin(geometries, config, output_path=None, output_prefix='tin_render', image_format='png')
渲染 TIN 三角网模型
Parameters
geometries : TINGeometry 或 List[TINGeometry] 待渲染的三角网几何体 config : TinRenderConfig 渲染配置(角度、模式、样式等) output_path : str, optional 输出路径: - separate 模式:指定目录,每个角度保存为独立文件 - combined 模式:指定文件路径,保存为单张组合图 - None:返回 Plotter 对象用于交互式显示 output_prefix : str 输出文件前缀(separate 模式有效),默认 "tin_render" image_format : str 图像格式(png/jpg/svg 等),默认 "png"
Returns
dict { "mode": "separate" | "combined", "angles": [...], "output_files": [...] | None, "plotters": [...] | None, "config": TinRenderConfig, }
Raises
MissingPyVistaError: PyVista 未安装 InvalidTINDataError: 输入数据无效 TINRenderError: 渲染过程中发生错误 LayoutError: 子图布局配置错误
Source code in dimine_python_sdk\lib\visualization\tin_renderer.py
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 | |