IGES as alternative to 2D DWG?

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

IGES as alternative to 2D DWG?

Post by NormandC »

Hey guys,

I wonder how I never realized this over the years, but the IGES open standard format can actually contain 2D geometry, and more specifically engineering drawings. (IGES on Wikipedia)

As a test, this week at work I exported a drawing page from our commercial CAD software to IGES and could open it back with the same CAD package and it contained all the information. Text formating was a little off but it may have been the IGES import engine at fault.

I then opened it in FreeCAD, and all the geometry was there, but the dims were broken down into lines, and all the text (including from the dims) was gone.

Obviously I can't post this drawing here, but I'll try to create some example files to post here.

Many of us would prefer an open standard alternative to DWG to share drawings, and we all know that SVG will never be a true CAD format. So maybe IGES could be the solution? That is, if it could import/export text.

This would be worth considering, don't you think? :)
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: IGES as alternative to 2D DWG?

Post by quick61 »

I think that is a great idea!

I see there is a test file linked there that does contain text. While the geometry imports perfectly, our IGES importer does not recognize the text formatting in the file. Might be something for some one with the talent to look into. (read - not me). I would suspect that this is related to the libs FreeCAD uses for importing IGES files and is not in direct control of the devs? Or is the capability in the libs and FreCAD is just not using them? :?

Anyway, with my testing on exporting and importing 2D and 3D IGES Drafting files, it has no problems getting the geometry right, and that can't be said for the fiasco known as DXF/DWG. ;)
IGES file created with FreeCAD's Drafting WB, exported and reopened.
IGES file created with FreeCAD's Drafting WB, exported and reopened.
IGES_Drafting.png (19.63 KiB) Viewed 3544 times
001_IGES_Testing_2Dplus.iges
(15.03 KiB) Downloaded 89 times
Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
wmayer
Founder
Posts: 20245
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: IGES as alternative to 2D DWG?

Post by wmayer »

Does STEP work, too?
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: IGES as alternative to 2D DWG?

Post by NormandC »

I didn't try, will report back this weekend.

Mark: thanks! As far as I know most file import/export operations are done by Open Cascade. I have been unable to find out if OCC supports the full IGES specifications but I didn't spend much time on this.
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: IGES as alternative to 2D DWG?

Post by quick61 »

wmayer, yes, STEP does seem to here and maybe with more desirable results as all the lines, arcs, etc., are treated as separate objects and not "welded" into a single object as the current IGES export in FreeCAD does. Here is a demo file of lines, BSplines, Clones, Circles, Bezier Curves, and so on.
Draft_STEP_Export.step
(87.66 KiB) Downloaded 82 times
The drawback that I see with STEP is that there is no text support like there is suppose to be with IGES. And neither one of them will recognize the Draft dimensions as a shape, producing the following on export -

Code: Select all

'Dimension' is not a shape, export will be ignored.
- which I would think is a "FreeCAD problem" that would need to be addressed if were wanting to go forward with this.

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: IGES as alternative to 2D DWG?

Post by quick61 »

I've been looking around for any sort of clue on what has been implemented in OCE with IGES and have found nothing. We'll probably end up having to ask Denis Barbier or one of the other OCE guys. Or maybe shoogen might have some input as to what is or is not included with IGES in OCE.

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: IGES as alternative to 2D DWG?

Post by NormandC »

Mark, I'm curious to know how you produced that STEP file? Actually, my question should be how did you create the geometry in the first place? Because even though it's 2D geometry, it's not on a single plane. It's like a 3D part, but not really.

I had a look in Solid Edge, and there is no way to export a drawing page as STEP. The choices are only DXF/DWG, IGES and DGN which is Bentley MicroStation's file format. So I'm not sure STEP actually supports engineering drawings (blueprints). I know it's supposed to support PMI, which stands for product and manufacturing information. AFAIK those are dimensions and annotations applied directly to a 3D model. http://en.wikipedia.org/wiki/Product_an ... nformation
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: IGES as alternative to 2D DWG?

Post by quick61 »

normandc wrote:Mark, I'm curious to know how you produced that STEP file? Actually, my question should be how did you create the geometry in the first place? Because even though it's 2D geometry, it's not on a single plane. It's like a 3D part, but not really.
That was just a "Draft Doodle" I made up as a test/demo. Something that would include BSplines, Bezier Curves, and Draft Objects, so I could see how they exported in STEP format. I just did the base in 2D then made Draft Clones and changed their Z height and connected with Draft Lines. Nothing special, just foolin' round with the mouse. :geek:
normandc wrote:I had a look in Solid Edge, and there is no way to export a drawing page as STEP. The choices are only DXF/DWG, IGES and DGN which is Bentley MicroStation's file format. So I'm not sure STEP actually supports engineering drawings (blueprints). I know it's supposed to support PMI, which stands for product and manufacturing information. AFAIK those are dimensions and annotations applied directly to a 3D model. http://en.wikipedia.org/wiki/Product_an ... nformation
Ah, so STEP does support dimensions, we would just need to provide the dimensions in a way the exporter would understand. (if I'm reading that right?) That is if the STEP exporter supports it?

I do know that Draft ShapeString will export to STEP and IGES. But a funny thing happens to Ellipse shapes. Either on export or import, they get a face, though none was applied on inital export.
IGES_ShapeString_Export.iges
(193.09 KiB) Downloaded 84 times
STEP_ShapeString_Export.step
(282.27 KiB) Downloaded 92 times
Mark

OS: Kubuntu 14.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.15.4111 (Git)
Branch: master
Hash: a53a239f2f57ecdc54be10f4821a47c4d762e39d
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.7.1 (OCE 0.17 dev)
This post made with 0.0% Micro$oft products - GOT LINUX?
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: IGES as alternative to 2D DWG?

Post by yorik »

Very interesting topic... Since IGES is managed natively by OCC, we might have very good performance there. But indeed since IGES is made for geometry, it might not take into account all the annotations usually found on a 2d drawing...
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: IGES as alternative to 2D DWG?

Post by NormandC »

yorik wrote:it might not take into account all the annotations usually found on a 2d drawing...
Well it's supposed to, according to the Wikipedia entry, but the question is, does OCC implements the IGES spec fully...

I forgot to post some example files from the commercial software I use at work, will try to do it this week.
Post Reply