Discussion:
[Gmsh] howto import STEP/IGES/BREP file?
Edgar Last
2008-02-18 00:08:17 UTC
Permalink
Hi,
the Gmsh website says
"Gmsh can be linked with OpenCascade to provide support for STEP, IGES and BREP files."

How do I do the linking? Is this procedure documented anywhere?

And how do I import a STEP file and mesh it after the linking is done?

Thanks
Edgar
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
=?windows-1252?Q?Jean-Fran=8D=E7ois_Remacle?=
2008-02-18 09:01:54 UTC
Permalink
Post by Edgar Last
Hi,
the Gmsh website says
"Gmsh can be linked with OpenCascade to provide support for STEP, IGES and BREP files."
How do I do the linking? Is this procedure documented anywhere?
in gmsh/configure, there is a directive for designing the location of
opencascade.

./configure --with-occ-prefix=/usr/local/opencascade etc...

Open cascade can be downloaded form http://www.opencascade.org/

At this location, you can have pre-compiled versions of occ :

http://www.opencascade.org/getocc/download/loadocc/

Note that we have ported OCC to Apple MAC OSX.

When linking is done, just do

gmsh foo.STEP

gmsh will treat files with extensions ".stp", ".step", ".STP" and
".STEP" as STEP files.

JF Remacle
Post by Edgar Last
And how do I import a STEP file and mesh it after the linking is done?
Thanks
Edgar
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
_______________________________________________
gmsh mailing list
http://www.geuz.org/mailman/listinfo/gmsh
Edgar Last
2008-02-19 10:22:43 UTC
Permalink
Thanks for the solutions how to configure gmsh with opencascade support and how to import a STEP file.

Now I wonder how I can set the characteristic lengths in an imported geometry. Is there no documentation how to use the import feature? I will probably have many more questions about what shapes can be meshed, mesh control etc. Do I need to take the source code for the only "documentation"?

Btw, I am now using the precompiled gmsh version from the gmsh website, which is fine for the moment. The configure options you suggested didn't have any effect. I used:
./configure --enable-occ --with-occ-prefix=/opt/local/opencascade
Configure produced no output at all mentioning occ, is this to be expected? Compilation was successful, but no import possible. This is not a severe problem right now, because I can use the precompiled binary. However, I'd like to be able to compile with occ support. How can I find out why configure doesn't recognize occ?

Edgar

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
Christophe Geuzaine
2008-02-19 17:40:59 UTC
Permalink
Post by Edgar Last
Thanks for the solutions how to configure gmsh with opencascade support
and how to import a STEP file.
Now I wonder how I can set the characteristic lengths in an imported
geometry. Is there no documentation how to use the import feature? I
will probably have many more questions about what shapes can be meshed,
mesh control etc. Do I need to take the source code for the only
"documentation"?
Using a nightly snapshot, you have many options:

1) Specify a global scaling factor (using e.g. "-clscale" on the command
line). When no char. lengths are provided (which is the case when you
load a normal STEP file), a default length of "object_size/10" is used.
Using "-clscale 0.1" will divide this default length by 10.

2) Specify a min and/or a max char. length, using the "-clmin" and
"-clmax" command line options.

3) Compute the char. length automatically from the curvatures, using
"-clcurv".

4) Use a background mesh (see tutorial/t7.geo).

5) Merge your STEP file in a GEO file, and use all the char. length
modification options available in the .geo language. In addition to the
options given above (for example,
"Mesh.CharacteristicLengthFactor=0.1;" in a GEO file is the same as
"-clscale 0.1" on the command line), you have also full access to char.
lengths associated with points, function-based size fields, etc.
Post by Edgar Last
Btw, I am now using the precompiled gmsh version from the gmsh website,
which is fine for the moment. The configure options you suggested didn't
./configure --enable-occ --with-occ-prefix=/opt/local/opencascade
Configure produced no output at all mentioning occ, is this to be
expected? Compilation was successful, but no import possible. This is
not a severe problem right now, because I can use the precompiled
binary. However, I'd like to be able to compile with occ support. How
can I find out why configure doesn't recognize occ?
Edgar
------------------------------------------------------------------------
Express yourself instantly with MSN Messenger! MSN Messenger
<http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/>
------------------------------------------------------------------------
_______________________________________________
gmsh mailing list
http://www.geuz.org/mailman/listinfo/gmsh
--
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine
Mireille Gaillard
2008-02-21 08:36:17 UTC
Permalink
Hello to all,

