| 1 |
souaissa |
116 |
//------------------------------------------------------------
|
| 2 |
|
|
//------------------------------------------------------------
|
| 3 |
|
|
// MAGiC
|
| 4 |
|
|
// Jean Christophe Cuillière et Vincent FRANCOIS
|
| 5 |
|
|
// Département de Génie Mécanique - UQTR
|
| 6 |
|
|
//------------------------------------------------------------
|
| 7 |
|
|
// Le projet MAGIC est un projet de recherche du département
|
| 8 |
|
|
// de génie mécanique de l'Université du Québec à
|
| 9 |
|
|
// Trois Rivières
|
| 10 |
|
|
// Les librairies ne peuvent être utilisées sans l'accord
|
| 11 |
|
|
// des auteurs (contact : francois@uqtr.ca)
|
| 12 |
|
|
//------------------------------------------------------------
|
| 13 |
|
|
//------------------------------------------------------------
|
| 14 |
|
|
//
|
| 15 |
|
|
// occ_fonction.h
|
| 16 |
|
|
//
|
| 17 |
|
|
//------------------------------------------------------------
|
| 18 |
|
|
//------------------------------------------------------------
|
| 19 |
|
|
// COPYRIGHT 2000
|
| 20 |
|
|
// Version du 02/03/2006 à 11H22
|
| 21 |
|
|
//------------------------------------------------------------
|
| 22 |
|
|
//------------------------------------------------------------
|
| 23 |
|
5 |
#ifndef OCC_fonctionH
|
| 24 |
|
|
#define OCC_fonctionH
|
| 25 |
|
|
|
| 26 |
|
|
#include <atl\atlmod.h>
|
| 27 |
|
|
|
| 28 |
|
|
//------------------------------------------------------------------------------
|
| 29 |
|
|
|
| 30 |
|
|
#ifdef WINDOWS_VERSION
|
| 31 |
|
|
#ifdef BUILT_DLL_RECONSTRUCTION
|
| 32 |
|
|
#define DLLPORTRECONSTRUCTION __declspec(dllexport)
|
| 33 |
|
|
#else
|
| 34 |
|
|
#define DLLPORTRECONSTRUCTION __declspec(dllimport)
|
| 35 |
|
|
#endif
|
| 36 |
|
|
#else
|
| 37 |
|
|
#define DLLPORTRECONSTRUCTION
|
| 38 |
|
|
#endif
|
| 39 |
|
|
|
| 40 |
souaissa |
116 |
//les includes d'opencascade 6.2
|
| 41 |
|
|
#include <BRep_Builder.hxx>
|
| 42 |
|
|
#include <TopoDS_Shell.hxx>
|
| 43 |
|
|
#include <GeomPlate_BuildPlateSurface.hxx>
|
| 44 |
|
|
#include <TColgp_Array1OfPnt.hxx>
|
| 45 |
|
|
#include <Geom_BSplineCurve.hxx>
|
| 46 |
|
|
#include <GeomAPI_PointsToBSpline.hxx>
|
| 47 |
|
|
#include <GeomAdaptor_HCurve.hxx>
|
| 48 |
|
|
#include <Handle_GeomAdaptor_HCurve.hxx>
|
| 49 |
|
|
#include <BRepFill_CurveConstraint.hxx>
|
| 50 |
|
|
#include <Handle_BRepFill_CurveConstraint.hxx>
|
| 51 |
|
|
#include <GeomPlate_PointConstraint.hxx>
|
| 52 |
|
|
#include <GeomPlate_MakeApprox.hxx>
|
| 53 |
|
|
#include <TopoDS_Wire.hxx>
|
| 54 |
|
|
#include <BRepBuilderAPI_MakeWire.hxx>
|
| 55 |
|
|
#include <GeomAPI_ProjectPointOnSurf.hxx>
|
| 56 |
|
|
#include <TColgp_Array1OfPnt2d.hxx>
|
| 57 |
|
|
#include <Geom2d_BSplineCurve.hxx>
|
| 58 |
|
|
#include <Geom2dAPI_PointsToBSpline.hxx>
|
| 59 |
|
|
#include <BRepBuilderAPI_MakeEdge.hxx>
|
| 60 |
|
|
#include <TopoDS_Face.hxx>
|
| 61 |
|
|
#include <BRepBuilderAPI_MakeFace.hxx>
|
| 62 |
|
|
#include <TopoDS_Solid.hxx>
|
| 63 |
|
|
#include <STEPControl_Writer.hxx>
|
| 64 |
|
|
#include <gp_Ax3.hxx>
|
| 65 |
|
|
#include <Geom_CylindricalSurface.hxx>
|
| 66 |
|
|
#include <TColGeom_Array1OfBSplineCurve.hxx>
|
| 67 |
|
|
#include <GeomFill_SimpleBound.hxx>
|
| 68 |
|
|
#include <GeomFill_ConstrainedFilling.hxx>
|
| 69 |
|
|
#include <Geom_ConicalSurface.hxx>
|
| 70 |
|
|
#include <Geom_ToroidalSurface.hxx>
|
| 71 |
|
|
#include <Geom_SphericalSurface.hxx>
|
| 72 |
|
5 |
|
| 73 |
souaissa |
116 |
|
| 74 |
|
|
#include <GProp_PEquation.hxx>
|
| 75 |
|
|
#include <Geom_Line.hxx>
|
| 76 |
|
|
#include <GeomAPI_ProjectPointOnCurve.hxx>
|
| 77 |
|
|
#include <Geom_SurfaceOfRevolution.hxx>
|
| 78 |
|
|
#include <Geom_Circle.hxx>
|
| 79 |
|
|
#include <gp_Pln.hxx>
|
| 80 |
|
|
#include <Geom_Plane.hxx>
|
| 81 |
|
|
#include <TColGeom_Array1OfSurface.hxx>
|
| 82 |
|
|
#include <GCE2d_MakeSegment.hxx>
|
| 83 |
|
|
#include <GC_MakeArcOfCircle.hxx>
|
| 84 |
|
|
#include <GeomProjLib.hxx>
|
| 85 |
|
|
#include <gp_Elips2d.hxx>
|
| 86 |
|
|
#include <GCE2d_MakeArcOfEllipse.hxx>
|
| 87 |
|
|
#include <gp_Circ2d.hxx>
|
| 88 |
|
|
#include <GCE2d_MakeArcOfCircle.hxx>
|
| 89 |
|
|
#include <gp_Cylinder.hxx>
|
| 90 |
|
|
|
| 91 |
|
5 |
class DLLPORTRECONSTRUCTION OCC_FONCTION
|
| 92 |
|
|
{
|
| 93 |
|
|
public:
|
| 94 |
|
|
OCC_FONCTION();
|
| 95 |
souaissa |
116 |
|
| 96 |
|
|
|
| 97 |
|
|
BRep_Builder Cons_Brep;
|
| 98 |
|
|
TopoDS_Shell Cons_Coquille;
|
| 99 |
|
|
TopoDS_Face Cons_Face;
|
| 100 |
|
|
TopoDS_Edge Cons_Arete;
|
| 101 |
|
|
Handle (Geom_Surface) Cons_Surface;
|
| 102 |
|
|
Handle(Geom_Curve) Cons_Courbe3d;
|
| 103 |
|
|
Handle(Geom_Curve) Curve_Projection;
|
| 104 |
|
|
Handle(Geom2d_Curve) Cons_Courbe2d;
|
| 105 |
|
|
BRepBuilderAPI_MakeWire Cons_Contour;
|
| 106 |
|
|
GeomPlate_BuildPlateSurface BPSurf;
|
| 107 |
|
|
int Face_Revol;
|
| 108 |
|
|
double U,V;
|
| 109 |
|
|
gp_Pnt N;
|
| 110 |
|
|
gp_Pnt Point_Projetee;
|
| 111 |
|
|
|
| 112 |
|
5 |
virtual ~OCC_FONCTION();
|
| 113 |
|
|
|
| 114 |
|
|
int OCC_FONCTION::Creer_Coquille();
|
| 115 |
|
|
int OCC_FONCTION::Ajouter_face_Coquille();
|
| 116 |
|
|
int OCC_FONCTION::Enregistrer(char *path);
|
| 117 |
souaissa |
116 |
int OCC_FONCTION::Ajouter_Contour_Face(int num_loop);
|
| 118 |
|
5 |
int OCC_FONCTION::Creer_Surface_Cylindrique(double Pnt_Insersion[3], double Vect_Directeur[3],double Rayon);
|
| 119 |
|
|
int OCC_FONCTION::Creer_Surface_Conique(double Pnt_Insersion[3], double Vect_Directeur[3],double Rayon, double Angle);
|
| 120 |
|
|
int OCC_FONCTION::Creer_Surface_Torique(double Pnt_Insersion[], double Vect_Directeur[], double GRayon, double PRayon);
|
| 121 |
|
|
int OCC_FONCTION::Creer_Surf_Spherique(double Pnt_Insersion[], double Vect_Directeur[], double Rayon);
|
| 122 |
|
|
int OCC_FONCTION::Initialiser_Surface();
|
| 123 |
|
|
int OCC_FONCTION::Rapprocher_Surface_Point(double x1, double y1, double z1);
|
| 124 |
|
|
int OCC_FONCTION::Calculer_Surface();
|
| 125 |
|
|
int OCC_FONCTION::Determiner_Surface();
|
| 126 |
|
|
int OCC_FONCTION::Ajouter_Point_Courbe(double x1, double y1, double z1, int i1);
|
| 127 |
|
|
int OCC_FONCTION::Ajouter_courbe_liste(int nb_pts,int num);
|
| 128 |
|
|
int OCC_FONCTION::Construire_Surface_Contour(int num);
|
| 129 |
|
|
int OCC_FONCTION::Creer_Face_Surface();
|
| 130 |
|
|
int OCC_FONCTION::Creer_Contour();
|
| 131 |
|
|
int OCC_FONCTION::Creer_Arete_Lineaire(double P1[3], double P2[3]);
|
| 132 |
|
|
int OCC_FONCTION::Creer_Arete_Circulaire(double Pnt_Insersion[3], double Normal[3],double P1[3], double P2[3], double Rayon);
|
| 133 |
|
|
int OCC_FONCTION::Creer_Arete_Elliptique(double Pnt_Insersion[], double P1[], double P2[], double GRayon, double PRayon);
|
| 134 |
|
|
int OCC_FONCTION::Ajouter_Point_Arete(double x, double y, double z, int i);
|
| 135 |
francois |
38 |
int OCC_FONCTION::Rapprocher_Surface_Courbe_Spline(int nb_pts);
|
| 136 |
souaissa |
116 |
int OCC_FONCTION::Ajouter_Arete_Contour(int nbpts);
|
| 137 |
|
5 |
int OCC_FONCTION::Initialiser_Surface_Cylindrique(double Pnt_Insersion[3], double Vect_Directeur[3],double Rayon);
|
| 138 |
|
|
int OCC_FONCTION::Initialiser_Surface_Surface();
|
| 139 |
|
|
int OCC_FONCTION::Ajouter_Point_Array_Ideal(double x, double y, double z, int i);
|
| 140 |
souaissa |
116 |
int OCC_FONCTION::Determiner_Param_Boite(int nb);
|
| 141 |
|
|
double OCC_FONCTION::Get_Param_Boite(int ii);
|
| 142 |
|
5 |
int OCC_FONCTION::Determiner_Plan(int nb, double Epsilon);
|
| 143 |
|
|
int OCC_FONCTION::Ligne_Revolution(double Pnt_Inser[], double Vect_Direc[]);
|
| 144 |
|
|
double OCC_FONCTION::Distance_Point_Curve(double x, double y, double z);
|
| 145 |
|
|
int OCC_FONCTION::Pt_Proj_Ligne();
|
| 146 |
|
|
double OCC_FONCTION::Pnt_Proj_Ligne(int ii);
|
| 147 |
|
|
int OCC_FONCTION::GCercle_Tore(double Pnt_Insersion[3], double Vect_Directeur[3],double Rayon);
|
| 148 |
|
|
int OCC_FONCTION::Creer_Surface_Cylindrique_Revolution(double Pnt_Insersion[3], double Vect_Directeur[3],double Vecteur1[3],double Rayon);
|
| 149 |
|
|
int OCC_FONCTION::Face_Revolution();
|
| 150 |
|
|
int OCC_FONCTION::Ajouter_Surface_liste_Ideal(int num);
|
| 151 |
|
|
int OCC_FONCTION::Projeter_Point_Surface_Idealisee(double x, double y,double z, int num);
|
| 152 |
|
|
int OCC_FONCTION::Pt_Proj_Surface_Ideal();
|
| 153 |
|
|
double OCC_FONCTION::Pnt_Proj_Surface_Ideal(int ii);
|
| 154 |
francois |
38 |
int OCC_FONCTION::Projeter_Point_Plan_Idealisee(double x, double y,double z);
|
| 155 |
|
|
int OCC_FONCTION::Ajouter_Point_AreteUV(int testU, int testV, double x, double y, double z, int i);
|
| 156 |
|
|
double OCC_FONCTION::Analyser_interval_AreteU(double x, double y, double z);
|
| 157 |
|
|
double OCC_FONCTION::Analyser_interval_AreteV(double x, double y, double z);
|
| 158 |
|
|
|
| 159 |
|
5 |
private:
|
| 160 |
|
|
|
| 161 |
|
|
|
| 162 |
|
|
} ;
|
| 163 |
|
|
#endif
|
| 164 |
|
|
|
| 165 |
|
|
|