Merge pull request #649 from jamesuber/dev
Bugfix for En_getaveragepatternvalue() and Return MISSING initial setting from EN_getlinkvalue()
This commit is contained in:
@@ -3635,8 +3635,7 @@ int DLLEXPORT EN_getlinkvalue(EN_Project p, int index, int property, double *val
|
|||||||
{
|
{
|
||||||
return EN_getlinkvalue(p, index, EN_ROUGHNESS, value);
|
return EN_getlinkvalue(p, index, EN_ROUGHNESS, value);
|
||||||
}
|
}
|
||||||
if (Link[index].Kc == MISSING) v = 0.0;
|
v = Link[index].Kc;
|
||||||
else v = Link[index].Kc;
|
|
||||||
switch (Link[index].Type)
|
switch (Link[index].Type)
|
||||||
{
|
{
|
||||||
case PRV:
|
case PRV:
|
||||||
@@ -3649,6 +3648,9 @@ int DLLEXPORT EN_getlinkvalue(EN_Project p, int index, int property, double *val
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (Link[index].Kc == MISSING) {
|
||||||
|
v = MISSING;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EN_KBULK:
|
case EN_KBULK:
|
||||||
@@ -4525,7 +4527,7 @@ int DLLEXPORT EN_getaveragepatternvalue(EN_Project p, int index, double *value)
|
|||||||
|
|
||||||
*value = 0.0;
|
*value = 0.0;
|
||||||
if (!p->Openflag) return 102;
|
if (!p->Openflag) return 102;
|
||||||
if (index < 1 || index > net->Npats) return 205;
|
if (index < 0 || index > net->Npats) return 205;
|
||||||
for (i = 0; i < Pattern[index].Length; i++)
|
for (i = 0; i < Pattern[index].Length; i++)
|
||||||
{
|
{
|
||||||
*value += (double)Pattern[index].F[i];
|
*value += (double)Pattern[index].F[i];
|
||||||
|
|||||||
Reference in New Issue
Block a user