[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libredwg] Someone would like to join "again"

From: Felipe Castro
Subject: Re: [libredwg] Someone would like to join "again"
Date: Fri, 2 Aug 2013 09:23:48 -0300

Hi, thanks for updating the status quickly for me.

2013/8/1 gagan <address@hidden>
On 8/1/13, Felipe Castro <address@hidden> wrote:
> The API is a really huge work, and it could start with very simple things,
> because there are functions there that maybe would never be used in a
> simple CAD environment. But it doesn't hurt anyway to have access on every
> little peace of Autodesk creativity (handles, for example), that's the
> final goal if you want total control of the file format. Would it be useful
> to follow some DXF references? See:

Currently the API is work in progress. Regarding the handle part, It
is buggy and mostly gives weird handles. That is the reason
concentration is on entities and objects right now but soon API will
also have support for handles.

You are right not worring so much about the handles for now, some of them are really arbitrary, and should be ignored when reading DWG data, I suppose, from reading DXF official specs:

"Arbitrary handles are distinct in that they are not translated to
session-persistent identifiers internally, or to entity names in AutoLISP, and
so on. They are stored as handles. When handle values are translated in
drawing-merge operations, arbitrary handles are ignored.
In all environments, arbitrary handles can be exchanged for entity names of
the current drawing by means of the handent functions. A common usage of
arbitrary handles is to refer to objects in external DXF and DWG files."

This is kind of esoteric for me, and I can just imagine that some handles are kind of trash, because they were created for some "copy and paste" operation, and are not used anymore. Not sure... I need to read the DXF stuff with attention.

> I don't know what would be the best way to access the API, but I think
> including "api.h" will not be the final result for the library user, rigth?
> Will it be included from the "dwg.h" header?

User has to include both "api.h" and "api.c" file to use the API right
now. I have provided the "testsvg2.c" file as an example of working.
It is same example we get with LibreDWG which is just ported to API.
If one has LibreDWG in his computer, He/She can compile the
"testsvg2.c" file by keeping all the 3 files ( "testsvg2.c", "api.c",
"api.h" ) together in one directory.

Yes, that's ok for testing purposes, but when someone wants to merge your code into the master branch, how would be the approach to integrate it, just including "api.h" from "dwg.h" would be ok?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]