by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - SG/Solids
Introduced first in SolidGeometry 2.4, Creation date: 2015-07-30, Last change: 2025-09-14
[SG,VL1,VL2,FLW]=SGofSurface(OVL,OFL,[t,d,s,cn])
OVL: | Vertex list of a surface (nx3) | |
OFL: | Facet list of a surface (nx3) | |
t: | thickness of the solid; default is 0.5 | |
d: | distance from the surface; default is 0.3 | |
s: | streching of the border line; default is 0 | |
cn: | false=matlab vertex calc; true=corrected vertex normal; default is false; true is 10 times slower -> VLFLvertexNormal |
SG: | resulting solid that can be attached to the surface | |
VL1: | VL oved along d | |
VL2: | VL moved d*ez | |
FLW: | Facet of list wall [VL1;VL2] |
Surface clouds to solid geometries
loadweb 'AAruffo_surf.mat'
SGofSurface(SG1.VL,SG1.FL,-5,0); A=ans
SGpuzzlecut3D(A); X=ans;
SGboxpacking(X,[],[500 500 500])
%% See the result of different vertex normal vectors
[VL,FL]=VLFLsample(18); SGofSurface(VL,FL,1,0,0,false)
[VL,FL]=VLFLsample(18); SGofSurface(VL,FL,1,0,0,true)