Transformations of PCF and XGL extracted data
- Last UpdatedMay 25, 2026
- 8 minute read
Matching of XGL with PCF Components
An XGL/ZGL file contains 3D model graphics (meshes) of pipeline systems and their components, whereas PCF files only contain the geometry of end-points, branch-points, center-points and bores of pipeline components. Matching between the XGL meshes and the PCF components is achieved with the PcfTo3d transform extension, which identifies the mesh structures at the 3D points specified in the PCF file. This of course requires the coordinates to be in the same system, or to apply a coordinate transformation to the PCF coordinates so that they are in the same system.
Creating Common PipelineModel from PCF and XGL Data
The Gateway extracts each component of PCF file and their attributes and assigns them into the ObjectModel as engineering objects.
The Gateway extracts each object of XGL file and their attributes and assigns them into the ObjectModel as graphical objects.
Any of these objects or their attributes can be changed or removed by Base mapping. The Gateway also creates spool objects.They are identified by a PCF component's attribute named as SPOOL-IDENTIFIER. Every subsequent component is associated with that spool object until the next component with erection attribute (ERECTIONITEM or CATEGORY ERECTION). This procedure is repeated until the ENDCONNECTION-PIPELINE attribute in last PCF component is read from the PCF file.
Notes:
-
Some XGL objects can be only points or lines which do not correspond to real graphics describing the PCF pipeline components.
-
Some PCF components can be built from multiple XGL objects and vice versa.
-
A PCF component does not always have its XGL object equivalent and vice versa.
-
If a WELD component contains the attribute SKEY = ZSP1, then this is not treated as a spool end because it means it is a support weld, not a pipe weld.
Adjusting 3D Models Using PcfTo3d Extension Configuration
You can match or adjust 3D models using the PcfTo3d Extension Configuration to enable matching between PCF and XGL components, adjust the visibility properties and add helper graphics.
Example of Extension Configuration:
<extension name="PcfTo3d"
TransformByMatchingCoords="false"
MatchingCoords="-3882.2001,-5349.7370,110.6175,-3882.4714,-5349.4695,110.2365,
-3882.2001,-5349.7370,110.2365,1039037.590,957402.700,110617.510,1039037.580,
957783.690,110236.510,1039037.590,957402.700, 110236.510"
PcfCoordsScaleFactor="0.001"
PcfBoreScaleFactor="0.0254"
MatchObjects="true"
TestSpoolEndsPreview="true"
SpoolEndsScale="0.0508"
TestPreview=" false "
TestBoreScaleFactor="0.0508"
TestMatchPreview="false"
GenerateFileExtents="false" />
Associating PCF components with XGL shapes may require adjustments regarding the 3D transformation of the PCF component's position, size, rotation and bore units.
By default, PcfTo3d extension is enabled. The setting MatchObjects="true" indicates that the program assigns all retrieved PCF and XGL objects’ pairs.
You can use two methods to match XGL and PCF models, depending on the source data:
-
Simple Case: When the only coordination transformation required to match PCF and XGL objects is to change the scale.
To modify the scale of the PCF model to match the XGL model, you can use PcfCoordsScaleFactor and PcfBoreScaleFactor options. In the configuration example, all coordinates in PCF are set in millimeters and bore is set in inches.
You can get this information from PCF header attributes.
Information about units is not placed in the XGL files, so you may not get this information during export from source format. All coordinates and bores in XGL can be specified in meters. In this case, a configuration must contain values:
PcfCoordsScaleFactor="0.001" and PcfBoreScaleFactor="0.0254".
-
Advanced Case: When the coordinates of the PCF objects need to be rotated and/or translated as well as scaled with respect to the XGL objects, and a complete coordinate transformation is required.
-
TransformByMatchingCoords: You can use the TransformByMatchingCoords setting for advanced matching. If this setting is set to true, it indicates that advanced matching will be used. Therefore, the basic option PcfCoordsScaleFactor is ignored. TransformByMatchingCoords setting is set to false by default.
-
MatchingCoords: Derives the coordinate transformation between PCF and XGL object locations by specifying three matching points. The points should be chosen to span a wide range in each coordinate direction (X, Y and Z). This setting is used only when TransformByMatchingCoords is set to true.
-
Order of points: pcf_point1, pcf_point2, pcf_point3, xgl_point1,xgl_point2, and xgl_point3
-
Order of coordinates for each point: X, Y, Z
Point 1 in the XGL coordinate system should be equivalent to point 1 of the PCF coordinate system and so on.
The Gateway checks if two polygons are similar, meaning having the same shape. Therefore, the ratios of the lengths of their corresponding sides must be equal.
Identifying Spools and Other PCF Components in AVEVA NET
In the AIM database, a spool is a kind of virtual object that does not contain graphics by itself but groups other objects. XGL objects which represent PCF components and are part of specific spools are represented additionally by spool objects with their own tags.
When you use the default base mapping, the 3D model is viewed in the AIM Dashboard browser, which displays the complete structure of pipelines with components associated with spools.
Note: Whether the PCF components are visible on the XGL model depends on the resolution of the model. For example, most piping models do not contain graphical representation of bolts or welds.
To select, highlight or view properties of a physical pipeline component imported into Dashboard:
-
Select the relevant part of the 3D model.
-
Click the part in the Dashboard View.
A pop-up window appears with the details of the pipeline component.

