# How can I get the DEPTH value of hull in Maxsurf Modeler?

I want to get the Depth value of the vessel. How do I get it in Maxsurf Modeler?

Note: I tried setting a ridiculously large DWL value as Reference and obtaining the Immersed Depth value from Hydrostatics. But this is not providing the actual depth of the vessel.

Parents
• Hi Michael,
If you are after a rough measurement, I would read it from the cursor positions in the bottom left of the window. The last set of numbers is the distance (and x,y translations) from the last point where the cursor was clicked.

The other one you could use would be to use Data | Calculate Areas and look at the total depth value.

Looking at the 2 screenshots, my rough estimate was 4.787m, the calculated value was 4.757m, 30mm different without zooming in.

• Hi Michael,
If you are after a rough measurement, I would read it from the cursor positions in the bottom left of the window. The last set of numbers is the distance (and x,y translations) from the last point where the cursor was clicked.

The other one you could use would be to use Data | Calculate Areas and look at the total depth value.

Looking at the 2 screenshots, my rough estimate was 4.787m, the calculated value was 4.757m, 30mm different without zooming in.

Children
• Hi James,
This method will not serve my purpose as I want to use automation to get the Depth data from a large number of hulls.

Thanks

• Ah - automation makes it trickier still!

One method would be to look at the control point locations, this may be indicative however it won't be accurate because:

- The control points don't lie on the surface

- The surfaces may be trimmed

Alternatively (and it would be slow) you could adjust the Frame of Reference DWL and calculate the hydrostatics. You could iterate on the lower bound at which the TpC is non-zero, and the upper bound where TpC is non-zero. The distance in between would be the hull depth.

Code to look at the difference between the highest and lowest CP would be:

==============

Dim msApp As New BentleyModeler.Application

Sub CalculateDistanceBetweenHighestAndLowestCP()

tIn = VBA.Timer

a = GetDepth

tOut = VBA.Timer

Debug.Print a & " :: time taken = " & tOut - tIn

End Sub

Function GetDepth() As Double

Dim ss As Surface
Dim rowCount As Long
Dim colCount As Long
Dim coord(1 To 3) As Double

Dim hMax As Double
Dim hMin As Double

hMax = -10000 'initialise these variables to be far beyond the model
hMin = 10000

For Each ss In msApp.Design.Surfaces

'if you only want the visible surfaces (to exclude SS etc then you could add a line about;
'If ss.Visible = True Then

ss.ControlPointLimits rowCount, colCount

For r = 1 To rowCount
For c = 1 To colCount

ss.GetControlPoint r, c, coord(1), coord(2), coord(3)

If coord(3) > hMax Then
hMax = coord(3)
End If

If coord(3) < hMin Then
hMin = coord(3)
End If

Next
Next

Next

Depth = hMax - hMin

GetDepth = Depth

End Function