Saving geometry bug

More
6 months 3 days ago #4090 by VienC
Saving geometry bug was created by VienC
I'm creating a geometry using the following code:
Code:
sph1 = occ.Sphere(occ.Pnt(0.5,0.5,0.5), r=0.5) cyl0 .Cylinder(occ.Pnt(0.5,0.5,0.5), occ.X, r=0.1, h=0.1) cyl2 = occ.Cylinder(occ.Pnt(0.7,0.5,0.5), occ.X, r=0.1, h=0.1) cyl3 = occ.C= occ.Cylinder(occ.Pnt(0.5,0.5,0.5), occ.X, r=0.1, h=1) cyl1 = occylinder(occ.Pnt(0.9,0.5,0.5), occ.X, r=0.1, h=0.1) sph = occ.Sphere(occ.Pnt(0.5,0.5,0.5), r=0.1) cyl= cyl0+cyl1+cyl2+cyl3+sph geo = sph1 - cyl geo.WriteStep("Geometry.step")

It is basically a sphere with a hole, but when I reloaded the geometry in Ngsolve using a step file, the geometry was a cylinder that is cyl in the code.
Note: when I change the sphere by the box. The saved geometry is correct. So I thought that it's a bug when saving with a sphere,

Please Log in or Create an account to join the conversation.

More
5 months 4 weeks ago #4095 by christopher
Replied by christopher on topic Saving geometry bug
Hi,
reported as a bug to the opencascade devs here:

tracker.dev.opencascade.org/view.php?id=32695

Best
Christopher

Please Log in or Create an account to join the conversation.

More
5 months 3 weeks ago #4096 by christopher
Replied by christopher on topic Saving geometry bug
Update: It seems to be a bug in occ that happens if the cylinder is exactly this way with the (for paramametrization needed) sphere edge.
As a workaround you can rotate the sphere:
Code:
import netgen.occ as occ from netgen.webgui import Draw as DrawGeo sph = occ.Sphere(occ.Pnt(0,0,0), r=0.5).Rotate(occ.Axis((0,0,0), (0,1,0)), 90) cyl = occ.Cylinder(occ.Pnt(0,0,0), occ.X, r=0.1, h=1) geo = sph - cyl geo.WriteStep("Geometry.step")

Please Log in or Create an account to join the conversation.

More
5 months 3 weeks ago #4097 by VienC
Replied by VienC on topic Saving geometry bug
Hi Christopher,

Thank you so much for your reply. It’s helpful

Cheers
Vien

Please Log in or Create an account to join the conversation.

Time to create page: 0.128 seconds