[Gmsh] dxf or other 2D import?
Zenker, Dr. Matthias
Matthias.Zenker at erbe-med.de
Mon Feb 16 10:15:15 CET 2009
Works fine, thank you!
Matthias
> -----Original Message-----
> From: Christophe Geuzaine [mailto:cgeuzaine at ulg.ac.be]
> Sent: Sunday, February 15, 2009 4:15 PM
> To: Zenker, Dr. Matthias
> Cc: gmsh at geuz.org
> Subject: Re: [Gmsh] dxf or other 2D import?
>
> Zenker, Dr. Matthias wrote:
> > Thank you for this clarification.
> >
> > The problem with STEP data is that it is always 3D, so in
> order to generate a 2D geometry, I have to convert to geo
> format and remove the 3rd dimension (volumes, surfaces,
> lines, points) manually. Or is there a more elegant way to do that?
> >
> > I have observed that when STEP data is saved in geo format,
> circular arcs are converted to splines with many points,
> which makes handling (and maybe also meshing) more complicated.
> > Can this behaviour be influenced?
> >
>
> I've added the little bit of code to do it for circle arcs <
> Pi (since that's all the GEO format supports).
>
> (The main purpose of the GEO export is to dump a "flat"
> representation of models that are built using Gmsh's internal
> CAD module. We added rudimentary export capabilities for
> other data models, but since the GEO format is quite limited
> these will never be "complete"...)
>
>
> > Thank you,
> >
> > Matthias
> >
> >> -----Original Message-----
> >> From: Christophe Geuzaine [mailto:cgeuzaine at ulg.ac.be]
> >> Sent: Wednesday, January 28, 2009 2:56 PM
> >> To: Zenker, Dr. Matthias
> >> Cc: gmsh at geuz.org
> >> Subject: Re: [Gmsh] dxf or other 2D import?
> >>
> >> Zenker, Dr. Matthias wrote:
> >>> Thank you for the info.
> >>> Since I have no C/C++ compiler on my system (Windoze XP
> >> SP2): Is there a binary available?
> >>> Are there plans to incorporate the converter into gmsh?
> >> No, this converter is very limited (it only translates points and
> >> curves). It can be useful to get the main features of an autocad
> >> file, but you'll have to fix the sketch by hand.
> >>
> >> At the moment I think your best bet is still to export/import STEP.
> >>
> >>
> >>> The link in the description is unfortunately dead.
> >>>
> >>> Matthias
> >>>
> >>>> -----Original Message-----
> >>>> From: David Colignon [mailto:David.Colignon at ulg.ac.be]
> >>>> Sent: Wednesday, January 28, 2009 1:24 PM
> >>>> To: Zenker, Dr. Matthias
> >>>> Cc: gmsh at geuz.org
> >>>> Subject: Re: [Gmsh] dxf or other 2D import?
> >>>>
> >>>> Hi Matthias,
> >>>>
> >>>> we have a very basic dxf to geo converter in
> >>>> utils/converters/autocad/dxf2geo.cpp :
> >>>>
> >>>> ...
> >>>> ...
> >>>> // This is a simple AutoCAD DXF to Gmsh GEO Data File
> >> Converter // //
> >>>> It was created from the AutoCAD DXF file to DKB data file
> >> converter
> >>>> // written and placed in the public domain 8/13/90 by
> Aaron // A.
> >>>> Collins (http://www.sdsc.edu/~mjb/mae152/dxf.spec.txt).
> >>>> //
> >>>> // It parses a limited, but useful, subset of the AutoCAD
> >> DXF file //
> >>>> format. No effort has been made to handle the complete
> range of //
> >>>> possible DXF opcodes and commands.
> >>>> ...
> >>>> ...
> >>>>
> >>>> Cheers,
> >>>>
> >>>> Dave
> >>>>
> >>>>
> >>>> --
> >>>> David Colignon, Ph.D.
> >>>> Collaborateur Logistique du F.R.S.-FNRS CÉCI - Consortium des
> >>>> Équipements de Calcul Intensif ACE - Applied & Computational
> >>>> Electromagnetics Sart-Tilman B28 Université de Liège
> 4000 Liège -
> >>>> BELGIQUE
> >>>> Tél: +32 (0)4 366 37 32
> >>>> Fax: +32 (0)4 366 29 10
> >>>> WWW: http://hpc.montefiore.ulg.ac.be/
> >>>> Agenda:
> >>>>
> http://www.google.com/calendar/embed?src=david.colignon%40gmail.com
> >>>>
> >>>>
> >>>>
> >>>> Zenker, Dr. Matthias wrote:
> >>>>> Hi,
> >>>>>
> >>>>> I need to import 2D data generated as cuts from a 3D model in
> >>>>> SolidWorks. One possibility would be to define a cut in
> >>>> SolidWorks and
> >>>>> export it as dxf (AutoCAD format). But it seems like gmsh
> >>>> is not able to
> >>>>> read dxf. Is there something I am missing (I just tried
> >>>> File->Open in
> >>>>> gmsh, it gave me a an error message)? Or what would be the best
> >>>>> (quickest) way to get the cut into gmsh? Is there any 2D
> >>>> vector format
> >>>>> it can read?
> >>>>>
> >>>>> The way I have done it before is to take a slice instead
> >> of a cut,
> >>>>> export it to STEP format, import it into gmsh and delete
> >>>> manually all
> >>>>> volumes, surfaces, lines and points in the 3rd dimension,
> >>>> which can be
> >>>>> very tedious for complex geometries.
> >>>>>
> >>>>> Any suggestions would be welcome.
> >>>>>
> >>>>> BTW, is there a complete list of all formats gmsh can read
> >>>> and write? I
> >>>>> have not found it in the manual, but I may have overlooked it...
> >>>>>
> >>>>> Thanks,
> >>>>>
> >>>>> Matthias
> >>>>>
> >>>>> ----------------------------------------------------------------
> >>>>> ERBE Elektromedizin GmbH
> >>>>> Dr.rer.nat. Matthias Zenker
> >>>>> Dipl. Phys.
> >>>>> Grundlagenentwicklung Technologie
> >>>>> Waldhoernlestrasse 17
> >>>>> 72072 Tuebingen
> >>>>> Phone + 49 7071 - 755 226
> >>>>> Fax + 49 7071 - 755 5226
> >>>>> _mailto:Matthias.Zenker at ERBE-med.de_
> >>>>> _www.ERBE-med.de_ <file://www.ERBE-med.de>
> >>>>> ----------------------------------------------------------------
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> ERBE Elektromedizin GmbH
> >>>>> Firmensitz: 72072 Tuebingen
> >>>>> Geschaeftsfuehrer: Christian O. Erbe, Reiner Thede
> >>>>> Registergericht: Stuttgart HRB 380137
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>> --------------------------------------------------------------
> >>>> ----------
> >>>>> _______________________________________________
> >>>>> gmsh mailing list
> >>>>> gmsh at geuz.org
> >>>>> http://www.geuz.org/mailman/listinfo/gmsh
> >>>
> >>
> _____________________________________________________________________
> >>> ERBE Elektromedizin GmbH
> >>> Firmensitz: 72072 Tuebingen
> >>> Geschaeftsfuehrer: Christian O. Erbe, Reiner Thede
> >>> Registergericht: Stuttgart HRB 380137
> >>>
> >>>
> >>> _______________________________________________
> >>> gmsh mailing list
> >>> gmsh at geuz.org
> >>> 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
> >>
> >
> >
> _____________________________________________________________________
> > ERBE Elektromedizin GmbH
> > Firmensitz: 72072 Tuebingen
> > Geschaeftsfuehrer: Christian O. Erbe, Reiner Thede
> > Registergericht: Stuttgart HRB 380137
> >
> >
> >
>
>
> --
> Prof. Christophe Geuzaine
> University of Liege, Electrical Engineering and Computer
> Science http://www.montefiore.ulg.ac.be/~geuzaine
>
>
>
_____________________________________________________________________
ERBE Elektromedizin GmbH
Firmensitz: 72072 Tuebingen
Geschaeftsfuehrer: Christian O. Erbe, Reiner Thede
Registergericht: Stuttgart HRB 380137