Calling IntPatch_WLineTool::ComputePurgedWLine() algorithm is forbidden if Walking-line is obtained from analytic line.
Creation of test case for this issue.
if(aWL.IsNull())
continue;
+ if(!aWL->IsPurgingAllowed())
+ continue;
+
Handle(IntPatch_WLine) aRW = IntPatch_WLineTool::ComputePurgedWLine(aWL, theS1, theS2, theD1, theD2);
if(aRW.IsNull())
}
IntPatch_ALineToWLine AToW(Quad1,Quad2,0.01,0.05,aNbPointsInALine);
- Handle(IntPatch_Line) wlin=AToW.MakeWLine((*((Handle(IntPatch_ALine) *)(&line))));
+ Handle(IntPatch_WLine) wlin=AToW.MakeWLine((*((Handle(IntPatch_ALine) *)(&line))));
+ wlin->EnablePurging(Standard_False);
slin.Append(wlin);
}
else
const IntSurf_TypeTrans Trans1,
const IntSurf_TypeTrans Trans2) :
IntPatch_PointLine(Tang,Trans1,Trans2),fipt(Standard_False),lapt(Standard_False),
- hasArcOnS1(Standard_False),hasArcOnS2(Standard_False)
+ hasArcOnS1(Standard_False),hasArcOnS2(Standard_False),
+ myIsPurgerAllowed(Standard_True)
{
typ = IntPatch_Walking;
curv = Line;
const IntSurf_Situation Situ1,
const IntSurf_Situation Situ2) :
IntPatch_PointLine(Tang,Situ1,Situ2),fipt(Standard_False),lapt(Standard_False),
- hasArcOnS1(Standard_False),hasArcOnS2(Standard_False)
+ hasArcOnS1(Standard_False),hasArcOnS2(Standard_False),
+ myIsPurgerAllowed(Standard_True)
{
typ = IntPatch_Walking;
curv = Line;
IntPatch_WLine::IntPatch_WLine (const Handle(IntSurf_LineOn2S)& Line,
const Standard_Boolean Tang) :
IntPatch_PointLine(Tang),fipt(Standard_False),lapt(Standard_False),
- hasArcOnS1(Standard_False),hasArcOnS2(Standard_False)
+ hasArcOnS1(Standard_False),hasArcOnS2(Standard_False),
+ myIsPurgerAllowed(Standard_True)
{
typ = IntPatch_Walking;
curv = Line;
//! Otherwise, prints list of 2d-points on the 2nd surface
Standard_EXPORT void Dump(const Standard_Integer theMode) const;
+ //! Allows or forbides purging of existing WLine
+ void EnablePurging(const Standard_Boolean theIsEnabled)
+ {
+ myIsPurgerAllowed = theIsEnabled;
+ }
+ //! Returns TRUE if purging is allowed or forbiden for existing WLine
+ Standard_Boolean IsPurgingAllowed()
+ {
+ return myIsPurgerAllowed;
+ }
DEFINE_STANDARD_RTTIEXT(IntPatch_WLine,IntPatch_PointLine)
Handle(Adaptor2d_HCurve2d) theArcOnS1;
Standard_Boolean hasArcOnS2;
Handle(Adaptor2d_HCurve2d) theArcOnS2;
+ Standard_Boolean myIsPurgerAllowed;
};
--- /dev/null
+puts "================"
+puts "OCC27267"
+puts "================"
+puts ""
+#######################################################################
+# [Regression to 6.9.1] geom/boolean_operations_06/G3: Cut produces invalid shape
+#######################################################################
+
+restore [locate_data_file bug27267_cmpd.brep] a
+explode a
+
+bcut result a_1 a_2
+checkshape result
+checknbshapes result -solid 1 -shell 1 -face 7
+checkprops result -s 0.00128248
+
+smallview
+don a_2
+fit
+don result
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
\ No newline at end of file