Skip to content
Snippets Groups Projects
Commit bee1546c authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

add 'automatic' option for saving views

parent 1d90e12b
Branches
Tags
No related merge requests found
......@@ -1313,9 +1313,10 @@ StringXNumber PostProcessingOptions_Number[] = {
{ F|O, "CombineRemoveOriginal" , opt_post_combine_remove_orig , 1. ,
"Remove original views after a Combine operation" },
{ F|O, "Format" , opt_post_file_format , 2. ,
{ F|O, "Format" , opt_post_file_format , 10. ,
"Default file format for post-processing views (0=ASCII view, 1=binary "
"view, 2=parsed view, 3=STL triangulation, 4=raw text, 5=Gmsh mesh, 6=MED file)" },
"view, 2=parsed view, 3=STL triangulation, 4=raw text, 5=Gmsh mesh, 6=MED file, "
"10=automatic)" },
{ F|O, "HorizontalScales" , opt_post_horizontal_scales , 1. ,
"Display value scales horizontally" },
......
......@@ -318,8 +318,10 @@ void PView::registerBindings(binding *b) {
methodBinding *cm;
cm = cb->addMethod("write",&PView::write);
cm->setArgNames("fileName","format","append",NULL);
cm->setDescription("write data to a file. Format can be : 0 for ascii pos file, 1 for binary pos file, 2 for parsed pos file, 3 for STL, 4 for TXT, 5 for MSH and 6 for MED files. 'append' option is only supported for pos format.");
cm->setDescription("write data to a file. Format can be: 0 for ascii pos file, "
"1 for binary pos file, 2 for parsed pos file, 3 for STL, "
"4 for TXT, 5 for MSH, 6 for MED files, or 10 for automatic. "
"'append' option is only supported for pos format.");
cm = cb->addMethod("getData",&PView::getData);
cm->setArgNames("useAdaptiveIfAvailable",NULL);
cm->setDescription("return the structure containing the data of this view.");
......
......@@ -266,6 +266,21 @@ bool PView::write(std::string fileName, int format, bool append)
case 4: ret = _data->writeTXT(fileName); break;
case 5: ret = _data->writeMSH(fileName); break;
case 6: ret = _data->writeMED(fileName); break;
case 10:
{
std::string ext = SplitFileName(fileName)[2];
if(ext == ".pos")
ret = _data->writePOS(fileName, false, true, append);
else if(ext == ".stl")
ret = _data->writeSTL(fileName);
else if(ext == ".msh")
ret = _data->writeMSH(fileName);
else if(ext == ".med")
ret = _data->writeMED(fileName);
else
ret = _data->writeTXT(fileName);
break;
}
default: ret = false; Msg::Error("Unknown view format %d", format); break;
}
......
......@@ -4,6 +4,11 @@
@c
@ftable @code
@item Plugin(AnalyseCurvedMesh)
Plugin(AnalyseCurvedMesh) computes AnalyseCurvedMeshs to boundaries in a mesh.
Plugin(AnalyseCurvedMesh) creates a bunch of files.
@item Plugin(Annotate)
Plugin(Annotate) adds the text string `Text', in font `Font' and size `FontSize', in the view `View'. The string is aligned according to `Align'.
......@@ -177,9 +182,37 @@ Default value: @code{-1}
@end table
@item Plugin(Distance)
Plugin(Distance) computes distances to boundaries in a mesh.
Plugin(Distance) computes distances to physical entities in a mesh.
Define the physical entities to which the distance is computed. If Point=0, Line=0, and Surface=0, then the distance is computed to all the boundaries of the mesh (edges in 2D and faces in 3D).
Computation<0. computes the geometrical euclidian distance (warning: different than the geodesic distance), and Computation=a>0.0 solves a PDE on the mesh with the diffusion constant mu = a*bbox, with bbox being the max size of the bounding box of the mesh (see paper Legrand 2006).
Plugin(Distance) creates a bunch of files.
Min Scale and max Scale, scale the distance function. If min Scale<0 and max Scale<0, then no scaling is applied to the distance function.
Plugin(Distance) creates a new distance view and also saves the view in the fileName.pos file.
String options:
@table @code
@item Filename
Default value: @code{"distance.pos"}
@end table
Numeric options:
@table @code
@item PhysPoint
Default value: @code{0}
@item PhysLine
Default value: @code{0}
@item PhysSurface
Default value: @code{0}
@item Computation
Default value: @code{-1}
@item MinScale
Default value: @code{-1}
@item MaxScale
Default value: @code{-1}
@item Orthogonal
Default value: @code{-1}
@end table
@item Plugin(Divergence)
Plugin(Divergence) computes the divergence of the field in the view `View'.
......@@ -594,6 +627,18 @@ Default value: @code{1}
Default value: @code{-1}
@end table
@item Plugin(NearestNeighbor)
Plugin(NearestNeighbor) computes the distance from each point in `View' to its nearest neighbor.
If `View' < 0, the plugin is run on the current view.
Plugin(NearestNeighbor) is executed in-place.
Numeric options:
@table @code
@item View
Default value: @code{-1}
@end table
@item Plugin(Particles)
Plugin(Particles) computes the trajectory of particules in the force field given by the `TimeStep'-th time step of a vector view `View'.
......@@ -707,13 +752,15 @@ Default value: @code{-1}
@end table
@item Plugin(Skin)
Plugin(Skin) extracts the boundary (skin) of the view `View'.
Plugin(Skin) extracts the boundary (skin) of the view `View'. If `Visible' is set, the plugin only extracts the skin of visible entities.
If `View' < 0, the plugin is run on the current view.
Plugin(Skin) creates one new view.
Numeric options:
@table @code
@item Visible
Default value: @code{1}
@item View
Default value: @code{-1}
@end table
......
......@@ -6,11 +6,11 @@
@ftable @code
@item PostProcessing.AnimationDelay
Delay (in seconds) between frames in automatic animation mode@*
Default value: @code{0.25}@*
Default value: @code{0.1}@*
Saved in: @code{General.OptionsFileName}
@item PostProcessing.AnimationCycle
Cycle through views instead of time steps in automatic animation mode@*
Cycle through time steps (0) or views (1) for animations@*
Default value: @code{0}@*
Saved in: @code{General.OptionsFileName}
......@@ -20,8 +20,8 @@ Default value: @code{1}@*
Saved in: @code{General.OptionsFileName}
@item PostProcessing.Format
Default file format for post-processing views (0=ASCII view, 1=binary view, 2=parsed view, 3=STL triangulation, 4=raw text, 5=Gmsh mesh, 6=MED file)@*
Default value: @code{2}@*
Default file format for post-processing views (0=ASCII view, 1=binary view, 2=parsed view, 3=STL triangulation, 4=raw text, 5=Gmsh mesh, 6=MED file, 10=automatic)@*
Default value: @code{10}@*
Saved in: @code{General.OptionsFileName}
@item PostProcessing.HorizontalScales
......
......@@ -9,6 +9,11 @@ Composite all window tiles in the same output image (for bitmap output only)@*
Default value: @code{0}@*
Saved in: @code{General.OptionsFileName}
@item Print.DeleteTemporaryFiles
Delete temporary files used during printing@*
Default value: @code{1}@*
Saved in: @code{General.OptionsFileName}
@item Print.EpsBackground
Save image background in PostScript/PDF output@*
Default value: @code{1}@*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment