fix: 曲线通道重建截面时防崩溃
RegionFromCurvesDwgInFields 里两处: - isRegionNull(pRegion) && isRegionNull(pRegionBig) 改为 ||,原写法要求 两个都无效才跳过,实际 pRegionBig 此时必非空,条件恒假,无效 region 照样进布尔运算 - booleanOper 改走已有的 rawBooleanOperWrapper,ACIS 内部异常时由 SEH 捕获,不再直接崩 CAD 顺带 delete pRegion:arRegPtrs 不拥有对象,原来 subtract 完没有释放。 曲线通道只读,spline 参数在写端从未落盘,几何缺失无法靠读端修复, 本次只处理崩溃路径,重建逻辑与启发式保持原样。
This commit is contained in:
1 parent
beeb6031e0
commit
4fc910d6fd
1 file changed
+5
-3
@@ -771,17 +771,19 @@ AcDbRegion *AecDbEwPipeBase::RegionFromCurvesDwgInFields(AcDbDwgFiler *pFiler, A
|
|||||||
arRegPtrs.removeAt(nPos);
|
arRegPtrs.removeAt(nPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
Acad::ErrorStatus es;
|
|
||||||
for (int j = 0;j < arRegPtrs.length();j++)
|
for (int j = 0;j < arRegPtrs.length();j++)
|
||||||
{
|
{
|
||||||
pRegion = (AcDbRegion*)arRegPtrs.at(j);
|
pRegion = (AcDbRegion*)arRegPtrs.at(j);
|
||||||
|
|
||||||
if (isRegionNull(pRegion) && isRegionNull(pRegionBig))
|
// 任一 region 无效就跳过,无效 region 参与布尔运算可能让 ACIS 崩溃
|
||||||
|
if (isRegionNull(pRegion) || isRegionNull(pRegionBig))
|
||||||
{
|
{
|
||||||
|
delete pRegion;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
es = pRegionBig->booleanOper(AcDb::kBoolSubtract, pRegion);
|
rawBooleanOperWrapper(pRegionBig, pRegion, AcDb::kBoolSubtract);
|
||||||
|
delete pRegion;
|
||||||
}
|
}
|
||||||
return pRegionBig;
|
return pRegionBig;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user