Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Importing dxf files created in autoCAD into Comsol 4.0a

Please login with a confirmed email address before reporting spam

Hi

I am trying to import dxf files created in autoCAD into Comsol as to create a 2d model. I am having problems when it comes to anything circular. Square or rectangular objects are fine, but when the objects are circular or elliptical the error message "The imported file did not contain any geometries" comes up.

If I were to import everything I needed at the same time - which seems to work - how do I then seperate them out?

Any help would be grealty apprecaited.

Kind Regards

Gareth

7 Replies Last Post 23 oct. 2013, 04:19 UTC−4
COMSOL Moderator

Hello Gareth Harris

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 14 oct. 2011, 00:01 UTC−4
Yes, I run into the same problem with a simple 2D drawing. If my dxf file has only a circle, I get that same "...did not contain any geometries" error. But if I add a polygon in addition to the circle to the dxf file, the import works and *both* objects are inserted into my Comsol model geometry. Seems like there must be a minor program bug here.
Yes, I run into the same problem with a simple 2D drawing. If my dxf file has only a circle, I get that same "...did not contain any geometries" error. But if I add a polygon in addition to the circle to the dxf file, the import works and *both* objects are inserted into my Comsol model geometry. Seems like there must be a minor program bug here.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 14 oct. 2011, 00:36 UTC−4
As a (crazy) work-around, if I have a dxf file with circles (leading to that error), I can add a little polygon and then import the dxf file. Then in Comsol, I can select the imported objects, use the "split" button on the toolbar at the top, and then select just the unwanted polygon and use the "delete" button. That leaves me with just the imported circle that, by itself, could not be imported.

Surprising that this issue with Version 4.0 is still present in Version 4.2. Then again, maybe no one has used dxf files to just import something simple like circles!
As a (crazy) work-around, if I have a dxf file with circles (leading to that error), I can add a little polygon and then import the dxf file. Then in Comsol, I can select the imported objects, use the "split" button on the toolbar at the top, and then select just the unwanted polygon and use the "delete" button. That leaves me with just the imported circle that, by itself, could not be imported. Surprising that this issue with Version 4.0 is still present in Version 4.2. Then again, maybe no one has used dxf files to just import something simple like circles!

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 28 mars 2012, 05:38 UTC−4
Paul, I love you! Thank you for solving this small but annoying problem! This bug should definitively have been removed in the 4.2 version.



As a (crazy) work-around, if I have a dxf file with circles (leading to that error), I can add a little polygon and then import the dxf file. Then in Comsol, I can select the imported objects, use the "split" button on the toolbar at the top, and then select just the unwanted polygon and use the "delete" button. That leaves me with just the imported circle that, by itself, could not be imported.

Surprising that this issue with Version 4.0 is still present in Version 4.2. Then again, maybe no one has used dxf files to just import something simple like circles!


Paul, I love you! Thank you for solving this small but annoying problem! This bug should definitively have been removed in the 4.2 version. [QUOTE] As a (crazy) work-around, if I have a dxf file with circles (leading to that error), I can add a little polygon and then import the dxf file. Then in Comsol, I can select the imported objects, use the "split" button on the toolbar at the top, and then select just the unwanted polygon and use the "delete" button. That leaves me with just the imported circle that, by itself, could not be imported. Surprising that this issue with Version 4.0 is still present in Version 4.2. Then again, maybe no one has used dxf files to just import something simple like circles! [/QUOTE]

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 24 août 2012, 05:28 UTC−4
I manage to import DXF file format without any problems by converting my drawing to a region using the Region command in AutoCAD.
I manage to import DXF file format without any problems by converting my drawing to a region using the Region command in AutoCAD.

Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 25 août 2012, 20:23 UTC−4
Hi

the dxf format is not a true geometric format, it's basically a definition for a line between two points, but complex geoemtry (even like a square or a circle) is a "polyline" linking a set of n points and n-1 (usually closed) lines joining these points. It could be just as well your CAD programme that is doing a poor job (in a topology sens still certainly perfectly "viewable") ...

--
Good luck
Ivar
Hi the dxf format is not a true geometric format, it's basically a definition for a line between two points, but complex geoemtry (even like a square or a circle) is a "polyline" linking a set of n points and n-1 (usually closed) lines joining these points. It could be just as well your CAD programme that is doing a poor job (in a topology sens still certainly perfectly "viewable") ... -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 24 oct. 2012, 07:08 UTC−4
Hello,



I also had a similar problem, but I was doing the import using the COMSOL MEMS module, so I had to convert my DXF file to GDS.
The file did indeed contain circles or semi-circular shaped objects.
I did the conversion using the affordable LayOut Editor (www.layouteditor.net).
The generated gds file was readable in Layout editor, but COMSOL could not recognize it.
(For layout editor to work properly, delete any unused or non-essential layers from the DXF file)

I did try the above mentioned method of adding a polygon but it did not work for me.


Instead, I cut and pasted the object(s) as a "block", only then could COMSOL import the GDS file (not all layers need be imported, some are just dummies that won't let the import to proceed). The object(s) did need to be scaled up
but this was easy.

Just wanted to share this in case anyone faces a similar problem in the future.

Regards,

Mohanad Zaki.
Hello, I also had a similar problem, but I was doing the import using the COMSOL MEMS module, so I had to convert my DXF file to GDS. The file did indeed contain circles or semi-circular shaped objects. I did the conversion using the affordable LayOut Editor (www.layouteditor.net). The generated gds file was readable in Layout editor, but COMSOL could not recognize it. (For layout editor to work properly, delete any unused or non-essential layers from the DXF file) I did try the above mentioned method of adding a polygon but it did not work for me. Instead, I cut and pasted the object(s) as a "block", only then could COMSOL import the GDS file (not all layers need be imported, some are just dummies that won't let the import to proceed). The object(s) did need to be scaled up but this was easy. Just wanted to share this in case anyone faces a similar problem in the future. Regards, Mohanad Zaki.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 23 oct. 2013, 04:19 UTC−4
Hi all,

I had a similar problem, where I drafted my DXF with Adobe illustrator. For me the trick was to fill the shapes with a color (white) and not to group them. Each shape had to be an indivdual, ungrouped object. No dummy object was needed after that.

I had this problem under 4.3b.

Best,
Martin
Hi all, I had a similar problem, where I drafted my DXF with Adobe illustrator. For me the trick was to fill the shapes with a color (white) and not to group them. Each shape had to be an indivdual, ungrouped object. No dummy object was needed after that. I had this problem under 4.3b. Best, Martin

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.