1 // Created on: 2000-03-16
2 // Created by: Peter KURNEV
3 // Copyright (c) 2000-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
17 #include <BOPAlgo_BOP.hxx>
18 #include <BOPAlgo_MakerVolume.hxx>
19 #include <BOPAlgo_Operation.hxx>
20 #include <BOPAlgo_PaveFiller.hxx>
21 #include <BOPAlgo_Section.hxx>
22 #include <BOPDS_DS.hxx>
23 #include <BOPTest.hxx>
24 #include <BOPTest_Objects.hxx>
25 #include <BRep_Builder.hxx>
26 #include <BRepAlgoAPI_BooleanOperation.hxx>
27 #include <BRepAlgoAPI_Common.hxx>
28 #include <BRepAlgoAPI_Cut.hxx>
29 #include <BRepAlgoAPI_Fuse.hxx>
30 #include <BRepAlgoAPI_Section.hxx>
31 #include <BRepTest_Objects.hxx>
34 #include <DrawTrSurf.hxx>
35 #include <Geom2d_Curve.hxx>
36 #include <Geom_Curve.hxx>
37 #include <IntTools_Curve.hxx>
38 #include <IntTools_FaceFace.hxx>
39 #include <IntTools_PntOn2Faces.hxx>
40 #include <NCollection_BaseAllocator.hxx>
41 #include <TCollection_AsciiString.hxx>
42 #include <TopoDS_Compound.hxx>
43 #include <TopoDS_Iterator.hxx>
44 #include <TopoDS_Shape.hxx>
45 #include <TopTools_ListOfShape.hxx>
50 static BOPAlgo_PaveFiller* pPF=NULL;
54 Standard_Integer bopsmt(Draw_Interpretor& di,
57 const BOPAlgo_Operation aOp);
60 Standard_Integer bsmt (Draw_Interpretor& di,
63 const BOPAlgo_Operation aOp);
65 static Standard_Integer bop (Draw_Interpretor&, Standard_Integer, const char**);
66 static Standard_Integer bopsection(Draw_Interpretor&, Standard_Integer, const char**);
67 static Standard_Integer boptuc (Draw_Interpretor&, Standard_Integer, const char**);
68 static Standard_Integer bopcut (Draw_Interpretor&, Standard_Integer, const char**);
69 static Standard_Integer bopfuse (Draw_Interpretor&, Standard_Integer, const char**);
70 static Standard_Integer bopcommon (Draw_Interpretor&, Standard_Integer, const char**);
72 static Standard_Integer bsection (Draw_Interpretor&, Standard_Integer, const char**);
73 static Standard_Integer btuc (Draw_Interpretor&, Standard_Integer, const char**);
74 static Standard_Integer bcut (Draw_Interpretor&, Standard_Integer, const char**);
75 static Standard_Integer bfuse (Draw_Interpretor&, Standard_Integer, const char**);
76 static Standard_Integer bcommon (Draw_Interpretor&, Standard_Integer, const char**);
78 static Standard_Integer bopcurves (Draw_Interpretor&, Standard_Integer, const char**);
79 static Standard_Integer mkvolume (Draw_Interpretor&, Standard_Integer, const char**);
81 //=======================================================================
82 //function : BOPCommands
84 //=======================================================================
85 void BOPTest::BOPCommands(Draw_Interpretor& theCommands)
87 static Standard_Boolean done = Standard_False;
91 const char* g = "BOPTest commands";
94 theCommands.Add("bop" , "use bop s1 s2" , __FILE__, bop, g);
95 theCommands.Add("bopcommon" , "use bopcommon r" , __FILE__, bopcommon, g);
96 theCommands.Add("bopfuse" , "use bopfuse r" , __FILE__,bopfuse, g);
97 theCommands.Add("bopcut" , "use bopcut r" , __FILE__,bopcut, g);
98 theCommands.Add("boptuc" , "use boptuc r" , __FILE__,boptuc, g);
99 theCommands.Add("bopsection", "use bopsection r" , __FILE__,bopsection, g);
101 theCommands.Add("bcommon" , "use bcommon r s1 s2" , __FILE__,bcommon, g);
102 theCommands.Add("bfuse" , "use bfuse r s1 s2" , __FILE__,bfuse, g);
103 theCommands.Add("bcut" , "use bcut r s1 s2" , __FILE__,bcut, g);
104 theCommands.Add("btuc" , "use btuc r s1 s2" , __FILE__,btuc, g);
105 theCommands.Add("bsection", "use bsection r s1 s2 [-n2d/-n2d1/-n2d2] [-na]"
106 "Builds section between shapes. Options:\n"
107 "-n2d/-n2d1/-n2d2 - disable the PCurve construction;\n"
108 "-na - disables the approximation of the section curves.\n",
109 __FILE__, bsection, g);
111 theCommands.Add("bopcurves", "use bopcurves F1 F2 [-2d/-2d1/-2d2] "
112 "[-p u1 v1 u2 v2 (to add start points] [-v (for extended output)]",
113 __FILE__, bopcurves, g);
114 theCommands.Add("mkvolume", "make solids from set of shapes.\nmkvolume r b1 b2 ... [-c] [-ni] [-ai]",
115 __FILE__, mkvolume , g);
118 //=======================================================================
121 //=======================================================================
122 Standard_Integer bop(Draw_Interpretor& di,
126 Standard_Boolean bRunParallel, bNonDestructive;
128 TopoDS_Shape aS1, aS2;
129 TopTools_ListOfShape aLC;
132 di << " use bop s1 s2 \n";
136 aS1=DBRep::Get(a[1]);
137 aS2=DBRep::Get(a[2]);
139 if (aS1.IsNull() || aS2.IsNull()) {
140 di << " null shapes are not allowed \n";
144 aTol=BOPTest_Objects::FuzzyValue();
145 bRunParallel=BOPTest_Objects::RunParallel();
146 bNonDestructive = BOPTest_Objects::NonDestructive();
147 BOPAlgo_GlueEnum aGlue = BOPTest_Objects::Glue();
156 Handle(NCollection_BaseAllocator)aAL=
157 NCollection_BaseAllocator::CommonBaseAllocator();
158 pPF=new BOPAlgo_PaveFiller(aAL);
160 pPF->SetArguments(aLC);
161 pPF->SetFuzzyValue(aTol);
162 pPF->SetRunParallel(bRunParallel);
163 pPF->SetNonDestructive(bNonDestructive);
165 pPF->SetUseOBB(BOPTest_Objects::UseOBB());
168 BOPTest::ReportAlerts(pPF->GetReport());
172 //=======================================================================
173 //function : bopcommon
175 //=======================================================================
176 Standard_Integer bopcommon (Draw_Interpretor& di,
180 return bopsmt(di, n, a, BOPAlgo_COMMON);
182 //=======================================================================
185 //=======================================================================
186 Standard_Integer bopfuse(Draw_Interpretor& di,
190 return bopsmt(di, n, a, BOPAlgo_FUSE);
192 //=======================================================================
195 //=======================================================================
196 Standard_Integer bopcut(Draw_Interpretor& di,
200 return bopsmt(di, n, a, BOPAlgo_CUT);
202 //=======================================================================
205 //=======================================================================
206 Standard_Integer boptuc(Draw_Interpretor& di,
210 return bopsmt(di, n, a, BOPAlgo_CUT21);
212 //=======================================================================
215 //=======================================================================
216 Standard_Integer bopsmt(Draw_Interpretor& di,
219 const BOPAlgo_Operation aOp)
222 di << " use bopsmt r\n";
227 di << " prepare PaveFiller first\n";
231 if (pPF->HasErrors()) {
232 di << " PaveFiller has not been done\n";
237 Standard_Boolean bRunParallel;
238 Standard_Integer aNb;
241 const TopTools_ListOfShape& aLC=pPF->Arguments();
244 Sprintf (buf, " wrong number of arguments %s\n", aNb);
249 bRunParallel=BOPTest_Objects::RunParallel();
251 const TopoDS_Shape& aS1=aLC.First();
252 const TopoDS_Shape& aS2=aLC.Last();
254 aBOP.AddArgument(aS1);
256 aBOP.SetOperation(aOp);
257 aBOP.SetRunParallel (bRunParallel);
258 aBOP.SetCheckInverted(BOPTest_Objects::CheckInverted());
259 aBOP.SetToFillHistory(BRepTest_Objects::IsHistoryNeeded());
261 aBOP.PerformWithFiller(*pPF);
262 BOPTest::ReportAlerts(aBOP.GetReport());
264 // Store the history of Boolean operation into the session
265 if (BRepTest_Objects::IsHistoryNeeded())
266 BRepTest_Objects::SetHistory(aBOP.History());
268 if (aBOP.HasErrors()) {
272 const TopoDS_Shape& aR=aBOP.Shape();
274 di << " null shape\n";
278 DBRep::Set(a[1], aR);
281 //=======================================================================
282 //function : bopsection
284 //=======================================================================
285 Standard_Integer bopsection(Draw_Interpretor& di,
290 di << " use bopsection r\n";
295 di << " prepare PaveFiller first\n";
299 if (pPF->HasErrors()) {
300 di << " PaveFiller has not been done\n";
305 Standard_Boolean bRunParallel;
306 Standard_Integer aNb;
307 BOPAlgo_Section aBOP;
309 const TopTools_ListOfShape& aLC=pPF->Arguments();
312 Sprintf (buf, " wrong number of arguments %s\n", aNb);
317 bRunParallel=BOPTest_Objects::RunParallel();
319 const TopoDS_Shape& aS1=aLC.First();
320 const TopoDS_Shape& aS2=aLC.Last();
322 aBOP.AddArgument(aS1);
323 aBOP.AddArgument(aS2);
324 aBOP.SetRunParallel (bRunParallel);
325 aBOP.SetCheckInverted(BOPTest_Objects::CheckInverted());
326 aBOP.SetToFillHistory(BRepTest_Objects::IsHistoryNeeded());
328 aBOP.PerformWithFiller(*pPF);
329 BOPTest::ReportAlerts(aBOP.GetReport());
331 // Store the history of Section operation into the session
332 if (BRepTest_Objects::IsHistoryNeeded())
333 BRepTest_Objects::SetHistory(aBOP.History());
335 if (aBOP.HasErrors()) {
339 const TopoDS_Shape& aR=aBOP.Shape();
341 di << " null shape\n";
345 DBRep::Set(a[1], aR);
348 //=======================================================================
351 //=======================================================================
352 Standard_Integer bcommon (Draw_Interpretor& di,
356 return bsmt(di, n, a, BOPAlgo_COMMON);
358 //=======================================================================
361 //=======================================================================
362 Standard_Integer bfuse (Draw_Interpretor& di,
366 return bsmt(di, n, a, BOPAlgo_FUSE);
368 //=======================================================================
371 //=======================================================================
372 Standard_Integer bcut (Draw_Interpretor& di,
376 return bsmt(di, n, a, BOPAlgo_CUT);
378 //=======================================================================
381 //=======================================================================
382 Standard_Integer btuc (Draw_Interpretor& di,
386 return bsmt(di, n, a, BOPAlgo_CUT21);
388 //=======================================================================
389 //function : bsection
391 //=======================================================================
392 Standard_Integer bsection(Draw_Interpretor& di,
397 di << "use bsection r s1 s2 [-n2d/-n2d1/-n2d2] [-na] [tol]\n";
401 TopoDS_Shape aS1, aS2;
403 aS1=DBRep::Get(a[2]);
404 aS2=DBRep::Get(a[3]);
405 if (aS1.IsNull() || aS2.IsNull()) {
406 di << " Null shapes are not allowed \n";
410 Standard_Boolean bRunParallel, bNonDestructive, bApp, bPC1, bPC2;
413 bApp = Standard_True;
414 bPC1 = Standard_True;
415 bPC2 = Standard_True;
416 aTol = BOPTest_Objects::FuzzyValue();
417 bRunParallel = BOPTest_Objects::RunParallel();
418 bNonDestructive = BOPTest_Objects::NonDestructive();
419 BOPAlgo_GlueEnum aGlue = BOPTest_Objects::Glue();
421 for (Standard_Integer i = 4; i < n; ++i) {
422 if (!strcmp(a[i], "-n2d")) {
423 bPC1 = Standard_False;
424 bPC2 = Standard_False;
426 else if (!strcmp(a[i], "-n2d1")) {
427 bPC1 = Standard_False;
429 else if (!strcmp(a[i], "-n2d2")) {
430 bPC2 = Standard_False;
432 else if (!strcmp(a[i], "-na")) {
433 bApp = Standard_False;
437 BRepAlgoAPI_Section aSec(aS1, aS2, Standard_False);
439 aSec.Approximation(bApp);
440 aSec.ComputePCurveOn1(bPC1);
441 aSec.ComputePCurveOn2(bPC2);
443 aSec.SetFuzzyValue(aTol);
444 aSec.SetRunParallel(bRunParallel);
445 aSec.SetNonDestructive(bNonDestructive);
447 aSec.SetUseOBB(BOPTest_Objects::UseOBB());
451 // Store the history of Section operation into the session
452 if (BRepTest_Objects::IsHistoryNeeded())
453 BRepTest_Objects::SetHistory(aSec.History());
456 if (aSec.HasWarnings()) {
457 Standard_SStream aSStream;
458 aSec.DumpWarnings(aSStream);
462 if (!aSec.IsDone()) {
463 Standard_SStream aSStream;
464 aSec.DumpErrors(aSStream);
469 const TopoDS_Shape& aR=aSec.Shape();
471 di << " null shape\n";
474 DBRep::Set(a[1], aR);
477 //=======================================================================
480 //=======================================================================
481 Standard_Integer bsmt (Draw_Interpretor& di,
484 const BOPAlgo_Operation aOp)
486 Standard_Boolean bRunParallel, bNonDestructive;
487 TopoDS_Shape aS1, aS2;
488 TopTools_ListOfShape aLC;
492 di << " use bx r s1 s2\n";
496 aS1=DBRep::Get(a[2]);
497 aS2=DBRep::Get(a[3]);
499 if (aS1.IsNull() || aS2.IsNull()) {
500 di << " null shapes are not allowed \n";
506 aTol=BOPTest_Objects::FuzzyValue();
507 bRunParallel = BOPTest_Objects::RunParallel();
508 bNonDestructive = BOPTest_Objects::NonDestructive();
509 BOPAlgo_GlueEnum aGlue = BOPTest_Objects::Glue();
511 Handle(NCollection_BaseAllocator)aAL=
512 NCollection_BaseAllocator::CommonBaseAllocator();
514 //---------------------------------------------------------------
515 BOPAlgo_PaveFiller aPF(aAL);
517 aPF.SetArguments(aLC);
518 aPF.SetFuzzyValue(aTol);
519 aPF.SetRunParallel(bRunParallel);
520 aPF.SetNonDestructive(bNonDestructive);
522 aPF.SetUseOBB(BOPTest_Objects::UseOBB());
525 BOPTest::ReportAlerts(aPF.GetReport());
526 if (aPF.HasErrors()) {
530 //---------------------------------------------------------------
531 BOPAlgo_BOP aBOP(aAL);
533 aBOP.AddArgument(aS1);
535 aBOP.SetOperation(aOp);
536 aBOP.SetRunParallel(bRunParallel);
537 aBOP.SetCheckInverted(BOPTest_Objects::CheckInverted());
538 aBOP.SetToFillHistory(BRepTest_Objects::IsHistoryNeeded());
540 aBOP.PerformWithFiller(aPF);
541 BOPTest::ReportAlerts(aBOP.GetReport());
543 // Store the history of Boolean operation into the session
544 if (BRepTest_Objects::IsHistoryNeeded())
545 BRepTest_Objects::SetHistory(aPF.Arguments(), aBOP);
547 if (aBOP.HasErrors()) {
550 const TopoDS_Shape& aR=aBOP.Shape();
552 di << " null shape\n";
556 DBRep::Set(a[1], aR);
559 //=======================================================================
560 //function : bopcurves
562 //=======================================================================
563 Standard_Integer bopcurves (Draw_Interpretor& di,
568 di << "Usage: bopcurves F1 F2 [-2d/-2d1/-2d2] "
569 "[-p u1 v1 u2 v2 (to add start points] [-v (for extended output)]\n";
573 TopoDS_Shape S1 = DBRep::Get(a[1]);
574 TopoDS_Shape S2 = DBRep::Get(a[2]);
575 TopAbs_ShapeEnum aType;
577 if (S1.IsNull() || S2.IsNull()) {
578 di << " Null shapes are not allowed \n";
582 aType=S1.ShapeType();
583 if (aType != TopAbs_FACE) {
584 di << " Type mismatch F1\n";
587 aType=S2.ShapeType();
588 if (aType != TopAbs_FACE) {
589 di << " Type mismatch F2\n";
593 const TopoDS_Face& aF1=*(TopoDS_Face*)(&S1);
594 const TopoDS_Face& aF2=*(TopoDS_Face*)(&S2);
596 Standard_Boolean aToApproxC3d, aToApproxC2dOnS1, aToApproxC2dOnS2, anIsDone;
597 Standard_Integer aNbCurves, aNbPoints;
598 Standard_Real anAppTol;
599 IntSurf_ListOfPntOn2S aListOfPnts;
600 TCollection_AsciiString aNm("c_"), aNp("p_");
602 anAppTol = 0.0000001;
603 aToApproxC3d = Standard_True;
604 aToApproxC2dOnS1 = Standard_False;
605 aToApproxC2dOnS2 = Standard_False;
608 Standard_Boolean bExtOut = Standard_False;
609 for(Standard_Integer i = 3; i < n; i++)
611 if (!strcasecmp(a[i],"-2d")) {
612 aToApproxC2dOnS1 = Standard_True;
613 aToApproxC2dOnS2 = Standard_True;
615 else if (!strcasecmp(a[i],"-2d1")) {
616 aToApproxC2dOnS1 = Standard_True;
618 else if (!strcasecmp(a[i],"-2d2")) {
619 aToApproxC2dOnS2 = Standard_True;
621 else if (!strcasecmp(a[i],"-p")) {
623 const Standard_Real aU1 = Draw::Atof(a[++i]);
624 const Standard_Real aV1 = Draw::Atof(a[++i]);
625 const Standard_Real aU2 = Draw::Atof(a[++i]);
626 const Standard_Real aV2 = Draw::Atof(a[++i]);
628 aPt.SetValue(aU1, aV1, aU2, aV2);
629 aListOfPnts.Append(aPt);
631 else if (!strcasecmp(a[i],"-v")) {
632 bExtOut = Standard_True;
635 di << "Wrong key.\n";
636 di << "To build 2d curves use one of the following keys: -2d/-2d1/-2d2\n";
637 di << "To add start points use the following key: -p u1 v1 u2 v2\n";
638 di << "For extended output use the following key: -v\n";
643 IntTools_FaceFace aFF;
645 aFF.SetParameters (aToApproxC3d,
649 aFF.SetList(aListOfPnts);
650 aFF.SetFuzzyValue (BOPTest_Objects::FuzzyValue());
652 aFF.Perform (aF1, aF2);
654 anIsDone=aFF.IsDone();
656 di << "Error: Intersection failed\n";
660 aFF.PrepareLines3D(Standard_False);
661 const IntTools_SequenceOfCurves& aSCs=aFF.Lines();
662 const IntTools_SequenceOfPntOn2Faces& aSPs = aFF.Points();
664 aNbCurves = aSCs.Length();
665 aNbPoints = aSPs.Length();
666 if (!aNbCurves && !aNbPoints) {
667 di << " has no 3d curves\n";
668 di << " has no 3d points\n";
674 Standard_Real aTolR = 0.;
676 // find maximal tolerance
677 for (Standard_Integer i = 1; i <= aNbCurves; i++) {
678 const IntTools_Curve& anIC = aSCs(i);
679 if (aTolR < anIC.Tolerance()) {
680 aTolR = anIC.Tolerance();
683 di << "Tolerance Reached=" << aTolR << "\n";
686 di << aNbCurves << " curve(s) found.\n";
688 for (Standard_Integer i=1; i<=aNbCurves; i++) {
689 const IntTools_Curve& anIC=aSCs(i);
691 Handle (Geom_Curve) aC3D = anIC.Curve();
694 di << " has Null 3d curve# " << i << "\n";
698 TCollection_AsciiString anIndx(i), aNmx;
701 Standard_CString nameC = aNmx.ToCString();
703 DrawTrSurf::Set(nameC, aC3D);
706 Handle(Geom2d_Curve) aPC1 = anIC.FirstCurve2d();
707 Handle(Geom2d_Curve) aPC2 = anIC.SecondCurve2d();
709 if (!aPC1.IsNull() || !aPC2.IsNull()) {
712 if (!aPC1.IsNull()) {
713 TCollection_AsciiString pc1N("c2d1_"), pc1Nx;
714 pc1Nx = pc1N + anIndx;
715 Standard_CString nameC2d1 = pc1Nx.ToCString();
717 DrawTrSurf::Set(nameC2d1, aPC1);
721 if (!aPC2.IsNull()) {
722 TCollection_AsciiString pc2N("c2d2_"), pc2Nx;
723 pc2Nx = pc2N + anIndx;
724 Standard_CString nameC2d2 = pc2Nx.ToCString();
726 DrawTrSurf::Set(nameC2d2, aPC2);
728 if (!aPC1.IsNull()) {
737 di << "\nTolerance: " << anIC.Tolerance() << "\n";
738 di << "Tangential tolerance: " << anIC.TangentialTolerance() << "\n";
749 di << aNbPoints << " point(s) found.\n";
751 for (Standard_Integer i = 1; i <= aNbPoints; i++) {
752 const IntTools_PntOn2Faces& aPi = aSPs(i);
753 const gp_Pnt& aP = aPi.P1().Pnt();
755 TCollection_AsciiString anIndx(i), aNmx;
757 Standard_CString nameP = aNmx.ToCString();
759 DrawTrSurf::Set(nameP, aP);
767 //=======================================================================
768 //function : mkvolume
770 //=======================================================================
771 Standard_Integer mkvolume(Draw_Interpretor& di, Standard_Integer n, const char** a)
774 di << "Usage: mkvolume r b1 b2 ... [-c] [-ni] [-ai]\n";
776 di << " -c - use this option if the arguments are compounds\n";
777 di << " containing shapes that should be interfered;\n";
778 di << " -ni - use this option if the arguments should not be interfered;\n";
779 di << " -ai - use this option to avoid internal for solids shapes in the result.\n";
783 const char* usage = "Type mkvolume without arguments for the usage of the command.\n";
785 Standard_Boolean bToIntersect, bRunParallel, bNonDestructive;
786 Standard_Boolean bCompounds, bAvoidInternal;
790 TopTools_ListOfShape aLS;
792 aTol = BOPTest_Objects::FuzzyValue();
793 bRunParallel = BOPTest_Objects::RunParallel();
794 bNonDestructive = BOPTest_Objects::NonDestructive();
795 BOPAlgo_GlueEnum aGlue = BOPTest_Objects::Glue();
797 bToIntersect = Standard_True;
798 bCompounds = Standard_False;
799 bAvoidInternal = Standard_False;
801 for (i = 2; i < n; ++i) {
802 aS = DBRep::Get(a[i]);
807 if (!strcmp(a[i], "-c")) {
808 bCompounds = Standard_True;
810 else if (!strcmp(a[i], "-ni")) {
811 bToIntersect = Standard_False;
813 else if (!strcmp(a[i], "-ai")) {
814 bAvoidInternal = Standard_True;
820 di << "No shapes to process.\n";
825 // treat list of arguments for the case of compounds
826 if (bToIntersect && bCompounds) {
827 TopTools_ListOfShape aLSx;
828 TopTools_ListIteratorOfListOfShape aItLS;
830 aItLS.Initialize(aLS);
831 for (; aItLS.More(); aItLS.Next()) {
832 const TopoDS_Shape& aSx = aItLS.Value();
833 TopoDS_Iterator aItS(aSx);
834 for (; aItS.More(); aItS.Next()) {
835 const TopoDS_Shape& aSxS = aItS.Value();
844 BOPAlgo_MakerVolume aMV;
845 aMV.SetArguments(aLS);
846 aMV.SetIntersect(bToIntersect);
847 aMV.SetRunParallel(bRunParallel);
848 aMV.SetFuzzyValue(aTol);
849 aMV.SetNonDestructive(bNonDestructive);
850 aMV.SetAvoidInternalShapes(bAvoidInternal);
852 aMV.SetUseOBB(BOPTest_Objects::UseOBB());
853 aMV.SetToFillHistory(BRepTest_Objects::IsHistoryNeeded());
856 BOPTest::ReportAlerts(aMV.GetReport());
858 // Store the history of Volume Maker into the session
859 if (BRepTest_Objects::IsHistoryNeeded())
860 BRepTest_Objects::SetHistory(aLS, aMV);
862 if (aMV.HasErrors()) {
866 const TopoDS_Shape& aR = aMV.Shape();
868 DBRep::Set(a[1], aR);