Click or drag to resize

IAnalysisModelLocalCoordinateSystemTransformationService

[This is preliminary documentation and is subject to change.]

See IAnalysisModelLocalCoordinateSystemTransformationService for technical documentation

This service is used to transform certain objects from one local coordinate system to another.

This page was last updated 2020-06-15

Why?

During development we un-covered some discrepancies between models that originated from somewhere else when importing them into SCIA Engineer or Bimplus.

Different parts of the world use different "default" local coordinate systems, which affect how they are rendered.

For example, SCIA Engineer uses a local coordinate system by default in which the Z-axis is pointing to the top of your screen (= north), the Y-axis is pointing to the right of your screen (= east) and the X-axis is pointing to the bottom-left of your screen (= south-west)

In the USA however, the default local coordinate system is one in which the Y-axis is pointing to the top of your screen (= north), the Z-axis is pointing to the right of your screen (= east) and the X-axis is pointing to the top-right of your screen (= north-east)

This service will transform any relevant objects for you in a way so that an object defined in one local coordinate system can be processed in another local coordinate system.

Gotchas

Here a few things to keep in mind when working with this service:

  • The local coordinate system information is stored on the LocalCoordinateSystem property.

    If ModelInformation is missing in your AnalysisModel, ZYX is assumed.

  • The transformations are defined in 2 ways:

    From any LCS to ZYX (= default)

    From ZYX (= default) to any LCS

    This means that when converting a model defined in a non-standard LCS to another non-standard LCS, the model will automatically be transformed twice.

    Once from the original non-standard LCS to ZYX and once from ZYX to the new non-standard LCS

  • When exporting to Bimplus, the model will always be transformed to ZYX.

    Our geometry module has been created and defined with an LCS of ZYX in mind. Allowing any other LCS when exporting would mess up the geometry of the objects.

  • When importing to SCIA Engineer, the model will always be transformed to ZYX.

    At this point in time, any model exported from SCIA Engineer will always be exported in ZYX. We currently do not offer the possibility to choose a different LCS when exporting.

  • When importing or exporting from Excel (= SAF), the model will not be transformed at all.

    This means that a model defined in a non-standard LCS will be exported as such, but it will also be imported as such.

Examples
Retrieving the IAnalysisModelLocalCoordinateSystemTransformationService from the container
IBootstrapper bootstrapper = new AnalysisDataModelBootstrapper();
using(IScopedServiceProvider scope = bootstrapper.CreateThreadedScope())
{
  IAnalysisModelLocalCoordinateSystemTransformationService lcsTransformationService = scope.GetService<IAnalysisModelLocalCoordinateSystemTransformationService>();
}
Using the IAnalysisModelLocalCoordinateSystemTransformationService to transform the model from one LCS to another
AnalysisModel model = CreateModel(); // Assume model was created somewhere with default LCS (= ZYX)
IBootstrapper bootstrapper = new AnalysisDataModelBootstrapper();
using(IScopedServiceProvider scope = bootstrapper.CreateThreadedScope())
{
  IAnalysisModelLocalCoordinateSystemTransformationService lcsTransformationService = scope.GetService<IAnalysisModelLocalCoordinateSystemTransformationService>();

  // We need another LCS on the model
  lcsTransformationService.Transform(model, LocalCoordinateSystem.YZMinusX);
}

More examples coming soon or on request.

See Also