The DWG question

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
yorik
Founder
Posts: 13659
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

The DWG question

Post by yorik »

Hi there,
I'm since a little while looking at the dwg issue, how I could possibly treat the problem... I already found some info, so I start a thread so I can update with anything new later. In short, what I have until now:
  • DWG format is proprietary and kept as secret as possible by Autodesk, it is a defacto standard for 2D and 3D CAD, and it is a major obstacle to having CAD people move to open-source solutions. The only existing reference document is the one produced by the opendwg alliance, and it is obscure and not very complete, specially when coming to post-2004 versions.
  • I spoke with FSF people during the FISL, they confirmed that, and that they might want to help any effort in that direction. The libredwg (see below) people also spoke to Richard Stallman (I wasn't there unfortunately), who got quite excited by their work, and said they should find a CAD application to partner with. Unfortunately everything that FSF does must be 100% GPL, so I'm sure they would have problems with opencascade, so this is probably not for us.Anyway I'll contact the guys.
  • PythonCAD has a preliminary python script that imports dwg <= 2000
  • This libdwg project seems to be quite active, but slow, but all the code is written in esperanto, which is not easy...
  • The libredwg project is a fork from the libdwg, they are basically rewriting it in english. It is maintained by a group of students from Brazil, I'll try to contact them to get more info.
  • Blender's DXF import script now uses a converter from opendwg to convert dwg files to dxf on the fly and open them as dxf. Not a perfect solution (the converter cannot be redistributed), but it works.
  • I have a couple of programmer friends who are interested by the subject too, I'll see what I can organize...
I think I'll have a look at how libredwg is going (it looks easy to use), but in a way or another I think it is feasible, even if it only import very basic entities.
I'll keep posting progresses...
Cheers
Yorik
User avatar
jriegel
Founder
Posts: 3369
Joined: Sun Feb 15, 2009 5:29 pm
Location: Ulm, Germany
Contact:

Re: The DWG question

Post by jriegel »

Good research.

Its always the same with this pseudo standards, there fore its hard to get a point there. The question is shut we define our CAD system with implementing formates of commercial software which is in no means standardized or even untouched by patents. Or is there a Open solution?
Im not that in 2D formats, but for 3D I would never like to implement Catias CatPart file format, I will always stick to STEP even if everyone tell me that Catia is the standard system. Maybe its time to define a new standard? :D

But on the other hand, would OpenOffice so succesfull if its wasent able to read M$ doc files??

Only time will tell....

Jürgen
Stop whining - start coding!
User avatar
yorik
Founder
Posts: 13659
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: The DWG question

Post by yorik »

Yes I agree totally... proprietary formats will never be a good solution. And step is a fantastic format... I even read somewhere that step files can contain scripted parts! It would probably be a perfect format for, let's say, intelligent building representations (a la Revit), the day we'll do that with freecad :) And actually, until now, it seems to behave perfectly for 2d too, so...