On the same topic, the use of IGES/STEP/BREP files, I also have a
question. I could import correctly the geometry .iges, but when asking
to mesh in 3D a fatal error forced Gmsh to abort and quit. This occur
when Gmsh try to mesh in 2D (no error for meshing in 1D) due to
"Segmentation violation (invalid memory reference)".


I work with the executable file Gmsh (not compiled on my own system) on
a labtop ACER under GNU/Linux Suse 10.3. I have attached the error file
.gmsh-errors.

Thank you for any advises on how to proceed to mesh in 3D an imported
.iges file.

Mireille
Post by Christophe Geuzaine
Post by Edgar Last
Thanks for the solutions how to configure gmsh with opencascade support
and how to import a STEP file.
Now I wonder how I can set the characteristic lengths in an imported
geometry. Is there no documentation how to use the import feature? I
will probably have many more questions about what shapes can be meshed,
mesh control etc. Do I need to take the source code for the only
"documentation"?
1) Specify a global scaling factor (using e.g. "-clscale" on the command
line). When no char. lengths are provided (which is the case when you
load a normal STEP file), a default length of "object_size/10" is used.
Using "-clscale 0.1" will divide this default length by 10.
2) Specify a min and/or a max char. length, using the "-clmin" and
"-clmax" command line options.
3) Compute the char. length automatically from the curvatures, using
"-clcurv".
4) Use a background mesh (see tutorial/t7.geo).
5) Merge your STEP file in a GEO file, and use all the char. length
modification options available in the .geo language. In addition to the
options given above (for example,
"Mesh.CharacteristicLengthFactor=0.1;" in a GEO file is the same as
"-clscale 0.1" on the command line), you have also full access to char.
lengths associated with points, function-based size fields, etc.
Post by Edgar Last
Btw, I am now using the precompiled gmsh version from the gmsh website,
which is fine for the moment. The configure options you suggested didn't
./configure --enable-occ --with-occ-prefix=/opt/local/opencascade
Configure produced no output at all mentioning occ, is this to be
expected? Compilation was successful, but no import possible. This is
not a severe problem right now, because I can use the precompiled
binary. However, I'd like to be able to compile with occ support. How
can I find out why configure doesn't recognize occ?
Edgar
------------------------------------------------------------------------
Express yourself instantly with MSN Messenger! MSN Messenger
<http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/>
------------------------------------------------------------------------
_______________________________________________
gmsh mailing list
http://www.geuz.org/mailman/listinfo/gmsh
David Colignon
2008-02-21 08:49:01 UTC
Permalink
Hi Mireille,

