# Definition of min. max. size netgen 2D

Hello,

I notice that depending on the size of the model that we want to mesh, eg. a cube of 200x200x200

when generating a mesh by:

1.create new mesh

2.clic 2D

3.select netgen 1D-2D

4.clicl in netgen 2D parameters

salome generates a min and max size. (0.346 and 34.6...)

when i re do this with a cube of 2x2x2 I get as min and max size. 0.0034 and 0.34, If I try with a 200x100x200 I get min and max 10 and 30.

is it possible to calculate these values in a python script from an imported solid? I am trying to create an script that will mesh "any" step model. but when i do a dump study to use it as a base for example using the last 200X100X200 i have the lines:

NETGEN_2D_Parameters_1.SetMaxSize( 30 )

NETGEN_2D_Parameters_1.SetMinSize( 10 )

that are wrote in "hard" (not calculated by an equation). is it possible to calculate this within the script?

best regards.

For anyone looking for these info: (thanks to nejc from https://damogranlabs.com/) for the maximum value, it is the diagonal of the bounding box divided by 10.

regards,

Previously Franco Otaola wrote:

Hello,

I notice that depending on the size of the model that we want to mesh, eg. a cube of 200x200x200

when generating a mesh by:

1.create new mesh

2.clic 2D

3.select netgen 1D-2D

4.clicl in netgen 2D parameterssalome generates a min and max size. (0.346 and 34.6...)

when i re do this with a cube of 2x2x2 I get as min and max size. 0.0034 and 0.34, If I try with a 200x100x200 I get min and max 10 and 30.

is it possible to calculate these values in a python script from an imported solid? I am trying to create an script that will mesh "any" step model. but when i do a dump study to use it as a base for example using the last 200X100X200 i have the lines:

NETGEN_2D_Parameters_1.SetMaxSize( 30 )

NETGEN_2D_Parameters_1.SetMinSize( 10 )

that are wrote in "hard" (not calculated by an equation). is it possible to calculate this within the script?

best regards.