if(Tr.IsNull())
MESSAGE("Error, null layer" );
nbNodes = Tr->NbNodes();
- const TColgp_Array1OfPnt& Nodes = Tr->Nodes();
// Calcul des dimensions de la boite englobante du solide
for(i=1;i<=nbNodes;i++)
{
- InitPoint = Nodes(i).Transformed(L.Transformation());
+ InitPoint = Tr->Node(i).Transformed(L.Transformation());
if(InitPoint.X() < Xmin)
Xmin = InitPoint.X();
if(InitPoint.X() > Xmax)
Standard_Real Volume=0;
Standard_Real Determinant=0;
gp_Pnt P[3];
-
+
// Projection du point d'initialisation sur le plan de section
-
+
InitPoint.SetZ(Elevation);
for (ex.Init(myShape, TopAbs_FACE); ex.More(); ex.Next())
Handle(Poly_Triangulation) Tr = BRep_Tool::Triangulation(F, L);
if(Tr.IsNull())
MESSAGE("Error, null layer" );
- const Poly_Array1OfTriangle& triangles = Tr->Triangles();
Standard_Integer nbTriangles = Tr->NbTriangles();
- //nbNodes = Tr->NbNodes();
- const TColgp_Array1OfPnt& Nodes = Tr->Nodes();
-
+
// Calcul des volumes de chaque triangle, de chaque face
// en tenant compte des triangles coupes par le plan de section
-
- for (i=1;i<=nbTriangles;i++)
+
+ for (i=1;i<=nbTriangles;i++)
{
Determinant=0;
//Gardons la meme orientation des noeuds
if (F.Orientation() == TopAbs_REVERSED)
- triangles(i).Get(noeud[0], noeud[2], noeud[1]);
+ Tr->Triangle(i).Get(noeud[0], noeud[2], noeud[1]);
else
- triangles(i).Get(noeud[0], noeud[1], noeud[2]);
+ Tr->Triangle(i).Get(noeud[0], noeud[1], noeud[2]);
- P[0] = Nodes(noeud[0]).Transformed(L.Transformation());
+ P[0] = Tr->Node(noeud[0]).Transformed(L.Transformation());
z[0] = P[0].Z();
- P[1] = Nodes(noeud[1]).Transformed(L.Transformation());
+ P[1] = Tr->Node(noeud[1]).Transformed(L.Transformation());
z[1] = P[1].Z();
- P[2] = Nodes(noeud[2]).Transformed(L.Transformation());
+ P[2] = Tr->Node(noeud[2]).Transformed(L.Transformation());
z[2] = P[2].Z();
// Determination des cas aux limites pour les triangles
#include <TColgp_SequenceOfXYZ.hxx>
#include <TColStd_Array1OfInteger.hxx>
+#include <Basics_OCCTVersion.hxx>
+
+#if OCC_VERSION_LARGE < 0x07070000
#include <BRepAdaptor_HSurface.hxx>
+#else
+#include <BRepAdaptor_Surface.hxx>
+#endif
#include <BRep_Builder.hxx>
#include <BRepGProp.hxx>
GeomPlate_BuildPlateSurface aBuilder(3,10);
// ** Initialization of surface
+#if OCC_VERSION_LARGE < 0x07070000
Handle(BRepAdaptor_HSurface) HSI = new BRepAdaptor_HSurface();
HSI->ChangeSurface().Initialize(aInitShape);
aBuilder.LoadInitSurface( BRep_Tool::Surface(HSI->ChangeSurface().Face()));
+#else
+ Handle(BRepAdaptor_Surface) HSI = new BRepAdaptor_Surface();
+ HSI->Initialize(aInitShape);
+ aBuilder.LoadInitSurface( BRep_Tool::Surface(HSI->Face()) );
+#endif
Standard_Integer j, j1, j2;
// cout << "Init surface" << endl;
#include <TColGeom_HArray2OfSurface.hxx>
+#if OCC_VERSION_LARGE < 0x07070000
#include <GeomAdaptor_HSurface.hxx>
-#include <GeomLib_IsPlanarSurface.hxx>
+#else
+#include <GeomAdaptor_Surface.hxx>
+#endif
+#include <GeomLib_IsPlanarSurface.hxx>
#include <Geom_Surface.hxx>
#include <Geom_Plane.hxx>
#include <Geom_OffsetSurface.hxx>
#include <Geom_SurfaceOfLinearExtrusion.hxx>
#include <Geom_RectangularTrimmedSurface.hxx>
#include <BRepAdaptor_Surface.hxx>
+#if OCC_VERSION_LARGE < 0x07070000
#include <BRepAdaptor_HSurface.hxx>
+#endif
#include <LocalAnalysis_SurfaceContinuity.hxx>
#include <GeomConvert_ApproxSurface.hxx>
#include <Bnd_Box.hxx>
// Computation of the number of samples on the edge.
BRepAdaptor_Surface aBAS(theFace);
+#if OCC_VERSION_LARGE < 0x07070000
Handle(BRepAdaptor_HSurface) aBAHS = new BRepAdaptor_HSurface(aBAS);
+#else
+ Handle(BRepAdaptor_Surface) aBAHS = new BRepAdaptor_Surface(aBAS);
+#endif
Handle(BRepTopAdaptor_TopolTool) aTool = new BRepTopAdaptor_TopolTool(aBAHS);
Standard_Integer aNbSamples = aTool->NbSamples();
const Standard_Integer aNbSamplesMax = 23;
if (S1->IsKind(STANDARD_TYPE(Geom_ElementarySurface)) &&
S2->IsKind(STANDARD_TYPE(Geom_ElementarySurface)))
{
+#if OCC_VERSION_LARGE < 0x07070000
Handle(GeomAdaptor_HSurface) aGA1 = new GeomAdaptor_HSurface(S1);
Handle(GeomAdaptor_HSurface) aGA2 = new GeomAdaptor_HSurface(S2);
+#else
+ Handle(GeomAdaptor_Surface) aGA1 = new GeomAdaptor_Surface(S1);
+ Handle(GeomAdaptor_Surface) aGA2 = new GeomAdaptor_Surface(S2);
+#endif
Handle(BRepTopAdaptor_TopolTool) aTT1 = new BRepTopAdaptor_TopolTool();
Handle(BRepTopAdaptor_TopolTool) aTT2 = new BRepTopAdaptor_TopolTool();
asp->Aspect()->SetTextZoomable(aZoomable);
asp->Aspect()->SetTextAngle(aAngle);
asp->Aspect()->SetTextFontAspect(aFontAspect);
- Prs3d_Text::Draw(aPresentation, asp, aText, aPosition); // todo: deprecated OCCT API
+ Prs3d_Text::Draw(aPresentation->CurrentGroup(), asp, aText, aPosition);
}
bool isSame (double d1, double d2)
}
//
const gp_Trsf& aTrsf=aLoc.Transformation();
- const Poly_Array1OfTriangle& aTrs=aTRF->Triangles();
- const TColgp_Array1OfPnt& aNodes=aTRF->Nodes();
//
// map link/nbtriangles
- j1=aTrs.Lower();
- j2=aTrs.Upper();
+ j1 = 1;
+ j2 = aTRF->NbTriangles();
for (j=j1; j<=j2; ++j) {
- const Poly_Triangle& aTr=aTrs(j);
+ const Poly_Triangle& aTr = aTRF->Triangle(j);
aTr.Get(n[0], n[1], n[2]);
n[3]=n[0];
for (k=0; k<3; ++k) {
}
//
// inner nodes=all_nodes - boundary_nodes
- j1=aNodes.Lower();
- j2=aNodes.Upper();
+ j1=1;
+ j2=aTRF->NbNodes();
for (j=j1; j<=j2; ++j) {
if (!aMBN.Contains(j)) {
- aP=aNodes(j).Transformed(aTrsf);
+ aP=aTRF->Node(j).Transformed(aTrsf);
aLP.Append(aP);
}
}
}
else {
const gp_Trsf& aTrsf=aLoc.Transformation();
- const TColgp_Array1OfPnt& aNodes=aTRE->Nodes();
//
aNbNodes=aPTE->NbNodes();
const TColStd_Array1OfInteger& aInds=aPTE->Nodes();
for (j=2; j<aNbNodes; ++j) {
aIndex=aInds(j);
- aP=aNodes(aIndex).Transformed(aTrsf);
+ aP=aTRE->Node(aIndex).Transformed(aTrsf);
aLP.Append(aP);
}
}
#include <BOPAlgo_Builder.hxx>
#include <GEOMAlgo_AlgoTools.hxx>
+
+#include <Basics_OCCTVersion.hxx>
+
/////////////////////////////////////////////////////////////////////////
//=======================================================================
//class : GEOMAlgo_ShellSolidBuilder
protected:
Standard_EXPORT
+#if OCC_VERSION_LARGE < 0x07070000
virtual void PerformInternal(const BOPAlgo_PaveFiller& theFiller);
+#else
+ virtual void PerformInternal(const BOPAlgo_PaveFiller& theFiller,
+ const Message_ProgressRange& theRange);
+#endif
};
//=======================================================================
//function : PerformInternal
//purpose :
//=======================================================================
+#if OCC_VERSION_LARGE < 0x07070000
void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFiller)
+#else
+void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFiller,
+ const Message_ProgressRange& theRange)
+#endif
{
- //
myPaveFiller=(BOPAlgo_PaveFiller*)&theFiller;
myDS=myPaveFiller->PDS();
myContext=myPaveFiller->Context();
if (HasErrors()) {
return;
}
+
+#if OCC_VERSION_LARGE >= 0x07070000
+ Message_ProgressScope aPS(theRange, "Building the result of Boolean operation", 100);
//
+ BOPAlgo_PISteps aSteps (PIOperation_Last);
+ analyzeProgress (100, aSteps);
+#endif
+
// 3. Fill Images
// 3.1 Vertice
+#if OCC_VERSION_LARGE < 0x07070000
FillImagesVertices();
+#else
+ FillImagesVertices(aPS.Next(aSteps.GetStep(PIOperation_TreatVertices)));
+#endif
if (HasErrors()) {
return;
}
return;
}
// 3.2 Edges
+#if OCC_VERSION_LARGE < 0x07070000
FillImagesEdges();
+#else
+ FillImagesEdges(aPS.Next(aSteps.GetStep(PIOperation_TreatEdges)));
+#endif
if (HasErrors()) {
return;
}
}
//
// 3.3 Wires
+#if OCC_VERSION_LARGE < 0x07070000
FillImagesContainers(TopAbs_WIRE);
+#else
+ FillImagesContainers(TopAbs_WIRE, aPS.Next(aSteps.GetStep(PIOperation_TreatWires)));
+#endif
if (HasErrors()) {
return;
}
}
// 3.4 Faces
+#if OCC_VERSION_LARGE < 0x07070000
FillImagesFaces();
+#else
+ FillImagesFaces(aPS.Next(aSteps.GetStep(PIOperation_TreatFaces)));
+#endif
if (HasErrors()) {
return;
}
//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 :
virtual void BuildResult(const TopAbs_ShapeEnum theType);
Standard_EXPORT
+#if OCC_VERSION_LARGE < 0x07070000
virtual void PostTreat();
+#else
+ virtual void PostTreat(const Message_ProgressRange& theRange);
+#endif
protected:
TopTools_ListOfShape myTools;
#include <TColStd_HSequenceOfTransient.hxx>
#include <TColStd_HArray1OfExtendedString.hxx>
+#include <gp_Cone.hxx>
+#include <gp_Cylinder.hxx>
+#include <gp_Pln.hxx>
+#include <gp_Sphere.hxx>
+#include <gp_Circ.hxx>
+#include <gp_Elips.hxx>
+#include <gp_Lin.hxx>
+
#include <vector>
class GEOM_Object;
#include <GEOMUtils.hxx>
+#include <Basics_OCCTVersion.hxx>
+
#include <ShapeAnalysis_FreeBounds.hxx>
#include <ShapeAnalysis_Edge.hxx>
#include <ShapeFix_Face.hxx>
#include <Geom_Conic.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom_BSplineSurface.hxx>
+#if OCC_VERSION_LARGE < 0x07070000
#include <GeomAdaptor_HCurve.hxx>
+#else
+#include <GeomAdaptor_Curve.hxx>
+#endif
#include <GeomFill_BSplineCurves.hxx>
#include <GeomConvert_ApproxCurve.hxx>
#include <GeomConvert.hxx>
Standard_Real fpar, lpar;
Handle(Geom_Curve) aCurve = BRep_Tool::Curve(anEdge, fpar, lpar);
GeomAdaptor_Curve GAcurve(aCurve, fpar, lpar);
+#if OCC_VERSION_LARGE < 0x07070000
Handle(GeomAdaptor_HCurve) GAHcurve = new GeomAdaptor_HCurve(GAcurve);
+#else
+ Handle(GeomAdaptor_Curve) GAHcurve = new GeomAdaptor_Curve(GAcurve);
+#endif
Handle(GeomFill_CorrectedFrenet) aCorrFrenet = new GeomFill_CorrectedFrenet(Standard_True); //for evaluation
aCorrFrenet->SetCurve(GAHcurve);
#include <GEOMImpl_ProjectionDriver.hxx>
+#include <Basics_OCCTVersion.hxx>
+
#include <GEOMImpl_IMirror.hxx>
#include <GEOMImpl_IProjection.hxx>
#include <GEOMImpl_IProjOnCyl.hxx>
#include <GEOMImpl_Types.hxx>
#include <GEOM_Function.hxx>
#include <GEOMUtils.hxx>
+
+#if OCC_VERSION_LARGE < 0x07070000
#include <GEOMUtils_HTrsfCurve2d.hxx>
+#else
+#include <GEOMUtils_TrsfCurve2d.hxx>
+#endif
#include <Approx_Curve2d.hxx>
#include <Bnd_Box2d.hxx>
}
// Transform the curve to cylinder's parametric space.
+#if OCC_VERSION_LARGE < 0x07070000
Handle(GEOMUtils::HTrsfCurve2d) aTrsfCurve =
new GEOMUtils::HTrsfCurve2d(aCurve, aPar[0], aPar[1], aTrsf2d);
- Approx_Curve2d aConv (aTrsfCurve, aPar[0], aPar[1],
- aUResol, aVResol, GeomAbs_C1,
- 9, 1000);
+#else
+ Handle(GEOMUtils::TrsfCurve2d) aTrsfCurve =
+ new GEOMUtils::TrsfCurve2d(aCurve, aPar[0], aPar[1], aTrsf2d);
+#endif
+
+ Approx_Curve2d aConv (aTrsfCurve, aPar[0], aPar[1],
+ aUResol, aVResol, GeomAbs_C1,
+ 9, 1000);
if (!aConv.IsDone() && !aConv.HasResult()) {
return aResult;
#include <sstream>
#include <algorithm>
-#include <V3d_Coordinate.hxx>
-
#include <Standard_Failure.hxx>
#include <Standard_NullObject.hxx>
#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC
// inside V3d_View::FitMinMax() method. It's by occt design.
// So, we should use camera direction instead.
- V3d_Coordinate XAt, YAt, ZAt;
+ Standard_Real XAt, YAt, ZAt;
aView->At(XAt, YAt, ZAt);
gp_Pnt AtPoint(XAt, YAt, ZAt);
//
+#include <Basics_OCCTVersion.hxx>
+
+#if OCC_VERSION_LARGE < 0x07070000
+
#include <GEOMUtils_HTrsfCurve2d.hxx>
namespace GEOMUtils {
: myCurve (theCurve, theUFirst, theULast, theTrsf)
{
}
+
+#endif
#define _GEOMUtils_HTrsfCurve2d_HXX_
+#include <Basics_OCCTVersion.hxx>
+
+#if OCC_VERSION_LARGE < 0x07070000
+
#include <GEOMUtils_TrsfCurve2d.hxx>
#include <Adaptor2d_HCurve2d.hxx>
}
#endif
+
+#endif
#include <GEOMUtils_TrsfCurve2d.hxx>
+
+#include <Geom2d_BezierCurve.hxx>
+#include <Geom2d_BSplineCurve.hxx>
+
+#if OCC_VERSION_LARGE < 0x07070000
#include <GEOMUtils_HTrsfCurve2d.hxx>
+#else
+IMPLEMENT_STANDARD_RTTIEXT(GEOMUtils::TrsfCurve2d, Adaptor2d_Curve2d)
+#endif
//=======================================================================
//function : TrsfCurve2d
//function : Trim
//purpose :
//=======================================================================
+#if OCC_VERSION_LARGE < 0x07070000
Handle(Adaptor2d_HCurve2d) GEOMUtils::TrsfCurve2d::Trim
(const Standard_Real First, const Standard_Real Last,
const Standard_Real /*Tol*/) const
return aAHCurve;
}
+#else
+Handle(Adaptor2d_Curve2d) GEOMUtils::TrsfCurve2d::Trim
+ (const Standard_Real First, const Standard_Real Last,
+ const Standard_Real /*Tol*/) const
+{
+ Handle(Geom2d_Curve) aCurve = myCurve.Curve();
+ Handle(GEOMUtils::TrsfCurve2d) aAHCurve =
+ new GEOMUtils::TrsfCurve2d(aCurve, First, Last, myTrsf);
+
+ return aAHCurve;
+}
+#endif
//=======================================================================
//function : IsClosed
#include <TColStd_HArray1OfReal.hxx>
#include <TopoDS_Face.hxx>
+#include <Basics_OCCTVersion.hxx>
+
namespace GEOMUtils
{
*/
class TrsfCurve2d : public Adaptor2d_Curve2d
{
+#if OCC_VERSION_LARGE >= 0x07070000
+ DEFINE_STANDARD_RTTIEXT(TrsfCurve2d, Adaptor2d_Curve2d)
+#endif
public:
/**
* Redefined method from the base class.
*/
+#if OCC_VERSION_LARGE < 0x07070000
Standard_EXPORT Handle(Adaptor2d_HCurve2d) Trim
+#else
+ Standard_EXPORT Handle(Adaptor2d_Curve2d) Trim
+#endif
(const Standard_Real First, const Standard_Real Last,
const Standard_Real ) const;
Trsf2d myTrsf;
};
+
+#if OCC_VERSION_LARGE >= 0x07070000
+ DEFINE_STANDARD_HANDLE(TrsfCurve2d, Adaptor2d_Curve2d)
+#endif
+
}
#endif
#include <Geom_Line.hxx>
#include <Geom_Plane.hxx>
#include <NCollection_Sequence.hxx>
-#include <Quantity_Length.hxx>
//=================================================================================
// function : Constructor
{
gp_XY C( 0, 0 );
double A = 0;
- const TColgp_Array1OfPnt2d& uvArray = triangulation->UVNodes();
- const Poly_Array1OfTriangle& trias = triangulation->Triangles();
Standard_Integer n1,n2,n3;
- for ( int iT = trias.Lower(); iT <= trias.Upper(); ++iT )
+ for ( int iT = 1; iT <= triangulation->NbTriangles(); ++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 );
+ 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;
const OpenGl_Aspects* anAspect = theWorkspace->Aspects();
// getting string size will also initialize font library
-#if OCC_VERSION_LARGE >= 0x07040000
+#if OCC_VERSION_LARGE >= 0x07070000
+ Font_Hinting aFH = theWorkspace->View()->RenderingParams().FontHinting;
myTextDraw->StringSize( aContext,
- myText, *anAspect, myTextParams->Height(), aDPI,
+ myText, *anAspect, myTextParams->Height(), aDPI, aFH,
myTextSize.x, myTextSize.a, myTextSize.d );
#else
myTextDraw->StringSize( aContext,
- myText, *anAspect, myTextParams, aDPI,
+ myText, *anAspect, myTextParams->Height(), aDPI,
myTextSize.x, myTextSize.a, myTextSize.d );
#endif
myTextDPI = aDPI;
myTextSize.y = myTextSize.a - myTextSize.d;
-# if OCC_VERSION_LARGE >= 0x07040000
switch ( myTextParams->HorizontalAlignment() )
-#else
- switch (myTextParams.HAlign)
-#endif
{
case Graphic3d_HTA_LEFT: myTextUnderline.x() = 0.f; break;
case Graphic3d_HTA_CENTER: myTextUnderline.x() = -myTextSize.x / 2.f; break;
break;
}
-# if OCC_VERSION_LARGE >= 0x07040000
switch ( myTextParams->VerticalAlignment() )
-#else
- switch (myTextParams.VAlign)
-#endif
{
case Graphic3d_VTA_TOPFIRSTLINE:
case Graphic3d_VTA_TOP: myTextUnderline.y() = -myTextSize.y; break;
#include <GEOMUtils_Hatcher.hxx>
+#include <Basics_OCCTVersion.hxx>
+
// VTK Includes
#include <vtkPoints.h>
#include <vtkCellArray.h>
#include <vtkInformationVector.h>
// OpenCASCADE Includes
+#if OCC_VERSION_LARGE < 0x07070000
#include <Adaptor3d_HCurve.hxx>
+#else
+#include <Adaptor3d_Curve.hxx>
+#endif
#include <Poly_Triangulation.hxx>
#include <Poly_Polygon3D.hxx>
#include <Poly_PolygonOnTriangulation.hxx>
} else {
nbnodes = aEdgePoly->NbNodes();
const TColStd_Array1OfInteger& Nodesidx = aEdgePoly->Nodes();
- const TColgp_Array1OfPnt& theNodesPoly = T->Nodes();
- aP1 = theNodesPoly(1);
- aP2 = theNodesPoly(nbnodes);
+ aP1 = T->Node(1);
+ aP2 = T->Node(nbnodes);
float coord[3];
vtkIdType pts[2];
Standard_Integer id1 = Nodesidx(j);
Standard_Integer id2 = Nodesidx(j+1);
- gp_Pnt pt1 = theNodesPoly(id1);
- gp_Pnt pt2 = theNodesPoly(id2);
+ gp_Pnt pt1 = T->Node(id1);
+ gp_Pnt pt2 = T->Node(id2);
if(!isidtrsf) {
// apply edge transformation
Standard_Integer nbNodesInFace = aPoly->NbNodes();
Standard_Integer nbTriInFace = aPoly->NbTriangles();
-
- const Poly_Array1OfTriangle& Triangles = aPoly->Triangles();
- const TColgp_Array1OfPnt& Nodes = aPoly->Nodes();
Standard_Integer i;
for(i=1;i<=nbNodesInFace;i++) {
- gp_Pnt P = Nodes(i);
+ gp_Pnt P = aPoly->Node(i);
float coord[3];
if(!identity) P.Transform(myTransf);
coord[0] = P.X(); coord[1] = P.Y(); coord[2] = P.Z();
// Get the triangle
Standard_Integer N1,N2,N3;
- Triangles(i).Get(N1,N2,N3);
+ aPoly->Triangle(i).Get(N1,N2,N3);
vtkIdType pts[3];
pts[0] = N1-1; pts[1] = N2-1; pts[2] = N3-1;
} else {
Standard_Integer aNbNodes = aEdgePoly->NbNodes();
const TColStd_Array1OfInteger& aNodeIds = aEdgePoly->Nodes();
- const TColgp_Array1OfPnt& anId2Pnts = T->Nodes();
- aP1 = anId2Pnts(aNodeIds(1));
- aP2 = anId2Pnts(aNodeIds(aNbNodes));
+ aP1 = T->Node(aNodeIds(1));
+ aP2 = T->Node(aNodeIds(aNbNodes));
for(int j = 1; j < aNbNodes; j++) {
Standard_Integer id1 = aNodeIds(j);
Standard_Integer id2 = aNodeIds(j+1);
- gp_Pnt pt1 = anId2Pnts(id1);
- gp_Pnt pt2 = anId2Pnts(id2);
+ gp_Pnt pt1 = T->Node(id1);
+ gp_Pnt pt2 = T->Node(id2);
if(!isidtrsf) {
// apply edge transformation
Standard_Integer i;
int aNbOfNodes = thePts->GetNumberOfPoints();
- const TColgp_Array1OfPnt& Nodes = aPoly->Nodes();
Standard_Integer nbNodesInFace = aPoly->NbNodes();
for(i = 1; i <= nbNodesInFace; i++) {
- gp_Pnt P = Nodes(i);
+ gp_Pnt P = aPoly->Node(i);
if(!identity)
P.Transform(myTransf);
thePts->InsertNextPoint(P.X(),P.Y(),P.Z());
}
- const Poly_Array1OfTriangle& Triangles = aPoly->Triangles();
Standard_Integer nbTriInFace = aPoly->NbTriangles();
for(i = 1; i <= nbTriInFace; i++){
// Get the triangle
Standard_Integer N1,N2,N3;
- Triangles(i).Get(N1,N2,N3);
+ aPoly->Triangle(i).Get(N1,N2,N3);
N1 += aNbOfNodes - 1;
N2 += aNbOfNodes - 1;
N3 += aNbOfNodes - 1;
#include <vtkInformation.h>
#include <vtkInformationVector.h>
-#include <Adaptor3d_HCurve.hxx>
#include <BRep_Tool.hxx>
#include <TColStd_Array1OfReal.hxx>
+#include <Basics_OCCTVersion.hxx>
+
+#if OCC_VERSION_LARGE < 0x07070000
+#include <Adaptor3d_HCurve.hxx>
+#else
+#include <Adaptor3d_Curve.hxx>
+#endif
+
vtkStandardNewMacro(GEOM_WireframeFace)
GEOM_WireframeFace::GEOM_WireframeFace():
#include <ShHealOper_FillHoles.hxx>
#include <ShapeAnalysis_FreeBounds.hxx>
+#include <Basics_OCCTVersion.hxx>
+
#include <BRep_Tool.hxx>
#include <BRepAdaptor_Curve.hxx>
+#if OCC_VERSION_LARGE < 0x07070000
#include <BRepAdaptor_HCurve.hxx>
+#endif
#include <BRep_Builder.hxx>
#include <BRepFill_CurveConstraint.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
TopoDS_Edge ae = TopoDS::Edge(aIter.Value());
BRepAdaptor_Curve adC(ae);
- Handle(BRepAdaptor_HCurve) aHAD= new BRepAdaptor_HCurve(adC);
+#if OCC_VERSION_LARGE < 0x07070000
+ Handle(BRepAdaptor_HCurve) aHAD = new BRepAdaptor_HCurve(adC);
+#else
+ Handle(BRepAdaptor_Curve) aHAD = new BRepAdaptor_Curve(adC);
+#endif
// Handle(BRepFill_CurveConstraint) aConst =
// new BRepFill_CurveConstraint (Handle(Adaptor3d_HCurve)::DownCast(aHAD), (Standard_Integer) GeomAbs_C0, myNbPtsOnCur, myTol3d);
Handle(GeomPlate_CurveConstraint) aConst =