diff --git a/libsrc/interface/writeuser.cpp b/libsrc/interface/writeuser.cpp index cafe38ae..b4659b53 100644 --- a/libsrc/interface/writeuser.cpp +++ b/libsrc/interface/writeuser.cpp @@ -238,12 +238,19 @@ void WriteNeutralFormat (const Mesh & mesh, if (mesh.GetDimension() == 2) { outfile << nseg << "\n"; - for (i = 1; i <= nseg; i++) + for (int i = 1; i <= nseg; i++) { const Segment & seg = mesh.LineSegment(i); outfile.width(4); outfile << seg.si << " "; + for (int j = 0; j < seg.GetNP(); j++) + { + outfile << " "; + outfile.width(8); + outfile << seg[j]; + } + /* outfile << " "; outfile.width(8); outfile << seg[0]; @@ -255,6 +262,7 @@ void WriteNeutralFormat (const Mesh & mesh, outfile.width(8); outfile << seg[2]; } + */ outfile << "\n"; } } diff --git a/libsrc/meshing/python_mesh.cpp b/libsrc/meshing/python_mesh.cpp index cd295228..4ee6610a 100644 --- a/libsrc/meshing/python_mesh.cpp +++ b/libsrc/meshing/python_mesh.cpp @@ -284,6 +284,14 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m) li.append(py::cast(self[i])); return li; })) + .def_property_readonly("points", + FunctionPointer ([](const Element2d & self) -> py::list + { + py::list li; + for (int i = 0; i < self.GetNP(); i++) + li.append (py::cast(self[i])); + return li; + })) ; py::class_(m, "Element1D") @@ -316,6 +324,14 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m) li.append (py::cast(self[i])); return li; })) + .def_property_readonly("points", + FunctionPointer ([](const Segment & self) -> py::list + { + py::list li; + for (int i = 0; i < self.GetNP(); i++) + li.append (py::cast(self[i])); + return li; + })) .def_property_readonly("surfaces", FunctionPointer ([](const Segment & self) -> py::list {