Closed gwt829 closed 1 year ago
@gwt829 thanks for your interest in jigsaw
!
One way to approach this could be to write a MATLAB
mex function that loads the jigsaw
API (jigsaw.dll
on Windows). This should allow you to call from MATLAB
to jigsaw
without any file I/O. The interface to jigsaw
's API is a set of C structs + function calls defined in jigsaw/inc/
.
Creating such a mex interface may require a little work though, and it could be worthwhile first exploring whether I/O time is definitely an issue for your workflows first. I/O is typically not a dominant part of the overall runtime --- for meshes of 10's of millions of cells I/O time may be a minute or two, based on my experience.
Thank you for your answer. I have solved this problem. The reason why I want to avoid file i/o is that a model is composed of a large number of small geometry rather than a large one, so the mesh generation of a model may involve thousands of file i/o operations. In addition, I want to ask:
Can only surface meshes (triangles) of 3D geometry be generated instead of volume meshes (tetrahedrons)?
Whether to consider adding quadrilateral mesh generation of the plane?
I read your doctoral thesis. My idea is that when inserting new points at the current end, it is no longer through the off-center method, but based on the cross field of geometry. The new points inserted in this way form a right triangle with the front edge and finally form a high-quality boundary-aligned quadrilateral by merging the triangles. I wrote a MATLAB program, but robustness is a problem. I want to implement it in C++, but it's very difficult for me.
@gwt829, to answer your questions:
opts.mesh_dims = k
defines the topological dimension of the mesh to generate, so k = 2
will give a surface mesh and k = 3
will give a volume mesh (k = 1
will mesh just the sharp curves in the geometry as edges).
Dear developer:
Jigsaw
is a very excellent mesh generation library! I use it to generate meshes before finite element calculation. I am not a programmer, but a mechanics researcher. I often use MATLAB language instead of C++ language in my work. I'm just a C++ beginner. Although there is a MATLAB version ofjigsaw-matlab
, generating a large number of nodes and units (millions) will spend a lot of time on file i/o, so I want to compilejigsaw
intomex
function. How can I get it? I use VS2017 and MATLAB R2021a.