Located in ./GitHub/RailCOMPLETE-DNA-[XX-YY]/[XX-YY]/3D
.
Objects in RailCOMPLETE may have one or more 3D models associated with them. These have two main types:
These are collectively known as 3D representations.
This document describes how to create these 3D representations. They can then be exported by RailCOMPLETE users to either dwg or IFC.
For a RailCOMPLETE object is to have a 3D representation, RailCOMPLETE expects two main parts. One of these parts is the source library, where RailCOMPLETE fetches 3D geometries when needed. This should be a collection of folders, each containing one dwg file for each of its 3D geometries. The other main part is the Representation3D
of each object within RailCOMPLETE. The Representation3D
may store geometry types which goes by the names Geometry3D
, IteratedGeometry3D
, Annotation3D
, IteratedAnnotation3D
and SweptGeometry3D
. Some of these types may contain a Name
property. The contents of this Name
property should coincide with the actual filename of one of the dwg files from the source library. When a 3D geometry is exported or previewed in RailCOMPLETE, the first dwg file found in the source library with the correct name is then collected and inserted into the block table of the dwg drawing. It is then processed according to properties such as Offset
and Rotation
, and then inserted at the object's insertion point. For alignment objects, the dwg can be repeated along the alignment through the use of IteratedGeometry3D
, or swept along it with SweptGeometry3D
. Note that sweeps in RailCOMPLETE expects a dwg containing 2D entities that can act as the sweep profile.
For an introduction on how to construct the source library, see
RailCOMPLETE expects a library of 3D geometries. The path to each folder in the library is set by the DNA through the <Geometry3DLibraryFolder>
element. The source folder list can be viewed within RailCOMPLETE buy running the 'RC-Export3D' command and navigating to the 'Source' tab. The user may also add his/her own source library folders. The root file should also contain information on the default unresolved 3D Geometry file name through DefaultUnresolved3DGeometryFileName
.
Specifying an ObjectType
's geometric representation starts with instantiating a geometric 3D representation type. This is done through the use of DynamicProperty
as indicated below:
Here we state that we wish to instantiate a Geometry3D
as part of the Representation3D
belonging to the object created. With SetValue
inside the DynamicProperty
scope we can alter the properties of the Geometry3D
instance. Lua formulas can also be set inside the DynamicProperty
scope like this:
Lua formulas can also be altered outside the DynamicProperty
scope, but then we will have to alter the Geometry3D
instance through it's complete property name: