|
|
|
|
![]() |
![]() |
![]() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
About McStas Documentation |
12.11 The Union_mesh McStas ComponentComponent for including 3D mesh in Union geometry
Identification
DescriptionPart of the Union components, a set of components that work together and thus separates geometry and physics within McStas. The use of this component requires other components to be used. 1) One specifies a number of processes using process components 2) These are gathered into material definitions using Union_make_material 3) Geometries are placed using Union_box/cylinder/sphere/mesh, assigned a material 4) A Union_master component placed after all the above Only in step 4 will any simulation happen, and per default all geometries defined before this master, but after the previous will be simulated here. There is a dedicated manual available for the Union_components The mesh component loads a 3D OFF, STL or PLY file as the geometry, using geometry-mesh-lib (polygons are triangulated, duplicated vertices welded). Faces given more than once are removed, so a volumetric mesh (cells sharing faces) gives its outer surface. The mesh geometry that is loaded must be a watertight mesh: every edge must be shared by exactly two triangles. Number of intersections per ray: for each mesh, Union_master stores the GMESH_MAX_HITS (default 50) nearest crossings of the ray with the mesh surface. A concave mesh, or one made of several parts, can be crossed more often. Then the farther crossings are lost, the ray can not find the surface where it leaves the mesh, and Union_master reports trace errors. geometry-mesh-lib warns once when this happens: Warning: <file>: a ray crossed the mesh N times, but only the 4 nearest hits are kept To fix it, add this line after the DEFINE INSTRUMENT line of the instrument, with N at least the number given in the warning: DEPENDENCY " -DGMESH_MAX_HITS=N " It is allowed to overlap components, but it is not allowed to have two parallel planes that coincides. This will crash the code on run time.
Input parametersParameters in boldface are required; the others are optional.
Links
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||