modeling
ContourExtrapolateModelingError
Bases: ModelingError
轮廓线外推建模失败
Source code in dimine_python_sdk\lib\exploitation\modeling.py
34 35 36 | |
ContourModeling
轮廓线建模 — 两轮廓线建模 / 单轮廓线封闭为面
推荐用法(无需实例化)
ContourModeling.two_contour_modeling(ContourAlgorithm.MIN_PERIMETER, line1, line2) ContourModeling.single_contour_modeling(ContourAlgorithm.MIN_PERIMETER, line)
Source code in dimine_python_sdk\lib\exploitation\modeling.py
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 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 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 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 | |
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=0(两端) / FRONT=1(正侧) / BACK=2(反侧) forward_distance : float 正侧距离 backward_distance : float 反侧距离 auto_calc : bool 自动计算外推法向量,默认 True normal : List[float] | None 外推法向量,auto_calc=True 时可省略 zoom : float 缩放比例,楔推和平推时用,范围 (0, 100],默认 70.0 pinchout_point_count : int 楔推尖灭点数,默认 2 close : bool 平推时是否封闭外推端,默认 True taper_line_verical : bool 楔推时是否按短轴尖灭,默认 False
Returns
List[TINGeometry] 生成的三角网模型列表
Raises
ContourExtrapolateModelingError 底层返回空结果或抛出异常时包装
Source code in dimine_python_sdk\lib\exploitation\modeling.py
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 | |
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]]]
多条轮廓线组成的数据集。每个元素为一条闭合(或开口)轮廓线,
支持 Line、np.ndarray、List[List[float]] 三种格式。
space_x : float
X 方向网格大小,默认 1.0
space_y : float
Y 方向网格大小,默认 1.0
vertical_tol : float
垂直方向间隔容差,默认 0.5
close_end : bool
是否封闭端部,默认 True
Returns
List[TINGeometry] 生成的三角网模型列表
Raises
ParallelContourModelingError 底层返回空结果或抛出异常时包装
Source code in dimine_python_sdk\lib\exploitation\modeling.py
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 | |
single_contour_modeling(method, line)
staticmethod
单轮廓线封闭为面
将一条轮廓线封闭为三角网面。
Parameters
method : ContourAlgorithm 算法类型:MIN_PERIMETER(最小周长法) / MIN_SURFACE_AREA(最小表面积法) / SYNC_ADVANCE(同步前进法) / MIN_DISTANCE(最小距离法) line : Line or np.ndarray or List[List[float]] 轮廓线。
Returns
List[TINGeometry] 生成的三角网模型列表
Raises
SingleContourModelingError 底层返回空结果或抛出异常时包装
Source code in dimine_python_sdk\lib\exploitation\modeling.py
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 | |
two_contour_modeling(method, line1, line2)
staticmethod
两轮廓线建模
根据两条轮廓线生成三角网模型。
Parameters
method : ContourAlgorithm 算法类型:MIN_PERIMETER(最小周长法) / MIN_SURFACE_AREA(最小表面积法) / SYNC_ADVANCE(同步前进法) / MIN_DISTANCE(最小距离法) line1 : Line or np.ndarray or List[List[float]] 第一条轮廓线。 line2 : Line or np.ndarray or List[List[float]] 第二条轮廓线。
Returns
List[TINGeometry] 生成的三角网模型列表
Raises
TwoContourModelingError 底层返回空结果或抛出异常时包装
Source code in dimine_python_sdk\lib\exploitation\modeling.py
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 | |
unite_polydata(tin_list)
staticmethod
实体合并
将多个 TINGeometry 三角网模型合并为一个实体。
Parameters
tin_list : list[TINGeometry] 待合并的三角网模型列表
Returns
List[TINGeometry] 合并后的三角网模型列表。当列表为空时返回空列表; 只有一个元素时深拷贝返回;多个元素时执行实际合并。
Raises
ModelingError 底层返回空结果或抛出异常时包装
Source code in dimine_python_sdk\lib\exploitation\modeling.py
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 | |
ModelingError
Bases: RuntimeError
轮廓线建模异常基类
Source code in dimine_python_sdk\lib\exploitation\modeling.py
19 20 21 | |
ParallelContourModelingError
Bases: ModelingError
多平行轮廓线建模失败
Source code in dimine_python_sdk\lib\exploitation\modeling.py
39 40 41 | |
SingleContourModelingError
Bases: ModelingError
单轮廓线封闭为面失败
Source code in dimine_python_sdk\lib\exploitation\modeling.py
29 30 31 | |
TwoContourModelingError
Bases: ModelingError
两轮廓线建模失败
Source code in dimine_python_sdk\lib\exploitation\modeling.py
24 25 26 | |