models
Native Layer v2 数据模型
使用标准库 dataclasses 定义 native 层内部传递的数据结构。
NativeEntity
dataclass
几何实体数据模型
Source code in dimine_python_sdk\lib\native\models.py
109 110 111 112 113 114 115 116 117 118 | |
NativeExtendTable
dataclass
Bases: NativeExtendTableMeta
扩展表(含数据)。
继承 NativeExtendTableMeta 的全部元数据字段, 附加加载后的 DataFrame。
__post_init__ 自动完成 field_list ↔ 元数据的双向推导。
Source code in dimine_python_sdk\lib\native\models.py
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 | |
df = None
class-attribute
instance-attribute
扩展表数据(pd.DataFrame),加载失败时为空 DataFrame
NativeExtendTableMeta
dataclass
扩展表元数据。
封装 DMD 引用字典中解析出的扩展表(DMT)信息, 替代裸 dict 传递,提供类型安全和 IDE 自动补全。
Source code in dimine_python_sdk\lib\native\models.py
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | |
display_title = None
class-attribute
instance-attribute
显示标题
dmt_filename
instance-attribute
DMT 文件名(不含路径)
field_list = ''
class-attribute
instance-attribute
原始字段列表字符串,格式:孔号列,起始深度列,结束深度列,标题
from_column = None
class-attribute
instance-attribute
起始深度列名
hole_id_column = None
class-attribute
instance-attribute
钻孔编号列名
table_name = ''
class-attribute
instance-attribute
表名(优先 display_title,回退到 dmt 文件名去后缀)
to_column = None
class-attribute
instance-attribute
结束深度列名
NativeFeature
dataclass
DMF 要素定义
Source code in dimine_python_sdk\lib\native\models.py
152 153 154 155 156 157 | |
NativeFieldDef
dataclass
字段定义
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
字段名称。 |
type |
int | str | float
|
C++ 类型编号(0-22),见 _DM_TYPE_MAP。 |
type_name |
str
|
只读,C++ 类型宏名称,如 "DM_INT"、"DM_DOUBLE"。 |
python_type |
type
|
只读,对应的 Python 类型,如 int、float、str、bool。 |
Source code in dimine_python_sdk\lib\native\models.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | |
python_type
property
对应的 Python 类型
type_name
property
C++ 类型宏名称,如 'DM_INT'、'DM_DOUBLE'
NativeLayer
dataclass
DMF 图层数据模型
Source code in dimine_python_sdk\lib\native\models.py
160 161 162 163 164 165 | |
NativeLithologyModel
dataclass
隐式建模岩性实体模型
Source code in dimine_python_sdk\lib\native\models.py
101 102 103 104 105 106 | |
NativeProperty
dataclass
属性键值对
Source code in dimine_python_sdk\lib\native\models.py
59 60 61 62 63 64 65 | |
NativeText
dataclass
文本实体数据模型(单行文本 / 多行文本共用)
多行文本(mtext)相比单行文本(text)额外支持: oblique(倾斜角)、width(文本框宽度)、direction(文本方向向量)。 同时多行文本无 face2_user 属性,始终为 False。
Source code in dimine_python_sdk\lib\native\models.py
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | |
color = field(default_factory=(lambda: [0, 0, 0]))
class-attribute
instance-attribute
文本颜色 [r, g, b],从 NativeEntityHandle.color 获取
direction = field(default_factory=(lambda: np.array([1, 0, 0]) if np is not None else [1, 0, 0]))
class-attribute
instance-attribute
文本方向向量 shape (3,),仅多行文本有效
oblique = 0.0
class-attribute
instance-attribute
倾斜角(度),仅多行文本有效
width = 0.0
class-attribute
instance-attribute
文本框宽度,仅多行文本有效
NativeTin
dataclass
三角网模型
Source code in dimine_python_sdk\lib\native\models.py
93 94 95 96 97 98 | |