DorianDepriester / MTEX2Gmsh

Matlab toolbox for generating 2D meshes from EBSD data
https://doriandepriester.github.io/MTEX2Gmsh/
MIT License
38 stars 17 forks source link

Add a 'medium' contour to a 2D mesh #9

Closed jeanmichelscherer closed 1 year ago

jeanmichelscherer commented 3 years ago

Hi,

The 'medium' option works perfectly in 3D. I wondered if it also available in 2D, i.e. without extrusion. I tried by giving a list of only two dimensions, or by setting the last dimension to 0, but without success.

Thanks

Jean-Michel

DorianDepriester commented 3 years ago

Hi Jean-Michel, Currently, this feature has been designed for 3D only. I can try to have a look on 2D. I will notice you once it's done. Regards

DorianDepriester commented 3 years ago

This issue is now fixed. You should be able to add a surrounding medium (referred to as 'Medium' in the mesh) in 2D meshes. The dimensions for the surrounding medium are of course of length 2 (ex: [dx dy]) in this case.

jeanmichelscherer commented 3 years ago

Great! It works as expected.

kun-Jiang commented 1 year ago

Sorry to bother you again, I tend to get a 2D mesh by the following command. I have tested mtex version of 5.3.1 and 5.8.0 but there didn't appear medium surround the ROI. And there were still four nodes existing in the margin of the medium. mesh(G,'titanium-medium.msh','ElementType','Quad','ElementSize',20,'medium',[1000 1000]); titanium-medium

DorianDepriester commented 1 year ago

Hello @kun-Jiang, Thank you for reporting this issue, and sorry for the inconvenience. The issue is hopefully fixed now. Download the latest version (not from releases) and it should work.

kun-Jiang commented 1 year ago

Thanks, Dorian, it works!