Commit 78852029 authored by hrchilds's avatar hrchilds
Browse files

Update from April 28, 2004

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@231 18c085ea-50e0-402c-830e-de6fd14e8384
parent c8066f9f
......@@ -11,7 +11,7 @@
// Note: Autogenerated by xml2python. Do not modify by hand!
//
// Programmer: xml2python
// Creation: Tue Jul 8 20:25:48 PST 2003
// Creation: Wed Apr 28 10:14:10 PDT 2004
//
// ****************************************************************************
......@@ -715,6 +715,148 @@ SliceAttributes_print(PyObject *v, FILE *fp, int flags)
return 0;
}
#include <snprintf.h>
PyObject *
PySliceAttributes_StringRepresentation(const SliceAttributes *atts)
{
std::string str;
char tmpStr[1000];
const char *originType_names = "Point, Intercept, Percent, Zone, Node";
if(atts->GetOriginType() == SliceAttributes::Point)
{
SNPRINTF(tmpStr, 10000, "originType = Point # %s\n", originType_names);
str += tmpStr;
}
else if(atts->GetOriginType() == SliceAttributes::Intercept)
{
SNPRINTF(tmpStr, 10000, "originType = Intercept # %s\n", originType_names);
str += tmpStr;
}
else if(atts->GetOriginType() == SliceAttributes::Percent)
{
SNPRINTF(tmpStr, 10000, "originType = Percent # %s\n", originType_names);
str += tmpStr;
}
else if(atts->GetOriginType() == SliceAttributes::Zone)
{
SNPRINTF(tmpStr, 10000, "originType = Zone # %s\n", originType_names);
str += tmpStr;
}
else
{
SNPRINTF(tmpStr, 10000, "originType = Node # %s\n", originType_names);
str += tmpStr;
}
{ const double *originPoint = atts->GetOriginPoint();
SNPRINTF(tmpStr, 1000, "originPoint = (");
str += tmpStr;
for(int i = 0; i < 3; ++i)
{
SNPRINTF(tmpStr, 1000, "%g", originPoint[i]);
str += tmpStr;
if(i < 2)
{
SNPRINTF(tmpStr, 1000, ", ");
str += tmpStr;
}
}
SNPRINTF(tmpStr, 1000, ")\n");
str += tmpStr;
}
SNPRINTF(tmpStr, 1000, "originIntercept = %g\n", atts->GetOriginIntercept());
str += tmpStr;
SNPRINTF(tmpStr, 1000, "originPercent = %g\n", atts->GetOriginPercent());
str += tmpStr;
SNPRINTF(tmpStr, 1000, "originZone = %d\n", atts->GetOriginZone());
str += tmpStr;
SNPRINTF(tmpStr, 1000, "originNode = %d\n", atts->GetOriginNode());
str += tmpStr;
{ const double *normal = atts->GetNormal();
SNPRINTF(tmpStr, 1000, "normal = (");
str += tmpStr;
for(int i = 0; i < 3; ++i)
{
SNPRINTF(tmpStr, 1000, "%g", normal[i]);
str += tmpStr;
if(i < 2)
{
SNPRINTF(tmpStr, 1000, ", ");
str += tmpStr;
}
}
SNPRINTF(tmpStr, 1000, ")\n");
str += tmpStr;
}
const char *axisType_names = "XAxis, YAxis, ZAxis, Arbitrary";
if(atts->GetAxisType() == SliceAttributes::XAxis)
{
SNPRINTF(tmpStr, 10000, "axisType = XAxis # %s\n", axisType_names);
str += tmpStr;
}
else if(atts->GetAxisType() == SliceAttributes::YAxis)
{
SNPRINTF(tmpStr, 10000, "axisType = YAxis # %s\n", axisType_names);
str += tmpStr;
}
else if(atts->GetAxisType() == SliceAttributes::ZAxis)
{
SNPRINTF(tmpStr, 10000, "axisType = ZAxis # %s\n", axisType_names);
str += tmpStr;
}
else
{
SNPRINTF(tmpStr, 10000, "axisType = Arbitrary # %s\n", axisType_names);
str += tmpStr;
}
{ const double *upAxis = atts->GetUpAxis();
SNPRINTF(tmpStr, 1000, "upAxis = (");
str += tmpStr;
for(int i = 0; i < 3; ++i)
{
SNPRINTF(tmpStr, 1000, "%g", upAxis[i]);
str += tmpStr;
if(i < 2)
{
SNPRINTF(tmpStr, 1000, ", ");
str += tmpStr;
}
}
SNPRINTF(tmpStr, 1000, ")\n");
str += tmpStr;
}
if(atts->GetProject2d())
SNPRINTF(tmpStr, 1000, "project2d = 1\n");
else
SNPRINTF(tmpStr, 1000, "project2d = 0\n");
str += tmpStr;
if(atts->GetInteractive())
SNPRINTF(tmpStr, 1000, "interactive = 1\n");
else
SNPRINTF(tmpStr, 1000, "interactive = 0\n");
str += tmpStr;
if(atts->GetFlip())
SNPRINTF(tmpStr, 1000, "flip = 1\n");
else
SNPRINTF(tmpStr, 1000, "flip = 0\n");
str += tmpStr;
SNPRINTF(tmpStr, 1000, "originZoneDomain = %d\n", atts->GetOriginZoneDomain());
str += tmpStr;
SNPRINTF(tmpStr, 1000, "originNodeDomain = %d\n", atts->GetOriginNodeDomain());
str += tmpStr;
return PyString_FromString(str.c_str());
}
static PyObject *
SliceAttributes_str(PyObject *v)
{
SliceAttributesObject *obj = (SliceAttributesObject *)v;
return PySliceAttributes_StringRepresentation(obj->data);
}
//
// The doc string for the class.
//
......@@ -753,7 +895,7 @@ static PyTypeObject SliceAttributesType =
//
0, // tp_hash
0, // tp_call
0, // tp_str
(reprfunc)SliceAttributes_str, // tp_str
0, // tp_getattro
0, // tp_setattro
0, // tp_as_buffer
......
......@@ -16,5 +16,7 @@ PyObject *PySliceAttributes_WrapPyObject(const SliceAttributes *attr);
void PySliceAttributes_SetLogging(bool val);
void PySliceAttributes_SetDefaults(const SliceAttributes *atts);
PyObject *PySliceAttributes_StringRepresentation(const SliceAttributes *atts);
#endif
......@@ -15,7 +15,7 @@
Node
</Enum>
<Field name="originType" label="originType" type="enum" subtype="OriginType">
Point
Intercept
</Field>
<Field name="originPoint" label="originPoint" type="doubleArray" length="3" enabler="originType:Point">
0.000000
......
......@@ -87,7 +87,7 @@ SliceAttributes::OriginType_FromString(const std::string &s, SliceAttributes::Or
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Mar 16 12:22:16 PDT 2004
// Creation: Wed Apr 28 10:13:42 PDT 2004
//
// Modifications:
//
......@@ -95,7 +95,7 @@ SliceAttributes::OriginType_FromString(const std::string &s, SliceAttributes::Or
SliceAttributes::SliceAttributes() : AttributeSubject("iDddiiDiDbbbii")
{
originType = Point;
originType = Intercept;
originPoint[0] = 0;
originPoint[1] = 0;
originPoint[2] = 0;
......@@ -126,7 +126,7 @@ SliceAttributes::SliceAttributes() : AttributeSubject("iDddiiDiDbbbii")
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Mar 16 12:22:16 PDT 2004
// Creation: Wed Apr 28 10:13:42 PDT 2004
//
// Modifications:
//
......@@ -170,7 +170,7 @@ SliceAttributes::SliceAttributes(const SliceAttributes &obj) : AttributeSubject(
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Mar 16 12:22:16 PDT 2004
// Creation: Wed Apr 28 10:13:42 PDT 2004
//
// Modifications:
//
......@@ -190,7 +190,7 @@ SliceAttributes::~SliceAttributes()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Mar 16 12:22:16 PDT 2004
// Creation: Wed Apr 28 10:13:42 PDT 2004
//
// Modifications:
//
......@@ -235,7 +235,7 @@ SliceAttributes::operator = (const SliceAttributes &obj)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Mar 16 12:22:16 PDT 2004
// Creation: Wed Apr 28 10:13:42 PDT 2004
//
// Modifications:
//
......@@ -287,7 +287,7 @@ SliceAttributes::operator == (const SliceAttributes &obj) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Mar 16 12:22:16 PDT 2004
// Creation: Wed Apr 28 10:13:42 PDT 2004
//
// Modifications:
//
......@@ -308,7 +308,7 @@ SliceAttributes::operator != (const SliceAttributes &obj) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Mar 16 12:22:16 PDT 2004
// Creation: Wed Apr 28 10:13:42 PDT 2004
//
// Modifications:
//
......@@ -433,7 +433,7 @@ SliceAttributes::CreateCompatible(const std::string &tname) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Mar 16 12:22:16 PDT 2004
// Creation: Wed Apr 28 10:13:42 PDT 2004
//
// Modifications:
//
......@@ -460,7 +460,7 @@ SliceAttributes::NewInstance(bool copy) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Mar 16 12:22:16 PDT 2004
// Creation: Wed Apr 28 10:13:42 PDT 2004
//
// Modifications:
//
......@@ -498,7 +498,7 @@ SliceAttributes::SelectAll()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Mar 16 12:22:16 PDT 2004
// Creation: Wed Apr 28 10:13:42 PDT 2004
//
// Modifications:
//
......@@ -618,7 +618,7 @@ SliceAttributes::CreateNode(DataNode *parentNode, bool completeSave, bool forceA
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Mar 16 12:22:16 PDT 2004
// Creation: Wed Apr 28 10:13:42 PDT 2004
//
// Modifications:
//
......@@ -947,7 +947,7 @@ SliceAttributes::SelectUpAxis()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Mar 16 12:22:16 PDT 2004
// Creation: Wed Apr 28 10:13:42 PDT 2004
//
// Modifications:
//
......@@ -985,7 +985,7 @@ SliceAttributes::GetFieldName(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Mar 16 12:22:16 PDT 2004
// Creation: Wed Apr 28 10:13:42 PDT 2004
//
// Modifications:
//
......@@ -1023,7 +1023,7 @@ SliceAttributes::GetFieldType(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Mar 16 12:22:16 PDT 2004
// Creation: Wed Apr 28 10:13:42 PDT 2004
//
// Modifications:
//
......@@ -1061,7 +1061,7 @@ SliceAttributes::GetFieldTypeName(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Mar 16 12:22:16 PDT 2004
// Creation: Wed Apr 28 10:13:42 PDT 2004
//
// Modifications:
//
......
......@@ -12,7 +12,7 @@
// Notes: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Thu Dec 18 11:50:11 PDT 2003
// Creation: Wed Apr 28 10:13:42 PDT 2004
//
// Modifications:
//
......
......@@ -13,7 +13,7 @@ import llnl.visit.Plugin;
// Notes: Autogenerated by xml2java.
//
// Programmer: xml2java
// Creation: Tue Mar 16 12:22:29 PDT 2004
// Creation: Wed Apr 28 10:13:55 PDT 2004
//
// Modifications:
//
......@@ -38,7 +38,7 @@ public class SliceAttributes extends AttributeSubject implements Plugin
{
super(14);
originType = ORIGINTYPE_POINT;
originType = ORIGINTYPE_INTERCEPT;
originPoint = new double[3];
originPoint[0] = 0;
originPoint[1] = 0;
......
......@@ -310,12 +310,16 @@ avtPseudocolorPlot::ApplyRenderingTransformation(avtDataObject_p input)
// Kathleen Bonnell, Mon Sep 29 13:07:50 PDT 2003
// Set AntialiasedRenderOrder.
//
// Kathleen Bonnell, Wed Apr 28 17:37:47 PDT 2004
// Chagned 'SetLegendRanges' to 'SetLimitsMode', as the legend ranges are
// dependent upon values set in SetLimitsMode.
//
// ****************************************************************************
void
avtPseudocolorPlot::CustomizeBehavior()
{
SetLegendRanges();
SetLimitsMode(atts.GetLimitsMode());
if (atts.GetOpacity() < 1.)
{
......
......@@ -3096,6 +3096,9 @@ ViewerQueryManager::UpdateQueryOverTimeAtts()
// Modify the way centering-consistency-checks are performed, so
// that Material vars will get evaluated correctly.
//
// Kathleen Bonnell, Wed Apr 28 11:11:28 PDT 2004
// Added retry capability if engine is dead.
//
// ***********************************************************************
void
......@@ -3250,46 +3253,92 @@ ViewerQueryManager::DoTimeQuery(ViewerWindow *origWin, QueryAttributes *qA)
int pid = plotList->AddPlot(plotType, vName, replacePlots, false);
ViewerPlot *resultsPlot = plotList->GetPlot(pid);
// Make sure we will be using a cloned network
resultsPlot->SetCloneId(origPlot->GetNetworkID());
resultsPlot->SetSILRestriction(origPlot->GetSILRestriction());
timeQueryAtts->SetQueryAtts(*qA);
bool retry = false;
int numAttempts = 0;
TRY
{
ViewerEngineManager::Instance()->CloneNetwork(
origPlot->GetEngineKey(), origPlot->GetNetworkID(), timeQueryAtts);
plotList->RealizePlots();
//
// If there was an error, the bad curve plot should not be left
// around muddying up the waters.
//
if (resultsPlot->GetErrorFlag())
plotList->DeletePlot(resultsPlot, false);
EngineKey engineKey = origPlot->GetEngineKey();
}
CATCH2(VisItException, e)
do
{
//
// If there was an error, the bad curve plot should not be left
// around muddying up the waters.
//
plotList->DeletePlot(resultsPlot, false);
retry = false;
//
// Add as much information to the message as we can,
// including query name, exception type and exception
// message.
//
char message[256];
SNPRINTF(message, sizeof(message), "%s: (%s)\n%s", qName.c_str(),
e.GetExceptionType().c_str(),
e.GetMessage().c_str());
Error(message);
return;
}
ENDTRY
// Make sure we will be using a cloned network
resultsPlot->SetCloneId(origPlot->GetNetworkID());
resultsPlot->SetSILRestriction(origPlot->GetSILRestriction());
TRY
{
ViewerEngineManager::Instance()->CloneNetwork(engineKey,
origPlot->GetNetworkID(), timeQueryAtts);
plotList->RealizePlots();
//
// If there was an error, the bad curve plot should not be left
// around muddying up the waters.
//
if (resultsPlot->GetErrorFlag())
plotList->DeletePlot(resultsPlot, false);
}
CATCH2(VisItException, e)
{
char message[2048];
if (e.GetExceptionType() == "LostConnectionException" ||
e.GetExceptionType() == "NoEngineException" ||
e.GetExceptionType() == "ImproperUseException" )
{
//
// Queries access the cached network used by the queried plot.
// Simply relaunching the engine does not work, as no network
// is created. This situation requires re-execution of the
// plot that is being queried.
//
origPlot->ClearCurrentActor();
origList->UpdateFrame();
retry = true;
numAttempts++;
}
else if (e.GetExceptionType() == "InvalidDimensionsException")
{
//
// Create message for the gui that includes the query name
// and message.
//
SNPRINTF(message, sizeof(message), "%s: %s", qName.c_str(),
e.GetMessage().c_str());
}
else if (e.GetExceptionType() == "NonQueryableInputException")
{
//
// Create message.
//
SNPRINTF(message, sizeof(message), "%s%s",
"The currently active plot is non-queryable.\n",
"Please select a different plot and try again.");
}
else
{
//
// Add as much information to the message as we can,
// including query name, exception type and exception
// message.
//
SNPRINTF(message, sizeof(message), "%s: (%s)\n%s", qName.c_str(),
e.GetExceptionType().c_str(),
e.GetMessage().c_str());
}
ClearStatus(engineKey.ID().c_str());
if (!retry)
{
//
// If there was an error, the bad curve plot should not be left
// around muddying up the waters.
//
plotList->DeletePlot(resultsPlot, false);
CATCH_RETURN(0);
}
}
ENDTRY
} while (retry && numAttempts < 2);
//
// Update the actions so the menus and the toolbars have the right state.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment