From f54290142e8f4743ef8dd71b1e1203145a460eb8 Mon Sep 17 00:00:00 2001 From: Jean-Francois Remacle <jean-francois.remacle@uclouvain.be> Date: Sun, 24 Dec 2006 13:37:20 +0000 Subject: [PATCH] Ruled surfaces seem to work a little better ;-) --- Geo/Geo.cpp | 17 ++++++++++++++++- Geo/Geo.h | 1 + Geo/GeoInterpolation.cpp | 17 +++++++++-------- Geo/gmshFace.cpp | 3 ++- 4 files changed, 28 insertions(+), 10 deletions(-) diff --git a/Geo/Geo.cpp b/Geo/Geo.cpp index da739dc63a..6202a71995 100644 --- a/Geo/Geo.cpp +++ b/Geo/Geo.cpp @@ -1,4 +1,4 @@ -// $Id: Geo.cpp,v 1.67 2006-12-20 15:50:57 remacle Exp $ +// $Id: Geo.cpp,v 1.68 2006-12-24 13:37:20 remacle Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -3303,3 +3303,18 @@ void Projette(Vertex * v, double mat[3][3]) v->Pos.Y = Y; v->Pos.Z = Z; } + + +void Surface::print_info () +{ + Msg(INFO,"Surface %d of type %d",Num,Typ); + Msg(INFO,"Generatrices : "); + Curve *C; + for(int i = 0; i < List_Nbr(Generatrices); i++) { + List_Read(Generatrices, i, &C); + Msg(INFO,"%d of type %d begin %d end %d ",C->Num,C->Typ,C->beg->Num,C->end->Num); + Msg(INFO,"CircleParams : %g %g %g %g %g %g %g %g", + C->Circle.t1,C->Circle.t2,C->Circle.f1,C->Circle.f2,C->Circle.incl,C->Circle.n[0],C->Circle.n[1],C->Circle.n[2]); + } + +} diff --git a/Geo/Geo.h b/Geo/Geo.h index 9a59daef20..60a49f7534 100644 --- a/Geo/Geo.h +++ b/Geo/Geo.h @@ -90,6 +90,7 @@ struct _Surf{ struct _Surf *Support; ExtrudeParams *Extrude; DrawingColor Color; + void print_info (); }; typedef struct _Surf Surface; diff --git a/Geo/GeoInterpolation.cpp b/Geo/GeoInterpolation.cpp index a356e9ee3e..ef6b973314 100644 --- a/Geo/GeoInterpolation.cpp +++ b/Geo/GeoInterpolation.cpp @@ -1,4 +1,4 @@ -// $Id: GeoInterpolation.cpp,v 1.9 2006-12-21 09:35:46 remacle Exp $ +// $Id: GeoInterpolation.cpp,v 1.10 2006-12-24 13:37:20 remacle Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -495,13 +495,14 @@ Vertex InterpolateSurface(Surface * s, double u, double v, int i, issphere; double eps = 1.e-6; - if(s->Extrude && s->Extrude->geo.Mode == EXTRUDED_ENTITY && - s->Typ != MSH_SURF_PLAN) { - Curve *c = FindCurve(s->Extrude->geo.Source); - Vertex v1 = InterpolateCurve(c, u, 0); - s->Extrude->Extrude(v, v1.Pos.X, v1.Pos.Y, v1.Pos.Z); - return v1; - } +// if(s->Extrude && s->Extrude->geo.Mode == EXTRUDED_ENTITY && +// s->Typ != MSH_SURF_PLAN) { +// Curve *c = FindCurve(s->Extrude->geo.Source); +// Vertex v1 = InterpolateCurve(c, u, 0); +// s->Extrude->Extrude(v, v1.Pos.X, v1.Pos.Y, v1.Pos.Z); +// // Msg(INFO,"COUCOUCOUCOUC"); +// return v1; +// } if(derivee) { diff --git a/Geo/gmshFace.cpp b/Geo/gmshFace.cpp index 399de13655..3ef716bbeb 100644 --- a/Geo/gmshFace.cpp +++ b/Geo/gmshFace.cpp @@ -1,4 +1,4 @@ -// $Id: gmshFace.cpp,v 1.31 2006-12-16 01:25:58 geuzaine Exp $ +// $Id: gmshFace.cpp,v 1.32 2006-12-24 13:37:20 remacle Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -65,6 +65,7 @@ gmshFace::gmshFace(GModel *m, Surface *face) embedded_vertices.push_back(gv); } } + // face->print_info(); resetMeshAttributes(); } -- GitLab