idea-statica / iom-examples

Examples of using IDEA StatiCa IOM API
MIT License
8 stars 4 forks source link

[BUG]Incorrect position of PlateData with IsNegativeObject = true #74

Closed dataneodev closed 3 years ago

dataneodev commented 3 years ago

Hi,

PlateData with IsNegativeObject = true has an invalid location.

In the example below, only the Z coordinate should differ

new PlateData()
{
    Name = $"Plate_{((++_plateCount) - PLATE_START_ID).Min2ToDigit()}",
    Thickness = (double)((double)plate.GruboscBlachy / 1000),
    Material = material.IdeaStaticaName,
    Id = _plateCount,
    OriginalModelId = _plateCount.ToString(),
    IsNegativeObject = true,
};
<PlateData>
    <Id>20001</Id>
    <Name>Plate_01</Name>
    <Thickness>0.05</Thickness>
    <Material>S235_T40_80</Material>
    <Origin>
      <Id>5</Id>
      <Name>N5</Name>
      <X>0.52715555195249142</X>
      <Y>0.23571214285109726</Y>
      <Z>-0.17</Z>
    </Origin>
    <AxisX>
      <X>1</X>
      <Y>0</Y>
      <Z>0</Z>
    </AxisX>
    <AxisY>
      <X>0</X>
      <Y>1</Y>
      <Z>0</Z>
    </AxisY>
    <AxisZ>
      <X>0</X>
      <Y>0</Y>
      <Z>0.99999999999999989</Z>
    </AxisZ>
    <Region>M 0 0 L 0.33441461 0 L 0.33441461 -0.48395917 L 0 -0.48395917 L 0 0</Region>
    <OriginalModelId>20001</OriginalModelId>
    <IsNegativeObject>false</IsNegativeObject>
  </PlateData>
  <PlateData>
    <Id>20002</Id>
    <Name>Plate_02</Name>
    <Thickness>0.05</Thickness>
    <Material>S235_T40_80</Material>
    <Origin>
      <Id>6</Id>
      <Name>N6</Name>
      <X>0.52715555195249142</X>
      <Y>0.23571214285109726</Y>
      <Z>0.14</Z>
    </Origin>
    <AxisX>
      <X>1</X>
      <Y>0</Y>
      <Z>0</Z>
    </AxisX>
    <AxisY>
      <X>0</X>
      <Y>1</Y>
      <Z>0</Z>
    </AxisY>
    <AxisZ>
      <X>0</X>
      <Y>0</Y>
      <Z>0.99999999999999989</Z>
    </AxisZ>
    <Region>M 0 0 L 0.33441461 0 L 0.33441461 -0.48395917 L 0 -0.48395917 L 0 0</Region>
    <OriginalModelId>20002</OriginalModelId>
    <IsNegativeObject>true</IsNegativeObject>
  </PlateData>
</Plates>

image image

OpenModel_f.zip

vojtech-chalupa commented 3 years ago

Hello, we will look into this more, but I took your IOM and created the following model in the development version 21. image I will see if we can get this fixed in the following patch, or whether the fix will have to wait for the spring release of version 21.

vojtech-chalupa commented 3 years ago

I believe that this issue has been fixed in the latest release 21.0.0.3277, the IOM produces the following model:

image