plot1
is taken from the BSplineSurface
document. I add two Disk
plot2
and plot3
to fill the surface in order to build a real solid. But BoundaryDiscretizeGraphics
won't work. I don't know how to fix it.
pts = {{{0.5, 0, -0.5}, {0, 0, -0.5}, {0, 1, -0.5}, {0.5,
1, -0.5}, {1, 1, -0.5}, {1, 0, -0.5}, {0.5, 0, -0.5}},
{{0.5, 0, 0.7}, {0, 0, 0.7}, {0, 1, 0.7}, {0.5, 1, 0.7}, {1, 1,
0.7}, {1, 0, 0.7}, {0.5, 0, 0.7}},
{{0.5, 0, 0.9}, {0, 0, 0.9}, {0, 1, 1.5}, {0.5, 1, 1.5}, {1, 1,
1.5}, {1, 0, 0.9}, {0.5, 0, 0.9}},
{{0.5, -0.1, 1}, {0, -0.1, 1}, {0, 0.5, 2}, {0.5, 0.5, 2}, {1,
0.5, 2}, {1, -0.1, 1}, {0.5, -0.1, 1}},
{{0.5, -0.3, 1}, {0, -0.3, 1}, {0, -0.3, 2}, {0.5, -0.3,
2}, {1, -0.3, 2}, {1, -0.3, 1}, {0.5, -0.3, 1}},
{{0.5, -1.5, 1}, {0, -1.5, 1}, {0, -1.5, 2}, {0.5, -1.5,
2}, {1, -1.5, 2}, {1, -1.5, 1}, {0.5, -1.5, 1}}}; w = {{1, .5, .5,
1, .5, .5, 1}, {1, .5, .5, 1, .5, .5, 1}, {1, .5, .5, 1, .5, .5,
1}, {1, .5, .5, 1, .5, .5, 1}, {1, .5, .5, 1, .5, .5,
1}, {1, .5, .5, 1, .5, .5, 1}};
uk = {0, 0, 0, 1/4, 1/2, 3/4, 1, 1, 1};
vk = {0, 0, 0, 1/4, 1/2, 1/2, 3/4, 1, 1, 1};
plot1 = Graphics3D[{
FaceForm[Yellow, Blue],
BSplineSurface[pts, SplineKnots -> {uk, vk}, SplineDegree -> 2,
SplineWeights -> w, SplineClosed -> {False, True}]},
ViewPoint -> {Right, Front}, Boxed -> False];
plot2 = Graphics3D[
BSplineSurface[{{{1., 0.5, -0.5}, {1., 1., -0.5}, {0.5,
1., -0.5}}, {{1., 0., -0.5}, {0.5, 0.5, -0.5}, {0.,
1., -0.5}}, {{0.5, 0., -0.5}, {0., 0., -0.5}, {0.,
0.5, -0.5}}},
SplineKnots -> {{0, 0, 0, 1, 1, 2}, {0, 0, 0, 1, 1, 2}},
SplineWeights -> {{1, 1/Sqrt[2], 1}, {1/Sqrt[2], 1,
1/Sqrt[2]}, {1, 1/Sqrt[2], 1}}]];
plot3 = Graphics3D[
BSplineSurface[{{{1., -1.5, 1.5}, {1., -1.5, 2.}, {0.5, -1.5,
2.}}, {{1., -1.5, 1.}, {0.5, -1.5, 1.5}, {0., -1.5,
2.}}, {{0.5, -1.5, 1.}, {0., -1.5, 1.}, {0., -1.5, 1.5}}},
SplineKnots -> {{0, 0, 0, 1, 1, 2}, {0, 0, 0, 1, 1, 2}},
SplineWeights -> {{1, 1/Sqrt[2], 1}, {1/Sqrt[2], 1,
1/Sqrt[2]}, {1, 1/Sqrt[2], 1}}]];
plot=Show[plot1, plot2, plot3]
DiscretizeGraphics[plot]
BoundaryDiscretizeGraphics[plot]