Command line CGF generation tools
CADMATIC Hull has two command line tools to generate CGF files from Hull parts. CGF files are used to interchange the geometry of Hull construction parts to CADMATIC Plant Modeller. Both tools generate .cgfx format files which are stored in the cgf subfolder of the block folder.
-
gdl2cgf.exe generates CGF files directly from GDL (Geometric Description Language) files.
-
gencgf.exe is an older tool. It generates CGF files from the available data in the construction database.
It is recommended to use the gdl2cgf tool because it runs much faster than the gencgf tool. In tests the tool has converted up to 300.000 files in 10 minutes. For each GDL file that contains tessellation, the tool will check if a correponding BREP file is available, and use it if present.
The gdl2cgf.exe tool can be run as a standalone command line tool, while the gencgf.exe tool is designed to be used from within Hull Clone. See Running scripts with Hull Clone. Later the tools can be run even for single parts from the command prompt.
See also Creating CGF files.
The gdl2cgf tool
The gdl2cgf tool (gdl2cgf.exe) generates CGFX files directly from GDL (.gd) files. it is designed specifically to read files that were originally created by the Hull application, and not to be a generic GDL language parser.
Note: The tool does not overwrite existing CGF files.
Using the gdl2cgf tool
Usage:
gdl2cgf [--help|help|/?|-h] project=<path> [block=<name>] [log=<logistical key>] [gdllist=<gdllist>]
-
When only a project path is given , all .gd files in all blocks are converted.
-
When also a block name is given, the tool will only convert .gd files in that block
-
When also a logistical key is given, the tool will convert only the single .gd file corresponding to the given key. When a logistical key is given, also a block must be given.
-
gdlist is the the basename for a file that will contain all the GDL files for which an equivalent CGF already existed, or got created. The full filename will be <gdllist>_<blockname>.log. This option is ignored when a logistical key is given.
-
Paths are stored relative to the project root.
-
When calling the tool without any options, or when using the standard help options (--help, -h, help, /?), the help is displayed.
The gencgf tool
The gencgf tool (gencgf.exe) generates CGFX files from previously stored extrusion data and BREP (Boundary REPresentation).
The tool generates CGFs with sweeps or BREPs depending on the settings in %ncgnorms%\bsvgdl.cgf. For more information, see the system management function Detailed Profile Models.
The requirements for generating .cgfx files are the following:
-
For shell plates and parts that require detailed presentation according to the settings, the BREP of the part has to be available in the 3dparts folder in the block.
-
The extrusion geometry of the remaining parts has to be available in the db0g<block> database.
Using the gencgfs tool
When generating the CGFX files, use the following syntax for a single part:
gencgfs log <logistical key>
Or use the following syntax for an entire block:
gencgfs block <block name>
Where:
- <logistical key> – The logistical key of the part.
- <block name> – The name of the project block.