I take the liberty of asking for your help because I want to represent a field with different levels of elevation in Solidworks and I dry complete.
I have as input data a flat sketch of the terrain (import of an autocad file as a sketch) as well as the height values at different places on the terrain. I therefore sketched vertical planes and lines starting from a given point in order to represent these different heights.
(See attached file)
I tried to use the "free form" function without success, same with the "deform" function . I also tried to make a surface by recutting my area but the result is not smooth and does not correspond to what is expected.
I am taking the liberty of answering in order to revive the discussion on the subject. I still haven't been able to generate a multipoint average or surface plane that would allow me to represent my terrain. attached, the Solidworks file with the relevant sketches.
The attached SolidWorks document (SW2022) takes up and completes your study by defining a surface that " best approximates" all the points for which you give the altitude.
The surface is generated by a macro that uses a " reverse distance weighting" algorithm (cf . Wikipedia), in three steps:
points are created on a regular grid (x, z) parallel to the top plane, with an estimated elevation for each of them from the neighboring data points;
then, the grid points are joined by 3D splines;
finally, the surface is generated by a " Surface-Smooth" function.
Attention: the resulting surface is an approximation of the set of given points, so it does not strictly pass through these points. It should be noted that their relatively small number (36) and their very irregular dispersal do not really help.
The macro needs to be finalized, but you can already review the document to see if the result is up to your expectations. Kind regards.
just wow!! Thank you very much for your help. Obviously, it's not easy to have something precise given the number of points and the surface area, I grant you. Nevertheless, it does a lot of work because I get closer to reality rather than having a simple flat surface.