diff --git a/Common/Context.h b/Common/Context.h index 531cb0fcf13d45fb82b89c5f67fd75cb1548602b..d9180ebb3359a96ad14cd6ee3bb44325dc01e905 100644 --- a/Common/Context.h +++ b/Common/Context.h @@ -147,7 +147,7 @@ public : int point_type, line_type; // flat or 3D int draw, light; int old_circle, circle_points; - int extrude_spline_points, old_newreg; + int extrude_spline_points, extrude_return_lateral, old_newreg; double normals, tangents; double scaling_factor; int auto_coherence, highlight_orphans; diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h index 69aa38998a9e6b71684ba7229eb12a4137915bf3..baa5a1281561924ef677fe7574af530594675583 100644 --- a/Common/DefaultOptions.h +++ b/Common/DefaultOptions.h @@ -792,6 +792,8 @@ StringXNumber GeometryOptions_Number[] = { { F|O, "CirclePoints" , opt_geometry_circle_points, 20. , "Number of points used to draw a circle/ellipse" }, + { F|O, "ExtrudeReturnLateralEntities" , opt_geometry_extrude_return_lateral, 1. , + "Add lateral entities in lists returned by extrusion commands?" }, { F|O, "ExtrudeSplinePoints" , opt_geometry_extrude_spline_points, 5. , "Number of control points for splines created during extrusion" }, diff --git a/Common/Options.cpp b/Common/Options.cpp index edc644fdeecc109d4005b8e37301abca8caae955..632757f8cb5f7ae1666e53899b806f6a3c077147 100644 --- a/Common/Options.cpp +++ b/Common/Options.cpp @@ -1,4 +1,4 @@ -// $Id: Options.cpp,v 1.338 2007-03-18 12:05:16 geuzaine Exp $ +// $Id: Options.cpp,v 1.339 2007-04-05 12:51:28 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -4083,6 +4083,13 @@ double opt_geometry_extrude_spline_points(OPT_ARGS_NUM) return CTX.geom.extrude_spline_points; } +double opt_geometry_extrude_return_lateral(OPT_ARGS_NUM) +{ + if(action & GMSH_SET) + CTX.geom.extrude_return_lateral = (int)val; + return CTX.geom.extrude_return_lateral; +} + double opt_geometry_scaling_factor(OPT_ARGS_NUM) { if(action & GMSH_SET) diff --git a/Common/Options.h b/Common/Options.h index 2ffe7e58119a77652a3e478aae4e73759539c888..21d6bce11b2497cf38abbcc99ce30aa53f22ad4c 100644 --- a/Common/Options.h +++ b/Common/Options.h @@ -401,7 +401,6 @@ double opt_geometry_point_size(OPT_ARGS_NUM); double opt_geometry_point_sel_size(OPT_ARGS_NUM); double opt_geometry_point_type(OPT_ARGS_NUM); double opt_geometry_line_width(OPT_ARGS_NUM); -double opt_mesh_label_frequency(OPT_ARGS_NUM); double opt_geometry_line_sel_width(OPT_ARGS_NUM); double opt_geometry_line_type(OPT_ARGS_NUM); double opt_geometry_light(OPT_ARGS_NUM); @@ -412,10 +411,12 @@ double opt_geometry_old_circle(OPT_ARGS_NUM); double opt_geometry_old_newreg(OPT_ARGS_NUM); double opt_geometry_circle_points(OPT_ARGS_NUM); double opt_geometry_extrude_spline_points(OPT_ARGS_NUM); +double opt_geometry_extrude_return_lateral(OPT_ARGS_NUM); double opt_geometry_scaling_factor(OPT_ARGS_NUM); double opt_geometry_snap0(OPT_ARGS_NUM); double opt_geometry_snap1(OPT_ARGS_NUM); double opt_geometry_snap2(OPT_ARGS_NUM); +double opt_mesh_label_frequency(OPT_ARGS_NUM); double opt_mesh_optimize(OPT_ARGS_NUM); double opt_mesh_normals(OPT_ARGS_NUM); double opt_mesh_tangents(OPT_ARGS_NUM); diff --git a/Geo/Geo.cpp b/Geo/Geo.cpp index bafe9c87ec50157303082581ef62f749a20a9613..10c0cf590a0186d2addc1994cd9ea0a6d8d9a2e9 100644 --- a/Geo/Geo.cpp +++ b/Geo/Geo.cpp @@ -1,4 +1,4 @@ -// $Id: Geo.cpp,v 1.87 2007-03-23 08:44:41 geuzaine Exp $ +// $Id: Geo.cpp,v 1.88 2007-04-05 12:51:28 geuzaine Exp $ // // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // @@ -2391,14 +2391,16 @@ void ExtrudeShapes(int type, List_T *list_in, body.Num = ps->Num; body.Type = ps->Typ; List_Add(list_out, &body); - for(int j = 0; j < List_Nbr(ps->Generatrices); j++){ - Curve *c; - List_Read(ps->Generatrices, j, &c); - if(abs(c->Num) != shape.Num && abs(c->Num) != top.Num){ - Shape side; - side.Num = c->Num; - side.Type = c->Typ; - List_Add(list_out, &side); + if(CTX.geom.extrude_return_lateral){ + for(int j = 0; j < List_Nbr(ps->Generatrices); j++){ + Curve *c; + List_Read(ps->Generatrices, j, &c); + if(abs(c->Num) != shape.Num && abs(c->Num) != top.Num){ + Shape side; + side.Num = c->Num; + side.Type = c->Typ; + List_Add(list_out, &side); + } } } } @@ -2422,14 +2424,16 @@ void ExtrudeShapes(int type, List_T *list_in, body.Num = pv->Num; body.Type = pv->Typ; List_Add(list_out, &body); - for(int j = 0; j < List_Nbr(pv->Surfaces); j++){ - Surface *s; - List_Read(pv->Surfaces, j, &s); - if(abs(s->Num) != shape.Num && abs(s->Num) != top.Num){ - Shape side; - side.Num = s->Num; - side.Type = s->Typ; - List_Add(list_out, &side); + if(CTX.geom.extrude_return_lateral){ + for(int j = 0; j < List_Nbr(pv->Surfaces); j++){ + Surface *s; + List_Read(pv->Surfaces, j, &s); + if(abs(s->Num) != shape.Num && abs(s->Num) != top.Num){ + Shape side; + side.Num = s->Num; + side.Type = s->Typ; + List_Add(list_out, &side); + } } } } diff --git a/doc/texinfo/opt_geometry.texi b/doc/texinfo/opt_geometry.texi index 41a23cf3d6eb1ac67717514b0007574283fdc8a0..39bdd864d5084b32b2bcd3f0b9fdaf46bc22bfec 100644 --- a/doc/texinfo/opt_geometry.texi +++ b/doc/texinfo/opt_geometry.texi @@ -14,6 +14,11 @@ Number of points used to draw a circle/ellipse@* Default value: @code{20}@* Saved in: @code{General.OptionsFileName} +@item Geometry.ExtrudeReturnLateralEntities +Add lateral entities in lists returned by extrusion commands?@* +Default value: @code{1}@* +Saved in: @code{General.OptionsFileName} + @item Geometry.ExtrudeSplinePoints Number of control points for splines created during extrusion@* Default value: @code{5}@* diff --git a/doc/texinfo/opt_view.texi b/doc/texinfo/opt_view.texi index 1ab71ff8f2694dc4925690de336fa113aee3ae15..24ab0a3388988119210fb44df1f30726da7f57f8 100644 --- a/doc/texinfo/opt_view.texi +++ b/doc/texinfo/opt_view.texi @@ -396,42 +396,42 @@ Saved in: @code{General.OptionsFileName} @item View.Max Maximum value in the view (read-only)@* -Default value: @code{-2.22195e-146}@* +Default value: @code{0}@* Saved in: @code{-} @item View.MaxX Maximum view coordinate along the X-axis (read-only)@* -Default value: @code{-2.22195e-146}@* +Default value: @code{0}@* Saved in: @code{-} @item View.MaxY Maximum view coordinate along the Y-axis (read-only)@* -Default value: @code{-2.22195e-146}@* +Default value: @code{0}@* Saved in: @code{-} @item View.MaxZ Maximum view coordinate along the Z-axis (read-only)@* -Default value: @code{-2.22195e-146}@* +Default value: @code{0}@* Saved in: @code{-} @item View.Min Minimum value in the view (read-only)@* -Default value: @code{-2.22195e-146}@* +Default value: @code{0}@* Saved in: @code{-} @item View.MinX Minimum view coordinate along the X-axis (read-only)@* -Default value: @code{-2.22195e-146}@* +Default value: @code{0}@* Saved in: @code{-} @item View.MinY Minimum view coordinate along the Y-axis (read-only)@* -Default value: @code{-2.22195e-146}@* +Default value: @code{0}@* Saved in: @code{-} @item View.MinZ Minimum view coordinate along the Z-axis (read-only)@* -Default value: @code{-2.22195e-146}@* +Default value: @code{0}@* Saved in: @code{-} @item View.NbIso