#include "GeomAPI_Cone.h"
#include "GeomAPI_Torus.h"
+#include <Basics_OCCTVersion.hxx>
+
#include <Bnd_Box2d.hxx>
#include <BndLib_Add2dCurve.hxx>
#include <BOPTools_AlgoTools.hxx>
#include <Geom_SurfaceOfRevolution.hxx>
#include <Geom_SweptSurface.hxx>
#include <Geom_ToroidalSurface.hxx>
-#include <GeomAdaptor_HSurface.hxx>
#include <GeomAPI_ExtremaCurveCurve.hxx>
#include <GeomLib_IsPlanarSurface.hxx>
#include <IntPatch_ImpImpIntersection.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Face.hxx>
+#if OCC_VERSION_LARGE < 0x07070000
+#include <GeomAdaptor_HSurface.hxx>
+#else
+#include <GeomAdaptor_Surface.hxx>
+#endif
+
#include <gp_Sphere.hxx>
#include <gp_Cylinder.hxx>
#include <gp_Cone.hxx>
if (anOwnSurf->IsKind(STANDARD_TYPE(Geom_ElementarySurface)) &&
anOtherSurf->IsKind(STANDARD_TYPE(Geom_ElementarySurface)))
{
+#if OCC_VERSION_LARGE < 0x07070000
Handle(GeomAdaptor_HSurface) aGA1 = new GeomAdaptor_HSurface(anOwnSurf);
Handle(GeomAdaptor_HSurface) aGA2 = new GeomAdaptor_HSurface(anOtherSurf);
+#else
+ Handle(GeomAdaptor_Surface) aGA1 = new GeomAdaptor_Surface(anOwnSurf);
+ Handle(GeomAdaptor_Surface) aGA2 = new GeomAdaptor_Surface(anOtherSurf);
+#endif
Handle(BRepTopAdaptor_TopolTool) aTT1 = new BRepTopAdaptor_TopolTool();
Handle(BRepTopAdaptor_TopolTool) aTT2 = new BRepTopAdaptor_TopolTool();
#include "GeomAlgoAPI_SketchBuilder.h"
+#include <Basics_OCCTVersion.hxx>
+
#include <GeomAPI_Ax1.h>
#include <GeomAPI_Edge.h>
#include <GeomAPI_Dir.h>
#include <Geom_Plane.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
+#if OCC_VERSION_LARGE < 0x07070000
#include <GeomAdaptor_HCurve.hxx>
+#else
+#include <GeomAdaptor_Curve.hxx>
+#endif
#include <GeomAPI_ProjectPointOnCurve.hxx>
#include <GeomAPI_ShapeIterator.h>
static const int THE_MAX_INTERVALS = 32;
double aFirst, aLast;
Handle(Geom_Curve) aCurve = BRep_Tool::Curve(aNewEdge, aFirst, aLast);
+#if OCC_VERSION_LARGE < 0x07070000
Handle(GeomAdaptor_HCurve) aHCurve = new GeomAdaptor_HCurve(aCurve);
+#else
+ Handle(GeomAdaptor_Curve) aHCurve = new GeomAdaptor_Curve(aCurve);
+#endif
Approx_CurvilinearParameter anApprox(aHCurve, Precision::Confusion(), aCurve->Continuity(),
THE_MAX_DEGREE, THE_MAX_INTERVALS);
if (anApprox.HasResult()) {
//function : PostTreat
//purpose :
//=======================================================================
+#if OCC_VERSION_LARGE < 0x07070000
void GEOMAlgo_Splitter::PostTreat()
+#else
+void GEOMAlgo_Splitter::PostTreat(const Message_ProgressRange& theRange)
+#endif
{
if (myLimit!=TopAbs_SHAPE) {
Standard_Integer i, aNbS;
myShape=aLS.First();
}
//
+#if OCC_VERSION_LARGE < 0x07070000
BOPAlgo_Builder::PostTreat();
+#else
+ BOPAlgo_Builder::PostTreat(theRange);
+#endif
}
//=======================================================================
//function : TreatCompound
#include <BOPAlgo_Builder.hxx>
+#include <Basics_OCCTVersion.hxx>
+
//=======================================================================
//class : GEOMAlgo_Splitter
//purpose :
GEOMALGOIMPL_EXPORT virtual void BuildResult(const TopAbs_ShapeEnum theType);
/// Post processing of the calculation
+#if OCC_VERSION_LARGE < 0x07070000
GEOMALGOIMPL_EXPORT virtual void PostTreat();
+#else
+ GEOMALGOIMPL_EXPORT virtual void PostTreat(const Message_ProgressRange& theRange);
+#endif
protected:
/// List of tools
#include <ModelGeomAlgo_Point2D.h>
#include <SUIT_ResourceMgr.h>
+#include <Basics_OCCTVersion.hxx>
+
#ifdef HAVE_SALOME
#include <SUIT_Application.h>
#include <SUIT_Session.h>
anAspect = aPntAspect->Aspect();
anAspect->SetType(Aspect_TOM_BALL);
} else {
+#if OCC_VERSION_LARGE < 0x07070000
if(aPixMap->Format() == Image_PixMap::ImgGray) {
aPixMap->SetFormat (Image_PixMap::ImgAlpha);
} else if(aPixMap->Format() == Image_PixMap::ImgGrayF) {
aPixMap->SetFormat (Image_PixMap::ImgAlphaF);
}
+#else
+ if(aPixMap->Format() == Image_Format_Gray) {
+ aPixMap->SetFormat (Image_Format_Alpha);
+ } else if(aPixMap->Format() == Image_Format_GrayF) {
+ aPixMap->SetFormat (Image_Format_AlphaF);
+ }
+#endif
anAspect = new Graphic3d_AspectMarker3d(aPixMap);
aPntAspect->SetAspect(anAspect);
}
#include <TopoDS_Vertex.hxx>
#include <TopExp_Explorer.hxx>
#include <Graphic3d_Text.hxx>
-
+#include <Graphic3d_AspectText3d.hxx>
IMPLEMENT_STANDARD_RTTIEXT(PartSet_FieldStepPrs, ViewerData_AISShape);
if (!triangulation.IsNull() && triangulation->HasUVNodes()) {
gp_XY C(0, 0);
double A = 0;
- const TColgp_Array1OfPnt2d& uvArray = triangulation->UVNodes();
- const Poly_Array1OfTriangle& trias = triangulation->Triangles();
int n1, n2, n3;
- for (int iT = trias.Lower(); iT <= trias.Upper(); ++iT) {
- trias(iT).Get(n1, n2, n3);
- const gp_Pnt2d& uv1 = uvArray(n1);
- const gp_Pnt2d& uv2 = uvArray(n2);
- const gp_Pnt2d& uv3 = uvArray(n3);
+ for (int iT = 1; iT <= triangulation->NbTriangles(); ++iT) {
+ triangulation->Triangle(iT).Get(n1, n2, n3);
+ const gp_Pnt2d& uv1 = triangulation->UVNode(n1);
+ const gp_Pnt2d& uv2 = triangulation->UVNode(n2);
+ const gp_Pnt2d& uv3 = triangulation->UVNode(n3);
double a = 0.5 * sqrt((uv1.X() - uv3.X()) * (uv2.Y() - uv1.Y()) -
(uv1.X() - uv2.X()) * (uv3.Y() - uv1.Y()));
C += (uv1.XY() + uv2.XY() + uv3.XY()) / 3. * a;
#include <SUIT_ResourceMgr.h>
+#include <Basics_OCCTVersion.hxx>
+
#define FEATURE_ITEM_COLOR "0,0,225"
//aPixmap = OCCViewer_Utilities::imageToPixmap( px.toImage());
Handle(Image_PixMap) aPixmap = new Image_PixMap();
+#if OCC_VERSION_LARGE < 0x07070000
aPixmap->InitTrash(Image_PixMap::ImgBGRA, aWidth, aHeight);
+#else
+ aPixmap->InitTrash(Image_Format_BGRA, aWidth, aHeight);
+#endif
std::list<unsigned char>::iterator aByteIter = aByteList.begin();
for (int aLine = 0; aLine < aHeight; ++aLine) {
// convert pixels from ARGB to renderer-compatible RGBA
#include <AIS_InteractiveObject.hxx>
#include <StdSelect_BRepOwner.hxx>
#include <SelectMgr_IndexedMapOfOwner.hxx>
-#include <V3d_Coordinate.hxx>
#include <QMouseEvent>
if (theView.IsNull())
return gp_Pnt();
- V3d_Coordinate XAt, YAt, ZAt;
+ Standard_Real XAt, YAt, ZAt;
theView->At(XAt, YAt, ZAt);
gp_Pnt AtPoint(XAt, YAt, ZAt);
gp_Vec aVec(anOriginPnt, thePoint);
if (!theView.IsNull()) {
- V3d_Coordinate XEye, YEye, ZEye, XAt, YAt, ZAt;
+ Standard_Real XEye, YEye, ZEye, XAt, YAt, ZAt;
theView->Eye(XEye, YEye, ZEye);
theView->At(XAt, YAt, ZAt);