1
$\begingroup$

Is there a way to take two arbitrary BSplineCurves and create a loft surface? I would like to then create a mesh to send to NDSolveValue.

$\endgroup$
6
$\begingroup$
Clear["`*"];
f = BSplineFunction[RandomReal[{-1, 1}, {4, 3}]];
g = BSplineFunction[RandomReal[{-1, 1}, {3, 3}]];
movingline = ParametricPlot3D[f[u], {u, 0, 1}, PlotStyle -> Red];
baseline = 
  ParametricPlot3D[g[v] + f[0] - g[0], {v, 0, 1}, PlotStyle -> Blue];
surface = 
  ParametricPlot3D[g[u] + f[v] - g[0], {u, 0, 1}, {v, 0, 1}, 
   MeshFunctions -> (#4 &), MeshStyle -> Pink, 
   PlotStyle -> LightGreen, PlotRange -> All];
Show[surface, baseline, movingline, Boxed -> False]

enter image description here

ToBoundaryMesh is also work, so it can be use in FEM

reg = DiscretizeGraphics[surface]
<< NDSolve`FEM`
loftmesh = ToBoundaryMesh[reg]
loftmesh["Wireframe"]

enter image description here

$\endgroup$
1
$\begingroup$

Do you mean something like this?

acc = 10
curv1 = Table[{Cos[u], Sin[u], 1.}, {u, Subdivide[0, 2 Pi - 2 Pi/acc, acc]}];
curv2 = Table[{.2 Cos[u], .2 Sin[u], -1.}, {u,Subdivide[0, 2 Pi - 2 Pi/acc, acc]}];

sur = BSplineSurface[{curv1, curv2}, SplineClosed -> {False, True}, SplineDegree -> 3];
surfun = BSplineFunction[{curv1, curv2}, SplineClosed -> {False, True}, SplineDegree -> 3];

Graphics3D[sur]

enter image description here

Generating the Mesh then from surfun should be straight forward.

$\endgroup$
1
  • $\begingroup$ Thanks guys! I don't know why it was so hard to cypher this out of the help structure. This has me going in the right direction! Best! $\endgroup$ – mh2000 Oct 13 '20 at 22:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.