# Elliptic cylinder with nested objects

Hello NG team,

I would like to ask you for advice on creating elliptical objects. I want to create an elliptical cylinder with nested holes around its perimeter. I use it for simulation in Matlab, where I also generated an attached geo file. When I started the NG mesh generator (Netgen version 5.3), I got stuck in the Start Findpoints operation, but I don’t know why? Can you describe me what I’m doing wrong?

Note: The coordinates of the second and sixth object are the same, but with opposite signs with respect to the origin of the system coordinates. Second is Ok, sixth failed.
Here is the generated geo file.

``````#Elliptic cylinder
#failed: 6th and 8th hole in the eliptic body

algebraic3d

solid body0001 = ((((((((ellipticcylinder(0, 0, 0 ; 0.0957, 0, 0 ; 0, 0.0953, 0)
and plane(0, 0, 0 ; -0, -0, -0.318) and plane(0, 0, 0.318 ; 0, 0, 0.318)))))

and (not (cylinder(-5.51091e-19, 0.0863, 0.296 ; 4.59243e-19, 0.1028, 0.296 ; 0.0045)
and plane(-5.51091e-19, 0.0863, 0.296 ; -1.01033e-18, -0.0165, -0)
and plane(4.59243e-19, 0.1028, 0.296 ; 1.01033e-18, 0.0165, 0))

and not (cylinder(0.0612874, 0.0610419, 0.296 ; 0.0729241, 0.0727397, 0.296 ; 0.0045)
and plane(0.0612874, 0.0610419, 0.296 ; -0.0116367, -0.0116978, -0)
and plane(0.0729241, 0.0727397, 0.296 ; 0.0116367, 0.0116978, 0))

and not (cylinder(0.0867, 5.28204e-18, 0.296 ; 0.1032, 6.29661e-18, 0.296 ; 0.0045)
and plane(0.0867, 5.28204e-18, 0.296 ; -0.0165, -1.01457e-18, -0)
and plane(0.1032, 6.29661e-18, 0.296 ; 0.0165, 1.01457e-18, 0))

and not (cylinder(0.0612874, -0.061042, 0.296 ; 0.0729241, -0.0727397, 0.296 ; 0.0045)
and plane(0.0612874, -0.061042, 0.296 ; -0.0116367, 0.0116978, -0)
and plane(0.0729241, -0.0727397, 0.296 ; 0.0116367, -0.0116978, 0))

and not (cylinder(1.11688e-17, -0.0863, 0.296 ; 1.21791e-17, -0.1028, 0.296 ; 0.0045)
and plane(1.11688e-17, -0.0863, 0.296 ; -1.01033e-18, 0.0165, -0)
and plane(1.21791e-17, -0.1028, 0.296 ; 1.01033e-18, -0.0165, 0))
#6th hole
and not (cylinder(-0.0612874, -0.0610419, 0.296 ; -0.0729241, -0.0727397, 0.296 ; 0.0045)
and plane(-0.0612874, -0.0610419, 0.296 ; 0.0116367, 0.0116978, 0)
and plane(-0.0729241, -0.0727397, 0.296 ; -0.0116367, -0.0116978, 0))

and not (cylinder(-0.0867, -1.64041e-17, 0.296 ; -0.1032, -1.84248e-17, 0.296 ; 0.0045)
and plane(-0.0867, -1.64041e-17, 0.296 ; 0.0165, 2.02067e-18, -0)
and plane(-0.1032, -1.84248e-17, 0.296 ; -0.0165, -2.02067e-18, 0))
#8th hole
and not (cylinder(-0.0612874, 0.061042, 0.296 ; -0.0729241, 0.0727397, 0.296 ; 0.0045)
and plane(-0.0612874, 0.061042, 0.296 ; 0.0116367, -0.0116978, -0)
and plane(-0.0729241, 0.0727397, 0.296 ; -0.0116367, 0.0116978, 0))
)))));

solid MainNetgenObject = body0001 ;
tlo MainNetgenObject -col=[0,1,0] -material=MainNetgenObject -maxh=0.02;``````

Hello NG Team,

I tried to solve the problem and I found a solution (geo file was attached). The difference between the successful and unsuccessful msh generation states was in the cyl02 object at the Y coordinate of the cylindrical object. I don’t know why, but it can’t be the same value (6 decimal places) as cyl01. This works correctly if the value was lower or with only 4 decimal places (0.0613626 vs 0.0613) or if you comment out the cyl01 object. The msh was originally generated in Netgen 5.3 but the same functionality is in the latest version 6.2…
I would like to ask you - Is this a feature/bug of the msh generator?
Can you help me with that?
I need it to optimize the simulations for my school project.

With Regards,
D Mikro

[code]
Netgen 5.3 x64
algebraic3d

solid cyl01 = (cylinder(0.061491, -0.0613626, 0.296 ; 0.0720825, -0.0719842, 0.296 ; 0.0045) and plane(0.061491, -0.0613626, 0.296 ; -0.0105916, 0.0106216, -0) and plane(0.0720825, -0.0719842, 0.296 ; 0.0105916, -0.0106216, 0));

# Work

#solid cyl02 = (cylinder(-0.061491, 0.0613, 0.296 ; -0.0720825, 0.0719842, 0.296 ; 0.0045) and plane(-0.061491, 0.0613626, 0.296 ; 0.0105916, -0.0106216, -0) and plane(-0.0720825, 0.0719842, 0.296 ; -0.0105916, 0.0106216, 0));

# Fail

solid cyl02 = (cylinder(-0.061491, 0.0613626, 0.296 ; -0.0720825, 0.0719842, 0.296 ; 0.0045) and plane(-0.061491, 0.0613626, 0.296 ; 0.0105916, -0.0106216, -0) and plane(-0.0720825, 0.0719842, 0.296 ; -0.0105916, 0.0106216, 0));

solid body0001 = not (cyl01 or cyl02) and (ellipticcylinder(0, 0, 0 ; 0.0944775, 0, 0 ; 0, 0.0942637, 0) and plane(0, 0, 0 ; -0, -0, -0.318) and plane(0, 0, 0.318 ; 0, 0, 0.318));

tlo cyl01 -col=[1,0,0] -material=cyl01;
tlo cyl02 -col=[1,0,0] -material=cyl02;
solid MainNetgenObject = body0001 ;
tlo MainNetgenObject -col=[0,1,0] -material=MainNetgenObject -maxh=0.02;[/code]