[Gmsh] creating patch on sphere

Peter Johnston p.johnston at griffith.edu.au
Tue Apr 30 07:59:57 CEST 2019


Dear Max,

Thanks for your thoughts. However, I am not sure how this helps as the spheres are no longer concentric.

I have made another example script, this time in python, that shows the issue that I keep coming up against. If you run the script, you will see that surfaces 10 and 13 have the same set of bounding curves: 6, 7, 8 and 9, but one is a bspline surface and the other is a spherical surface. Perhaps I simply need to delete one of these?

Regards,

Peter.

---------------------------------------------------------------------

Associate Professor Peter Johnston (FAustMS, FIMA)
School of Environment and Science
Griffith University | Nathan | QLD 4111 | Technology (N44) Room 3.19
T +61 7 373 57748| F +61 7 373 57656 Email p.johnston at griffith.edu.au
On 29 Apr 2019, 6:41 AM +1000, Max Orok <morok at mevex.com>, wrote:
Hello Peter,

I took a bit of a different approach and hopefully it is similar to what you'd like to do.
This short script makes a "sphere patch" by subtracting one sphere from another.

SetFactory("OpenCASCADE");

// arbitrary angle selections here
Sphere(1) = {0, 0, 0, 0.5, -Pi/9, Pi/9, Pi/4};
Sphere(2) = {-.25, 0, 0, 0.5, -Pi/9, Pi/9, Pi/4}; // shift sphere 2

// use sphere 2 to cut sphere 1
BooleanDifference{ Volume{1}; Delete; }{ Volume{2}; Delete; }

[image.png]
[image.png]

I hope this is helpful! If I missed the point please let me know.

Sincerely,
Max

On Wed, Apr 24, 2019 at 7:22 PM Peter Johnston <p.johnston at griffith.edu.au<mailto:p.johnston at griffith.edu.au>> wrote:
Thanks Max and Christophe,

I have attached a simple sample .geo file. For some reason it creates even more volumes than the more complicated script I was working on. However, it still displays similar problems.

If you have any further questions, please let me know.

Thanks again,

Peter.

---------------------------------------------------------------------

Associate Professor Peter Johnston (FAustMS, FIMA)
School of Environment and Science
Griffith University | Nathan | QLD 4111 | Technology (N44) Room 3.19
T +61 7 373 57748| F +61 7 373 57656 Email p.johnston at griffith.edu.au<mailto:p.johnston at griffith.edu.au>
On 25 Apr 2019, 1:36 AM +1000, Max Orok <morok at mevex.com<mailto:morok at mevex.com>>, wrote:
Hi Peter,

Scripts are always helpful! It is nice to be able to see the steps as you go along.

Max

On Wed, Apr 24, 2019 at 8:36 AM Peter Johnston <p.johnston at griffith.edu.au<mailto:p.johnston at griffith.edu.au>> wrote:
Hello,

I appear to have a problem for which I cannot figure out a solution.

I have an annular hemispherical volume created between to hemispheres centred on the origin. I would like to divide the volume into two parts in a special way using Boolean operations. To define a sub-volume of the initial volume by defining four points on the surface of the inner sphere, create a “quadrilateral” on the inner surface by joining the four points in order using circles through the origin. (I think that these should be parts of great circles on the inner surface?). Then I create a line loop and a surface, and finally extrude the surface away from the origin to create a volume. Perhaps a .geo script would help here?

When I perform BooleanDifferences and BooleanIntersections I end up with three volumes instead of two. The reason I get the third volume is that the surface patch that I create does not fit exactly onto the original spherical surface. Is there any way that I can force the patch to be part of the spherical surface?

A consequence of the extra volume is that I cannot create a sensible mesh.

Any ideas would be greatly appreciated.

Thanks very much,

Peter.

PS, I could send a simple script file if that would help.

---------------------------------------------------------------------

Associate Professor Peter Johnston (FAustMS, FIMA)
School of Environment and Science
Griffith University | Nathan | QLD 4111 | Technology (N44) Room 3.19
T +61 7 373 57748| F +61 7 373 57656 Email p.johnston at griffith.edu.au<mailto:p.johnston at griffith.edu.au>
_______________________________________________
gmsh mailing list
gmsh at onelab.info<mailto:gmsh at onelab.info>
http://onelab.info/mailman/listinfo/gmsh<http://onelab.info/mailman/listinfo/gmsh>


--
Max Orok
Contractor
www.mevex.com<http://www.mevex.com>

[X]


--
Max Orok
Contractor
www.mevex.com<http://www.mevex.com>

[https://docs.google.com/uc?export=download&id=1fHTIiW4OMUjQr1iOkspQ7wiEsxunoOs0&revid=0B6x5w-5zVaEjSkpwbm5oY29jbG1XMzJoYldXTmJpNGFtb3dVPQ]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20190430/e9a75bfa/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 6287 bytes
Desc: image.png
URL: <http://onelab.info/pipermail/gmsh/attachments/20190430/e9a75bfa/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 9137 bytes
Desc: image.png
URL: <http://onelab.info/pipermail/gmsh/attachments/20190430/e9a75bfa/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample.py
Type: application/octet-stream
Size: 3204 bytes
Desc: sample.py
URL: <http://onelab.info/pipermail/gmsh/attachments/20190430/e9a75bfa/attachment-0001.py>


More information about the gmsh mailing list