\(\renewcommand\AA{\unicode{x212B}}\)

LoadSampleShape v1

../_images/LoadSampleShape-v1_dlg.png

LoadSampleShape dialog.

Summary

The algorithm loads a shape into the instrument of a workspace at the sample.

Properties

Name Direction Type Default Description
InputWorkspace Input Workspace Mandatory The name of the workspace containing the instrument to add the shape
Filename Input string Mandatory The path name of the file containing the shape. Allowed extensions: [‘.stl’, ‘.off’]
Scale Input string cm The scale of the stl: m, cm, or mm
XDegrees Input number 0 The degrees to rotate on the x axis by
YDegrees Input number 0 The degrees to rotate on the y axis by
ZDegrees Input number 0 The degrees to rotate on the z axis by
TranslationVector Input dbl list 0,0,0 Vector by which to translate the loaded sample shape
OutputWorkspace Output Workspace Mandatory The name of the workspace that will contain the loaded shape of the sample

Description

Loads a shape into the sample of a workspace. The newly added shape can be translated by a vector, and rotated by an angle along each axis applied in order X,Y,Z, rotation applies before translation eg if the shape in the input file isn’t centred on the origin. The Sample will then be rotated according to the rotation of the goniometer on the workspace, if there is one. The first angle used in SetGoniometer will be applied last.

The following types of input file are supported:

  • *.stl stereolithography https://en.wikipedia.org/wiki/STL_(file_format) This is a file format consisting of a list of faces specified by their vertex coordinates. The file may be in ASCII or Binary format, and all the faces must be triangular. The normals are ignored, but the vertices must be in the order required by the standard (counter-clockwise when viewed from outside).
  • *.off Object File Format https://en.wikipedia.org/wiki/OFF_(file_format) This is a file format consisting of a list of vertices and a list of faces specified by the position of each vertex in the list of vertices. The file must is in ASCII for and all the faces must be triangular. There are no normals. The vertices of a face must be ordered counter-clockwise when viewed from outside.

Categories: AlgorithmIndex | DataHandling\Instrument

Source

C++ header: LoadSampleShape.h (last modified: 2020-06-30)

C++ source: LoadSampleShape.cpp (last modified: 2020-06-30)