summaryrefslogtreecommitdiff
path: root/CSXCAD/src
diff options
context:
space:
mode:
authorRuben Undheim <ruben.undheim@gmail.com>2019-02-10 08:49:27 +0000
committerRuben Undheim <ruben.undheim@gmail.com>2019-02-10 08:49:27 +0000
commit94cdcb9013e4862560945c14dbe762daa2baea07 (patch)
tree6e2a3a3dad7a0800109f911c70c100daa6502d22 /CSXCAD/src
parentffda26309128be5d112df61a03e4827e47ecfac8 (diff)
Import GIT HEAD of CSXCAD sub-project (with Python interface)
Diffstat (limited to 'CSXCAD/src')
-rw-r--r--CSXCAD/src/CSPrimCylinder.cpp4
-rw-r--r--CSXCAD/src/CSPrimCylindricalShell.cpp4
-rw-r--r--CSXCAD/src/CSPrimLinPoly.cpp4
-rw-r--r--CSXCAD/src/CSPrimMultiBox.cpp2
-rw-r--r--CSXCAD/src/CSPrimPolygon.cpp8
-rw-r--r--CSXCAD/src/CSPrimPolyhedron.cpp1
-rw-r--r--CSXCAD/src/CSPrimRotPoly.cpp8
-rw-r--r--CSXCAD/src/CSPrimSphere.cpp4
-rw-r--r--CSXCAD/src/CSPrimSphericalShell.cpp4
-rw-r--r--CSXCAD/src/CSPrimUserDefined.cpp4
-rw-r--r--CSXCAD/src/CSPrimWire.cpp4
-rw-r--r--CSXCAD/src/CSPropConductingSheet.cpp8
-rw-r--r--CSXCAD/src/CSPropDebyeMaterial.cpp16
-rw-r--r--CSXCAD/src/CSPropDumpBox.cpp4
-rw-r--r--CSXCAD/src/CSPropExcitation.cpp16
-rw-r--r--CSXCAD/src/CSPropLorentzMaterial.cpp48
-rw-r--r--CSXCAD/src/CSPropLumpedElement.cpp12
-rw-r--r--CSXCAD/src/CSPropMaterial.cpp40
-rw-r--r--CSXCAD/src/CSPropProbeBox.cpp1
-rw-r--r--CSXCAD/src/CSProperties.cpp2
-rw-r--r--CSXCAD/src/CSProperties.h6
-rw-r--r--CSXCAD/src/CSRectGrid.cpp1
-rw-r--r--CSXCAD/src/CSXCAD_Global.h2
-rw-r--r--CSXCAD/src/ContinuousStructure.cpp9
-rw-r--r--CSXCAD/src/ContinuousStructure.h9
-rw-r--r--CSXCAD/src/ParameterCoord.cpp4
-rw-r--r--CSXCAD/src/ParameterObjects.h14
27 files changed, 126 insertions, 113 deletions
diff --git a/CSXCAD/src/CSPrimCylinder.cpp b/CSXCAD/src/CSPrimCylinder.cpp
index fb16262..453a851 100644
--- a/CSXCAD/src/CSPrimCylinder.cpp
+++ b/CSXCAD/src/CSPrimCylinder.cpp
@@ -153,8 +153,8 @@ bool CSPrimCylinder::Update(std::string *ErrStr)
EC=psRadius.Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
bOK=false;
std::stringstream stream;
diff --git a/CSXCAD/src/CSPrimCylindricalShell.cpp b/CSXCAD/src/CSPrimCylindricalShell.cpp
index 0ca1701..481055d 100644
--- a/CSXCAD/src/CSPrimCylindricalShell.cpp
+++ b/CSXCAD/src/CSPrimCylindricalShell.cpp
@@ -136,8 +136,8 @@ bool CSPrimCylindricalShell::Update(std::string *ErrStr)
bool bOK=CSPrimCylinder::Update(ErrStr);
EC=psShellWidth.Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
bOK=false;
std::stringstream stream;
diff --git a/CSXCAD/src/CSPrimLinPoly.cpp b/CSXCAD/src/CSPrimLinPoly.cpp
index 5ca3201..b03b9a9 100644
--- a/CSXCAD/src/CSPrimLinPoly.cpp
+++ b/CSXCAD/src/CSPrimLinPoly.cpp
@@ -95,8 +95,8 @@ bool CSPrimLinPoly::Update(std::string *ErrStr)
bool bOK = CSPrimPolygon::Update(ErrStr);
EC=extrudeLength.Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
bOK=false;
std::stringstream stream;
diff --git a/CSXCAD/src/CSPrimMultiBox.cpp b/CSXCAD/src/CSPrimMultiBox.cpp
index e5547f0..51f1a5f 100644
--- a/CSXCAD/src/CSPrimMultiBox.cpp
+++ b/CSXCAD/src/CSPrimMultiBox.cpp
@@ -211,7 +211,7 @@ bool CSPrimMultiBox::Update(std::string *ErrStr)
for (size_t i=0;i<vCoords.size();++i)
{
EC=vCoords.at(i)->Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
if ((EC!=0) && (ErrStr!=NULL))
{
bOK=false;
diff --git a/CSXCAD/src/CSPrimPolygon.cpp b/CSXCAD/src/CSPrimPolygon.cpp
index 733fb0a..523857c 100644
--- a/CSXCAD/src/CSPrimPolygon.cpp
+++ b/CSXCAD/src/CSPrimPolygon.cpp
@@ -214,8 +214,8 @@ bool CSPrimPolygon::Update(std::string *ErrStr)
for (size_t i=1;i<vCoords.size();++i)
{
EC=vCoords[i].Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
bOK=false;
std::stringstream stream;
@@ -226,8 +226,8 @@ bool CSPrimPolygon::Update(std::string *ErrStr)
}
EC=Elevation.Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
bOK=false;
std::stringstream stream;
diff --git a/CSXCAD/src/CSPrimPolyhedron.cpp b/CSXCAD/src/CSPrimPolyhedron.cpp
index 7eac505..2454f28 100644
--- a/CSXCAD/src/CSPrimPolyhedron.cpp
+++ b/CSXCAD/src/CSPrimPolyhedron.cpp
@@ -268,6 +268,7 @@ bool CSPrimPolyhedron::IsInside(const double* Coord, double /*tol*/)
bool CSPrimPolyhedron::Update(std::string *ErrStr)
{
+ BuildTree();
//update local bounding box
m_BoundBoxValid = GetBoundBox(m_BoundBox);
return CSPrimitives::Update(ErrStr);
diff --git a/CSXCAD/src/CSPrimRotPoly.cpp b/CSXCAD/src/CSPrimRotPoly.cpp
index 705b08e..1411277 100644
--- a/CSXCAD/src/CSPrimRotPoly.cpp
+++ b/CSXCAD/src/CSPrimRotPoly.cpp
@@ -110,8 +110,8 @@ bool CSPrimRotPoly::Update(std::string *ErrStr)
bool bOK = CSPrimPolygon::Update(ErrStr);
EC=StartStopAngle[0].Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
bOK=false;
std::stringstream stream;
@@ -121,8 +121,8 @@ bool CSPrimRotPoly::Update(std::string *ErrStr)
}
EC=StartStopAngle[1].Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
bOK=false;
std::stringstream stream;
diff --git a/CSXCAD/src/CSPrimSphere.cpp b/CSXCAD/src/CSPrimSphere.cpp
index a372fe3..3d20308 100644
--- a/CSXCAD/src/CSPrimSphere.cpp
+++ b/CSXCAD/src/CSPrimSphere.cpp
@@ -126,8 +126,8 @@ bool CSPrimSphere::Update(std::string *ErrStr)
m_Center.SetCoordinateSystem(m_PrimCoordSystem, m_MeshType);
EC=psRadius.Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
bOK=false;
std::stringstream stream;
diff --git a/CSXCAD/src/CSPrimSphericalShell.cpp b/CSXCAD/src/CSPrimSphericalShell.cpp
index 73f2d82..cb71cbd 100644
--- a/CSXCAD/src/CSPrimSphericalShell.cpp
+++ b/CSXCAD/src/CSPrimSphericalShell.cpp
@@ -92,8 +92,8 @@ bool CSPrimSphericalShell::Update(std::string *ErrStr)
bool bOK=CSPrimSphere::Update(ErrStr);
EC=psShellWidth.Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
bOK=false;
std::stringstream stream;
diff --git a/CSXCAD/src/CSPrimUserDefined.cpp b/CSXCAD/src/CSPrimUserDefined.cpp
index 2cd5219..746e77e 100644
--- a/CSXCAD/src/CSPrimUserDefined.cpp
+++ b/CSXCAD/src/CSPrimUserDefined.cpp
@@ -190,8 +190,8 @@ bool CSPrimUserDefined::Update(std::string *ErrStr)
for (int i=0;i<3;++i)
{
EC=dPosShift[i].Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
bOK=false;
std::ostringstream oss;
diff --git a/CSXCAD/src/CSPrimWire.cpp b/CSXCAD/src/CSPrimWire.cpp
index a182400..776e62d 100644
--- a/CSXCAD/src/CSPrimWire.cpp
+++ b/CSXCAD/src/CSPrimWire.cpp
@@ -116,8 +116,8 @@ bool CSPrimWire::Update(std::string *ErrStr)
CSPrimCurve::Update(ErrStr);
EC=wireRadius.Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
bOK=false;
std::stringstream stream;
diff --git a/CSXCAD/src/CSPropConductingSheet.cpp b/CSXCAD/src/CSPropConductingSheet.cpp
index adce7fd..1fc5a53 100644
--- a/CSXCAD/src/CSPropConductingSheet.cpp
+++ b/CSXCAD/src/CSPropConductingSheet.cpp
@@ -39,8 +39,8 @@ bool CSPropConductingSheet::Update(std::string *ErrStr)
{
int EC=Conductivity.Evaluate();
bool bOK=true;
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in ConductingSheet-Property Conductivity-Value";
@@ -49,8 +49,8 @@ bool CSPropConductingSheet::Update(std::string *ErrStr)
}
EC=Thickness.Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in ConductingSheet-Property Thickness-Value";
diff --git a/CSXCAD/src/CSPropDebyeMaterial.cpp b/CSXCAD/src/CSPropDebyeMaterial.cpp
index f12c261..b1809be 100644
--- a/CSXCAD/src/CSPropDebyeMaterial.cpp
+++ b/CSXCAD/src/CSPropDebyeMaterial.cpp
@@ -99,8 +99,8 @@ bool CSPropDebyeMaterial::Update(std::string *ErrStr)
for (int n=0;n<3;++n)
{
EC=EpsDelta[o][n].Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in Debye Material-Property epsilon Delta frequency value (ID: " << uiID << "): ";
@@ -109,8 +109,8 @@ bool CSPropDebyeMaterial::Update(std::string *ErrStr)
}
EC=WeightEpsDelta[o][n].Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in Debye Material-Property epsilon Delta frequency weighting function (ID: " << uiID << "): ";
@@ -119,8 +119,8 @@ bool CSPropDebyeMaterial::Update(std::string *ErrStr)
}
EC=EpsRelaxTime[o][n].Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in Debye Material-Property epsilon relaxation time value (ID: " << uiID << "): ";
@@ -129,8 +129,8 @@ bool CSPropDebyeMaterial::Update(std::string *ErrStr)
}
EC=WeightEpsRelaxTime[o][n].Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in Debye Material-Property epsilon relaxation time weighting function (ID: " << uiID << "): ";
diff --git a/CSXCAD/src/CSPropDumpBox.cpp b/CSXCAD/src/CSPropDumpBox.cpp
index 6cccce6..a16f92e 100644
--- a/CSXCAD/src/CSPropDumpBox.cpp
+++ b/CSXCAD/src/CSPropDumpBox.cpp
@@ -44,6 +44,7 @@ void CSPropDumpBox::SetSubSampling(int ny, unsigned int val)
{
if ((ny<0) || (ny>2)) return;
if (val<1) return;
+ m_SubSampling=true;
SubSampling[ny] = val;
}
@@ -56,7 +57,6 @@ void CSPropDumpBox::SetSubSampling(unsigned int val[])
void CSPropDumpBox::SetSubSampling(const char* vals)
{
if (vals==NULL) return;
- m_SubSampling=true;
std::vector<int> values = SplitString2Int(std::string(vals),',');
for (int ny=0;ny<3 && ny<(int)values.size();++ny)
SetSubSampling(ny,values.at(ny));
@@ -72,6 +72,7 @@ void CSPropDumpBox::SetOptResolution(int ny, double val)
{
if ((ny<0) || (ny>2)) return;
if (val<0) return;
+ m_OptResolution=true;
OptResolution[ny] = val;
}
@@ -84,7 +85,6 @@ void CSPropDumpBox::SetOptResolution(double val[])
void CSPropDumpBox::SetOptResolution(const char* vals)
{
if (vals==NULL) return;
- m_OptResolution=true;
std::vector<double> values = SplitString2Double(std::string(vals),',');
if (values.size()==1) //allow one resolution for all directions
{
diff --git a/CSXCAD/src/CSPropExcitation.cpp b/CSXCAD/src/CSPropExcitation.cpp
index 8d498ad..4089567 100644
--- a/CSXCAD/src/CSPropExcitation.cpp
+++ b/CSXCAD/src/CSPropExcitation.cpp
@@ -171,8 +171,8 @@ bool CSPropExcitation::Update(std::string *ErrStr)
for (unsigned int i=0;i<3;++i)
{
EC=Excitation[i].Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in Excitation-Property Excitaion-Value (ID: " << uiID << "): ";
@@ -180,8 +180,8 @@ bool CSPropExcitation::Update(std::string *ErrStr)
PSErrorCode2Msg(EC,ErrStr);
}
EC=PropagationDir[i].Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in Excitation-Property PropagationDir-Value (ID: " << uiID << "): ";
@@ -190,8 +190,8 @@ bool CSPropExcitation::Update(std::string *ErrStr)
}
}
EC=m_Frequency.Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in Excitation-Property Frequency-Value";
@@ -199,8 +199,8 @@ bool CSPropExcitation::Update(std::string *ErrStr)
PSErrorCode2Msg(EC,ErrStr);
}
EC=Delay.Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in Excitation-Property Delay-Value";
diff --git a/CSXCAD/src/CSPropLorentzMaterial.cpp b/CSXCAD/src/CSPropLorentzMaterial.cpp
index 73cda4a..763da66 100644
--- a/CSXCAD/src/CSPropLorentzMaterial.cpp
+++ b/CSXCAD/src/CSPropLorentzMaterial.cpp
@@ -163,8 +163,8 @@ bool CSPropLorentzMaterial::Update(std::string *ErrStr)
for (int n=0;n<3;++n)
{
EC=EpsPlasma[o][n].Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in Lorentz Material-Property epsilon plasma frequency value (ID: " << uiID << "): ";
@@ -172,8 +172,8 @@ bool CSPropLorentzMaterial::Update(std::string *ErrStr)
PSErrorCode2Msg(EC,ErrStr);
}
EC=MuePlasma[o][n].Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in Lorentz Material-Property mue plasma frequency value (ID: " << uiID << "): ";
@@ -182,8 +182,8 @@ bool CSPropLorentzMaterial::Update(std::string *ErrStr)
}
EC=WeightEpsPlasma[o][n].Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in Lorentz Material-Property epsilon plasma frequency weighting function (ID: " << uiID << "): ";
@@ -191,8 +191,8 @@ bool CSPropLorentzMaterial::Update(std::string *ErrStr)
PSErrorCode2Msg(EC,ErrStr);
}
EC=WeightMuePlasma[o][n].Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in Lorentz Material-Property mue plasma frequency value weighting function (ID: " << uiID << "): ";
@@ -201,8 +201,8 @@ bool CSPropLorentzMaterial::Update(std::string *ErrStr)
}
EC=EpsLorPole[o][n].Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in Lorentz Material-Property epsilon lorentz pole frequency value (ID: " << uiID << "): ";
@@ -210,8 +210,8 @@ bool CSPropLorentzMaterial::Update(std::string *ErrStr)
PSErrorCode2Msg(EC,ErrStr);
}
EC=MueLorPole[o][n].Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in Lorentz Material-Property mue lorentz pole frequency value (ID: " << uiID << "): ";
@@ -220,8 +220,8 @@ bool CSPropLorentzMaterial::Update(std::string *ErrStr)
}
EC=WeightEpsLorPole[o][n].Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in Lorentz Material-Property epsilon lorentz pole frequency weighting function (ID: " << uiID << "): ";
@@ -229,8 +229,8 @@ bool CSPropLorentzMaterial::Update(std::string *ErrStr)
PSErrorCode2Msg(EC,ErrStr);
}
EC=WeightMueLorPole[o][n].Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in Lorentz Material-Property mue lorentz pole frequency value weighting function (ID: " << uiID << "): ";
@@ -239,8 +239,8 @@ bool CSPropLorentzMaterial::Update(std::string *ErrStr)
}
EC=EpsRelaxTime[o][n].Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in Lorentz Material-Property epsilon relaxation time value (ID: " << uiID << "): ";
@@ -248,8 +248,8 @@ bool CSPropLorentzMaterial::Update(std::string *ErrStr)
PSErrorCode2Msg(EC,ErrStr);
}
EC=MueRelaxTime[o][n].Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in Lorentz Material-Property mue relaxation time value (ID: " << uiID << "): ";
@@ -258,8 +258,8 @@ bool CSPropLorentzMaterial::Update(std::string *ErrStr)
}
EC=WeightEpsRelaxTime[o][n].Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in Lorentz Material-Property epsilon relaxation time weighting function (ID: " << uiID << "): ";
@@ -267,8 +267,8 @@ bool CSPropLorentzMaterial::Update(std::string *ErrStr)
PSErrorCode2Msg(EC,ErrStr);
}
EC=WeightMueRelaxTime[o][n].Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in Lorentz Material-Property mue relaxation time value weighting function (ID: " << uiID << "): ";
diff --git a/CSXCAD/src/CSPropLumpedElement.cpp b/CSXCAD/src/CSPropLumpedElement.cpp
index f4dc602..f21f610 100644
--- a/CSXCAD/src/CSPropLumpedElement.cpp
+++ b/CSXCAD/src/CSPropLumpedElement.cpp
@@ -37,8 +37,8 @@ bool CSPropLumpedElement::Update(std::string *ErrStr)
{
int EC=m_R.Evaluate();
bool bOK=true;
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in LumpedElement-Property Resistance-Value";
@@ -48,8 +48,8 @@ bool CSPropLumpedElement::Update(std::string *ErrStr)
}
EC=m_C.Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in LumpedElement-Property Capacitor-Value";
@@ -59,8 +59,8 @@ bool CSPropLumpedElement::Update(std::string *ErrStr)
}
EC=m_L.Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in LumpedElement-Property Inductance-Value";
diff --git a/CSXCAD/src/CSPropMaterial.cpp b/CSXCAD/src/CSPropMaterial.cpp
index 7fd2415..21fc2dd 100644
--- a/CSXCAD/src/CSPropMaterial.cpp
+++ b/CSXCAD/src/CSPropMaterial.cpp
@@ -128,8 +128,8 @@ bool CSPropMaterial::Update(std::string *ErrStr)
for (int n=0;n<3;++n)
{
EC=Epsilon[n].Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in Material-Property Epsilon-Value (ID: " << uiID << "): ";
@@ -137,8 +137,8 @@ bool CSPropMaterial::Update(std::string *ErrStr)
PSErrorCode2Msg(EC,ErrStr);
}
EC=Mue[n].Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in Material-Property Mue-Value (ID: " << uiID << "): ";
@@ -146,8 +146,8 @@ bool CSPropMaterial::Update(std::string *ErrStr)
PSErrorCode2Msg(EC,ErrStr);
}
EC=Kappa[n].Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in Material-Property Kappa-Value (ID: " << uiID << "): ";
@@ -155,8 +155,8 @@ bool CSPropMaterial::Update(std::string *ErrStr)
PSErrorCode2Msg(EC,ErrStr);
}
EC=Sigma[n].Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in Material-Property Sigma-Value (ID: " << uiID << "): ";
@@ -164,8 +164,8 @@ bool CSPropMaterial::Update(std::string *ErrStr)
PSErrorCode2Msg(EC,ErrStr);
}
EC=WeightEpsilon[n].Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in Material-Property Epsilon-Value weighting function (ID: " << uiID << "): ";
@@ -173,8 +173,8 @@ bool CSPropMaterial::Update(std::string *ErrStr)
PSErrorCode2Msg(EC,ErrStr);
}
EC=WeightMue[n].Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in Material-Property Mue-Value weighting function (ID: " << uiID << "): ";
@@ -182,8 +182,8 @@ bool CSPropMaterial::Update(std::string *ErrStr)
PSErrorCode2Msg(EC,ErrStr);
}
EC=WeightKappa[n].Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in Material-Property Kappa-Value weighting function (ID: " << uiID << "): ";
@@ -191,8 +191,8 @@ bool CSPropMaterial::Update(std::string *ErrStr)
PSErrorCode2Msg(EC,ErrStr);
}
EC=WeightSigma[n].Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in Material-Property Sigma-Value weighting function (ID: " << uiID << "): ";
@@ -202,8 +202,8 @@ bool CSPropMaterial::Update(std::string *ErrStr)
}
EC=Density.Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in Material-Property Density-Value (ID: " << uiID << "): ";
@@ -211,8 +211,8 @@ bool CSPropMaterial::Update(std::string *ErrStr)
PSErrorCode2Msg(EC,ErrStr);
}
EC=WeightDensity.Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in Material-Property Density weighting function (ID: " << uiID << "): ";
diff --git a/CSXCAD/src/CSPropProbeBox.cpp b/CSXCAD/src/CSPropProbeBox.cpp
index b7c87da..c9234f1 100644
--- a/CSXCAD/src/CSPropProbeBox.cpp
+++ b/CSXCAD/src/CSPropProbeBox.cpp
@@ -50,6 +50,7 @@ bool CSPropProbeBox::Write2XML(TiXmlNode& root, bool parameterised, bool sparse)
prop->SetAttribute("NormDir",(int)uiNumber);
prop->SetAttribute("Type",ProbeType);
prop->SetAttribute("Weight",m_weight);
+ prop->SetAttribute("NormDir",m_NormDir);
prop->SetAttribute("StartTime",startTime);
prop->SetAttribute("StopTime" ,stopTime );
diff --git a/CSXCAD/src/CSProperties.cpp b/CSXCAD/src/CSProperties.cpp
index 605b0be..6da7bf2 100644
--- a/CSXCAD/src/CSProperties.cpp
+++ b/CSXCAD/src/CSProperties.cpp
@@ -164,10 +164,12 @@ void CSProperties::AddAttribute(std::string name, std::string value)
size_t CSProperties::GetQtyPrimitives() {return vPrimitives.size();}
CSPrimitives* CSProperties::GetPrimitive(size_t index) {if (index<vPrimitives.size()) return vPrimitives.at(index); else return NULL;}
void CSProperties::SetFillColor(RGBa color) {FillColor.R=color.R;FillColor.G=color.G;FillColor.B=color.B;FillColor.a=color.a;}
+void CSProperties::SetFillColor(unsigned char R, unsigned char G, unsigned char B, unsigned char a) {FillColor.R=R;FillColor.G=G;FillColor.B=B;FillColor.a=a;}
RGBa CSProperties::GetFillColor() {return FillColor;}
RGBa CSProperties::GetEdgeColor() {return EdgeColor;}
void CSProperties::SetEdgeColor(RGBa color) {EdgeColor.R=color.R;EdgeColor.G=color.G;EdgeColor.B=color.B;EdgeColor.a=color.a;}
+void CSProperties::SetEdgeColor(unsigned char R, unsigned char G, unsigned char B, unsigned char a) {EdgeColor.R=R;EdgeColor.G=G;EdgeColor.B=B;EdgeColor.a=a;}
bool CSProperties::GetVisibility() {return bVisisble;}
void CSProperties::SetVisibility(bool val) {bVisisble=val;}
diff --git a/CSXCAD/src/CSProperties.h b/CSXCAD/src/CSProperties.h
index d8757ee..58b0085 100644
--- a/CSXCAD/src/CSProperties.h
+++ b/CSXCAD/src/CSProperties.h
@@ -76,7 +76,7 @@ public:
//! Enumeration of all possible sub-types of this base-class
enum PropertyType
{
- ANY = 0xfff, UNKNOWN = 0x001, MATERIAL = 0x002, METAL = 0x004, EXCITATION = 0x008, PROBEBOX = 0x010, RESBOX = 0x020, DUMPBOX = 0x040, /* unused = 0x080, */
+ ANY = 0xffff, UNKNOWN = 0x001, MATERIAL = 0x002, METAL = 0x004, EXCITATION = 0x008, PROBEBOX = 0x010, RESBOX = 0x020, DUMPBOX = 0x040, /* unused = 0x080, */
DISPERSIVEMATERIAL = 0x100, LORENTZMATERIAL = 0x200, DEBYEMATERIAL = 0x400,
DISCRETE_MATERIAL = 0x1000, LUMPED_ELEMENT = 0x2000, CONDUCTINGSHEET = 0x4000
};
@@ -89,6 +89,8 @@ public:
//! Get Property Type as a string. (default is the xml element name)
virtual const std::string GetTypeString() const {return GetTypeXMLString();}
+ ParameterSet* GetParameterSet() {return clParaSet;}
+
//! Check if Property is a physical material. Current PropertyType: MATERIAL & METAL
bool GetMaterial() {return bMaterial;}
//!Get ID of this property. Used for primitive-->property mapping. \sa SetID
@@ -138,11 +140,13 @@ public:
//! Set a fill-color for this property. \sa GetFillColor
void SetFillColor(RGBa color);
+ void SetFillColor(unsigned char R, unsigned char G, unsigned char B, unsigned char a);
//! Get a fill-color for this property. \sa SetFillColor \return RGBa color object.
RGBa GetFillColor();
//! Set a edge-color for this property. \sa SetEdgeColor
void SetEdgeColor(RGBa color);
+ void SetEdgeColor(unsigned char R, unsigned char G, unsigned char B, unsigned char a);
//! Get a fill-color for this property. \sa GetEdgeColor \return RGBa color object.
RGBa GetEdgeColor();
diff --git a/CSXCAD/src/CSRectGrid.cpp b/CSXCAD/src/CSRectGrid.cpp
index 50f2947..4f90bfe 100644
--- a/CSXCAD/src/CSRectGrid.cpp
+++ b/CSXCAD/src/CSRectGrid.cpp
@@ -255,6 +255,7 @@ bool CSRectGrid::Write2XML(TiXmlNode &root, bool sorted)
TiXmlElement grid("RectilinearGrid");
grid.SetDoubleAttribute("DeltaUnit",dDeltaUnit);
+ grid.SetAttribute("CoordSystem",(int)this->GetMeshType());
TiXmlElement XLines("XLines");
XLines.SetAttribute("Qty",(int)Lines[0].size());
diff --git a/CSXCAD/src/CSXCAD_Global.h b/CSXCAD/src/CSXCAD_Global.h
index 15f1b32..6589ae9 100644
--- a/CSXCAD/src/CSXCAD_Global.h
+++ b/CSXCAD/src/CSXCAD_Global.h
@@ -20,7 +20,7 @@
#define _CSXCAD_LIB_NAME_ "CSXCAD-Lib: Continuous Structure XML - CAD"
#define _CSXCAD_LIB_NAME_SHORT_ "CSXCAD"
-#define _CSXCAD_AUTHOR_ "Thorsten Liebig (2008-2012)"
+#define _CSXCAD_AUTHOR_ "Thorsten Liebig (2008-2016)"
#define _CSXCAD_AUTHOR_MAIL_ "Thorsten.Liebig@gmx.de"
#define _CSXCAD_VERSION_ GIT_VERSION
#define _CSXCAD_LICENSE_ "LGPL v3"
diff --git a/CSXCAD/src/ContinuousStructure.cpp b/CSXCAD/src/ContinuousStructure.cpp
index a0c17a1..2882b04 100644
--- a/CSXCAD/src/ContinuousStructure.cpp
+++ b/CSXCAD/src/ContinuousStructure.cpp
@@ -373,11 +373,11 @@ bool ContinuousStructure::isGeometryValid()
return true;
}
-double* ContinuousStructure::GetObjectArea()
+double* ContinuousStructure::GetObjectArea(CSProperties::PropertyType type)
{
CSPrimitives* prim=NULL;
bool AccBound;
- std::vector<CSPrimitives*> vPrimitives=GetAllPrimitives();
+ std::vector<CSPrimitives*> vPrimitives=GetAllPrimitives(type);
for (size_t i=0;i<vPrimitives.size();++i)
{
prim=vPrimitives.at(i);
@@ -631,6 +631,11 @@ const char* ContinuousStructure::ReadFromXML(const char* file)
return ReadFromXML(&doc);
}
+std::string ContinuousStructure::ReadFromXML(std::string file)
+{
+ return ReadFromXML(file.c_str());
+}
+
void ContinuousStructure::UpdateIDs()
{
for (size_t i=0;i<vProperties.size();++i)
diff --git a/CSXCAD/src/ContinuousStructure.h b/CSXCAD/src/ContinuousStructure.h
index aa986c5..6d2b25b 100644
--- a/CSXCAD/src/ContinuousStructure.h
+++ b/CSXCAD/src/ContinuousStructure.h
@@ -78,7 +78,7 @@ public:
//! Get a primitive by its unique ID.
CSPrimitives* GetPrimitiveByID(unsigned int ID);
- //! Get all primitives with the given name
+ //! Get all properties with the given name
std::vector<CSProperties*> GetPropertiesByName(std::string name);
//! Get a property by its internal index number. \sa GetQtyProperties
@@ -135,7 +135,6 @@ public:
//! Get a primitives array of a certian type
std::vector<CSPrimitives*> GetPrimitivesByType(CSPrimitives::PrimitiveType type);
-
//! Get a primitives array inside a bounding box and with a certian property type (default is any)
std::vector<CSPrimitives*> GetPrimitivesByBoundBox(const double* boundbox, bool sorted=false, CSProperties::PropertyType type=CSProperties::ANY);
@@ -160,7 +159,7 @@ public:
std::string Update();
//! Get an array containing the absolute size of the current structure.
- double* GetObjectArea();
+ double* GetObjectArea(CSProperties::PropertyType type=CSProperties::ANY);
//! Delete and clear all objects includes. This will result in an empty structure.
void clear();
@@ -185,7 +184,9 @@ public:
\param file Filename to read this structure from.
*/
const char* ReadFromXML(const char* file);
- //! Read a structure from a given XML-node.
+ std::string ReadFromXML(std::string file);
+
+ //! Read a structure from a given XML-node.
/*!
\return Will return a string with possible error-messages!
\param rootNode XML-node to read this structure from.
diff --git a/CSXCAD/src/ParameterCoord.cpp b/CSXCAD/src/ParameterCoord.cpp
index 62da688..a79b1dc 100644
--- a/CSXCAD/src/ParameterCoord.cpp
+++ b/CSXCAD/src/ParameterCoord.cpp
@@ -210,8 +210,8 @@ bool ParameterCoord::Evaluate(std::string *ErrStr)
for (int i=0;i<3;++i)
{
EC=m_Coords[i]->Evaluate();
- if (EC!=ParameterScalar::NO_ERROR) bOK=false;
- if ((EC!=ParameterScalar::NO_ERROR) && (ErrStr!=NULL))
+ if (EC!=ParameterScalar::PS_NO_ERROR) bOK=false;
+ if ((EC!=ParameterScalar::PS_NO_ERROR) && (ErrStr!=NULL))
{
std::stringstream stream;
stream << std::endl << "Error in ParameterCoord (component: " << i << "): ";
diff --git a/CSXCAD/src/ParameterObjects.h b/CSXCAD/src/ParameterObjects.h
index 9e9da49..383999f 100644
--- a/CSXCAD/src/ParameterObjects.h
+++ b/CSXCAD/src/ParameterObjects.h
@@ -15,8 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef _PARAMETEROBJECTS_H_
-#define _PARAMETEROBJECTS_H_
+#pragma once
+
/*
* Author: Thorsten Liebig
* Date: 03-12-2008
@@ -210,10 +210,10 @@ std::string PSErrorCode2Msg(int code);
class CSXCAD_EXPORT ParameterScalar
{
public:
- enum EvaluateErrorType
- {
- NO_ERROR
- };
+ enum EvaluateErrorType
+ {
+ PS_NO_ERROR
+ };
ParameterScalar();
ParameterScalar(ParameterSet* ParaSet, double value);
ParameterScalar(ParameterSet* ParaSet, const std::string value);
@@ -247,5 +247,3 @@ protected:
std::string sValue;
double dValue;
};
-
-#endif