But i would be interested too in reading dwg files, basically so in some future I could drop autocad away for good... I just had a 30min telefone talk with one of the libredwg guys (they're from São Paulo!), I'm going to meet them next week I think... Who knows, maybe interesting things can come from there!
User avatar
yohplala
Posts: 27
Joined: Mon Feb 23, 2009 9:35 pm

Re: The DWG question

Post by yohplala »

Hi Yorik and Jürgen,

You have noticed that I'm not an expert. So I may be wrong with the following information, but:
Can we save just surface in STEP (I am working in automotive industry where for body parts, we only use surfaces, never volumes)?
I always had the feeling you can't. I tried once to save a surface in CATIA in STEP: CATIA simply didn't allow me to select STEP.

So I'm not sure STEP is the really right choice, but I may be of course wrong.

Also, an open source project was began few years ago to build a 3D standard format from Rhino3D CAD format:
OpenNURBS: http://www.opennurbs.org/

I was appreciating their will to make it known by posting this news in other forums of CAD applications, for instance OpenCascade: http://www.opencascade.org/org/forum/thread_10310/

I however, don't know if this one can handle surface, but I guess it can if it can deal with nurbs :-)...

Cheers,

Yoh
wmayer
Founder
Posts: 20298
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: The DWG question

Post by wmayer »

Hi Yoh,

AFAIK the STEP format can of course work with normal surfaces. When creating one and saving it in FreeCAD I can also load it again properly. Beyond normal surfaces the STEP format also supports solids (volumes) which is not supported by all other formats like the IGES format for example.

So, IMO no reason why not to use STEP.

Cheers,
Werner
User avatar
yohplala
Posts: 27
Joined: Mon Feb 23, 2009 9:35 pm

Re: The DWG question

Post by yohplala »

Hi Werner,

Ok, I see I should carry out additional trials.

Just also to let you know that this subject was discussed in a google group which had not much activity these past months, but still gathers interesting information:
http://groups.google.fr/group/open_cad_format

So you may find additional data there.
There is one pdf I'm gonna check: a STEP handbook describing its capabilities:

(181 pages: I won't read it completely I guess... :-))


Yoh
User avatar
yorik
Founder
Posts: 13659
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: The DWG question

Post by yorik »

Yes, you must have seen that I made an attempt to support the open cad format... Freecad must be the only application supporting it, besides gCAD3d. Actually I was waiting to build good examples of OCA files before posting the results to the open cad group, but I got a bit distracted and forgot about it, good that you are bringing the subject in...
User avatar
jriegel
Founder
Posts: 3369
Joined: Sun Feb 15, 2009 5:29 pm
Location: Ulm, Germany
Contact:

Re: The DWG question

Post by jriegel »

Hi,
Catia can save STEP, if you have the right license installed! ;-) Thats the problem with commercial software like Catia, you have to pay for every feature.

And Yopla, its much worse. I have at home the ISO standard documents of STEP. Only the base documents and the AP214 "core automotiv data" are 6000 pages long! So its a huge powerfull standard. But OCC implemented the most geometric stuff, so no worry so far.

The big car manufactures leaving the path of designing body in white with surfaces. Daimler/Mercedes use Solids since the actual C-Class with Catia V5. Surfaces are in the long run to dangerous, you never no where is the thickness and what its inside outside. Also you can not do engineering checks like
DMU....

DWG is IMO "old thinking". Its the world where designs get expressed and developed in 2D on a sketch pad. You have to do all kinds of tricks to fold a 3D world on sketch pad. dwg is bunch of lines and in no way others then PDF. The MCAD system go strongly in the direction of 3D models, where models mean really not only geomtry. It means also higher class features and parametric behaviour! This design process takes completely place in a unbounded 3D world. All the next steps like CAM or DMU are only possible in 3D.

Jürgen
Stop whining - start coding!
User avatar
yohplala
Posts: 27
Joined: Mon Feb 23, 2009 9:35 pm

Re: The DWG question

Post by yohplala »

Jürgen,

You're using some terms I don't understand, most notably DMU: can you explain it or give some links to some examples?

I have to say that in my job (I don't think it is really a specific job, but maybe...), there is no link to CAM.
The thing is, CAD are used to draw parts and assemblies for FE applications: stamping of the parts, crash, NVH, and so on: we work at sizing parts (geometry and materials), and validating concepts.

We demonstrate numerically manufacturing of parts (stamping, welding, bonding, gluing, assembly strategy)) and performances of assemblies (crash, NVH, stiffness, modal analysis...).

The thing is that to model all these stuffs, you only work with meshed surfaces and only shell elements (tria or quad), and never solid element (hexa or others...). It indeed doesn't bring much more accuracy to the results (others factors are far more important). However, the computation gets quite expensive if you use solid elements.

This is why we work with surfaces in CAD: we just have to mesh them then. No extra work to extract mid-surface or this kind of things...

This was to explain our methods.

cheers,

Yoh
wmayer
Founder
Posts: 20298
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: The DWG question

Post by wmayer »

Hi Yoh,

DMU is called Digital Mock-Up. The basic idea is to have a model completely described as a data set on your computer which can be used for virtual tests such as collision detection, buildability checks, ... This means that no longer a physical prototype is needed which saves a lot of money and time.

More information you'll find here: http://en.wikipedia.org/wiki/Digital_mockup

Werner
Post Reply