Skip to content

Commit

Permalink
Merge pull request #182 from SOFAgh/FixIssue153
Browse files Browse the repository at this point in the history
Fix Issue #153
  • Loading branch information
dsn27 authored Sep 12, 2024
2 parents c6f6171 + 4890263 commit 0ff903a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion CADability/ImportStep.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4816,11 +4816,19 @@ private void GetContext(Item item)
context.factor = (double)(vc.val as List<Item>)[0].val; // why * 1000 ? definitely wrong for 83855_elp11b.stp
if (it.parameter.TryGetValue("name", out Item name))
{
if (name.type == Item.ItemType.stringval && name.sval == "METRE") context.factor *= 1000; // added because of "PROBLEM ELE NULLPUNKT.stp"
//REVIEW: Is *= 1000 really right? Shouldn't it be = 1000?
if (name.type == Item.ItemType.stringval && name.sval == "METRE")
context.factor *= 1000; // added because of "PROBLEM ELE NULLPUNKT.stp"
}
}
}
}
else if (it.parameter.TryGetValue("name", out Item name))
{
//TODO: Add other units
if (name.type == Item.ItemType.keyword && name.sval == "METRE")
context.factor = 1000; // added because of "issue153.stp"
}
}
}
}
Expand Down

0 comments on commit 0ff903a

Please sign in to comment.