[cad-linux] Re: Open Cascade, openDWG, and Perl

  • From: Thomas Schmidt <thomas.schmidt@xxxxxxxxxx>
  • To: cad-linux@xxxxxxxxxxxxx
  • Date: Fri, 23 May 2003 10:59:59 +0200

Eric,

As far as I know there is not Perl wrapper for OC. But it might be possib=
le
to use swig to create one. OC code base is large, but its "easy" C++ Code=
=2E
No templates, no multiple inheritance, nothing of the sort that confuses
your interface generator.=20
What I know is that there is Python wrapper. I know because I made it :-)=
=2E=20
There is another Python wrapper slowly appearing. Currently only Windows =
:-(=20
Check out the OC web site.

OC has no builtin support for DWG. To use DWG, you would most
probably use the DWG toolkit:
1) Read: Use DWG Toolkit to read a file. Convert DWG toolkit entities
to OC entities. Use OC entities to setup your application specific data s=
tructure.
2) Write: Your application specific data structure uses OC entities.
Convert them to DWG entities. Write DWG entities to file.

BUT: OC has builtin support for STEP, IGES, STL, and VRML. Ok, this does =
not
help when DWG is a requirement. But _very_ usefull in all other cases.

Bye,
Thomas

>
=2E..
> Any chance of getting a Perl interface to it?
> How could you use it to handle DWG files?
>
> I've been working with the openDWG toolkit via a perl module built with
> SWIG and it actually is starting to make me wish I knew C.  I'm not doi=
ng
> really complex operations, and it is all cli-based programming, so
> supporting a subset of the toolkit with SWIG and turning it into a
> higher-level interface has been really succesfull.  Only problem is my
> handling of things in the interface file doesn't quite work, so I get
> segfaults and such.  I'm sure a good C programmer could tell me what's
> wrong, but I don't know any.
>
> I'm going to talk to my boss about open-sourcing the module.  It's real=
ly
> just a file-converter, so its not like we are loosing trade-secrets by
> doing it. This would allow others to work from where it is now and allo=
w me
> to not have to write any more code in C.
>
> Anyone interested in such a project?
>
> --Eric


Other related posts: