井巷工程 API
井巷工程模块:提供巷道断面生成、建模与轮廓线建模功能
ContourAlgorithm
Bases: IntEnum
轮廓线建模算法类型
Source code in dimine_python_sdk\lib\exploitation\models.py
113 114 115 116 117 118 119 | |
ContourExtrapolateModelingError
Bases: ModelingError
轮廓线外推建模失败
Source code in dimine_python_sdk\lib\exploitation\contour_modeling.py
59 60 | |
ContourModeling
轮廓线建模 — 两轮廓线建模 / 单轮廓线封闭为面 / 外推建模 / 实体合并 / 多平行轮廓线建模
推荐用法(无需实例化)
ContourModeling.two_contour_modeling(ContourAlgorithm.MIN_PERIMETER, line1, line2) ContourModeling.single_contour_modeling(ContourAlgorithm.MIN_PERIMETER, line) ContourModeling.contour_extrapolate_modeling(ExtrapolateMode.TIP, line) ContourModeling.unite_polydata(tin_list) ContourModeling.multi_parallel_contour_modeling(polylines_set)
Source code in dimine_python_sdk\lib\exploitation\contour_modeling.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 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 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 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 | |
contour_extrapolate_modeling(model, point_set, extra_dir=ExtrapolateDirection.BOTH, forward_distance=25.0, backward_distance=25.0, auto_calc=True, normal=None, zoom=70.0, pinchout_point_count=2, close=True, taper_line_verical=False)
staticmethod
轮廓线外推建模
Parameters
model : ExtrapolateMode 外推模式枚举:TIP=0 尖推、WEDGE=1 楔推、FLAT=2 平推 point_set : Line or np.ndarray or List[List[float]] 轮廓线 extra_dir : ExtrapolateDirection 外推方向,默认 BOTH forward_distance : float 正侧距离 backward_distance : float 反侧距离 auto_calc : bool 自动计算外推法向量 normal : List[float] | None 外推法向量,auto_calc=True 时可省略 zoom : float 缩放比例 pinchout_point_count : int 楔推尖灭点数 close : bool 平推时是否封闭外推端 taper_line_verical : bool 楔推时是否按短轴尖灭
Returns
List[TINGeometry]
Source code in dimine_python_sdk\lib\exploitation\contour_modeling.py
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | |
multi_parallel_contour_modeling(polylines_set, space_x=1.0, space_y=1.0, vertical_tol=0.5, close_end=True)
staticmethod
多平行轮廓线建模
Parameters
polylines_set : List[Line] or List[np.ndarray] or List[List[List[float]]] 多条轮廓线数据集 space_x : float X 方向网格大小 space_y : float Y 方向网格大小 vertical_tol : float 垂直方向间隔容差 close_end : bool 是否封闭端部
Returns
List[TINGeometry]
Source code in dimine_python_sdk\lib\exploitation\contour_modeling.py
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 | |
single_contour_modeling(method, line)
staticmethod
单轮廓线封闭为面
Parameters
method : ContourAlgorithm 算法类型 line : Line or np.ndarray or List[List[float]] 轮廓线
Returns
List[TINGeometry]
Source code in dimine_python_sdk\lib\exploitation\contour_modeling.py
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 | |
two_contour_modeling(method, line1, line2)
staticmethod
两轮廓线建模
Parameters
method : ContourAlgorithm 算法类型 line1 : Line or np.ndarray or List[List[float]] 第一条轮廓线 line2 : Line or np.ndarray or List[List[float]] 第二条轮廓线
Returns
List[TINGeometry]
Source code in dimine_python_sdk\lib\exploitation\contour_modeling.py
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | |
unite_polydata(tin_list)
staticmethod
实体合并
Parameters
tin_list : list[TINGeometry] 待合并的三角网模型列表
Returns
List[TINGeometry] 合并后的三角网模型列表
Source code in dimine_python_sdk\lib\exploitation\contour_modeling.py
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | |
ExtrapolateDirection
Bases: IntEnum
轮廓线外推方向
Source code in dimine_python_sdk\lib\exploitation\models.py
130 131 132 133 134 135 | |
ExtrapolateMode
Bases: IntEnum
轮廓线外推建模模式
Source code in dimine_python_sdk\lib\exploitation\models.py
122 123 124 125 126 127 | |
ImplicitEstimationParam
Bases: ParamModel
隐式建模估值参数
Source code in dimine_python_sdk\lib\exploitation\models.py
189 190 191 192 193 194 195 196 197 198 199 200 201 | |
ImplicitGridParam
Bases: ParamModel
隐式建模网格参数
Source code in dimine_python_sdk\lib\exploitation\models.py
178 179 180 181 182 183 184 185 186 | |
ImplicitModeling
隐式建模 — 隐式地层建模
推荐用法(无需实例化)
param = ImplicitStratumModelingParam( ... data=ImplicitStratumDataParam( ... drill_file=r"F:\测试数据\建模测试数据\钻孔数据库.dmd", ... layer_table="分层表", ... layer_table_field="地层", ... layer_sequence=["泥盆纪地层", "志留纪地层", "寒武纪地层"], ... ) ... ) ImplicitModeling.stratum_modeling(param)
Source code in dimine_python_sdk\lib\exploitation\implicit_modeling.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | |
stratum_modeling(param)
staticmethod
隐式地层建模
Parameters
param : ImplicitStratumModelingParam 隐式地层建模参数(数据 / 网格 / 估值 / 尖灭厚度)
Returns
List[Tuple[str, TINGeometry]] (地层名称, 实体三角网) 列表,按建模顺序排列
Raises
ImplicitStratumModelingError 底层建模失败或抛出异常时包装
Source code in dimine_python_sdk\lib\exploitation\implicit_modeling.py
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | |
ImplicitModelingError
Bases: RuntimeError
隐式建模异常基类
Source code in dimine_python_sdk\lib\exploitation\implicit_modeling.py
27 28 | |
ImplicitStratumDataParam
Bases: ParamModel
隐式地层建模数据参数
示例
ImplicitStratumDataParam( ... drill_file=r"F:\测试数据\建模测试数据\钻孔数据库.dmd", ... layer_table="分层表", ... layer_table_field="地层", ... layer_sequence=["泥盆纪地层", "志留纪地层", "寒武纪地层"], ... )
Source code in dimine_python_sdk\lib\exploitation\models.py
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | |
ImplicitStratumModelingError
Bases: ImplicitModelingError
隐式地层建模失败
Source code in dimine_python_sdk\lib\exploitation\implicit_modeling.py
31 32 | |
ImplicitStratumModelingParam
Bases: ParamModel
隐式地层建模参数:数据 + 网格 + 估值 + 尖灭厚度
示例
ImplicitStratumModelingParam( ... data=ImplicitStratumDataParam( ... drill_file=r"F:\测试数据\建模测试数据\钻孔数据库.dmd", ... layer_table="分层表", ... layer_table_field="地层", ... layer_sequence=["泥盆纪地层", "志留纪地层", "寒武纪地层"], ... ), ... grid=ImplicitGridParam(x_node_num=81, y_node_num=81, z_node_num=20), ... pinch_thickness=0.1, ... )
Source code in dimine_python_sdk\lib\exploitation\models.py
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 | |
Laneway
井巷工程 — 断面/巷道/竖井生成
推荐用法(无需实例化)
Laneway.get_section(SectionParam(type=0, width=2.0)) Laneway.get_lane_way_model(LanewayParam(section=..., polylines_set=...)) Laneway.get_lane_way_model(LanewayParam(section=..., polylines_set=..., shaft=True, angle=45.0))
Source code in dimine_python_sdk\lib\exploitation\lane_way.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | |
get_lane_way_model(param)
staticmethod
根据断面 + 中心线生成巷道或竖井
Parameters
param : LanewayParam or dict
巷道/竖井建模参数(dict 已废弃,会发出 DeprecationWarning)。
当 shaft=True 时切换为竖井建模,由 C++ 侧根据 shaft 字段区分;
angle 控制竖井水平旋转角度(度),范围 [0, 360)。
Returns
List[TINGeometry] 生成的巷道/竖井模型三角网列表
Raises
LanewayModelingError 底层返回空结果或抛出异常时包装
Source code in dimine_python_sdk\lib\exploitation\lane_way.py
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | |
get_section(param)
staticmethod
获取断面轮廓
Parameters
param : SectionParam or dict 断面参数(dict 已废弃,会发出 DeprecationWarning)
Returns
np.ndarray 断面轮廓点数组
Raises
SectionGenerateError 底层返回空结果或抛出异常时包装
Source code in dimine_python_sdk\lib\exploitation\lane_way.py
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | |
LanewayError
Bases: RuntimeError
井巷工程异常基类
Source code in dimine_python_sdk\lib\exploitation\lane_way.py
34 35 | |
LanewayModelingError
Bases: LanewayError
巷道建模失败
Source code in dimine_python_sdk\lib\exploitation\lane_way.py
42 43 | |
LanewayParam
Bases: ParamModel
巷道/竖井建模参数:断面 + 中心线 + 生成选项
示例
LanewayParam( ... section=SectionParam(type=0, width=2.0, wall_height=1.0), ... polylines_set=[ ... [["1", "2", "0"], ["2", "4", "0"], ["3", "6", "0"]], ... [["2", "1", "3"], ["4", "2", "3"], ["6", "3", "3"]], ... ], ... close=False, ... connectivity=False, ... method=0, ... bottom_contour=False, ... )
竖井建模示例
LanewayParam( ... section=SectionParam(type=0, width=2.0, wall_height=1.0), ... polylines_set=[[["0", "0", "0"], ["0", "0", "10"]]], ... shaft=True, ... angle=45.0, ... )
Source code in dimine_python_sdk\lib\exploitation\models.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | |
ModelingError
Bases: RuntimeError
轮廓线建模异常基类
Source code in dimine_python_sdk\lib\exploitation\contour_modeling.py
47 48 | |
ParallelContourModelingError
Bases: ModelingError
多平行轮廓线建模失败
Source code in dimine_python_sdk\lib\exploitation\contour_modeling.py
63 64 | |
SectionGenerateError
Bases: LanewayError
断面生成失败
Source code in dimine_python_sdk\lib\exploitation\lane_way.py
38 39 | |
SectionParam
Bases: ParamModel
巷道断面参数
示例
SectionParam( ... type=0, ... width=2.0, ... width_up=2.0, ... wall_height=1.0, ... wide_arch_ratio=3, ... offset_x=0, ... offset_y=0, ... point_count=20, ... )
Source code in dimine_python_sdk\lib\exploitation\models.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | |
SingleContourModelingError
Bases: ModelingError
单轮廓线封闭为面失败
Source code in dimine_python_sdk\lib\exploitation\contour_modeling.py
55 56 | |
TwoContourModelingError
Bases: ModelingError
两轮廓线建模失败
Source code in dimine_python_sdk\lib\exploitation\contour_modeling.py
51 52 | |