diff --git a/karst_cave/GenerateSurfacesFromPointsCloud3D.mlx b/karst_cave/GenerateSurfacesFromPointsCloud3D.mlx new file mode 100644 index 0000000..45aacc0 Binary files /dev/null and b/karst_cave/GenerateSurfacesFromPointsCloud3D.mlx differ diff --git a/karst_cave/lofting.m b/karst_cave/lofting.m new file mode 100644 index 0000000..93a2cb9 --- /dev/null +++ b/karst_cave/lofting.m @@ -0,0 +1,30 @@ +function model = lofting(model,data_dir) +%Constructed Irregular 3D volumes from 2D contour curves +% example: +% Comsol_with_Matlab_Start; +% import com.comsol.model.util.* +% model = ModelUtil.create('Model1');% ModelUtil.remove('Model'); +% model.modelNode.create('mod1'); +% model.geom.create('geom1', 3); +% model.mesh.create('mesh1', 'geom1'); +% data_dir = pwd ; +% model = lofting(model,data_dir) + +CurveFiles = get_curveTxtFile(data_dir,[1:5],'curve'); +objectIPC = AndInterpolationCurve(model,CurveFiles); + +model.geom("geom1").create("loft1", "Loft"); +model.geom("geom1").feature("loft1").selection("profile").set(objectIPC); +model.geom("geom1").feature("loft1").set("facepartitioning", "grid"); + +% model.geom("geom1").create("pare1", "PartitionEdges"); + +try +model.component("mod1").geom("geom1").run(); +catch + warning('The automatic lofting failed, so the Partition Edges had to be added manually.'); +end + mphlaunch(model); + + +end \ No newline at end of file diff --git a/karst_cave/ptCloud2Curve.mlx b/karst_cave/ptCloud2Curve.mlx new file mode 100644 index 0000000..25da3b8 Binary files /dev/null and b/karst_cave/ptCloud2Curve.mlx differ