if (anAIS.IsNull())
return;
- Quantity_Color aColor = anAIS->Color();
+ Quantity_Color aColor;
+ anAIS->Color(aColor);
theR = (int)(aColor.Red()*255.);
theG = (int)(aColor.Green()*255.);
theB = (int)(aColor.Blue()*255.);
// Building and getting result.
aBuilder->Perform();
+#ifdef USE_OCCT_720
+ if (aBuilder->HasErrors())
+ return;
+#else
if(aBuilder->ErrorStatus() != 0) {
return;
}
+#endif
TopoDS_Shape aResult = aBuilder->Shape();
if(aResult.ShapeType() == TopAbs_COMPOUND) {
// Building and getting result.
anOperation->Perform();
+#ifdef USE_OCCT_720
+ if (anOperation->HasErrors())
+ return;
+#else
if(anOperation->ErrorStatus() != 0) {
return;
}
+#endif
TopoDS_Shape aResult = anOperation->Shape();
if(aResult.ShapeType() == TopAbs_COMPOUND) {
}
aPaveFiller.SetArguments(aListOfShape);
aPaveFiller.Perform();
+#ifdef USE_OCCT_720
+ if (aPaveFiller.HasErrors())
+ return;
+#else
Standard_Integer iErr = aPaveFiller.ErrorStatus();
if(iErr) {
return;
}
+#endif
BOPAlgo_Builder* aBuilder = new BOPAlgo_Builder();
this->setImpl(aBuilder);
this->setBuilderType(OCCT_BOPAlgo_Builder);
aBuilder->SetArguments(aListOfShape);
aBuilder->PerformWithFiller(aPaveFiller);
+#ifdef USE_OCCT_720
+ if (aBuilder->HasErrors())
+ return;
+#else
iErr = aBuilder->ErrorStatus();
if(iErr) {
return;
}
+#endif
TopoDS_Shape aResult = aBuilder->Shape();
if(aResult.ShapeType() == TopAbs_COMPOUND) {
}
aBOP.Perform();
+#ifdef USE_OCCT_720
+ if (aBOP.HasErrors())
+ return;
+#else
if (aBOP.ErrorStatus())
return;
+#endif
// Collect splits
const TopTools_ListOfShape& aSplits = aBOP.Modified(aBaseEdge);
}
aBOP.Perform();
+#ifdef USE_OCCT_720
+ if (aBOP.HasErrors())
+ return;
+#else
if (aBOP.ErrorStatus())
return;
+#endif
// Collect splits
const TopTools_ListOfShape& aSplits = aBOP.Modified(aBaseEdge);
aBB.AddArgument(anEdge);
}
aBB.Perform();
+#ifdef USE_OCCT_720
+ if (aBB.HasErrors())
+ return;
+#else
if (aBB.ErrorStatus())
return;
-
+#endif
// Collect faces
TopTools_ListOfShape anAreas = aBB.Modified(aPlnFace);
sortFaces(anAreas, theFeatures); // sort faces by the edges in them
//=======================================================================
void GEOMAlgo_Splitter::BuildResult(const TopAbs_ShapeEnum theType)
{
+#ifndef USE_OCCT_720
myErrorStatus=0;
+#endif
//
TopAbs_ShapeEnum aType;
BRep_Builder aBB;
Handle(Graphic3d_AspectMarker3d) anAspect;
Handle(Prs3d_Drawer) aDrawer = theAIS->HilightAttributes();
+#ifdef USE_OCCT_720
+ // to do: implement ball highlighting, in 7.2.0 this drawer is NULL
+#else
if(aDrawer->HasOwnPointAspect()) {
Handle(Prs3d_PointAspect) aPntAspect = aDrawer->PointAspect();
if(aPixMap->IsEmpty()) {
aDrawer->SetPointAspect(aPntAspect);
theAIS->SetHilightAttributes(aDrawer);
}
+#endif
}
} // namespace ModuleBase_Tools
const Prs3d_DatumParts& aPart = aTrOwner->DatumPart();
if (aPart >= Prs3d_DP_XAxis && aPart <= Prs3d_DP_ZAxis)
{
+#ifdef USE_OCCT_720
+ gp_Ax2 anAxis = aTrihedron->Component()->Ax2();
+ gp_Dir aDir = anAxis.XDirection();
+ gp_Lin aLine(aTrihedron->Component()->Location(), aDir);
+ return aPlane.Contains(aLine, Precision::Confusion(), Precision::Angular());
+#else
Handle(Prs3d_Drawer) aDrawer = aTrihedron->Attributes();
Handle(Prs3d_DatumAspect) aDatumAspect = aDrawer->DatumAspect();
Handle(Graphic3d_ArrayOfPrimitives) aPrimitives =
gp_Pnt aPnt2(aX2, anY2, aZ2);
gp_Lin aLine(aPnt1, gp_Dir(gp_Vec(aPnt1, aPnt2)));
return aPlane.Contains(aLine, Precision::Confusion(), Precision::Angular());
+#endif
}
}
}
#include <AIS_InteractiveObject.hxx>
#include <StdSelect_BRepOwner.hxx>
#include <SelectMgr_IndexedMapOfOwner.hxx>
+#include <V3d_Coordinate.hxx>
#include <QMouseEvent>
void SketcherPrs_Coincident::SetColor(const Quantity_Color &aCol)
{
hasOwnColor=Standard_True;
+#ifndef USE_OCCT_720
myOwnColor=aCol;
+#endif
}
void SketcherPrs_Coincident::SetCustomColor(const std::vector<int>& theColor)
} else {
deactivateTrihedron(false);
- aContext->Erase(aTrihedron);
+ aContext->Erase(aTrihedron, Standard_True);
#ifdef TINSPECTOR
if (getCallBack()) getCallBack()->Remove(aTrihedron);
#endif