[Gmsh] Another STL question

Max Orok morok at mevex.com
Tue Mar 19 16:51:02 CET 2019


Hi Peter,

For two volumes (including STL imports), you can find the volume between
them using the `BooleanDifference` command.

Here is a small example:

SetFactory("OpenCASCADE");

Box(1) = {-10, -10, -10, 20, 20, 20};

Sphere(2) = {0, 0, 0, 10};

BooleanDifference{ Volume{1}; Delete; }{ Volume{2}; Delete; }

Also, depending on the number of shapes you're importing, the `Coherence`
command might also help if you find that volumes don't end up sharing mesh
faces.

Picture after using a clipping plane:

[image: image.png]

On Tue, Mar 19, 2019 at 2:41 AM Peter Johnston <p.johnston at griffith.edu.au>
wrote:

> Hello again,
>
> I’m sorry to keep asking questions about STL files, but there is something
> else that has arisen.
>
> I import two surfaces, one inside the other as follows:
>
> Merge "inner_shape.stl";
>
> Mesh.Smoothing=100;
>
> //+
>
> Surface Loop(1) = {1};
>
> //+
>
> Volume(1) = {1};
>
> //+
>
> Merge "outer_shape.stl";
>
> //+
>
> Surface Loop(2) = {2};
>
> //+
>
> Volume(2) = {2};
>
> Can I mesh the space in between the two shapes?
>
> Thanks,
>
> 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
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh
>


-- 
Max Orok
Contractor
www.mevex.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20190319/c8c8b269/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 28635 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20190319/c8c8b269/attachment-0001.png>


More information about the gmsh mailing list