by Andy Davis
Let us assume that we wish to reference a ReCap project that was accurately geolocated into AutoCAD Plant3D, to facilitate modelling of pipework from a point cloud.
Offset and Rotate
We will usually need to offset and rotate the ReCap project in AutoCAD for two reasons:
- to bring it close to the origin of our AutoCAD drawing
- to enable us to align the pipework as closely as possible with the axes of the AutoCAD WCS
The pipework model that we create will reference the local coordinates from our AutoCAD drawing and store those local coordinates within the Plant 3D piping database.
Model Coordination Issues
To correctly geolocate the completed pipework model within the original point cloud to produce a federated 3D model, we will need to translate the coordinates of the geometry in our piping model. When we do so, however, the coordinates of the pipework stored within the Plant 3D database will not update.
If we wish to generate fabrication isometric drawings of our pipework that show geolocated coordinates, we will have to apply a coordinate offset to the iso’s at run time.
Additionally, if we wish to view the true coordinates of the piping components in our Plant 3D model, we will need to calculate these and store them as additional properties within the Plant 3D database.
AutoCAD Master Drawing
The most efficient way to translate the coordinates of the geometry in our Plant 3D piping drawing is to create a master drawing in our Plant 3D project and reference our model into it. We can specify the insertion point and rotation that is to be applied to our piping drawing to correctly geolocate the pipework within the master drawing.
Calculate Coordinates of Insertion Point
To determine the coordinates of the insertion point for our piping drawing, we need to account for the offset and angle of rotation that we applied to the ReCap project.
Let us assume that we applied the offset xw, yw, zw and rotated the project by ar degrees. Then, we have offset the origin, (xo yo zo) of the project as follows:
xo = xw.cos(360-ar) – yw .sin(360-ar)
yo = yw.cos(360-ar) + xw.sin(360-ar)
zo = zw
When we reference our piping drawing into the master, we must specify the insertion point and rotation as follows:
X = - xo
Y = - yo
Z = - zo
Angle = 360 - ar
Fabrication Isometric Offset
To produce iso’s with geolocated coordinates, we must apply the same offset location values into the advanced options that we specified for the insertion point and rotation of our piping drawing into the master drawing, above.
Real World Model Coordinates
To calculate the real-world coordinates of the piping fittings in the Plant 3D database, we need to add new calculated properties to the Engineering Items class in Plant 3D.
Let us assume that we offset out project by (xo yo zo) and rotated it by ar degrees.
To calculate the real world coordinates we must first rotate the local coordinates (x, y, z) and then subtract the offset. The real-world coordinates (xr, yr, zr) become:
xr = x.cos(360-ar) – y.sin(360-ar) - xo
yr = y.cos(360-ar) + x.sin(360-ar) - yo
zr = z - zo
In this example, we have referenced a ReCap project into a Plant 3D project drawing with the following insertion point and rotation:
The insertion point and rotation to reference this into a master drawing are calculated as follows:
xo = 2000*cos(340) – 9000*sin(340)
yo = 9000*cos(340) + 2000*sin(340)
zo = 2000
Giving the following:
X = -4957
Y = -7773
Z = -2000
Rotation = 340
Project and class properties are added to the Plant 3D project and used to calculate the real-world coordinates for all piping components from their local model coordinates.
The original point cloud offsets are stored in project properties:
These are acquired into all piping and equipment items:
Calculated properties are defined to perform the calculations and store the results.
For any iso’s that we generate we specify the following location offsets to produce real world coordinates: