---
title: "getArticleRenderingSetup"
slug: "api/basket/operations/getarticlerenderingsetup"
sidebar:
  order: 455
---

<a id="ref-6fd7789287fa"></a>
<a id="ref-3f91d6646a8f"></a>
<a id="ref-dbe8a2da9b1e"></a>

## Synopsis

```text
ARSRenderingSetup getArticleRenderingSetup(SessionId sessionId,
    string catalogId,
    string manuId,
    string seriesId,
    string baseArtNr,
    string *ofmlVarCode,
    string[] viewIds)
throws BasketServiceFault;
```

See also: [`SessionId`](/pCon/configuratorOnline/specs/api/session/types/sessionid#ref-02e397c8fdb4), [`BasketServiceFault`](/pCon/configuratorOnline/specs/api/basket/faults/basketservicefault#ref-d5adb74faa1b), [`ARSRenderingSetup`](/pCon/configuratorOnline/specs/api/basket/types/arsrenderingsetup)

The operation <a id="ref-88cf789e4685"></a>`getArticleRenderingSetup` is used to access data from ARS (article-specific rendering setup) database[^1]`.`

The rendering setup consists of information about the camera setup (position and orientation) and information about lighting (ambient light and light sources as known from OpenGL).

```text
struct ARSRenderingSetup {
    ARSCamera *camera;                        // element
    ARSLighting *lighting;                      // element
}
```

See also: [ARSCamera](/pCon/configuratorOnline/specs/api/basket/operations/getarticlerenderingsetup#ref-5b397cf7a210), [ARSLighting](/pCon/configuratorOnline/specs/api/basket/operations/getarticlerenderingsetup#ref-06c2b9aaef6d)

Reference point, viewpoint and positions of light sources are defined by the origin of some coordinate system and the point’s or position’s coordinates within that coordinate system. The coordinate system can be <a id="ref-90ac2adaa501"></a>cartesian or spherical.

<a id="ref-b51ea5c00af1"></a>

```text
enum ARSCoordinateSystem {
    Cartesian,
    Spherical
}
```

The origin can be defined as either the origin of the local coordinate system, the center of the bounding box plus some offset, the reference point or the view point.

<a id="ref-1962dace3e0a"></a>

```text
enum ARSOriginType {
    LocalCoordinateSystem,
    BoundingBox,
    ReferencePoint,
    ViewPoint
}
```

The offset is computed as the size of the bounding box in each direction multiplied by x/y/z scaling factors defined as part of the origin.

<a id="ref-fb925ae4ad48"></a>

```text
struct ARSOrigin {
    ARSOriginType type;                       // attribute
    float x;                          // attribute
    float y;                          // attribute
    float z;                          // attribute
}
```

See also: [ARSOriginType](/pCon/configuratorOnline/specs/api/basket/operations/getarticlerenderingsetup#ref-1962dace3e0a)

As mentioned above, coordinates are specified as either cartesian or spherical. The member `coordinateSystem` of `ARSCoordinates` defines the type of coordinates used. The actual data type corresponds to the specified type of coordinate system.

<a id="ref-50e800c2ba40"></a>

```text
abstract struct ARSCoordinates {
    ARSCoordinateSystem coordinateSystem;               // attribute
}
```

See also: [ARSCoordinateSystem](/pCon/configuratorOnline/specs/api/basket/operations/getarticlerenderingsetup#ref-b51ea5c00af1)

If cartesian coordinates are used, the axes of the coordinate system have the same direction as the corresponding axes of the object’s local coordinate system.

```text
struct ARSCartesianCoordinates : ARSCoordinates {
    float x;                              // attribute
    float y;                              // attribute
    float z;                              // attribute
}
```

See also: [ARSCoordinates](/pCon/configuratorOnline/specs/api/basket/operations/getarticlerenderingsetup#ref-50e800c2ba40)

If spherical coordinates are used, the zenith direction corresponds to the direction of the y-axis of the object’s local coordinate system, and the azimuth is measured counter-clockwise from the positive z-axis (0°) to the positive x-axis (90°).[^2]

Azimuth and elevation are specified in degree. EAIWS does not impose any limits on the values of radius, azimuth and elevation.

```text
struct ARSSphericalCoordinates : ARSCoordinates {
    float azimuth;                            // attribute
    float elevation;                          // attribute
    float radius;                         // attribute
}
```

See also: [ARSCoordinates](/pCon/configuratorOnline/specs/api/basket/operations/getarticlerenderingsetup#ref-50e800c2ba40)

The origin type of the reference point is either `LocalCoordinateSystem` or `BoundingBox`. The coordinates of the reference point are always specified as cartesian coordinates.

<a id="ref-12bbfb51beed"></a>

```text
struct ARSReferencePoint {
    ARSOrigin origin;                 // element
    ARSCartesianCoordinates coordinates;                // element
}
```

See also: [ARSOrigin](/pCon/configuratorOnline/specs/api/basket/operations/getarticlerenderingsetup#ref-fb925ae4ad48)

The origin of the viewpoint is either `LocalCoordinateSystem`, `BoundingBox` or `ReferencePoint`.

<a id="ref-aca19e8f43d2"></a>

```text
struct ARSViewpoint {
    ARSOrigin origin;                     // element
    ARSCoordinates coordinates;                    // element
}
```

See also: [ARSOrigin](/pCon/configuratorOnline/specs/api/basket/operations/getarticlerenderingsetup#ref-fb925ae4ad48), [ARSCoordinates](/pCon/configuratorOnline/specs/api/basket/operations/getarticlerenderingsetup#ref-50e800c2ba40)

In addition to reference and viewpoint, the camera setup defines the projection mode and zoom.

In perspective mode, the zoom is passed unmodified to `gluPerspective`, defining the field of view angle, in degrees. In orthographic mode, the `top` and `bottom` values passed to `glOrtho` are computed as *±**tan(zoom* *∙* *π / 180.0**)*, thus defining the coordinates for the top and bottom horizontal clipping planes.

<a id="ref-4c45ae981383"></a>

```text
enum ARSProjectionMode {
    Perspective,
    Orthographic
}
```

<a id="ref-5b397cf7a210"></a>

```text
struct ARSCamera {
    ARSReferencePoint referencePoint;             // element
    ARSViewpoint viewpoint;                  // element
    ARSProjectionMode projectionMode;             // attribute
    float zoom;                       // attribute
}
```

See also: [ARSReferencePoint](/pCon/configuratorOnline/specs/api/basket/operations/getarticlerenderingsetup#ref-12bbfb51beed), [ARSViewpoint](/pCon/configuratorOnline/specs/api/basket/operations/getarticlerenderingsetup#ref-aca19e8f43d2), [ARSProjectionMode](/pCon/configuratorOnline/specs/api/basket/operations/getarticlerenderingsetup#ref-4c45ae981383)

Lighting information consists of the ambient light and a possibly empty list of light sources.

<a id="ref-06c2b9aaef6d"></a>

```text
struct ARSLighting {
    Color ambientLight;               // element
    ARSLightSource[]    lightSources;               // element
}
```

See also: [Color](/pCon/configuratorOnline/specs/api/basket/operations/getarticlerenderingsetup#ref-6b73191a0a4b), [ARSLightSource](/pCon/configuratorOnline/specs/api/basket/operations/getarticlerenderingsetup#ref-eb70a27570f0)

Light sources are defined the same way as in OpenGL.

<a id="ref-e05a76aee6c3"></a>

```text
enum ARSLightSourceType {
    Directional,
    Positional
}
```

<a id="ref-eb70a27570f0"></a>

```text
struct ARSLightSource {
    ARSOrigin origin;                 // element
    ARSCoordinates coordinates;                // element
    Color ambientLight;               // element
    Color diffuseLight;               // element
    Color specularLight;              // element
    float constantAttenuation;            // attribute
    float linearAttenuation;          // attribute
    float quadraticAttenuation;           // attribute
    ARSLightSourceType type;                       // attribute
}
```

See also: [ARSOrigin](/pCon/configuratorOnline/specs/api/basket/operations/getarticlerenderingsetup#ref-fb925ae4ad48), [ARSCoordinates](/pCon/configuratorOnline/specs/api/basket/operations/getarticlerenderingsetup#ref-50e800c2ba40), [Color](/pCon/configuratorOnline/specs/api/basket/operations/getarticlerenderingsetup#ref-6b73191a0a4b), [ARSLightSourceType](/pCon/configuratorOnline/specs/api/basket/operations/getarticlerenderingsetup#ref-e05a76aee6c3)

Lights are defined by their red, green and blue components, with values being between zero and one, both inclusive.

<a id="ref-6b73191a0a4b"></a>

```text
struct Color {
    float red;                                // attribute
    float green;                          // attribute
    fluat blue;                               // attribute
}
```

The catalog ID, manufacturer ID and series ID passed to  `getArticleRenderingSetup` must be specified and valid.

The base article number must be specified and must not be empty.

The OFML variant code must be a valid OFML variant code. It should be equal to the OFML variant code of the article instance whose rendering setup is to be determined. If it is missing, an empty OFML variant code is assumed instead.

The list of view IDs may be empty. If so, a list containing only the default view ID (an empty string) is used instead.

For each view ID, the operation looks for a rendering setup matching the specified parameters. The first one found is returned. If no rendering setup is found, nothing is returned.

[^1]: For further information see ARS specification.

[^2]: Conversion of spherical into cartesian coordinates is done as follows (radius *r*, elevation *θ*, azimuth *φ*): *y* = *r* sin *θ* ; *x* = *r* cos *θ* sin *φ* ; *z* = *r* cos *θ* cos <a id="ref-1ca636882cdd"></a>*φ*