can you try with a recent nightly build ( http://geuz.org/gmsh/bin/Linux/gmsh-nightly-Linux.tgz ), and send us the .iges
file if the problem persists ?

Cheers,

Dave
--
David Colignon, Ph.D.
ACE - Applied & Computational Electromagnetics
Institut Montefiore B28
Université de Liège
4000 Liège - BELGIQUE
Tél: +32 (0)4 366 37 32
Fax: +32 (0)4 366 29 10
http://ace.montefiore.ulg.ac.be
Post by Mireille Gaillard
Hello to all,
On the same topic, the use of IGES/STEP/BREP files, I also have a
question. I could import correctly the geometry .iges, but when asking
to mesh in 3D a fatal error forced Gmsh to abort and quit. This occur
when Gmsh try to mesh in 2D (no error for meshing in 1D) due to
"Segmentation violation (invalid memory reference)".
I work with the executable file Gmsh (not compiled on my own system) on
a labtop ACER under GNU/Linux Suse 10.3. I have attached the error file
.gmsh-errors.
Thank you for any advises on how to proceed to mesh in 3D an imported
.iges file.
Mireille
Post by Christophe Geuzaine
Post by Edgar Last
Thanks for the solutions how to configure gmsh with opencascade support
and how to import a STEP file.
Now I wonder how I can set the characteristic lengths in an imported
geometry. Is there no documentation how to use the import feature? I
will probably have many more questions about what shapes can be meshed,
mesh control etc. Do I need to take the source code for the only
"documentation"?
1) Specify a global scaling factor (using e.g. "-clscale" on the command
line). When no char. lengths are provided (which is the case when you
load a normal STEP file), a default length of "object_size/10" is used.
Using "-clscale 0.1" will divide this default length by 10.
2) Specify a min and/or a max char. length, using the "-clmin" and
"-clmax" command line options.
3) Compute the char. length automatically from the curvatures, using
"-clcurv".
4) Use a background mesh (see tutorial/t7.geo).
5) Merge your STEP file in a GEO file, and use all the char. length
modification options available in the .geo language. In addition to the
options given above (for example,
"Mesh.CharacteristicLengthFactor=0.1;" in a GEO file is the same as
"-clscale 0.1" on the command line), you have also full access to char.
lengths associated with points, function-based size fields, etc.
Post by Edgar Last
Btw, I am now using the precompiled gmsh version from the gmsh website,
which is fine for the moment. The configure options you suggested didn't
./configure --enable-occ --with-occ-prefix=/opt/local/opencascade
Configure produced no output at all mentioning occ, is this to be
expected? Compilation was successful, but no import possible. This is
not a severe problem right now, because I can use the precompiled
binary. However, I'd like to be able to compile with occ support. How
can I find out why configure doesn't recognize occ?
Edgar
------------------------------------------------------------------------
Express yourself instantly with MSN Messenger! MSN Messenger
<http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/>
------------------------------------------------------------------------
_______________________________________________
gmsh mailing list
http://www.geuz.org/mailman/listinfo/gmsh
------------------------------------------------------------------------
_______________________________________________
gmsh mailing list
http://www.geuz.org/mailman/listinfo/gmsh
Mireille Gaillard
2008-02-21 09:50:11 UTC
Permalink
Hello Dave,

Thank you for quick answer.
The recent gmsh nightly build can even not import the .iges file (I have
attached it) and produces the same message and fatal error than
previously (I have attached the gmsh-errors file) immediatly after
asking for importation (and still not for meshing).

Many thanks for advises,
Mireille
Post by David Colignon
Hi Mireille,
can you try with a recent nightly build (
http://geuz.org/gmsh/bin/Linux/gmsh-nightly-Linux.tgz ), and send us the
.iges file if the problem persists ?
Cheers,
Dave
=?windows-1252?Q?Jean-Fran=8D=E7ois_Remacle?=
2008-02-21 19:59:49 UTC
Permalink
Post by Mireille Gaillard
Hello Dave,
Thank you for quick answer.
The recent gmsh nightly build can even not import the .iges file (I have
attached it) and produces the same message and fatal error than
previously (I have attached the gmsh-errors file) immediatly after
asking for importation (and still not for meshing).
You have put the point on one known bug that exists in the current
release of gmsh.

By default, a constant mesh size of a tenth of the size of the model
is assigned to the
model.

When the closure surface consist in only one curve, then it can happen that
only 2 points are present on the mesh of the contour, leading to a
problem. A
new release of gmsh will be produced within a week, with this (very
simple) fix.

Yet, tou can do something like

gmsh Source3D.iges -clcurv -clmin 1 -clmax 10 -2

and the surface mesh is correct.

Note that you iges is not closed so that volume mesh cannot be performed
(see the picture).

Jean-François Remacle
Post by Mireille Gaillard
Many thanks for advises,
Mireille
Post by David Colignon
Hi Mireille,
can you try with a recent nightly build (
http://geuz.org/gmsh/bin/Linux/gmsh-nightly-Linux.tgz ), and send us the
.iges file if the problem persists ?
Cheers,
Dave
------------------------------------------------------------------------
_______________________________________________
gmsh mailing list
http://www.geuz.org/mailman/listinfo/gmsh
Loading...