CONSTANT GAP OPTIMIZATION

Not everything can be taken from a class A surfacer … This time it was a frozen phase of the prototype and deadlines. Here I recreated the case of the situation I came across :

The effect of this was to be the following assembly of two parts:

The highlighted surface was defined by the constructor as an offset of one of the front surfaces. Only the result was a visually not constant gap:

And now how to define surfaces that will only meet the aesthetic requirements, i.e. after trimming the above styling, the gap will visually be constant over the entire length?

The problem is not so simple because the surface areas affected by the gap width on both parts are free form surfaces with a variable angle of demoulding to the forming direction (highlighted in the picture):

We will start by determining the starting height from the left, taking into account the directions of moulding, i.e. X for the blue part and Z for the brown part:

The following procedure was created:

That is, the derivative of the gap height will be the offset of the surface being demolded. This is the procedure in 3D:

And the following parameter was created measuring the height of the gap:

The next step will be to subject this Target Value optimization parameter to reach our starting gap height of 20 mm – the optimized parameter will be the offset value of the demolded surface and the target function our GAP Height parameter:

The result of this is a gap having perfect 20 mm at the start :

So we have defined the initial sweep surface demolded to the Z direction for the brown part …. and now the more difficult part of this issue, i.e. how to define the curve on the blue surface, from which we will get an equal longitudinal gap by creating a sweep surface in the direction of forming the brown part ??? The answer is PEO again ðŸ™‚ You have to come up with some kind of smart procedure that will be optimized. Here is an example procedure:

A spline curve has been created that passes successively through points: the starting point (defined in the previous optimization) and points A, B, C, D which distances can be controlled using parameters with the same names. Just how do I know where to set these points, so that the sweep released from this spline curve has cut us brown surfaces in a place exactly providing us with a 20 mm high gap???

The following procedure was created:

In appropriate places at the intersection of our sweep surface with our brown surface, gap height measurement points were created: A1, B1, C1, D1.

So now we have a recipe for gap, i.e. we optimize the value of A to get the value of A1 equal to 20 mm …. And so with the next points. The following set of parameters was created:

These are the setting for the first point:

Which results in

And so with the next points B, C and D – in one word, we stretch our spline curve point by point with evolutionary algorithms in order to obtain an even gap ðŸ™‚ The effect of the measurements at the measurement points is:

You can freely compact the number of points and the performed optimization as well as the optimization parameters, so that the result is more accurate but the accuracy requires time and this effect should be included in the general “tolerance”.

And the final result:

To sum up – ready surface providing an even gap and technological by the way in line with the brown part moulding direction. How to do it in a classic way – I did not have the idea according to the input i.e. two surfaces and the requirement for the width of the gap. I still have a headache to make a template with such a task ..