Just a quick update, I have noticed that in some cases translated and bottom curves require a boolean union operation. I have updated the script and the txt file accordingly (see attachment). Marco
Il lunedì 9 novembre 2020, 09:31:58 CET, Marco Antolovic
<[email protected]> ha scritto:
Hello Christophe,
there appear to be problems with my email formatting.
To avoid that I re-send the previous message as a file (hopefully this should
work)
Regards,
Marco
Il mercoledì 4 novembre 2020, 09:14:51 CET, Christophe Geuzaine
<[email protected]> ha scritto:
> On 22 Oct 2020, at 12:56, Marco Antolovic <[email protected]> wrote:
>
> Hi all,
>
> I'm trying to find the best way to approach the following problem:
>
> I have a parallelepiped with the edge alone z much smaller than that along x
> and y (this is typical, for example,
> for PCB traces) and I would like to guarantee, in the volume, a predefined
> number of layers (np_layers) along z
> edge.
>
> If I build the structure in gmsh this is quite simple to obtain by saying:
>
> SetFactory("OpenCASCADE");
> thickness = 140e-6;
> nr_layers = 4;
> surf=newreg;
> Rectangle(surf)={.001,0,0,.001,.001,0};
> Extruded_surf() = Extrude { 0,0, thickness } { Surface{surf};
> Layers{nr_layers}; Recombine;};
>
> But how can I apply this in case the parallelepiped is coming from a step
> file? The command above
> (Extrude{...}{... Layers{}}) can't be used.
Indeed, we would need to "reverse engineer" the fact that the volume has indeed
been created by extrusion. See
https://gitlab.onelab.info/gmsh/gmsh/-/issues/929
for the issue tracking this feature request.
Christophe
>
> I was thinking about slicing the Volume with some planes (see example below)
>
> SetFactory("OpenCASCADE");
> thickness = 140e-6;
> nr_layers = 4;
> surf=newreg;
> Rectangle(surf)={.001,0,0,.001,.001,0};
> Extruded_surf() = Extrude { 0,0, thickness } { Surface{surf};};
> vol() = Extruded_surf(1);
> For i In {1:nr_layers-1}
> surf1(i-1)=newreg;
> Rectangle(surf1(i-1)) = {.001, 0, thickness/nr_layers*i, .001, .001};
> EndFor
> results() = BooleanFragments{Volume{vol()};Delete;}{Surface{surf1()};
> Delete;};
>
> but when trying to recombine the triangles in the layers I get the following
> error:
>
> Error : Pyramid top vertex already classified on volume 2 (!= 3) -
> non-manifold quad boundaries not supported
> yet
>
> Any suggestion on how to address the issue is much appreciated.
>
> Regards,
>
> Marco
>
> _______________________________________________
> gmsh mailing list
> [email protected]
> http://onelab.info/mailman/listinfo/gmsh
—
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://people.montefiore.ulg.ac.be/geuzaine
structured_grids_with_step_files_test_V06.geo
Description: Binary data
From my side I have spent some time thinking on how to solve, if possible, this
problem
with scripting tools only and I came out with the following idea
Assumptions:
1. The ID of the volume to be meshed with layered extrusion is known
2. The volume is extruded from a surface that belongs to a plane
3. Embedded curves are present only on top and bottom surfaces of the volume
4. The embedded curves on top does not match with embedded curves on bottom
I assume that if another entity is touching the volume (defined in points 1,2)
on its top and bottom surfaces, due to conformal meshing requirements, this
will
create embedded curves on them hence assumption 3 and 4.
The procedure is as follows:
- Select the volume that requires layered extrusion
- Duplicate its bottom surface (including embedded curves) and top embedded
curves
- Delete (recursive) the volume
- Duplicate, translate and embed the top curves on the bottom surface. If
translated
curves intersects with original bottom curves use BooleanUnion
- Extrude the bottom mesh with Extrude{}{ Layers{...}}
- Embed the top curve on top surface generated by Extrude
- Run Coherence/BooleanFragmens
The attached script is a simplified version of the above procedure (the volume
requiring
extrusion is already deleted, top embedded curves, bottom surface and embedded
curves
already available).
I wanted to prepare a simple script and hopefully get a feedback before I embark
on further hours of scripting because there might be subtleties that only Gmsh
developers
are aware of which, if overlooked, could lead to a unicorn chase from my side
:-)
The script builds a cylinder inside a parallelepiped.
The cylinder is the volume meshed with a layered extrusion (along z) and it
features
two embedded curves, one on top and one on bottom that are different in shape
and location
on XY plane.
The mesh type in the parallelepiped is arbitrary, it only needs to guarantee
that
the total mesh (cube + cylinder) is conformal.
The results seem to give a conformal mesh and solve the extrusion problem.
Any feedback is much appreciated,
Many thanks,
Marco_______________________________________________ gmsh mailing list [email protected] http://onelab.info/mailman/listinfo/gmsh
