Minimum and maximum Distance to Surface / help needed

Hi there,

I need a little help as I’m not that familiar with Grashopper.
The attached model shows a situation I have to deal with.
There’s a 3 D Scan of an steel wall and I need to arrange window panes, doors and other items in a distance of minimum and maximum glue thickness of 12 to 25 lets say.
The items to be placed are volumes or blocks (in which a defined surface needs have the distance)
I could put each window glass into an block if that helps with Grashopper defintion to simplify.
Or I could extract the needed surfaces from the blocks and volumes.
The Surface Scan could be arranged in a group instead of a block if necessary, but unfortunately the scan consists of many smal surfaces. To create large single surfaces would really take to much time with the overall scale of the project.

The whole project is lot bigger and it seems, that it would the easiest way to check this with grashopper.
All the window panes in the ship shall be on a fair curve in the end.
The evaluation of glue thickness must be done probably window by window or door then.

Sorry, the file is still quite large. Have tried to reduce it from 226 Mb to this…

Thanks for your help !!
Minimum+Maximum Distance to Scan Surface.3dm (8.6 MB)

Dear all,

if someone could help me here, I’d really greateful.
I might pay for the development of such tool or grashopper script, agreement on price assumed.

The distance to the scan surface should be always normal to the glass pane.

Thanks !

My initial thought was, window by window, reference the window, reference some of the small surface triangles around the window, create a series of points around the window glass to calculate the normal distance to the surface. Calculate a new plane and position for the window and check the new distances.

This takes the innermost glass surface.

Some of the points miss the target surface because it looks like the aperture is bigger than the glass?

Will you only move the glass in or out along its normal vector or does the glass need to be re-oriented on a new, best fit plane?

This lets you move the glass in and out and see the range of distances change.

The geometry is internalised in the GH file. (5.7 MB)

This is a starting point… hopefully it can help.

1 Like

Hi Martyn,

thanks so much, this is great. Awesome!!
The glueing surface of the glass is on the recess. Of course it’s been the last surface in the index… :slight_smile:
The glass shall move on this wall aft or forward only, as all 5 glass panes shall be parallel.
On other walls the glass will oriented on a curve, which has to edited when I found out about the minimum and maximum distance. We will have a glueing distance of 12 to 20 mm, any more tolerance will need to be adjusted by fairing the curve or we will need to add some aluminium bars on the wall.
The cutout indeed got to big on the lower edge and will need to be corrected.
I will have a look into it and check if I can improve it. But I believe I will have to check window by window, orient it to the curve and check again.

Thank you so much again.

1 Like

not sure if I got you right… This def searches for controlpoint containment of the steel-surfaces inside the “Vierkant Fenster”-bars, then moves the bars (colored pink) by the amount of the most distant point so that there is (almost) no overlapping.
Is uses Elefront-plugin to reference blocks/layers.
Geometry is not internalized, should work with your file above.

Good luck

Minimum+Maximum Distance to Scan (15.6 KB)

1 Like

Thank you so much as well.
I have just downloaded the elefront plugin and will check your defintion.
Looks very good though.

Hi all,
@ferry59: I couldn’t get the script collecting data from different layers and didn’t find a description how to add layers to the list. Could you have a look please?

I tried a bit on the first definition.
As it takes a lot of time on PC to compute (don’t know for what reason, the hardware is a Ryzen 5800X and a AMD 6800X 16`GB Card) I tried different ways. And almost got there.
Here’s what I want to achieve first:
The scanned surfaces shall be compared against the glass.
There will be windows without the bars and some will have them. So it’s more universal to measure the distance to the recessed glass face, which will be the gluing face.
There will be round windows and straight ones and we also need to check for filler thickness on steel bulwarks.
If the definition can do all these tasks would be great.

There’s a issue with the round window.
As I want to measure bulwarks with cut outs and without, round windows as well straight ones, the points should run all over the surface and adjust to cut outs similar as shown in the file.
But there are 4 points near the edge of the cut out instead of one and I don’t know how to filter them out so only the one really perpendicular to the surface is left.
As the scan surface for the round window is just idealized with an offset surface of 50 mm, the distance should be 50 everywhere.

Thanks agian for your generous help !!
I have internalized the surfaces of an bulwark, round window and straight glass.

DistSurfToScan (15.0 MB)

Could someone have a look into my file please? I’m really keen to have some results.
I need to find the closest distance with some precision.

@ferry59 It would be nice to find out why Grasshopper didn’t recognize my change to layer of the scan surface. As I need to extract the neded surfaces from the block, I have to copy them to another layer.


sent you a message.