Next, you can examine a specific spool:
-
Select an association with the spool in the Properties window, then select the spool element.
The whole spool (group of pipeline components) should then be highlighted.

You can specifically adjust the data produced by the Gateway using the following mappings.
Adjusting the Presentation of Output Data
You can specifically adjust the data produced by the Gateway using the following mappings.
To adjust the output data using mappings:
-
Use the additional base mapping that is prepared and delivered with sample projects. This will only tag spools in the pipeline.
By default, it is commented. To enable this mapping, you need to edit the transformation configuration and uncomment the section shown below:

While viewing in Dashboard, it is also useful to filter the 3D model using the Material attributes, which are defined in the Materials mapping feature of the Presentation mapping:

By default, different types of pipeline components are placed on the following layers:
|
Layer Name |
Type of Components |
|
“PCF-SPOOLS” |
The optional transparent geometry showing spool locations delivered only when the preview setting is enabled in the PcfTo3d extension. Note: All spools are marked in a light green colour and all components which are not part of spools, are marked in light blue colour. |
|
"PCFCOMPONENTS" |
All components that are not part of spools but have matching PCF and XGL geometry. |
|
“NOTCONNECTED” |
All XGL objects that are not paired with any PCF components. |
|
"PCF-MATCH" |
All matching and spooled PCF and XGL components. |
|
"SPOOL_ENDS" |
Additional graphics marking spools' ends. |
|
"ERECTION" |
All ERECTION items - components having an erection attribute. |
Mapping components by layer to materials enables you to select the visible layer in the Dashboard view.
Excluding 3D Model Attributes
-
The XGL input file contains attributes and graphical elements. To avoid including them with attributes from PCF input files, you can exclude them from the EIWMoutput by default when ExcludeAttributesFromInputXGL="true". If you want to include them in the output EIWMfile, then set this parameter to “false”.
Checking the Effectiveness of Matching PCF and XGL Components
You can use three ways to check the success and failure of matching between PCF and XGL components:
-
Logging: This provides information on whether an XGL object (or objects) is found for its equivalent PCF component.
-
Adding HelperMarks on the 3DModel View: When using the PcfTo3d extension setting: TestPreview="true", and setting bore scale to, for example, 2 times bigger: TestBoreScaleFactor="0.0508" - the Gateway will generate an additional layer of data - “PCF-SPOOLS” in the XGL model showing the simplified 3D collar surrounding spools (light green). If a 3D collar surrounds not spooled components, the graphic placed in the additional layer "PCFCOMPONENTS" in the XGL model will appear in light blue.

-
Producing Additional XGL with all Components in a List:
You can use the PcfTo3d extension TestMatchPreview="true" to produce a 3D list of the PCF components with their matched XGL equivalents. You can use the report for debugging purposes by exporting it to a separate XGL file using segmentation in the presentation mapping:

The XGL preview with components list is organised in the following three columns (from left), as shown in the following diagram of a XGL file in the list view:
-
PCF simulated object geometry
-
XGL objects found for PCF object
-
XGL object and PCF object with doubled bores
Example of the List view in an XGL File:

Note: It is not recommended to use this list view report for large pipelines.
Checking positions of PCF and XGL files' models
Using the GenerateFileExtents="true" option helps you prepare or check the data for processing by the Gateway. If you enable this option, additional bounding boxes are added to XGL graphics showing the extents of each PCF and each XGL file selected for processing. The following example shows two PCF files (pink boxes) and one XGL file (yellow box):

Note: Bounding boxes geometries are tagged with the names of the corresponding PCF or XGL files names.
-
Identifying Spool Ends
You can identify the ends of each spool in the 3D model using the TestSpoolEndsPreview method.
When it is set to true (default), then additional graphics in the form of halftransparent disks are shown at the ends of each spool. You can use an additional setting SpoolEndsScale to set the bore size factor, which is also done for other settings for bores.

Erection Components
Erection components are components having attributes with name: CATEGORY and value: ERECTION, or components with attribute name ERECTION-ITEM (no value).
Erection components are set on separate layers, so you can set specific material and colour for them, as shown in the following presentation mapping:
</presentation>
<materials>
<material fromAttribute="LAYER" fromValue="ERECTION_WELD" toMaterial="ERECTION" />
<material fromAttribute="LAYER" fromValue="ERECTION_GASKET" toMaterial="ERECTION" />
<material fromAttribute="LAYER" fromValue="ERECTION_FLANGE" toMaterial="ERECTION" />
<material fromAttribute="LAYER" fromValue="ERECTION_OTHERS" toMaterial="ERECTION" />
</materials>
<colours>
<colour fromAttribute="LAYER" fromValue="ERECTION_WELD" toColour="Red"/>
<colour fromAttribute="LAYER" fromValue="ERECTION_GASKET" toColour="Blue"/>
<colour fromAttribute="LAYER" fromValue="ERECTION_FLANGE" toColour="Green"/>
<colour fromAttribute="LAYER" fromValue="ERECTION_OTHERS" toColour="Yellow"/>
</colours>
</presentation>
Erection items directly connected to the spool (that is, share the same end point coordinates) are associated with the spool by type "is connected to". Other erection items are not associated with the spool but are associated with the pipeline object.
The following figure shows a view of erection components (in yellow colour).
