diff --git a/doc/dynapi.texi b/doc/dynapi.texi index 372876969..8a008cd62 100644 --- a/doc/dynapi.texi +++ b/doc/dynapi.texi @@ -8546,6 +8546,8 @@ BL, DXF 72 BL, DXF 73 @item hdls Dwg_BLOCKSTRETCHACTION_handles* +@item bl94 +BL @item num_codes BL, DXF 75 @item codes @@ -13804,6 +13806,20 @@ BL, DXF 94 @end vtable @end indentedblock +@strong{Dwg_BLOCKSTRETCHACTION_handle_indices} @anchor{Dwg_BLOCKSTRETCHACTION_handle_indices} +@vindex Dwg_BLOCKSTRETCHACTION_handle_indices + +@indentedblock +@vtable @code + +@item parent +struct _dwg_object_BLOCKSTRETCHACTION* +@item index +BL, DXF 94 + +@end vtable +@end indentedblock + @strong{Dwg_BLOCKSTRETCHACTION_handles} @anchor{Dwg_BLOCKSTRETCHACTION_handles} @vindex Dwg_BLOCKSTRETCHACTION_handles @@ -13814,10 +13830,10 @@ BL, DXF 94 struct _dwg_object_BLOCKSTRETCHACTION* @item hdl H, DXF 331 -@item bs74 +@item num_index BS, DXF 74 -@item bl94 -BL, DXF 94 +@item indices +Dwg_BLOCKSTRETCHACTION_handle_indices* @end vtable @end indentedblock @@ -14559,9 +14575,9 @@ BL, DXF 97 @item fitpts 2RD* @item start_tangent -2RD +2RD, DXF 12 @item end_tangent -2RD +2RD, DXF 13 @end vtable @end indentedblock diff --git a/include/dwg.h b/include/dwg.h index a504cfd61..67ae51bd8 100644 --- a/include/dwg.h +++ b/include/dwg.h @@ -7797,11 +7797,16 @@ typedef struct _dwg_object_BLOCKSCALEACTION BLOCKACTION_WITHBASEPT_fields(5); } Dwg_Object_BLOCKSCALEACTION; +typedef struct _dwg_BLOCKSTRETCHACTION_handle_indices { + struct _dwg_object_BLOCKSTRETCHACTION *parent; + BITCODE_BL index; // 94 +} Dwg_BLOCKSTRETCHACTION_handle_indices; + typedef struct _dwg_BLOCKSTRETCHACTION_handles { struct _dwg_object_BLOCKSTRETCHACTION *parent; - BITCODE_H hdl; // 331 - BITCODE_BS bs74; // 74 - BITCODE_BL bl94; // 94 + BITCODE_H hdl; // 331 + BITCODE_BS num_index; // 74 + Dwg_BLOCKSTRETCHACTION_handle_indices *indices; } Dwg_BLOCKSTRETCHACTION_handles; typedef struct _dwg_BLOCKSTRETCHACTION_codes { @@ -7819,7 +7824,8 @@ typedef struct _dwg_object_BLOCKSTRETCHACTION BITCODE_BL num_pts; // 72 BITCODE_2RD *pts; // 10 BITCODE_BL num_hdls; // 72 - Dwg_BLOCKSTRETCHACTION_handles *hdls; /*!< DXF 331, 74, 94, 94 */ + Dwg_BLOCKSTRETCHACTION_handles *hdls; /*!< DXF 331, 74, 94 */ + BITCODE_BL bl94; BITCODE_BL num_codes; // 75 Dwg_BLOCKSTRETCHACTION_codes *codes; /*!< DXF 95, 76, 94 */ BLOCKACTION_doubles_fields; diff --git a/src/dwg.spec b/src/dwg.spec index 3b21b5f58..79ab36845 100644 --- a/src/dwg.spec +++ b/src/dwg.spec @@ -12427,8 +12427,13 @@ DWG_OBJECT (BLOCKSTRETCHACTION) REPEAT (num_hdls, hdls, Dwg_BLOCKSTRETCHACTION_handles) REPEAT_BLOCK SUB_FIELD_HANDLE (hdls[rcount1], hdl, 0, 331); - SUB_FIELD_BS (hdls[rcount1], bs74, 74); - SUB_FIELD_BL (hdls[rcount1], bl94, 94); + SUB_FIELD_BS (hdls[rcount1], num_index, 74); + REPEAT2 (hdls[rcount1].num_index, hdls[rcount1].indices, Dwg_BLOCKSTRETCHACTION_handle_indices) + REPEAT_BLOCK + SUB_FIELD_BL (hdls[rcount1].indices[rcount2], index, 94); + SET_PARENT_OBJ (hdls[rcount1].indices[rcount2]); + END_REPEAT_BLOCK + END_REPEAT (hdls[rcount1].indices) SET_PARENT_OBJ (hdls[rcount1]); END_REPEAT_BLOCK END_REPEAT (hdls) diff --git a/src/dynapi.c b/src/dynapi.c index 4d52adf22..a72151bf6 100644 --- a/src/dynapi.c +++ b/src/dynapi.c @@ -7171,6 +7171,8 @@ static const Dwg_DYNAPI_field _dwg_BLOCKSTRETCHACTION_fields[] = { 0,0,0, 73 }, { "hdls", "Dwg_BLOCKSTRETCHACTION_handles*", sizeof (Dwg_BLOCKSTRETCHACTION_handles*), OFF (struct _dwg_object_BLOCKSTRETCHACTION, hdls), 1,1,0, 0 }, + { "bl94", "BL", sizeof (BITCODE_BL), OFF (struct _dwg_object_BLOCKSTRETCHACTION, bl94), + 0,0,0, 0 }, { "num_codes", "BL", sizeof (BITCODE_BL), OFF (struct _dwg_object_BLOCKSTRETCHACTION, num_codes), 0,0,0, 75 }, { "codes", "Dwg_BLOCKSTRETCHACTION_codes*", sizeof (Dwg_BLOCKSTRETCHACTION_codes*), OFF (struct _dwg_object_BLOCKSTRETCHACTION, codes), @@ -11248,16 +11250,24 @@ static const Dwg_DYNAPI_field _dwg_BLOCKSTRETCHACTION_codes_fields[] = { 0,0,0, 94 }, {NULL, NULL, 0, 0, 0,0,0, 0}, }; +/* from typedef struct _dwg_BLOCKSTRETCHACTION_handle_indices: (sorted by offset) */ +static const Dwg_DYNAPI_field _dwg_BLOCKSTRETCHACTION_handle_indices_fields[] = { + { "parent", "struct _dwg_object_BLOCKSTRETCHACTION*", sizeof (void *), OFF (struct _dwg_BLOCKSTRETCHACTION_handle_indices, parent), + 1,1,0, 0 }, + { "index", "BL", sizeof (BITCODE_BL), OFF (struct _dwg_BLOCKSTRETCHACTION_handle_indices, index), + 0,0,0, 94 }, + {NULL, NULL, 0, 0, 0,0,0, 0}, +}; /* from typedef struct _dwg_BLOCKSTRETCHACTION_handles: (sorted by offset) */ static const Dwg_DYNAPI_field _dwg_BLOCKSTRETCHACTION_handles_fields[] = { { "parent", "struct _dwg_object_BLOCKSTRETCHACTION*", sizeof (void *), OFF (struct _dwg_BLOCKSTRETCHACTION_handles, parent), 1,1,0, 0 }, { "hdl", "H", sizeof (BITCODE_H), OFF (struct _dwg_BLOCKSTRETCHACTION_handles, hdl), 1,0,0, 331 }, - { "bs74", "BS", sizeof (BITCODE_BS), OFF (struct _dwg_BLOCKSTRETCHACTION_handles, bs74), + { "num_index", "BS", sizeof (BITCODE_BS), OFF (struct _dwg_BLOCKSTRETCHACTION_handles, num_index), 0,0,0, 74 }, - { "bl94", "BL", sizeof (BITCODE_BL), OFF (struct _dwg_BLOCKSTRETCHACTION_handles, bl94), - 0,0,0, 94 }, + { "indices", "Dwg_BLOCKSTRETCHACTION_handle_indices*", sizeof (Dwg_BLOCKSTRETCHACTION_handle_indices*), OFF (struct _dwg_BLOCKSTRETCHACTION_handles, indices), + 1,1,0, 0 }, {NULL, NULL, 0, 0, 0,0,0, 0}, }; /* from typedef struct _dwg_BLOCKVISIBILITYPARAMETER_state: (sorted by offset) */ @@ -11819,9 +11829,9 @@ static const Dwg_DYNAPI_field _dwg_HATCH_PathSeg_fields[] = { { "fitpts", "2RD*", sizeof (BITCODE_2RD*), OFF (struct _dwg_HATCH_PathSeg, fitpts), 1,1,0, 0 }, { "start_tangent", "2RD", sizeof (BITCODE_2RD), OFF (struct _dwg_HATCH_PathSeg, start_tangent), - 1,0,0, 0 }, + 1,0,0, 12 }, { "end_tangent", "2RD", sizeof (BITCODE_2RD), OFF (struct _dwg_HATCH_PathSeg, end_tangent), - 1,0,0, 0 }, + 1,0,0, 13 }, {NULL, NULL, 0, 0, 0,0,0, 0}, }; /* from typedef struct _dwg_HATCH_PolylinePath: (sorted by offset) */ @@ -13471,91 +13481,92 @@ static const struct _name_subclass_fields dwg_list_subclasses[] = { { "BLOCKPARAMETER_connection", 0, NULL, _dwg_BLOCKPARAMETER_connection_fields, sizeof (Dwg_BLOCKPARAMETER_connection) }, /* 39 */ { "BLOCKPARAMVALUESET", 0, NULL, _dwg_BLOCKPARAMVALUESET_fields, sizeof (Dwg_BLOCKPARAMVALUESET) }, /* 40 */ { "BLOCKSTRETCHACTION_codes", (int)DWG_TYPE_BLOCKSTRETCHACTION, NULL, _dwg_BLOCKSTRETCHACTION_codes_fields, sizeof (Dwg_BLOCKSTRETCHACTION_codes) }, /* 41 */ - { "BLOCKSTRETCHACTION_handles", (int)DWG_TYPE_BLOCKSTRETCHACTION, NULL, _dwg_BLOCKSTRETCHACTION_handles_fields, sizeof (Dwg_BLOCKSTRETCHACTION_handles) }, /* 42 */ - { "BLOCKVISIBILITYPARAMETER_state", (int)DWG_TYPE_BLOCKVISIBILITYPARAMETER, NULL, _dwg_BLOCKVISIBILITYPARAMETER_state_fields, sizeof (Dwg_BLOCKVISIBILITYPARAMETER_state) }, /* 43 */ - { "COMPOUNDOBJECTID", 0, NULL, _dwg_COMPOUNDOBJECTID_fields, sizeof (Dwg_COMPOUNDOBJECTID) }, /* 44 */ - { "CONSTRAINTGROUPNODE", 0, NULL, _dwg_CONSTRAINTGROUPNODE_fields, sizeof (Dwg_CONSTRAINTGROUPNODE) }, /* 45 */ - { "CONTEXTDATA_dict", 0, NULL, _dwg_CONTEXTDATA_dict_fields, sizeof (Dwg_CONTEXTDATA_dict) }, /* 46 */ - { "CONTEXTDATA_submgr", 0, NULL, _dwg_CONTEXTDATA_submgr_fields, sizeof (Dwg_CONTEXTDATA_submgr) }, /* 47 */ - { "CellContentGeometry", 0, NULL, _dwg_CellContentGeometry_fields, sizeof (Dwg_CellContentGeometry) }, /* 48 */ - { "CellStyle", 0, NULL, _dwg_CellStyle_fields, sizeof (Dwg_CellStyle) }, /* 49 */ - { "ColorRamp", 0, NULL, _dwg_ColorRamp_fields, sizeof (Dwg_ColorRamp) }, /* 50 */ - { "ContentFormat", 0, NULL, _dwg_ContentFormat_fields, sizeof (Dwg_ContentFormat) }, /* 51 */ - { "DATALINK_customdata", (int)DWG_TYPE_DATALINK, NULL, _dwg_DATALINK_customdata_fields, sizeof (Dwg_DATALINK_customdata) }, /* 52 */ - { "DATATABLE_column", (int)DWG_TYPE_DATATABLE, NULL, _dwg_DATATABLE_column_fields, sizeof (Dwg_DATATABLE_column) }, /* 53 */ - { "DATATABLE_row", (int)DWG_TYPE_DATATABLE, NULL, _dwg_DATATABLE_row_fields, sizeof (Dwg_DATATABLE_row) }, /* 54 */ - { "DIMASSOC_Ref", (int)DWG_TYPE_DIMASSOC, NULL, _dwg_DIMASSOC_Ref_fields, sizeof (Dwg_DIMASSOC_Ref) }, /* 55 */ - { "DIMENSION_common", 0, "AcDbDimension", _dwg_DIMENSION_common_fields, sizeof (Dwg_DIMENSION_common) }, /* 56 */ - { "EVAL_Edge", 0, NULL, _dwg_EVAL_Edge_fields, sizeof (Dwg_EVAL_Edge) }, /* 57 */ - { "EVAL_Node", 0, NULL, _dwg_EVAL_Node_fields, sizeof (Dwg_EVAL_Node) }, /* 58 */ - { "EvalExpr", 0, NULL, _dwg_EvalExpr_fields, sizeof (Dwg_EvalExpr) }, /* 59 */ - { "EvalVariant", 0, NULL, _dwg_EvalVariant_fields, sizeof (Dwg_EvalVariant) }, /* 60 */ - { "FIELD_ChildValue", (int)DWG_TYPE_FIELD, NULL, _dwg_FIELD_ChildValue_fields, sizeof (Dwg_FIELD_ChildValue) }, /* 61 */ - { "FileDepList_Files", 0, NULL, _dwg_FileDepList_Files_fields, sizeof (Dwg_FileDepList_Files) }, /* 62 */ - { "FormattedTableData", 0, NULL, _dwg_FormattedTableData_fields, sizeof (Dwg_FormattedTableData) }, /* 63 */ - { "FormattedTableMerged", 0, NULL, _dwg_FormattedTableMerged_fields, sizeof (Dwg_FormattedTableMerged) }, /* 64 */ - { "GEODATA_meshface", (int)DWG_TYPE_GEODATA, NULL, _dwg_GEODATA_meshface_fields, sizeof (Dwg_GEODATA_meshface) }, /* 65 */ - { "GEODATA_meshpt", (int)DWG_TYPE_GEODATA, NULL, _dwg_GEODATA_meshpt_fields, sizeof (Dwg_GEODATA_meshpt) }, /* 66 */ - { "GridFormat", 0, NULL, _dwg_GridFormat_fields, sizeof (Dwg_GridFormat) }, /* 67 */ - { "HATCH_Color", (int)DWG_TYPE_HATCH, NULL, _dwg_HATCH_Color_fields, sizeof (Dwg_HATCH_Color) }, /* 68 */ - { "HATCH_ControlPoint", (int)DWG_TYPE_HATCH, NULL, _dwg_HATCH_ControlPoint_fields, sizeof (Dwg_HATCH_ControlPoint) }, /* 69 */ - { "HATCH_DefLine", (int)DWG_TYPE_HATCH, NULL, _dwg_HATCH_DefLine_fields, sizeof (Dwg_HATCH_DefLine) }, /* 70 */ - { "HATCH_Path", (int)DWG_TYPE_HATCH, NULL, _dwg_HATCH_Path_fields, sizeof (Dwg_HATCH_Path) }, /* 71 */ - { "HATCH_PathSeg", (int)DWG_TYPE_HATCH, NULL, _dwg_HATCH_PathSeg_fields, sizeof (Dwg_HATCH_PathSeg) }, /* 72 */ - { "HATCH_PolylinePath", (int)DWG_TYPE_HATCH, NULL, _dwg_HATCH_PolylinePath_fields, sizeof (Dwg_HATCH_PolylinePath) }, /* 73 */ - { "LAYER_entry", (int)DWG_TYPE_LAYER, NULL, _dwg_LAYER_entry_fields, sizeof (Dwg_LAYER_entry) }, /* 74 */ - { "LEADER_ArrowHead", (int)DWG_TYPE_LEADER, NULL, _dwg_LEADER_ArrowHead_fields, sizeof (Dwg_LEADER_ArrowHead) }, /* 75 */ - { "LEADER_BlockLabel", (int)DWG_TYPE_LEADER, NULL, _dwg_LEADER_BlockLabel_fields, sizeof (Dwg_LEADER_BlockLabel) }, /* 76 */ - { "LEADER_Break", (int)DWG_TYPE_LEADER, NULL, _dwg_LEADER_Break_fields, sizeof (Dwg_LEADER_Break) }, /* 77 */ - { "LEADER_Line", (int)DWG_TYPE_LEADER, NULL, _dwg_LEADER_Line_fields, sizeof (Dwg_LEADER_Line) }, /* 78 */ - { "LEADER_Node", (int)DWG_TYPE_LEADER, NULL, _dwg_LEADER_Node_fields, sizeof (Dwg_LEADER_Node) }, /* 79 */ - { "LIGHTLIST_light", (int)DWG_TYPE_LIGHTLIST, NULL, _dwg_LIGHTLIST_light_fields, sizeof (Dwg_LIGHTLIST_light) }, /* 80 */ - { "LTYPE_dash", (int)DWG_TYPE_LTYPE, NULL, _dwg_LTYPE_dash_fields, sizeof (Dwg_LTYPE_dash) }, /* 81 */ - { "LWPOLYLINE_width", (int)DWG_TYPE_LWPOLYLINE, NULL, _dwg_LWPOLYLINE_width_fields, sizeof (Dwg_LWPOLYLINE_width) }, /* 82 */ - { "LinkedData", 0, NULL, _dwg_LinkedData_fields, sizeof (Dwg_LinkedData) }, /* 83 */ - { "LinkedTableData", 0, NULL, _dwg_LinkedTableData_fields, sizeof (Dwg_LinkedTableData) }, /* 84 */ - { "MATERIAL_color", (int)DWG_TYPE_MATERIAL, NULL, _dwg_MATERIAL_color_fields, sizeof (Dwg_MATERIAL_color) }, /* 85 */ - { "MATERIAL_gentexture", (int)DWG_TYPE_MATERIAL, NULL, _dwg_MATERIAL_gentexture_fields, sizeof (Dwg_MATERIAL_gentexture) }, /* 86 */ - { "MATERIAL_mapper", (int)DWG_TYPE_MATERIAL, NULL, _dwg_MATERIAL_mapper_fields, sizeof (Dwg_MATERIAL_mapper) }, /* 87 */ - { "MESH_edge", (int)DWG_TYPE_MESH, NULL, _dwg_MESH_edge_fields, sizeof (Dwg_MESH_edge) }, /* 88 */ - { "MLEADER_AnnotContext", 0, "AcDbMLeaderAnnotContext", _dwg_MLEADER_AnnotContext_fields, sizeof (Dwg_MLEADER_AnnotContext) }, /* 89 */ - { "MLEADER_Content", 0, NULL, _dwg_MLEADER_Content_fields, sizeof (Dwg_MLEADER_Content) }, /* 90 */ - { "MLEADER_Content_Block", 0, NULL, _dwg_MLEADER_Content_Block_fields, sizeof (Dwg_MLEADER_Content_Block) }, /* 91 */ - { "MLEADER_Content_MText", 0, NULL, _dwg_MLEADER_Content_MText_fields, sizeof (Dwg_MLEADER_Content_MText) }, /* 92 */ - { "MLINESTYLE_line", (int)DWG_TYPE_MLINESTYLE, NULL, _dwg_MLINESTYLE_line_fields, sizeof (Dwg_MLINESTYLE_line) }, /* 93 */ - { "MLINE_line", (int)DWG_TYPE_MLINE, NULL, _dwg_MLINE_line_fields, sizeof (Dwg_MLINE_line) }, /* 94 */ - { "MLINE_vertex", (int)DWG_TYPE_MLINE, NULL, _dwg_MLINE_vertex_fields, sizeof (Dwg_MLINE_vertex) }, /* 95 */ - { "OCD_Dimension", 0, "AcDbDimensionObjectContextData", _dwg_OCD_Dimension_fields, sizeof (Dwg_OCD_Dimension) }, /* 96 */ - { "PARTIAL_VIEWING_INDEX_Entry", (int)DWG_TYPE_PARTIAL_VIEWING_INDEX, NULL, _dwg_PARTIAL_VIEWING_INDEX_Entry_fields, sizeof (Dwg_PARTIAL_VIEWING_INDEX_Entry) }, /* 97 */ - { "POINTCLOUDCOLORMAP_Ramp", (int)DWG_TYPE_POINTCLOUDCOLORMAP, NULL, _dwg_POINTCLOUDCOLORMAP_Ramp_fields, sizeof (Dwg_POINTCLOUDCOLORMAP_Ramp) }, /* 98 */ - { "POINTCLOUDEX_Croppings", (int)DWG_TYPE_POINTCLOUDEX, NULL, _dwg_POINTCLOUDEX_Croppings_fields, sizeof (Dwg_POINTCLOUDEX_Croppings) }, /* 99 */ - { "POINTCLOUD_Clippings", (int)DWG_TYPE_POINTCLOUD, NULL, _dwg_POINTCLOUD_Clippings_fields, sizeof (Dwg_POINTCLOUD_Clippings) }, /* 100 */ - { "POINTCLOUD_IntensityStyle", (int)DWG_TYPE_POINTCLOUD, NULL, _dwg_POINTCLOUD_IntensityStyle_fields, sizeof (Dwg_POINTCLOUD_IntensityStyle) }, /* 101 */ - { "PROXY_LWPOLYLINE", 0, NULL, _dwg_PROXY_LWPOLYLINE_fields, sizeof (Dwg_PROXY_LWPOLYLINE) }, /* 102 */ - { "R2004_Header", 0, NULL, _dwg_R2004_Header_fields, sizeof (Dwg_R2004_Header) }, /* 103 */ - { "SECTION_geometrysettings", 0, NULL, _dwg_SECTION_geometrysettings_fields, sizeof (Dwg_SECTION_geometrysettings) }, /* 104 */ - { "SECTION_typesettings", 0, NULL, _dwg_SECTION_typesettings_fields, sizeof (Dwg_SECTION_typesettings) }, /* 105 */ - { "SPLINE_control_point", (int)DWG_TYPE_SPLINE, NULL, _dwg_SPLINE_control_point_fields, sizeof (Dwg_SPLINE_control_point) }, /* 106 */ - { "SUNSTUDY_Dates", (int)DWG_TYPE_SUNSTUDY, NULL, _dwg_SUNSTUDY_Dates_fields, sizeof (Dwg_SUNSTUDY_Dates) }, /* 107 */ - { "SummaryInfo_Property", 0, NULL, _dwg_SummaryInfo_Property_fields, sizeof (Dwg_SummaryInfo_Property) }, /* 108 */ - { "TABLEGEOMETRY_Cell", (int)DWG_TYPE_TABLEGEOMETRY, NULL, _dwg_TABLEGEOMETRY_Cell_fields, sizeof (Dwg_TABLEGEOMETRY_Cell) }, /* 109 */ - { "TABLESTYLE_CellStyle", (int)DWG_TYPE_TABLESTYLE, NULL, _dwg_TABLESTYLE_CellStyle_fields, sizeof (Dwg_TABLESTYLE_CellStyle) }, /* 110 */ - { "TABLESTYLE_border", (int)DWG_TYPE_TABLESTYLE, NULL, _dwg_TABLESTYLE_border_fields, sizeof (Dwg_TABLESTYLE_border) }, /* 111 */ - { "TABLESTYLE_rowstyles", (int)DWG_TYPE_TABLESTYLE, NULL, _dwg_TABLESTYLE_rowstyles_fields, sizeof (Dwg_TABLESTYLE_rowstyles) }, /* 112 */ - { "TABLE_AttrDef", (int)DWG_TYPE_TABLE, NULL, _dwg_TABLE_AttrDef_fields, sizeof (Dwg_TABLE_AttrDef) }, /* 113 */ - { "TABLE_BreakHeight", (int)DWG_TYPE_TABLE, NULL, _dwg_TABLE_BreakHeight_fields, sizeof (Dwg_TABLE_BreakHeight) }, /* 114 */ - { "TABLE_BreakRow", (int)DWG_TYPE_TABLE, NULL, _dwg_TABLE_BreakRow_fields, sizeof (Dwg_TABLE_BreakRow) }, /* 115 */ - { "TABLE_Cell", (int)DWG_TYPE_TABLE, NULL, _dwg_TABLE_Cell_fields, sizeof (Dwg_TABLE_Cell) }, /* 116 */ - { "TABLE_CustomDataItem", (int)DWG_TYPE_TABLE, NULL, _dwg_TABLE_CustomDataItem_fields, sizeof (Dwg_TABLE_CustomDataItem) }, /* 117 */ - { "TABLE_value", (int)DWG_TYPE_TABLE, NULL, _dwg_TABLE_value_fields, sizeof (Dwg_TABLE_value) }, /* 118 */ - { "TableCell", 0, NULL, _dwg_TableCell_fields, sizeof (Dwg_TableCell) }, /* 119 */ - { "TableCellContent", 0, NULL, _dwg_TableCellContent_fields, sizeof (Dwg_TableCellContent) }, /* 120 */ - { "TableCellContent_Attr", 0, NULL, _dwg_TableCellContent_Attr_fields, sizeof (Dwg_TableCellContent_Attr) }, /* 121 */ - { "TableDataColumn", 0, NULL, _dwg_TableDataColumn_fields, sizeof (Dwg_TableDataColumn) }, /* 122 */ - { "TableRow", 0, NULL, _dwg_TableRow_fields, sizeof (Dwg_TableRow) }, /* 123 */ - { "UCS_orthopts", (int)DWG_TYPE_UCS, NULL, _dwg_UCS_orthopts_fields, sizeof (Dwg_UCS_orthopts) }, /* 124 */ - { "VALUEPARAM", 0, NULL, _dwg_VALUEPARAM_fields, sizeof (Dwg_VALUEPARAM) }, /* 125 */ - { "VALUEPARAM_vars", 0, NULL, _dwg_VALUEPARAM_vars_fields, sizeof (Dwg_VALUEPARAM_vars) }, /* 126 */ + { "BLOCKSTRETCHACTION_handle_indices", (int)DWG_TYPE_BLOCKSTRETCHACTION, NULL, _dwg_BLOCKSTRETCHACTION_handle_indices_fields, sizeof (Dwg_BLOCKSTRETCHACTION_handle_indices) }, /* 42 */ + { "BLOCKSTRETCHACTION_handles", (int)DWG_TYPE_BLOCKSTRETCHACTION, NULL, _dwg_BLOCKSTRETCHACTION_handles_fields, sizeof (Dwg_BLOCKSTRETCHACTION_handles) }, /* 43 */ + { "BLOCKVISIBILITYPARAMETER_state", (int)DWG_TYPE_BLOCKVISIBILITYPARAMETER, NULL, _dwg_BLOCKVISIBILITYPARAMETER_state_fields, sizeof (Dwg_BLOCKVISIBILITYPARAMETER_state) }, /* 44 */ + { "COMPOUNDOBJECTID", 0, NULL, _dwg_COMPOUNDOBJECTID_fields, sizeof (Dwg_COMPOUNDOBJECTID) }, /* 45 */ + { "CONSTRAINTGROUPNODE", 0, NULL, _dwg_CONSTRAINTGROUPNODE_fields, sizeof (Dwg_CONSTRAINTGROUPNODE) }, /* 46 */ + { "CONTEXTDATA_dict", 0, NULL, _dwg_CONTEXTDATA_dict_fields, sizeof (Dwg_CONTEXTDATA_dict) }, /* 47 */ + { "CONTEXTDATA_submgr", 0, NULL, _dwg_CONTEXTDATA_submgr_fields, sizeof (Dwg_CONTEXTDATA_submgr) }, /* 48 */ + { "CellContentGeometry", 0, NULL, _dwg_CellContentGeometry_fields, sizeof (Dwg_CellContentGeometry) }, /* 49 */ + { "CellStyle", 0, NULL, _dwg_CellStyle_fields, sizeof (Dwg_CellStyle) }, /* 50 */ + { "ColorRamp", 0, NULL, _dwg_ColorRamp_fields, sizeof (Dwg_ColorRamp) }, /* 51 */ + { "ContentFormat", 0, NULL, _dwg_ContentFormat_fields, sizeof (Dwg_ContentFormat) }, /* 52 */ + { "DATALINK_customdata", (int)DWG_TYPE_DATALINK, NULL, _dwg_DATALINK_customdata_fields, sizeof (Dwg_DATALINK_customdata) }, /* 53 */ + { "DATATABLE_column", (int)DWG_TYPE_DATATABLE, NULL, _dwg_DATATABLE_column_fields, sizeof (Dwg_DATATABLE_column) }, /* 54 */ + { "DATATABLE_row", (int)DWG_TYPE_DATATABLE, NULL, _dwg_DATATABLE_row_fields, sizeof (Dwg_DATATABLE_row) }, /* 55 */ + { "DIMASSOC_Ref", (int)DWG_TYPE_DIMASSOC, NULL, _dwg_DIMASSOC_Ref_fields, sizeof (Dwg_DIMASSOC_Ref) }, /* 56 */ + { "DIMENSION_common", 0, "AcDbDimension", _dwg_DIMENSION_common_fields, sizeof (Dwg_DIMENSION_common) }, /* 57 */ + { "EVAL_Edge", 0, NULL, _dwg_EVAL_Edge_fields, sizeof (Dwg_EVAL_Edge) }, /* 58 */ + { "EVAL_Node", 0, NULL, _dwg_EVAL_Node_fields, sizeof (Dwg_EVAL_Node) }, /* 59 */ + { "EvalExpr", 0, NULL, _dwg_EvalExpr_fields, sizeof (Dwg_EvalExpr) }, /* 60 */ + { "EvalVariant", 0, NULL, _dwg_EvalVariant_fields, sizeof (Dwg_EvalVariant) }, /* 61 */ + { "FIELD_ChildValue", (int)DWG_TYPE_FIELD, NULL, _dwg_FIELD_ChildValue_fields, sizeof (Dwg_FIELD_ChildValue) }, /* 62 */ + { "FileDepList_Files", 0, NULL, _dwg_FileDepList_Files_fields, sizeof (Dwg_FileDepList_Files) }, /* 63 */ + { "FormattedTableData", 0, NULL, _dwg_FormattedTableData_fields, sizeof (Dwg_FormattedTableData) }, /* 64 */ + { "FormattedTableMerged", 0, NULL, _dwg_FormattedTableMerged_fields, sizeof (Dwg_FormattedTableMerged) }, /* 65 */ + { "GEODATA_meshface", (int)DWG_TYPE_GEODATA, NULL, _dwg_GEODATA_meshface_fields, sizeof (Dwg_GEODATA_meshface) }, /* 66 */ + { "GEODATA_meshpt", (int)DWG_TYPE_GEODATA, NULL, _dwg_GEODATA_meshpt_fields, sizeof (Dwg_GEODATA_meshpt) }, /* 67 */ + { "GridFormat", 0, NULL, _dwg_GridFormat_fields, sizeof (Dwg_GridFormat) }, /* 68 */ + { "HATCH_Color", (int)DWG_TYPE_HATCH, NULL, _dwg_HATCH_Color_fields, sizeof (Dwg_HATCH_Color) }, /* 69 */ + { "HATCH_ControlPoint", (int)DWG_TYPE_HATCH, NULL, _dwg_HATCH_ControlPoint_fields, sizeof (Dwg_HATCH_ControlPoint) }, /* 70 */ + { "HATCH_DefLine", (int)DWG_TYPE_HATCH, NULL, _dwg_HATCH_DefLine_fields, sizeof (Dwg_HATCH_DefLine) }, /* 71 */ + { "HATCH_Path", (int)DWG_TYPE_HATCH, NULL, _dwg_HATCH_Path_fields, sizeof (Dwg_HATCH_Path) }, /* 72 */ + { "HATCH_PathSeg", (int)DWG_TYPE_HATCH, NULL, _dwg_HATCH_PathSeg_fields, sizeof (Dwg_HATCH_PathSeg) }, /* 73 */ + { "HATCH_PolylinePath", (int)DWG_TYPE_HATCH, NULL, _dwg_HATCH_PolylinePath_fields, sizeof (Dwg_HATCH_PolylinePath) }, /* 74 */ + { "LAYER_entry", (int)DWG_TYPE_LAYER, NULL, _dwg_LAYER_entry_fields, sizeof (Dwg_LAYER_entry) }, /* 75 */ + { "LEADER_ArrowHead", (int)DWG_TYPE_LEADER, NULL, _dwg_LEADER_ArrowHead_fields, sizeof (Dwg_LEADER_ArrowHead) }, /* 76 */ + { "LEADER_BlockLabel", (int)DWG_TYPE_LEADER, NULL, _dwg_LEADER_BlockLabel_fields, sizeof (Dwg_LEADER_BlockLabel) }, /* 77 */ + { "LEADER_Break", (int)DWG_TYPE_LEADER, NULL, _dwg_LEADER_Break_fields, sizeof (Dwg_LEADER_Break) }, /* 78 */ + { "LEADER_Line", (int)DWG_TYPE_LEADER, NULL, _dwg_LEADER_Line_fields, sizeof (Dwg_LEADER_Line) }, /* 79 */ + { "LEADER_Node", (int)DWG_TYPE_LEADER, NULL, _dwg_LEADER_Node_fields, sizeof (Dwg_LEADER_Node) }, /* 80 */ + { "LIGHTLIST_light", (int)DWG_TYPE_LIGHTLIST, NULL, _dwg_LIGHTLIST_light_fields, sizeof (Dwg_LIGHTLIST_light) }, /* 81 */ + { "LTYPE_dash", (int)DWG_TYPE_LTYPE, NULL, _dwg_LTYPE_dash_fields, sizeof (Dwg_LTYPE_dash) }, /* 82 */ + { "LWPOLYLINE_width", (int)DWG_TYPE_LWPOLYLINE, NULL, _dwg_LWPOLYLINE_width_fields, sizeof (Dwg_LWPOLYLINE_width) }, /* 83 */ + { "LinkedData", 0, NULL, _dwg_LinkedData_fields, sizeof (Dwg_LinkedData) }, /* 84 */ + { "LinkedTableData", 0, NULL, _dwg_LinkedTableData_fields, sizeof (Dwg_LinkedTableData) }, /* 85 */ + { "MATERIAL_color", (int)DWG_TYPE_MATERIAL, NULL, _dwg_MATERIAL_color_fields, sizeof (Dwg_MATERIAL_color) }, /* 86 */ + { "MATERIAL_gentexture", (int)DWG_TYPE_MATERIAL, NULL, _dwg_MATERIAL_gentexture_fields, sizeof (Dwg_MATERIAL_gentexture) }, /* 87 */ + { "MATERIAL_mapper", (int)DWG_TYPE_MATERIAL, NULL, _dwg_MATERIAL_mapper_fields, sizeof (Dwg_MATERIAL_mapper) }, /* 88 */ + { "MESH_edge", (int)DWG_TYPE_MESH, NULL, _dwg_MESH_edge_fields, sizeof (Dwg_MESH_edge) }, /* 89 */ + { "MLEADER_AnnotContext", 0, "AcDbMLeaderAnnotContext", _dwg_MLEADER_AnnotContext_fields, sizeof (Dwg_MLEADER_AnnotContext) }, /* 90 */ + { "MLEADER_Content", 0, NULL, _dwg_MLEADER_Content_fields, sizeof (Dwg_MLEADER_Content) }, /* 91 */ + { "MLEADER_Content_Block", 0, NULL, _dwg_MLEADER_Content_Block_fields, sizeof (Dwg_MLEADER_Content_Block) }, /* 92 */ + { "MLEADER_Content_MText", 0, NULL, _dwg_MLEADER_Content_MText_fields, sizeof (Dwg_MLEADER_Content_MText) }, /* 93 */ + { "MLINESTYLE_line", (int)DWG_TYPE_MLINESTYLE, NULL, _dwg_MLINESTYLE_line_fields, sizeof (Dwg_MLINESTYLE_line) }, /* 94 */ + { "MLINE_line", (int)DWG_TYPE_MLINE, NULL, _dwg_MLINE_line_fields, sizeof (Dwg_MLINE_line) }, /* 95 */ + { "MLINE_vertex", (int)DWG_TYPE_MLINE, NULL, _dwg_MLINE_vertex_fields, sizeof (Dwg_MLINE_vertex) }, /* 96 */ + { "OCD_Dimension", 0, "AcDbDimensionObjectContextData", _dwg_OCD_Dimension_fields, sizeof (Dwg_OCD_Dimension) }, /* 97 */ + { "PARTIAL_VIEWING_INDEX_Entry", (int)DWG_TYPE_PARTIAL_VIEWING_INDEX, NULL, _dwg_PARTIAL_VIEWING_INDEX_Entry_fields, sizeof (Dwg_PARTIAL_VIEWING_INDEX_Entry) }, /* 98 */ + { "POINTCLOUDCOLORMAP_Ramp", (int)DWG_TYPE_POINTCLOUDCOLORMAP, NULL, _dwg_POINTCLOUDCOLORMAP_Ramp_fields, sizeof (Dwg_POINTCLOUDCOLORMAP_Ramp) }, /* 99 */ + { "POINTCLOUDEX_Croppings", (int)DWG_TYPE_POINTCLOUDEX, NULL, _dwg_POINTCLOUDEX_Croppings_fields, sizeof (Dwg_POINTCLOUDEX_Croppings) }, /* 100 */ + { "POINTCLOUD_Clippings", (int)DWG_TYPE_POINTCLOUD, NULL, _dwg_POINTCLOUD_Clippings_fields, sizeof (Dwg_POINTCLOUD_Clippings) }, /* 101 */ + { "POINTCLOUD_IntensityStyle", (int)DWG_TYPE_POINTCLOUD, NULL, _dwg_POINTCLOUD_IntensityStyle_fields, sizeof (Dwg_POINTCLOUD_IntensityStyle) }, /* 102 */ + { "PROXY_LWPOLYLINE", 0, NULL, _dwg_PROXY_LWPOLYLINE_fields, sizeof (Dwg_PROXY_LWPOLYLINE) }, /* 103 */ + { "R2004_Header", 0, NULL, _dwg_R2004_Header_fields, sizeof (Dwg_R2004_Header) }, /* 104 */ + { "SECTION_geometrysettings", 0, NULL, _dwg_SECTION_geometrysettings_fields, sizeof (Dwg_SECTION_geometrysettings) }, /* 105 */ + { "SECTION_typesettings", 0, NULL, _dwg_SECTION_typesettings_fields, sizeof (Dwg_SECTION_typesettings) }, /* 106 */ + { "SPLINE_control_point", (int)DWG_TYPE_SPLINE, NULL, _dwg_SPLINE_control_point_fields, sizeof (Dwg_SPLINE_control_point) }, /* 107 */ + { "SUNSTUDY_Dates", (int)DWG_TYPE_SUNSTUDY, NULL, _dwg_SUNSTUDY_Dates_fields, sizeof (Dwg_SUNSTUDY_Dates) }, /* 108 */ + { "SummaryInfo_Property", 0, NULL, _dwg_SummaryInfo_Property_fields, sizeof (Dwg_SummaryInfo_Property) }, /* 109 */ + { "TABLEGEOMETRY_Cell", (int)DWG_TYPE_TABLEGEOMETRY, NULL, _dwg_TABLEGEOMETRY_Cell_fields, sizeof (Dwg_TABLEGEOMETRY_Cell) }, /* 110 */ + { "TABLESTYLE_CellStyle", (int)DWG_TYPE_TABLESTYLE, NULL, _dwg_TABLESTYLE_CellStyle_fields, sizeof (Dwg_TABLESTYLE_CellStyle) }, /* 111 */ + { "TABLESTYLE_border", (int)DWG_TYPE_TABLESTYLE, NULL, _dwg_TABLESTYLE_border_fields, sizeof (Dwg_TABLESTYLE_border) }, /* 112 */ + { "TABLESTYLE_rowstyles", (int)DWG_TYPE_TABLESTYLE, NULL, _dwg_TABLESTYLE_rowstyles_fields, sizeof (Dwg_TABLESTYLE_rowstyles) }, /* 113 */ + { "TABLE_AttrDef", (int)DWG_TYPE_TABLE, NULL, _dwg_TABLE_AttrDef_fields, sizeof (Dwg_TABLE_AttrDef) }, /* 114 */ + { "TABLE_BreakHeight", (int)DWG_TYPE_TABLE, NULL, _dwg_TABLE_BreakHeight_fields, sizeof (Dwg_TABLE_BreakHeight) }, /* 115 */ + { "TABLE_BreakRow", (int)DWG_TYPE_TABLE, NULL, _dwg_TABLE_BreakRow_fields, sizeof (Dwg_TABLE_BreakRow) }, /* 116 */ + { "TABLE_Cell", (int)DWG_TYPE_TABLE, NULL, _dwg_TABLE_Cell_fields, sizeof (Dwg_TABLE_Cell) }, /* 117 */ + { "TABLE_CustomDataItem", (int)DWG_TYPE_TABLE, NULL, _dwg_TABLE_CustomDataItem_fields, sizeof (Dwg_TABLE_CustomDataItem) }, /* 118 */ + { "TABLE_value", (int)DWG_TYPE_TABLE, NULL, _dwg_TABLE_value_fields, sizeof (Dwg_TABLE_value) }, /* 119 */ + { "TableCell", 0, NULL, _dwg_TableCell_fields, sizeof (Dwg_TableCell) }, /* 120 */ + { "TableCellContent", 0, NULL, _dwg_TableCellContent_fields, sizeof (Dwg_TableCellContent) }, /* 121 */ + { "TableCellContent_Attr", 0, NULL, _dwg_TableCellContent_Attr_fields, sizeof (Dwg_TableCellContent_Attr) }, /* 122 */ + { "TableDataColumn", 0, NULL, _dwg_TableDataColumn_fields, sizeof (Dwg_TableDataColumn) }, /* 123 */ + { "TableRow", 0, NULL, _dwg_TableRow_fields, sizeof (Dwg_TableRow) }, /* 124 */ + { "UCS_orthopts", (int)DWG_TYPE_UCS, NULL, _dwg_UCS_orthopts_fields, sizeof (Dwg_UCS_orthopts) }, /* 125 */ + { "VALUEPARAM", 0, NULL, _dwg_VALUEPARAM_fields, sizeof (Dwg_VALUEPARAM) }, /* 126 */ + { "VALUEPARAM_vars", 0, NULL, _dwg_VALUEPARAM_vars_fields, sizeof (Dwg_VALUEPARAM_vars) }, /* 127 */ }; diff --git a/src/in_dxf.c b/src/in_dxf.c index 222305459..14406a85a 100644 --- a/src/in_dxf.c +++ b/src/in_dxf.c @@ -7867,18 +7867,29 @@ add_AcDbBlockStretchAction (Dwg_Object *restrict obj, Bit_Chain *restrict dat) dxf_free_pair (pair); pair = dxf_read_pair (dat); - EXPECT_DXF (obj->name, o->hdls[i].bs74, 74); - o->hdls[i].bs74 = pair->value.i; - LOG_TRACE ("%s.hdls[%d].bs74 = %u [BS 74]\n", obj->name, i, - (unsigned)o->hdls[i].bs74); + EXPECT_DXF (obj->name, o->hdls[i].num_index, 74); + o->hdls[i].num_index = pair->value.i; + LOG_TRACE ("%s.hdls[%d].num_index = %u [BS 74]\n", obj->name, i, + (unsigned)o->hdls[i].num_index); dxf_free_pair (pair); - pair = dxf_read_pair (dat); - EXPECT_DXF (obj->name, o->hdls[i].bl94, 94); - o->hdls[i].bl94 = pair->value.u; - LOG_TRACE ("%s.hdls[%d].bl94 = %u [BL 94]\n", obj->name, i, - (unsigned)o->hdls[i].bl94); - dxf_free_pair (pair); + if (o->hdls[i].num_index) + { + o->hdls[i].indices = (Dwg_BLOCKSTRETCHACTION_handle_indices *)xcalloc ( + o->hdls[i].num_index, sizeof (Dwg_BLOCKSTRETCHACTION_handle_indices)); + if (!o->hdls[i].indices) + return pair; + for (unsigned j = 0; j < o->hdls[i].num_index; j++) + { + pair = dxf_read_pair (dat); + EXPECT_DXF (obj->name, o->hdls[i].indices[j], 94); + o->hdls[i].indices[j].index = pair->value.u; + LOG_TRACE ("%s.hdls[%d].indices[%d] = %u [BL 94]\n", obj->name, i, j, + (unsigned)o->hdls[i].indices[j].index); + dxf_free_pair (pair); + } + } + } } diff --git a/test/unit-testing/dynapi_test.c b/test/unit-testing/dynapi_test.c index d627b1d26..14199d294 100644 --- a/test/unit-testing/dynapi_test.c +++ b/test/unit-testing/dynapi_test.c @@ -42987,6 +42987,21 @@ static int test_BLOCKSTRETCHACTION (const Dwg_Object *obj) fail ("BLOCKSTRETCHACTION.be_minor [BL] set+1 %u != %u", blockstretchaction->be_minor, be_minor); blockstretchaction->be_minor--; } + { + BITCODE_BL bl94; + if (dwg_dynapi_entity_value (blockstretchaction, "BLOCKSTRETCHACTION", "bl94", &bl94, NULL) + && bl94 == blockstretchaction->bl94) + pass (); + else + fail ("BLOCKSTRETCHACTION.bl94 [BL] %u != %u", blockstretchaction->bl94, bl94); + bl94++; + if (dwg_dynapi_entity_set_value (blockstretchaction, "BLOCKSTRETCHACTION", "bl94", &bl94, 0) + && bl94 == blockstretchaction->bl94) + pass (); + else + fail ("BLOCKSTRETCHACTION.bl94 [BL] set+1 %u != %u", blockstretchaction->bl94, bl94); + blockstretchaction->bl94--; + } { Dwg_BLOCKSTRETCHACTION_codes* codes; BITCODE_BL count = 0; @@ -67931,6 +67946,14 @@ test_sizes (void) "dwg_dynapi_fields_size (\"BLOCKSTRETCHACTION_codes\"): %d\n", size1, size2); error++; } + size1 = sizeof (struct _dwg_BLOCKSTRETCHACTION_handle_indices); + size2 = dwg_dynapi_fields_size ("BLOCKSTRETCHACTION_handle_indices"); + if (size1 != size2) + { + fprintf (stderr, "sizeof(struct _dwg_BLOCKSTRETCHACTION_handle_indices): %d != " + "dwg_dynapi_fields_size (\"BLOCKSTRETCHACTION_handle_indices\"): %d\n", size1, size2); + error++; + } size1 = sizeof (struct _dwg_BLOCKSTRETCHACTION_handles); size2 = dwg_dynapi_fields_size ("BLOCKSTRETCHACTION_handles"); if (size1 != size2)