OpenCasCade是什么
Open CASCADE(简称OCC)平台是由法国Matra Datavision公司开发的CAD/CAE/CAM软件平台,可以说是世界上最重要的几何造型基础软件平台之一。开源OCC对象库是一个面向对象C++类库,用于快速开发设计领域的专业应用程序。
最近一直在利用OpenCasCade来进行空间几何的相关算法,于是有了这个教程让大家可以更直观的看到occ内部对象最终组装呈现的实际效果是什么。
利用OpenGL如何让occ做简单模型展示
1.依赖引用
预编译头stdafx.h中加入头文件引用与静态描述引用
#include <V3d_View.hxx> //V3d_View
#include <WNT_Window.hxx> //Handle_WNT_Window
#include <AIS_InteractiveContext.hxx> //AIS_InteractiveContext
#include <AIS_Shape.hxx> //Handle_AIS_Shape
#include <Standard.hxx>
#include <Standard_PrimitiveTypes.hxx>
#include <AIS_InteractiveContext.hxx>
#include <AIS_Line.hxx>
#include <AIS_Shape.hxx>
#include <AIS_Point.hxx>
#include <AIS_TexturedShape.hxx>
#include <Aspect_Grid.hxx>
#include <Aspect_PolygonOffsetMode.hxx>
#include <Aspect_DisplayConnection.hxx>
#include <gp.hxx>
#include <gp_Ax1.hxx>
#include <gp_Ax2.hxx>
#include <gp_Ax2d.hxx>
#include <gp_Dir.hxx>
#include <gp_Dir2d.hxx>
#include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Trsf.hxx>
#include <gp_Vec.hxx>
#include <gp_Lin2d.hxx>
#include <gp_Pln.hxx>
#include <gp.hxx>
#include <gp_Pnt2d.hxx>
#include <Geom_CylindricalSurface.hxx>
#include <Geom_Plane.hxx>
#include <Geom_Surface.hxx>
#include <Geom_TrimmedCurve.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <GeomLib.hxx>
#include <Geom_Surface.hxx>
#include <Geom_Curve.hxx>
#include <Geom_CartesianPoint.hxx>
#include <Geom2d_Ellipse.hxx>
#include <Geom2d_TrimmedCurve.hxx>
#include <Geom2d_Circle.hxx>
#include <GeomAPI_ProjectPointOnCurve.hxx>
#include <GCPnts_QuasiUniformDeflection.hxx>
#include <Graphic3d_Group.hxx>
#include <Graphic3d_HorizontalTextAlignment.hxx>
#include <Graphic3d_VerticalTextAlignment.hxx>
#include <Graphic3d_ArrayOfPolylines.hxx>
#include <Graphic3d_ExportFormat.hxx>
#include <Graphic3d_ArrayOfPolylines.hxx>
#include <Graphic3d_AspectFillArea3d.hxx>
#include <Graphic3d_AspectText3d.hxx>
#include