### Blog posts

### Bio

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 x_{w}, y_{w}, z_{w} and rotated the project by a_{r} degrees. Then, we have offset the origin, (x_{o} y_{o} z_{o}) of the project as follows:

x_{o} = x_{w}.cos(360-a_{r}) – y_{w} .sin(360-a_{r})

y_{o} = y_{w}.cos(360-a_{r}) + x_{w}.sin(360-a_{r})

z_{o} = z_{w}

When we reference our piping drawing into the master, we must specify the insertion point and rotation as follows:

X = - x_{o}

Y = - y_{o}

Z = - z_{o}

Angle = 360 - a_{r}

### 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 (x_{o} y_{o} z_{o}) and rotated it by a_{r} 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 (x_{r}, y_{r}, z_{r}) become:

x_{r} = x.cos(360-a_{r}) – y.sin(360-a_{r}) - x_{o}

y_{r} = y.cos(360-a_{r}) + x.sin(360-a_{r}) - y_{o}

z_{r }= z - z_{o}

### Worked Example

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:

x_{o} = 2000*cos(340) – 9000*sin(340)

y_{o} = 9000*cos(340) + 2000*sin(340)

z_{o} = 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:

## Comments

0 comments

Please sign in to leave a comment.