mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-21 10:13:43 +03:00
Fix compilation errors for mfc samples.
This commit is contained in:
parent
1aa6b1c9e2
commit
9a148b08df
@ -1304,7 +1304,7 @@ void CGeometryDoc::simplify(const TopoDS_Shape& aShape)
|
|||||||
//and all the polygons on the triangulations of the edges
|
//and all the polygons on the triangulations of the edges
|
||||||
BRepTools::Clean(aShape);
|
BRepTools::Clean(aShape);
|
||||||
// adds a triangulation of the shape aShape with the deflection aDeflection
|
// adds a triangulation of the shape aShape with the deflection aDeflection
|
||||||
BRepMesh::Mesh(aShape,aDeflection);
|
BRepMesh_IncrementalMesh(aShape,aDeflection);
|
||||||
|
|
||||||
Standard_Integer aIndex = 1, nbNodes = 0;
|
Standard_Integer aIndex = 1, nbNodes = 0;
|
||||||
|
|
||||||
|
@ -89,6 +89,7 @@
|
|||||||
#include <Aspect_Window.hxx>
|
#include <Aspect_Window.hxx>
|
||||||
#include <Aspect_Background.hxx>
|
#include <Aspect_Background.hxx>
|
||||||
|
|
||||||
|
#include <BRepMesh_IncrementalMesh.hxx>
|
||||||
#include <BRepAlgo.hxx>
|
#include <BRepAlgo.hxx>
|
||||||
#include <BRep_Builder.hxx>
|
#include <BRep_Builder.hxx>
|
||||||
#include <BRepBuilderAPI_MakeVertex.hxx>
|
#include <BRepBuilderAPI_MakeVertex.hxx>
|
||||||
@ -100,7 +101,6 @@
|
|||||||
#include <BndLib_Add3dCurve.hxx>
|
#include <BndLib_Add3dCurve.hxx>
|
||||||
#include <BndLib_AddSurface.hxx>
|
#include <BndLib_AddSurface.hxx>
|
||||||
#include <BRep_Tool.hxx>
|
#include <BRep_Tool.hxx>
|
||||||
#include <BRepMesh.hxx>
|
|
||||||
|
|
||||||
#include <DsgPrs_LengthPresentation.hxx>
|
#include <DsgPrs_LengthPresentation.hxx>
|
||||||
#include <FairCurve_Batten.hxx>
|
#include <FairCurve_Batten.hxx>
|
||||||
|
@ -90,7 +90,6 @@
|
|||||||
#include "BRepPrimAPI_MakeSphere.hxx"
|
#include "BRepPrimAPI_MakeSphere.hxx"
|
||||||
#include "gp_Pnt.hxx"
|
#include "gp_Pnt.hxx"
|
||||||
#include "BRepAlgoAPI_Cut.hxx"
|
#include "BRepAlgoAPI_Cut.hxx"
|
||||||
#include "BRepMesh.hxx"
|
|
||||||
#include "TopExp_Explorer.hxx"
|
#include "TopExp_Explorer.hxx"
|
||||||
#include "TopoDS_Face.hxx"
|
#include "TopoDS_Face.hxx"
|
||||||
#include "TopLoc_Location.hxx"
|
#include "TopLoc_Location.hxx"
|
||||||
@ -108,6 +107,7 @@
|
|||||||
#include "BRepBuilderAPI_MakeVertex.hxx"
|
#include "BRepBuilderAPI_MakeVertex.hxx"
|
||||||
#include "TopoDS.hxx"
|
#include "TopoDS.hxx"
|
||||||
#include "BRepTools.hxx"
|
#include "BRepTools.hxx"
|
||||||
|
#include "BRepMesh_IncrementalMesh.hxx"
|
||||||
|
|
||||||
#include <UnitsAPI.hxx>
|
#include <UnitsAPI.hxx>
|
||||||
|
|
||||||
|
@ -16,9 +16,9 @@
|
|||||||
#include <BRep_Builder.hxx>
|
#include <BRep_Builder.hxx>
|
||||||
#include <BRepTools.hxx>
|
#include <BRepTools.hxx>
|
||||||
#include <BRep_Tool.hxx>
|
#include <BRep_Tool.hxx>
|
||||||
#include <BRepMesh.hxx>
|
|
||||||
#include <BRepBuilderAPI_MakeEdge.hxx>
|
#include <BRepBuilderAPI_MakeEdge.hxx>
|
||||||
#include <BRepBuilderAPI_MakeVertex.hxx>
|
#include <BRepBuilderAPI_MakeVertex.hxx>
|
||||||
|
#include <BRepMesh_IncrementalMesh.hxx>
|
||||||
|
|
||||||
#include <TopExp_Explorer.hxx>
|
#include <TopExp_Explorer.hxx>
|
||||||
#include <TopLoc_Location.hxx>
|
#include <TopLoc_Location.hxx>
|
||||||
@ -189,7 +189,7 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
|
|||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
BRepTools::Clean(aShape);
|
BRepTools::Clean(aShape);
|
||||||
BRepMesh::Mesh(aShape,aDeflection);
|
BRepMesh_IncrementalMesh(aShape,aDeflection);
|
||||||
|
|
||||||
BRep_Builder aBuilder,aBuild1,aBuild2;
|
BRep_Builder aBuilder,aBuild1,aBuild2;
|
||||||
TopoDS_Compound aCompound,aComp1,aComp2;
|
TopoDS_Compound aCompound,aComp1,aComp2;
|
||||||
|
@ -81,7 +81,7 @@ void CTriangulationDoc::OnTriangu()
|
|||||||
TopoDS_Shape theBox = BRepPrimAPI_MakeBox(200,60,60);
|
TopoDS_Shape theBox = BRepPrimAPI_MakeBox(200,60,60);
|
||||||
TopoDS_Shape theSphere = BRepPrimAPI_MakeSphere(gp_Pnt(100,20,20),80);
|
TopoDS_Shape theSphere = BRepPrimAPI_MakeSphere(gp_Pnt(100,20,20),80);
|
||||||
TopoDS_Shape ShapeFused = BRepAlgoAPI_Fuse(theSphere,theBox);
|
TopoDS_Shape ShapeFused = BRepAlgoAPI_Fuse(theSphere,theBox);
|
||||||
BRepMesh::Mesh(ShapeFused,1);
|
BRepMesh_IncrementalMesh(ShapeFused,1);
|
||||||
|
|
||||||
Handle (AIS_Shape) aSection = new AIS_Shape(ShapeFused);
|
Handle (AIS_Shape) aSection = new AIS_Shape(ShapeFused);
|
||||||
myAISContext->SetDisplayMode(aSection,1);
|
myAISContext->SetDisplayMode(aSection,1);
|
||||||
@ -139,7 +139,7 @@ void CTriangulationDoc::OnVisu()
|
|||||||
TopoDS_Shape theBox = BRepPrimAPI_MakeBox(200,60,60);
|
TopoDS_Shape theBox = BRepPrimAPI_MakeBox(200,60,60);
|
||||||
TopoDS_Shape theSphere = BRepPrimAPI_MakeSphere(gp_Pnt(100,20,20),80);
|
TopoDS_Shape theSphere = BRepPrimAPI_MakeSphere(gp_Pnt(100,20,20),80);
|
||||||
TopoDS_Shape ShapeFused = BRepAlgoAPI_Fuse(theSphere,theBox);
|
TopoDS_Shape ShapeFused = BRepAlgoAPI_Fuse(theSphere,theBox);
|
||||||
BRepMesh::Mesh(ShapeFused,1);
|
BRepMesh_IncrementalMesh(ShapeFused,1);
|
||||||
|
|
||||||
Handle (AIS_Shape) aSection = new AIS_Shape(ShapeFused);
|
Handle (AIS_Shape) aSection = new AIS_Shape(ShapeFused);
|
||||||
myAISContext->SetDisplayMode(aSection,1);
|
myAISContext->SetDisplayMode(aSection,1);
|
||||||
@ -264,7 +264,7 @@ void CTriangulationDoc::OnClear()
|
|||||||
TopoDS_Shape theBox = BRepPrimAPI_MakeBox(200,60,60);
|
TopoDS_Shape theBox = BRepPrimAPI_MakeBox(200,60,60);
|
||||||
TopoDS_Shape theSphere = BRepPrimAPI_MakeSphere(gp_Pnt(100,20,20),80);
|
TopoDS_Shape theSphere = BRepPrimAPI_MakeSphere(gp_Pnt(100,20,20),80);
|
||||||
TopoDS_Shape ShapeFused = BRepAlgoAPI_Fuse(theSphere,theBox);
|
TopoDS_Shape ShapeFused = BRepAlgoAPI_Fuse(theSphere,theBox);
|
||||||
BRepMesh::Mesh(ShapeFused,1);
|
BRepMesh_IncrementalMesh(ShapeFused,1);
|
||||||
|
|
||||||
|
|
||||||
Handle (AIS_Shape) aSection = new AIS_Shape(ShapeFused);
|
Handle (AIS_Shape) aSection = new AIS_Shape(ShapeFused);
|
||||||
|
@ -12,7 +12,6 @@ IMPLEMENT_STANDARD_RTTIEXT(User_Cylinder,AIS_InteractiveObject)
|
|||||||
#include <Graphic3d_ArrayOfTriangles.hxx>
|
#include <Graphic3d_ArrayOfTriangles.hxx>
|
||||||
#include <Graphic3d_StructureManager.hxx>
|
#include <Graphic3d_StructureManager.hxx>
|
||||||
#include <PrsMgr_PresentationManager3d.hxx>
|
#include <PrsMgr_PresentationManager3d.hxx>
|
||||||
#include <BRepMesh.hxx>
|
|
||||||
#include <StdPrs_ToolShadedShape.hxx>
|
#include <StdPrs_ToolShadedShape.hxx>
|
||||||
#include <Poly_Connect.hxx>
|
#include <Poly_Connect.hxx>
|
||||||
#include <TColgp_Array1OfPnt.hxx>
|
#include <TColgp_Array1OfPnt.hxx>
|
||||||
@ -22,6 +21,7 @@ IMPLEMENT_STANDARD_RTTIEXT(User_Cylinder,AIS_InteractiveObject)
|
|||||||
#include <Graphic3d_Array1OfVertex.hxx>
|
#include <Graphic3d_Array1OfVertex.hxx>
|
||||||
#include <Aspect_Array1OfEdge.hxx>
|
#include <Aspect_Array1OfEdge.hxx>
|
||||||
#include <Quantity_Color.hxx>
|
#include <Quantity_Color.hxx>
|
||||||
|
#include <BRepMesh_IncrementalMesh.hxx>
|
||||||
|
|
||||||
#include <AIS_GraphicTool.hxx>
|
#include <AIS_GraphicTool.hxx>
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ case 6: //color
|
|||||||
myAspect->SetEdgeOn();
|
myAspect->SetEdgeOn();
|
||||||
|
|
||||||
myDeflection = AIS_Shape::GetDeflection(myShape,myDrawer);
|
myDeflection = AIS_Shape::GetDeflection(myShape,myDrawer);
|
||||||
BRepMesh::Mesh(myShape,myDeflection);
|
BRepMesh_IncrementalMesh(myShape,myDeflection);
|
||||||
|
|
||||||
myX1OnOff = Standard_False;
|
myX1OnOff = Standard_False;
|
||||||
myXBlueOnOff = Standard_False;
|
myXBlueOnOff = Standard_False;
|
||||||
@ -151,8 +151,6 @@ case 6: //color
|
|||||||
cout <<"Deflection = " << myDeflection << "\n" << endl;
|
cout <<"Deflection = " << myDeflection << "\n" << endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
StdPrs_ToolShadedShape SST;
|
|
||||||
|
|
||||||
Standard_Integer NumFace;
|
Standard_Integer NumFace;
|
||||||
TopExp_Explorer ExpFace;
|
TopExp_Explorer ExpFace;
|
||||||
|
|
||||||
@ -191,7 +189,7 @@ case 6: //color
|
|||||||
{
|
{
|
||||||
// triangles(nt).Get(n1,n2,n3); // le triangle est n1,n2,n3
|
// triangles(nt).Get(n1,n2,n3); // le triangle est n1,n2,n3
|
||||||
|
|
||||||
if (SST.Orientation(myFace) == TopAbs_REVERSED) // si la face est "reversed"
|
if (myFace.Orientation() == TopAbs_REVERSED) // si la face est "reversed"
|
||||||
triangles(nt).Get(n1,n3,n2); // le triangle est n1,n3,n2
|
triangles(nt).Get(n1,n3,n2); // le triangle est n1,n3,n2
|
||||||
else
|
else
|
||||||
triangles(nt).Get(n1,n2,n3); // le triangle est n1,n2,n3
|
triangles(nt).Get(n1,n2,n3); // le triangle est n1,n2,n3
|
||||||
@ -242,7 +240,7 @@ case 6: //color
|
|||||||
const Poly_Array1OfTriangle& triangles = myT->Triangles();
|
const Poly_Array1OfTriangle& triangles = myT->Triangles();
|
||||||
TColgp_Array1OfDir myNormal(Nodes.Lower(), Nodes.Upper());
|
TColgp_Array1OfDir myNormal(Nodes.Lower(), Nodes.Upper());
|
||||||
|
|
||||||
SST.Normal(myFace, pc, myNormal);
|
StdPrs_ToolShadedShape::Normal(myFace, pc, myNormal);
|
||||||
BRepTools::UVBounds(myFace,Umin, Umax, Vmin, Vmax);
|
BRepTools::UVBounds(myFace,Umin, Umax, Vmin, Vmax);
|
||||||
dUmax = (Umax - Umin);
|
dUmax = (Umax - Umin);
|
||||||
dVmax = (Vmax - Vmin);
|
dVmax = (Vmax - Vmin);
|
||||||
@ -258,7 +256,7 @@ case 6: //color
|
|||||||
for (nt = 1; nt <= nnn; nt++)
|
for (nt = 1; nt <= nnn; nt++)
|
||||||
{
|
{
|
||||||
// triangles(nt).Get(n1,n2,n3); // le triangle est n1,n2,n3
|
// triangles(nt).Get(n1,n2,n3); // le triangle est n1,n2,n3
|
||||||
if (SST.Orientation(myFace) == TopAbs_REVERSED) // si la face est "reversed"
|
if (myFace.Orientation() == TopAbs_REVERSED) // si la face est "reversed"
|
||||||
triangles(nt).Get(n1,n3,n2); // le triangle est n1,n3,n2
|
triangles(nt).Get(n1,n3,n2); // le triangle est n1,n3,n2
|
||||||
else
|
else
|
||||||
triangles(nt).Get(n1,n2,n3); // le triangle est n1,n2,n3
|
triangles(nt).Get(n1,n2,n3); // le triangle est n1,n2,n3
|
||||||
@ -278,7 +276,7 @@ case 6: //color
|
|||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
cout << "On traite actuellement le triangle : "<< nt <<"\n";
|
cout << "On traite actuellement le triangle : "<< nt <<"\n";
|
||||||
#endif
|
#endif
|
||||||
if (SST.Orientation(myFace) == TopAbs_REVERSED) // si la face est "reversed"
|
if (myFace.Orientation() == TopAbs_REVERSED) // si la face est "reversed"
|
||||||
triangles(nt).Get(n1,n3,n2); // le triangle est n1,n3,n2
|
triangles(nt).Get(n1,n3,n2); // le triangle est n1,n3,n2
|
||||||
else
|
else
|
||||||
triangles(nt).Get(n1,n2,n3); // le triangle est n1,n2,n3
|
triangles(nt).Get(n1,n2,n3); // le triangle est n1,n2,n3
|
||||||
|
@ -34,14 +34,14 @@ public:
|
|||||||
|
|
||||||
//! Checks back faces visibility for specified shape (to activate back-face culling). <br>
|
//! Checks back faces visibility for specified shape (to activate back-face culling). <br>
|
||||||
//! @return true if shape is closed Solid or compound of closed Solids. <br>
|
//! @return true if shape is closed Solid or compound of closed Solids. <br>
|
||||||
static Standard_Boolean IsClosed(const TopoDS_Shape& theShape);
|
Standard_EXPORT static Standard_Boolean IsClosed(const TopoDS_Shape& theShape);
|
||||||
|
|
||||||
static Handle_Poly_Triangulation Triangulation(const TopoDS_Face& aFace,
|
Standard_EXPORT static Handle_Poly_Triangulation Triangulation(const TopoDS_Face& aFace,
|
||||||
TopLoc_Location& loc);
|
TopLoc_Location& loc);
|
||||||
|
|
||||||
static void Normal(const TopoDS_Face& aFace,
|
Standard_EXPORT static void Normal(const TopoDS_Face& aFace,
|
||||||
Poly_Connect& PC,
|
Poly_Connect& PC,
|
||||||
TColgp_Array1OfDir& Nor);
|
TColgp_Array1OfDir& Nor);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user