diff --git a/src/Mod/PartDesign/App/FeaturePocket.cpp b/src/Mod/PartDesign/App/FeaturePocket.cpp index 43e07b69a..e111a0723 100644 --- a/src/Mod/PartDesign/App/FeaturePocket.cpp +++ b/src/Mod/PartDesign/App/FeaturePocket.cpp @@ -153,8 +153,12 @@ App::DocumentObjectExecReturn *Pocket::execute(void) } getUpToFace(upToFace, base, supportface, sketchshape, method, dir, Offset.getValue()); - // Special treatment because often the created stand-alone prism is invalid (empty) because - // BRepFeat_MakePrism(..., 2, 1) is buggy + // BRepFeat_MakePrism(..., 2, 1) in combination with PerForm(upToFace) is buggy when the + // prism that is being created is contained completely inside the base solid + // In this case the resulting shape is empty. This is not a problem for the Pad or Pocket itself + // but it leads to an invalid SubShape + // The bug only occurs when the upToFace is limited (by a wire), not for unlimited upToFace. But + // other problems occur with unlimited concave upToFace so it is not an option to always unlimit upToFace // Check supportface for limits, otherwise Perform() throws an exception TopExp_Explorer Ex(supportface,TopAbs_WIRE); if (!Ex.More()) diff --git a/src/Mod/PartDesign/App/FeatureSketchBased.cpp b/src/Mod/PartDesign/App/FeatureSketchBased.cpp index b5f3633b6..b3604a45a 100644 --- a/src/Mod/PartDesign/App/FeatureSketchBased.cpp +++ b/src/Mod/PartDesign/App/FeatureSketchBased.cpp @@ -628,8 +628,10 @@ void SketchBased::generatePrism(TopoDS_Shape& prism, const bool SketchBased::checkWireInsideFace(const TopoDS_Wire& wire, const TopoDS_Face& face, const gp_Dir& dir) { // Project wire onto the face (face, not surface! So limits of face apply) - // FIXME: For a user-selected upToFace, sometimes this returns a non-closed wire for no apparent reason - // Check again after introduction of "robust" reference for upToFace + // FIXME: The results of BRepProj_Projection do not seem to be very stable. Sometimes they return no result + // even in the simplest projection case. + // FIXME: Checking for Closed() is wrong because this has nothing to do with the wire itself being closed + // But ShapeAnalysis_Wire::CheckClosed() doesn't give correct results either. BRepProj_Projection proj(wire, face, dir); return (proj.More() && proj.Current().Closed()); }