Fix #3401 warning on multiple solid
- PartDesign only uses the first result shape of an operation and discards the rest without warning. - this also fixes #1707
This commit is contained in:
committed by
Yorik van Havre
parent
97932a25bc
commit
0d3008e4eb
@@ -79,6 +79,21 @@ TopoDS_Shape Feature::getSolid(const TopoDS_Shape& shape)
|
||||
return TopoDS_Shape();
|
||||
}
|
||||
|
||||
int Feature::countSolids(const TopoDS_Shape& shape, TopAbs_ShapeEnum type)
|
||||
{
|
||||
int result = 0;
|
||||
if (shape.IsNull())
|
||||
return result;
|
||||
TopExp_Explorer xp;
|
||||
xp.Init(shape,type);
|
||||
for (; xp.More(); xp.Next()) {
|
||||
result++;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
const gp_Pnt Feature::getPointFromFace(const TopoDS_Face& f)
|
||||
{
|
||||
if (!f.Infinite()) {
|
||||
|
||||
Reference in New Issue
Block a user