Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

new/delete/free API fixup #10

Closed
rurban opened this issue May 31, 2018 · 0 comments
Closed

new/delete/free API fixup #10

rurban opened this issue May 31, 2018 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@rurban
Copy link
Contributor

rurban commented May 31, 2018

The few new/delete/free functions from the dwg_api are basically useless,
as they don't add/delete the entity to the DWG. We need to add a Dwg_Object
and the associated Dwg_Object_Entity and then the Dwg_Entity_CIRCLE.
Same for delete.

See encode.c for dwg_add_##ENTITY for the proper API, but these are untested (waiting for dwgwrite/dxf2dwg).

Use dwg_add_##ENTITY and dwg_free_object() instead.

Add these to the header, and document it.

@rurban rurban added the bug Something isn't working label May 31, 2018
@rurban rurban self-assigned this May 31, 2018
@rurban rurban added this to the 0.5 milestone May 31, 2018
rurban added a commit that referenced this issue May 31, 2018
rurban added a commit that referenced this issue May 31, 2018
See [GH #10] and the note in the previous commit.
rurban added a commit that referenced this issue May 31, 2018
change the return value to the newly created object.
also add the counterpart dwg_free_object() to the public API.
src/free.h is now empty and could be removed. (later)

The next commit will remove the wrong dwg_ent_ENTITY_new/delete/free
functions from the API.  See [GH #10]
rurban added a commit that referenced this issue May 31, 2018
these were only entity specific, and didnt add them to the DWG
an object consists of the generic Dwg_Object, a common-entity
Dwg_Object_Entity and the specific Dwg_Entity_ENTITY.

Use the dwg_add_ENTITY and dwg_free_object API instead.
Closes GH #10
@rurban rurban closed this as completed Jun 1, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant