1 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
\r
4 // File : BLSURFlugin_Mesher.cxx
\r
5 // Authors : Francis KLOSS (OCC) & Patrick LAUG (INRIA)
\r
8 //=============================================================================
\r
9 // using namespace std;
\r
11 // #include "BLSURFPlugin_Mesher.hxx"
\r
12 // #include "BLSURFPlugin_Hypothesis.hxx"
\r
14 // #include <SMESHDS_Mesh.hxx>
\r
15 // #include <SMDS_MeshElement.hxx>
\r
16 // #include <SMDS_MeshNode.hxx>
\r
17 // #include <utilities.h>
\r
19 // #include <vector>
\r
21 // #include <BRep_Tool.hxx>
\r
22 // #include <TopExp.hxx>
\r
23 // #include <TopExp_Explorer.hxx>
\r
24 // #include <TopoDS.hxx>
\r
25 // #include <NCollection_Map.hxx>
\r
30 #include <Occ_utility.h>
\r
31 #include <TDataStd_Name.hxx>
\r
32 #include <TPrsStd_AISPresentation.hxx>
\r
33 #include <TNaming_NamedShape.hxx>
\r
34 #include <TopExp_Explorer.hxx>
\r
35 #include <AIS_InteractiveObject.hxx>
\r
36 #include <ShapeFix_Edge.hxx>
\r
37 #include <TopoDS.hxx>
\r
38 #include <TopLoc_Location.hxx>
\r
39 #include <Geom_Surface.hxx>
\r
40 #include <Handle_Geom_Surface.hxx>
\r
41 #include <BRep_Tool.hxx>
\r
42 #include <Geom_ElementarySurface.hxx>
\r
43 #include <Geom_BoundedSurface.hxx>
\r
44 #include <Geom_OffsetSurface.hxx>
\r
45 #include <Geom_SweptSurface.hxx>
\r
46 #include <Geom_RectangularTrimmedSurface.hxx>
\r
47 #include <Geom_BezierSurface.hxx>
\r
48 #include <GeomAPI_ProjectPointOnCurve.hxx>
\r
49 #include <GeomAPI_ProjectPointOnSurf.hxx>
\r
50 #include <Geom_ConicalSurface.hxx>
\r
51 #include <Geom_CylindricalSurface.hxx>
\r
52 #include <Geom_Plane.hxx>
\r
53 #include <Geom_SphericalSurface.hxx>
\r
54 #include <Geom_ToroidalSurface.hxx>
\r
55 #include <Geom_SurfaceOfLinearExtrusion.hxx>
\r
56 #include <Geom_SurfaceOfRevolution.hxx>
\r
57 #include <ShapeUpgrade_ClosedFaceDivide.hxx>
\r
58 #include <ShapeUpgrade_ShapeDivide.hxx>
\r
59 #include <TNaming_Builder.hxx>
\r
60 #include <TDataStd_Integer.hxx>
\r
61 #include <cad_occ.h>
\r
63 #include <GProp_GProps.hxx>
\r
64 #include <BRepGProp.hxx>
\r
65 #include <BRepAlgoAPI_Common.hxx>
\r
67 #include <BRep_ListIteratorOfListOfCurveRepresentation.hxx>
\r
68 #include <BRep_TEdge.hxx>
\r
69 #include <Handle_BRep_TEdge.hxx>
\r
70 #include <BRep_GCurve.hxx>
\r
71 #include <Handle_BRep_GCurve.hxx>
\r
72 #include <ShapeFix_Edge.hxx>
\r
73 #include <BRep_Tool.hxx>
\r
74 #include <TopoDS_Vertex.hxx>
\r
75 #include <TopoDS_Wire.hxx>
\r
76 #include <TopTools_IndexedMapOfShape.hxx>
\r
78 #define TSMO blw->bls_glo.tsmo
\r
80 bool BL_SURF::init(const TopoDS_Shape& _shape) {
\r
81 cout << "BLSURF_init: begin" << endl;
\r
83 if (_shape.ShapeType() == TopAbs_COMPOUND) {
\r
84 cout << "BLSURF_init: the shape is a COMPOUND" << endl;
\r
86 cout << "BLSURF_init: the shape is UNKNOWN" << endl;
\r
89 cout << "BLSURF_init: exploring faces and edges " << endl;
\r
91 for (TopExp_Explorer expf(_shape, TopAbs_FACE); expf.More(); expf.Next()) {
\r
92 const TopoDS_Shape& face = expf.Current();
\r
95 for (TopExp_Explorer expe(face, TopAbs_EDGE); expe.More(); expe.Next()) {
\r
96 // const TopoDS_Shape& edge = expe.Current(); -> warning: unused variable 'edge'
\r
99 // cout << "BLSURF_init: face " << i << " has " << j << " edges" << endl;
\r
101 cout << "BLSURF_init: total number of faces = " << i << endl;
\r
103 TopoDS_Shape the_shape;
\r
104 the_shape = _shape;
\r
107 return(run(the_shape));
\r
110 // #define TC2D blw.bls_glo.TC2dNew
\r
112 void BL_SURF::get_blw(blw_*& blw_param) {
\r
116 bool BL_SURF::end() {
\r
118 if (blw.error[0]) {
\r
125 double norm(vector<double> v)
\r
128 for (int i=0;i<v.size();i++) res+=POW2(v[i]);
\r
132 vector<double> operator-(vector<double> v1, vector<double> v2)
\r
134 assert(v1.size()==v2.size());
\r
135 vector<double> res(v1.size(),0.);
\r
136 for (int i=0;i<v1.size();i++) res[i]=v1[i]-v2[i];
\r
140 bool BL_SURF::run(TopoDS_Shape &s)
\r
146 bool BL_SURF::run()
\r
148 active_blsurf = this;
\r
149 build_surfaces(the_object);
\r
150 int ret = bls_main(&blw);
\r
151 active_blsurf = NULL;
\r
159 void BL_SURF::build_surfaces(TopoDS_Shape &shape)
\r
164 // Explore the whole shape to extract surfaces, and build BL objects
\r
167 for (i=0;i<surfaces.size();i++) delete(surfaces[i]);
\r
168 surfaces.resize(0);
\r
170 TopTools_IndexedMapOfShape fmap;
\r
173 for (TopExp_Explorer ex_face(shape,TopAbs_FACE);ex_face.More();ex_face.Next()) {
\r
174 TopoDS_Face f=TopoDS::Face(ex_face.Current());
\r
175 if (fmap.FindIndex(f) <= 0) {
\r
178 BL_SURFACE *bl_surface=new BL_SURFACE(f);
\r
179 if(bl_surface->build()) {
\r
180 surfaces.push_back(bl_surface);
\r
182 cout<<"Weird surface detected !"<<endl;
\r
183 delete(bl_surface);
\r
189 BL_SURFACE::BL_SURFACE(TopoDS_Face &f)
\r
193 geometry=BRep_Tool::Surface(f);
\r
196 BL_SURFACE::~BL_SURFACE()
\r
198 for (int i=0;i<edges.size();i++) delete(edges[i]);
\r
201 bool BL_SURFACE::build()
\r
204 // Explore the surface to extract all edges
\r
206 for (TopExp_Explorer ex_face(topology,TopAbs_EDGE);ex_face.More();ex_face.Next()) {
\r
207 TopoDS_Edge e=TopoDS::Edge(ex_face.Current());
\r
208 if(!add(e)) return(false);
\r
213 void BL_SURFACE::add(double u, double v)
\r
215 points.push_back(new BL_POINT(this,u,v));
\r
218 bool BL_SURFACE::add(TopoDS_Edge &edge)
\r
221 // add an edge ( make some checks, and build the associated BL_EDGE object )
\r
223 Handle(Geom2d_Curve) pargeo;
\r
226 pargeo=BRep_Tool::CurveOnSurface(edge,topology,tmin,tmax);
\r
228 BL_EDGE *bl_edge=new BL_EDGE(edge,this,pargeo,tmin,tmax);
\r
229 edges.push_back(bl_edge);
\r
233 BL_EDGE::BL_EDGE(TopoDS_Edge &ed,BL_SURFACE *b, Handle(Geom2d_Curve) pargeo, double tmin, double tmax)
\r
238 topology=ed; boss=b;
\r
239 parametric_geometry=pargeo;
\r
240 parametric_min=tmin; parametric_max=tmax;
\r
243 BL_EDGE::~BL_EDGE() { }
\r
245 void BL_EDGE::method_curv0(const double &t, double *C)
\r
249 P=parametric_geometry->Value(t);
\r
250 C[0]=P.X(); C[1]=P.Y();
\r
253 void BL_EDGE::method_curv1(const double &t, double *C)
\r
257 V1=parametric_geometry->DN(t,1);
\r
258 C[0]=V1.X(); C[1]=V1.Y();
\r
261 void BL_EDGE::method_curv2(const double &t, double *C)
\r
265 V2=parametric_geometry->DN(t,2);
\r
266 C[0]=V2.X(); C[1]=V2.Y();
\r
269 void BL_SURFACE::method_surf0(const double *UV, double *S)
\r
273 P=geometry->Value(UV[0],UV[1]); // S.D0(U,V,P);
\r
274 S[0]=P.X(); S[1]=P.Y(); S[2]=P.Z();
\r
277 void BL_SURFACE::method_surf1(const double *UV, double *Su, double *Sv)
\r
282 geometry->D1(UV[0],UV[1],P,D1U,D1V);
\r
283 Su[0]=D1U.X(); Su[1]=D1U.Y(); Su[2]=D1U.Z();
\r
284 Sv[0]=D1V.X(); Sv[1]=D1V.Y(); Sv[2]=D1V.Z();
\r
287 void BL_SURFACE::method_surf2(const double *UV, double *Suu, double *Suv, double *Svv)
\r
291 gp_Vec D2U,D2V,D2UV;
\r
293 geometry->D2(UV[0],UV[1],P,D1U,D1V,D2U,D2V,D2UV);
\r
294 Suu[0]=D2U.X(); Suu[1]=D2U.Y(); Suu[2]=D2U.Z();
\r
295 Suv[0]=D2UV.X(); Suv[1]=D2UV.Y(); Suv[2]=D2UV.Z();
\r
296 Svv[0]=D2V.X(); Svv[1]=D2V.Y(); Svv[2]=D2V.Z();
\r
299 static vector<BL_SURFACE*> *current_list_of_faces=NULL;
\r
300 BL_SURF* BL_SURF::active_blsurf=NULL;
\r
302 void cad_surf0 (blw_ *blw, int *refs, double *uv, double *S)
\r
304 BL_SURFACE *surf=(*current_list_of_faces)[*refs-1];
\r
305 surf->method_surf0(uv,S);
\r
308 void cad_surf1 (blw_ *blw, int *refs, double *uv, double *Su, double *Sv)
\r
310 BL_SURFACE *surf=(*current_list_of_faces)[*refs-1];
\r
311 surf->method_surf1(uv,Su,Sv);
\r
315 // double du, dv, uvg[2], uvd[2], uvb[2], uvh[2], Sg[3], Sd[3], Sb[3], Sh[3];
\r
316 // double Sucont[3], Svcont[3];
\r
317 // if (*refs == 33) {
\r
318 // Sucont[0] = Su[0]; Sucont[1] = Su[1]; Sucont[2] = Su[2];
\r
319 // Svcont[0] = Sv[0]; Svcont[1] = Sv[1]; Svcont[2] = Sv[2];
\r
320 // BL_SURFACE *surf=(*current_list_of_faces)[*refs-1];
\r
321 // du = (TSMO[*refs].uvmax[0] - TSMO[*refs].uvmin[0]) * 0.08;
\r
322 // dv = (TSMO[*refs].uvmax[1] - TSMO[*refs].uvmin[1]) * 0.08;
\r
323 // uvg[0] = uv[0]-du;
\r
325 // uvd[0] = uv[0]+du;
\r
328 // uvb[1] = uv[1]-dv;
\r
330 // uvh[1] = uv[1]+dv;
\r
331 // if (uvg[0] < TSMO[*refs].uvmin[0]) uvg[0] = TSMO[*refs].uvmin[0];
\r
332 // if (uvd[0] > TSMO[*refs].uvmax[0]) uvd[0] = TSMO[*refs].uvmax[0];
\r
333 // if (uvb[1] < TSMO[*refs].uvmin[1]) uvb[1] = TSMO[*refs].uvmin[1];
\r
334 // if (uvh[1] > TSMO[*refs].uvmax[1]) uvh[1] = TSMO[*refs].uvmax[1];
\r
335 // surf->method_surf0(uvg,Sg);
\r
336 // surf->method_surf0(uvd,Sd);
\r
337 // surf->method_surf0(uvb,Sb);
\r
338 // surf->method_surf0(uvh,Sh);
\r
339 // du = uvd[0] - uvg[0];
\r
340 // dv = uvh[1] - uvb[1];
\r
341 // Su[0] = (Sd[0] - Sg[0]) / du;
\r
342 // Su[1] = (Sd[1] - Sg[1]) / du;
\r
343 // Su[2] = (Sd[2] - Sg[2]) / du;
\r
344 // Sv[0] = (Sh[0] - Sb[0]) / dv;
\r
345 // Sv[1] = (Sh[1] - Sb[1]) / dv;
\r
346 // Sv[2] = (Sh[2] - Sb[2]) / dv;
\r
347 // fprintf(blw->out, "Su cont %g %g %g\n", Sucont[0], Sucont[1], Sucont[2]);
\r
348 // fprintf(blw->out, "Su disc %g %g %g\n", Su[0], Su[1], Su[2]);
\r
349 // fprintf(blw->out, "Sv cont %g %g %g\n", Svcont[0], Svcont[1], Svcont[2]);
\r
350 // fprintf(blw->out, "Sv disc %g %g %g\n", Sv[0], Sv[1], Sv[2]);
\r
353 void cad_surf2 (blw_ *blw, int *refs, double uv[2], double Suu[3], double Suv[3], double Svv[3])
\r
355 BL_SURFACE *surf=(*current_list_of_faces)[*refs-1];
\r
356 surf->method_surf2(uv,Suu,Suv,Svv);
\r
358 // // calcul discret
\r
359 // double du, dv, uvg[2], uvd[2], uvb[2], uvh[2], Sug[3], Sud[3], Sub[3], Suh[3], Svg[3], Svd[3], Svb[3], Svh[3];
\r
360 // double Suucont[3], Suvcont[3], Svvcont[3];
\r
361 // if (*refs >= 0) {
\r
362 // Suucont[0] = Suu[0]; Suucont[1] = Suu[1]; Suucont[2] = Suu[2];
\r
363 // Suvcont[0] = Suv[0]; Suvcont[1] = Suv[1]; Suvcont[2] = Suv[2];
\r
364 // Svvcont[0] = Svv[0]; Svvcont[1] = Svv[1]; Svvcont[2] = Svv[2];
\r
365 // du = (TSMO[*refs].uvmax[0] - TSMO[*refs].uvmin[0]) * 0.08;
\r
366 // dv = (TSMO[*refs].uvmax[1] - TSMO[*refs].uvmin[1]) * 0.08;
\r
367 // uvg[0] = uv[0]-du;
\r
369 // uvd[0] = uv[0]+du;
\r
372 // uvb[1] = uv[1]-dv;
\r
374 // uvh[1] = uv[1]+dv;
\r
375 // if (uvg[0] < TSMO[*refs].uvmin[0]) uvg[0] = TSMO[*refs].uvmin[0];
\r
376 // if (uvd[0] > TSMO[*refs].uvmax[0]) uvd[0] = TSMO[*refs].uvmax[0];
\r
377 // if (uvb[1] < TSMO[*refs].uvmin[1]) uvb[1] = TSMO[*refs].uvmin[1];
\r
378 // if (uvh[1] > TSMO[*refs].uvmax[1]) uvh[1] = TSMO[*refs].uvmax[1];
\r
379 // surf->method_surf1(uvg,Sug,Svg);
\r
380 // surf->method_surf1(uvd,Sud,Svd);
\r
381 // surf->method_surf1(uvb,Sub,Svb);
\r
382 // surf->method_surf1(uvh,Suh,Svh);
\r
383 // du = uvd[0] - uvg[0];
\r
384 // dv = uvh[1] - uvb[1];
\r
385 // Suu[0] = (Sud[0] - Sug[0]) / du;
\r
386 // Suu[1] = (Sud[1] - Sug[1]) / du;
\r
387 // Suu[2] = (Sud[2] - Sug[2]) / du;
\r
388 // Svv[0] = (Svh[0] - Svb[0]) / dv;
\r
389 // Svv[1] = (Svh[1] - Svb[1]) / dv;
\r
390 // Svv[2] = (Svh[2] - Svb[2]) / dv;
\r
391 // Suv[0] = ((Suh[0] - Sub[0]) / dv + (Svd[0] - Svg[0]) / du) * 0.5;
\r
392 // Suv[1] = ((Suh[1] - Sub[1]) / dv + (Svd[1] - Svg[1]) / du) * 0.5;
\r
393 // Suv[2] = ((Suh[2] - Sub[2]) / dv + (Svd[2] - Svg[2]) / du) * 0.5;
\r
394 // // fprintf(blw->out, "disc uv %g %g Suu %g %g %g\n", uv[0], uv[1], Suu[0], Suu[1], Suu[2]);
\r
395 // // fprintf(blw->out, "Suv disc %g %g %g\n", Suv[0], Suv[1], Suv[2]);
\r
396 // // fprintf(blw->out, "Svv disc %g %g %g\n", Svv[0], Svv[1], Svv[2]);
\r
400 void cad_curvint (blw_ *blw, int *refs, int *ic, double *a, double *b)
\r
402 *a=(*current_list_of_faces)[*refs-1]->edges[*ic-1]->parametric_min;
\r
403 *b=(*current_list_of_faces)[*refs-1]->edges[*ic-1]->parametric_max;
\r
406 void cad_curv0 (blw_ *blw, int *refs, int *ic, double *t, double *C)
\r
408 (*current_list_of_faces)[*refs-1]->edges[*ic-1]->method_curv0(*t,C);
\r
411 void cad_curv1 (blw_ *blw, int *refs, int *ic, double *t, double *Ct)
\r
413 (*current_list_of_faces)[*refs-1]->edges[*ic-1]->method_curv1(*t,Ct);
\r
416 void cad_curv2 (blw_ *blw, int *refs, int *ic, double *t, double *Ctt)
\r
418 (*current_list_of_faces)[*refs-1]->edges[*ic-1]->method_curv2(*t,Ctt);
\r
421 void cad_hphys (blw_ *blw, int *refs, double *uv, double *h) {}
\r
422 void cad_hphyc (blw_ *blw, int *refs, int *ic, double *t, double *h) {}
\r
423 void cad_hphyp (blw_ *blw, int *refp, double *h) {}
\r
425 void cad_rads (blw_ *blw, int *refs, double *uv, double *rhos) {
\r
426 sprintf(blw->error, "cad_rads should not be called\n");
\r
429 void cad_radc (blw_ *blw, int *refs, int *ic, double *t, double *rhoc) {
\r
430 sprintf(blw->error, "cad_radc should not be called");
\r
433 void cad_hageos(blw_ *blw, int *refs, double uv[2], double hageos[6]) {
\r
434 sprintf(blw->error, "cad_hageos should not be called\n");
\r
437 void cad_refphyc(blw_ *blw, int *refc, int *phyc) {
\r
441 void cad_refphyp(blw_ *blw, int *refp, int *phyp) {
\r
445 void cad_refphys(blw_ *blw, int *refs, int *phys) {
\r
449 void cad_edgetag(blw_ *blw, int *refc, int *required) {
\r
453 void cad_curvparam(blw_ *blw, int *refs, int *ic, int *n, double tab[]) {
\r
457 void BL_SURF::init_tsmo(blw_ *blw) { /* cf. bls_read_pardom */
\r
458 int is, ns, ic, nc, j, igloP, igloQ, isurf;
\r
461 double a, b, uv[2], xyz[3], xyzP[3], xyzQ[3];
\r
463 ns = surfaces.size();
\r
464 if (blw->env.verb >= 10) fprintf(blw->out, "\ninit_tsmo: %d surfaces\n", ns);
\r
467 blw->bls_glo.number_of_patches = 0;
\r
471 TopTools_IndexedMapOfShape fmap_edges;
\r
472 TopTools_IndexedMapOfShape fmap_points;
\r
473 fmap_edges.Clear();
\r
474 fmap_points.Clear();
\r
475 for (isurf=0; isurf<ns; isurf++) {
\r
476 TopoDS_Face face = surfaces[isurf]->topology;
\r
477 for (TopExp_Explorer ex_face(face ,TopAbs_EDGE); ex_face.More(); ex_face.Next()) {
\r
478 TopoDS_Edge e = TopoDS::Edge(ex_face.Current());
\r
479 if (fmap_edges.FindIndex(e) <= 0) { /* not found => FindIndex = 0, found => FindIndex > 0 */
\r
482 for (TopExp_Explorer ex_edge(e ,TopAbs_VERTEX); ex_edge.More(); ex_edge.Next()) {
\r
483 v = TopoDS::Vertex(ex_edge.Current());
\r
485 if (fmap_points.FindIndex(v) <= 0) fmap_points.Add(v);
\r
488 sprintf(blw->error, "init_tsmo: surface is=%d: an edge has %d != 2 extremities\n", isurf+1, j); return;
\r
494 MALLOC(surface_, TSMO, ns+1); if (blw->error[0]) return;
\r
495 blw->bls_glo.number_of_patches = ns;
\r
496 for (isurf=0; isurf<ns; isurf++) {
\r
498 nc = surfaces[isurf]->edges.size();
\r
499 if (blw->env.verb >= 70) fprintf(blw->out, "init_tsmo: surface is=%d: %d curves\n", is, nc);
\r
501 bls_init_surface(blw, &(TSMO[is]), nc);
\r
502 TSMO[is].iglos = is;
\r
503 TSMO[is].pardom_side = 0;
\r
504 TSMO[is].surforient = +1;
\r
505 for (int icurv=0;icurv<nc;icurv++) {
\r
507 TSMO[is].TC[ic].typc = 1;
\r
508 BL_EDGE* curve = surfaces[isurf]->edges[icurv];
\r
509 TopoDS_Edge edge = curve->topology;
\r
510 TSMO[is].TC[ic].igloc = fmap_edges.FindIndex(edge);
\r
512 TopExp_Explorer ex_edge(edge, TopAbs_VERTEX);
\r
513 v = TopoDS::Vertex(ex_edge.Current());
\r
514 p = BRep_Tool::Pnt(v);
\r
515 xyzP[0] = p.X(); xyzP[1] = p.Y(); xyzP[2] = p.Z();
\r
516 igloP = fmap_points.FindIndex(v);
\r
519 v = TopoDS::Vertex(ex_edge.Current());
\r
520 p = BRep_Tool::Pnt(v);
\r
521 xyzQ[0] = p.X(); xyzQ[1] = p.Y(); xyzQ[2] = p.Z();
\r
522 igloQ = fmap_points.FindIndex(v);
\r
524 cad_curvint (blw, &is, &ic, &a, &b);
\r
525 cad_curv0 (blw, &is, &ic, &a, uv);
\r
526 cad_surf0 (blw, &is, uv, xyz);
\r
527 xyzP[0] -= xyz[0]; xyzP[1] -= xyz[1]; xyzP[2] -= xyz[2];
\r
528 xyzQ[0] -= xyz[0]; xyzQ[1] -= xyz[1]; xyzQ[2] -= xyz[2];
\r
529 if (NORM3DPOW2(xyzP) <= NORM3DPOW2(xyzQ)) {
\r
530 TSMO[is].TC[ic].iglope[0] = igloP;
\r
531 TSMO[is].TC[ic].iglope[1] = igloQ;
\r
533 TSMO[is].TC[ic].iglope[0] = igloQ;
\r
534 TSMO[is].TC[ic].iglope[1] = igloP;
\r
540 int BL_SURF::bls_main(blw_ *blw) {
\r
545 bls_banner(blw, 1);
\r
547 /* initialiser l'environnement de BLSURF */
\r
550 /* lire l'environnement de BLSURF */
\r
551 /* par defaut : strcpy(blw->dirname, ""); */
\r
552 /* sinon : strcpy(blw->dirname, "C:\\Documents and Settings\\xxx\\"); */
\r
553 sprintf(blw->filename, "%sblsurf.env", blw->dirname);
\r
555 if (blw->error[0]) {
\r
556 fprintf(blw->out, "File blsurf.env not found. Default values will be used.\n");
\r
559 read_blsenv(blw, file);
\r
561 if (blw->error[0]) goto error; /* read_blsenv: unknown keyword */
\r
564 /* copier les variables communes entre "bl2denv" et blsenv (en particulier verb) */
\r
565 copy_common_env(blw);
\r
567 /* imprimer l'environnement de BLSURF */
\r
568 if (blw->env.verb >= 70) print_blsenv(blw);
\r
570 /* initialiser TSMO */
\r
571 current_list_of_faces = &surfaces;
\r
572 BL_SURF::init_tsmo(blw); if (blw->error[0]) goto error;
\r
574 /* generer le maillage surfacique */
\r
575 bls_init(blw); if (blw->error[0]) goto error;
\r
576 bls_mesh(blw); if (blw->error[0]) goto error;
\r
577 bls_surforient(blw); if (blw->error[0]) goto error;
\r
578 bls_export(blw); if (blw->error[0]) goto error;
\r
579 /* a voir : les tableaux pointes par current_list_of_faces sont liberes ? handles ? */
\r
581 bls_banner(blw, 2);
\r
585 fprintf(blw->out, "\nBLSURF ERROR MESSAGE:\n%s\n", blw->error);
\r
586 bls_banner(blw, 2);
\r