Skip to content

Commit

Permalink
debug: add NanoSPDS classes dxf<->cpp names
Browse files Browse the repository at this point in the history
and regen dynapi
  • Loading branch information
rurban committed Oct 15, 2024
1 parent d5a1dce commit 8e961a8
Show file tree
Hide file tree
Showing 6 changed files with 591 additions and 521 deletions.
4 changes: 4 additions & 0 deletions doc/dynapi.texi
Original file line number Diff line number Diff line change
Expand Up @@ -2072,6 +2072,10 @@ RC, DXF 280
B, DXF 290
@item enable_frame_text
B, DXF 290
@item ins_pt
3BD
@item alignment_pt
2RD
@item mtext
Dwg_AcDbMTextObjectEmbedded
@item is_really_locked
Expand Down
1 change: 1 addition & 0 deletions src/classes.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1222,6 +1222,7 @@ McDbContainer2
McDbMarker
NAMEDAPPL
NEWSTDPARTPARLIST
NOTEPOSITION / mcsDbObjectNotePosition
OBJCLONER
PARAMMGR
PARAMSCOPE
Expand Down
1,076 changes: 555 additions & 521 deletions src/dxfclasses.c

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions src/dxfclasses.in
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ enum apptypes
DGNLSCLASS,
AEC60CLASS,
SPECIALCLASS,
NanoSPDSCLASS,
};
#define ODBX ODBXCLASS
#define ISM ISMCLASS
Expand All @@ -58,6 +59,7 @@ enum apptypes
#define DGNLS DGNLSCLASS
#define AEC60 AEC60CLASS
#define SPECIAL SPECIALCLASS
#define NanoSPDS NanoSPDSCLASS
//%null-strings

%}
Expand Down Expand Up @@ -309,6 +311,13 @@ LSCOMPOUNDCOMPONENT, "AcDbLSCompoundComponent", DGNLS, 0
LSPOINTCOMPONENT, "AcDbLSPointComponent", DGNLS, 0
LSSYMBOLCOMPONENT, "AcDbLSSymbolComponent", DGNLS, 0
AEC_REFEDIT_STATUS_TRACKER, "AecDbRefEditStatusTracker", AEC60, 0
Wall, "PtDbWall", NanoSPDS, 1
Format, "mcsDbObjectFormat", NanoSPDS, 1
NOTEPOSITION, "mcsDbObjectNotePosition", NanoSPDS, 1
mcsDbObject, "mcsDbObject", NanoSPDS, 1
McDbContainer2, "McDbContainer2", NanoSPDS, 0
spdsLevelMark, "mcsDbObjectLevelMark", NanoSPDS, 1
spdsRelationMark, "mcsDbObjectRelationMark", NanoSPDS, 1
%%

/* Create classes on demand.
Expand Down Expand Up @@ -349,6 +358,8 @@ dwg_require_class (Dwg_Data *restrict dwg, const char *const restrict dxfname, c
return dwg_add_class (dwg, dxfname, result->cppname, "AcDbPointCloudObj", result->isent); //appname?
case DGNLSCLASS:
return dwg_add_class (dwg, dxfname, result->cppname, "AcDgnLS", result->isent);
case NanoSPDSCLASS:
return dwg_add_class (dwg, dxfname, result->cppname, "NanoSPDS", result->isent);
case AEC60CLASS:
return dwg_add_class (dwg, dxfname, result->cppname, "AecArchBase60|Product Desc: "
"Autodesk Architectural Desktop 2007", result->isent);
Expand Down
4 changes: 4 additions & 0 deletions src/dynapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1878,6 +1878,10 @@ static const Dwg_DYNAPI_field _dwg_GEOPOSITIONMARKER_fields[] = {
0,0,0, 290 },
{ "enable_frame_text", "B", sizeof (BITCODE_B), OFF (struct _dwg_entity_GEOPOSITIONMARKER, enable_frame_text),
0,0,0, 290 },
{ "ins_pt", "3BD", sizeof (BITCODE_3BD), OFF (struct _dwg_entity_GEOPOSITIONMARKER, ins_pt),
1,0,0, 0 },
{ "alignment_pt", "2RD", sizeof (BITCODE_2RD), OFF (struct _dwg_entity_GEOPOSITIONMARKER, alignment_pt),
1,0,0, 0 },
{ "mtext", "Dwg_AcDbMTextObjectEmbedded", sizeof (Dwg_AcDbMTextObjectEmbedded), OFF (struct _dwg_entity_GEOPOSITIONMARKER, mtext),
0,0,0, 0 },
{ "is_really_locked", "B", sizeof (BITCODE_B), OFF (struct _dwg_entity_GEOPOSITIONMARKER, is_really_locked),
Expand Down
16 changes: 16 additions & 0 deletions test/unit-testing/dynapi_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -12018,6 +12018,14 @@ static int test_GEOPOSITIONMARKER (const Dwg_Object *obj)
fail ("NULL GEOPOSITIONMARKER");
return 1;
}
{
BITCODE_2RD alignment_pt;
if (dwg_dynapi_entity_value (geopositionmarker, "GEOPOSITIONMARKER", "alignment_pt", &alignment_pt, NULL)
&& !memcmp (&alignment_pt, &geopositionmarker->alignment_pt, sizeof (BITCODE_2RD)))
pass ();
else
fail ("GEOPOSITIONMARKER.alignment_pt [2RD]");
}
{
BITCODE_RC* annotative_data;
if (dwg_dynapi_entity_value (geopositionmarker, "GEOPOSITIONMARKER", "annotative_data", &annotative_data, NULL)
Expand Down Expand Up @@ -12096,6 +12104,14 @@ static int test_GEOPOSITIONMARKER (const Dwg_Object *obj)
fail ("GEOPOSITIONMARKER.enable_frame_text [B] set+1 " FORMAT_B " != " FORMAT_B "", geopositionmarker->enable_frame_text, enable_frame_text);
geopositionmarker->enable_frame_text--;
}
{
BITCODE_3BD ins_pt;
if (dwg_dynapi_entity_value (geopositionmarker, "GEOPOSITIONMARKER", "ins_pt", &ins_pt, NULL)
&& !memcmp (&ins_pt, &geopositionmarker->ins_pt, sizeof (BITCODE_3BD)))
pass ();
else
fail ("GEOPOSITIONMARKER.ins_pt [3BD]");
}
{
BITCODE_B is_really_locked;
if (dwg_dynapi_entity_value (geopositionmarker, "GEOPOSITIONMARKER", "is_really_locked", &is_really_locked, NULL)
Expand Down

0 comments on commit 8e961a8

Please sign in to comment.