0
$\begingroup$

I am trying to make a 3D solid (with BoundaryMeshRegion) from surfaces created by spline curves.

In the follow simple example, I need to close the ends of this irregular tubular shape using boundaries defined by curv1 and curv3:

curv1 = {{3, 0, 0}, {1, 1, 0}, {0, 2, 0}, {-2, 0, 0}, {0, -2, 0}, {3, 0, 0}};
curv2 = {{2, 0, 5}, {1, 1, 2}, {0, 2, 2}, {-1, 0, 5}, {0, -2, 5}, {3, 0, 5}};
curv3 = {{2, 0, 9}, {1, 1, 9}, {0, 2, 9}, {-1, 0, 6}, {0, -2, 6}, {3, 0, 9}};
sur1 = BSplineSurface[{curv1, curv2}, SplineClosed -> {False, True}, SplineDegree -> 3];
sur2 = BSplineSurface[{curv2, curv3}, SplineClosed -> {False, True}, SplineDegree -> 3];
DiscretizeGraphics[{sur1, sur2}]

Also, for exporting to an .stl file, is it ok to have multiple meshed regions like this? They share a boundary curve, but when I look at the MeshCells, I can see that there are duplicate coincident nodes along the boundary curves. FEM software require an "equivalence" step to actually attach surfaces (etc.).

$\endgroup$
3
  • 2
    $\begingroup$ In the stl format, there is no notion of incidents. Each triangle will be specified by 3 coordinates and an optional normal. Any equivalencing will be lost when converting to stl. $\endgroup$ – Tim Laska Oct 15 '20 at 2:15
  • $\begingroup$ So Mathematica doesn't care if there are duplicate coordinates and the Polygons don't share a single entry as shown in the MeshCoordinates? IE. if vertex 1 and 47 are located at the same place and two adjoining Polygons look like they are attached, but one references node ! and the other node 47, in the translation, they will be attached to close a surface? Also, as a NASTRAN/PATRAN user, I am thinking of nodes and "elements" as how they are used in FEM code and I'm not sure if Mathematica uses the same conventions and rules. $\endgroup$ – mh2000 Oct 15 '20 at 17:36
  • $\begingroup$ My comment addressed the STL format and STL cares nothing about equivalencing. Mathematica (MMA) is a very broad application and it will depend on the context in which it is being used. When one uses MMA to do FEM, the coordinates must be unique. The meshing requirements will be similar to NASTRAN. Look at the Element Mesh Generation Tutorial. $\endgroup$ – Tim Laska Oct 15 '20 at 23:45

Your Answer

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

Browse other questions tagged or ask your own question.