将SPLINE添加到DXF会导致文件损坏(内容未显示)

时间:2017-11-20 11:49:27

标签: freepascal dxf

我正在使用自己的DXF编写器,因为我只需要某些元素(例如LINE,POLYLINE,POINT和SPLINE)。

我从tfpdxfbridge开始,其想法也包括SPLINE支持。当我尝试手动将SPLINE添加到* .dxf文件中的ENTITIES时,该文件不再打开。 SPLINE示例:

    SPLINE
  5
274
330
1F
100
AcDbEntity
  8
0
100
AcDbSpline
210
0.0
220
0.0
230
1.0
 70
     8
 71
     3
 72
     9
 73
     5
 74
     0
 42
0.0000000001
 43
0.0000000001
 40
0.0
 40
0.0
 40
0.0
 40
0.0
 40
1.0
 40
2.0
 40
2.0
 40
2.0
 40
2.0
 10
747.2822841342859
 20
1453.676625339077
 30
0.0
 10
1364.898523055965
 20
2324.178049512178
 30
0.0
 10
2830.924436828291
 20
1999.364085075557
 30
0.0
 10
1130.854480067877
 20
862.5152127789023
 30
0.0
 10
2837.42565094653
 20
791.0561394394999
 30
0.0
  0

是否有人知道问题可能是什么或如何使文件再次运作?

以下是使用tfpdxfbridge生成的完整文件(显然除了SPLINE部分)。

0
SECTION
2
HEADER
999
Generator: TFPDxfWriteBridge
999
By jmpessoa@hotmail.com
9
$DIMASZ
40
0.1800
9
$DIMTSZ
40
0
9
$DIMGAP
40
0.0900
9
$DIMEXO
40
0.0625
9
$DIMDLI
40
0.38
9
$DIMDLE
40
0.0
9
$DIMEXE
40
0.1800
9
$DIMTXT
40
0.1800
9
$DIMTXTDIRECTION
70
0
9
$DIMTIH
70
1
9
$DIMTAD
70
0
9
$DIMCLRD
70
256
9
$DIMCLRE
70
256
9
$DIMCLRT
70
256
9
$DIMASO
70
1
9
$DIMASSOC
280
2
9
$DIMSHO
70
0
9
$DIMLUNIT
70
2
9
$DIMDEC
70
4
9
$DIMADEC
70
2
9
$INSBASE
10
0.0
20
0.0
30
0.0
9
$EXTMIN
10
0.0
20
0.0
9
$EXTMAX
10
3200.0
20
3200.0
9
$LINMIN
10
0.0
20
0.0
9
$LINMAX
10
3200.0
20
3200.0
0
ENDSEC
0
SECTION
2
TABLES
0
TABLE
2
LTYPE
70
8
100
AcDbSymbolTable
100
AcDbLTypeTable
0
LTYPE
2
CONTINUOUS
100
AcDbSymbolTableRecord
100
AcDbLinetypeTableRecord
3
____________
72
65
73
0
40
0.000
70
0
0
LTYPE
2
HIDDEN
100
AcDbSymbolTableRecord
100
AcDbLinetypeTableRecord
3
__ __ __ 
72
65
73
2
40
0.375
49
0.250
49
-0.125
70
0
0
LTYPE
2
CENTER
100
AcDbSymbolTableRecord
100
AcDbLinetypeTableRecord
3
____ _ ____ _ 
72
65
73
4
40
2.000
49
1.250
49
-0.250
49
0.250
49
-0.250
70
0
0
LTYPE
2
DOT
100
AcDbSymbolTableRecord
100
AcDbLinetypeTableRecord
3
. . . . . 
72
65
73
2
40
0.250
49
0.000
49
-0.250
70
0
0
LTYPE
2
DASHDOT
100
AcDbSymbolTableRecord
100
AcDbLinetypeTableRecord
3
__ . __ . 
72
65
73
4
40
1.000
49
0.500
49
-0.250
49
0.000
49
-0.250
70
0
0
LTYPE
2
DIVIDE
100
AcDbSymbolTableRecord
100
AcDbLinetypeTableRecord
3
____ . . ____ . . 
72
65
73
6
40
1.250
49
0.500
49
-0.250
49
0.000
49
-0.250
49
0.000
49
-0.250
70
0
0
LTYPE
2
BORDER
100
AcDbSymbolTableRecord
100
AcDbLinetypeTableRecord
3
__ __ . __ __ . 
72
65
73
6
40
1.750
49
0.500
49
-0.250
49
0.500
49
-0.250
49
0.000
49
-0.250
70
0
0
LTYPE
2
MJLINE
100
AcDbSymbolTableRecord
100
AcDbLinetypeTableRecord
3
__ __ __ 
72
65
73
2
40
0.375
49
0.250
49
-0.125
70
0
0
ENDTAB
0
TABLE
2
STYLE
70
2
100
AcDbSymbolTable
100
AcDbStyleTable
0
STYLE
2
DEFAULT
71
0
40
0.00
42
1.00
50
0.00
41
1.00
3
ARIAL.TTF
100
AcDbSymbolTableRecord
100
AcDbTextStyleTableRecord
70
0
0
STYLE
2
ISOCPEUR
71
0
40
0.00
42
1.00
50
0.00
41
1.00
3
isocpeur.ttf
100
AcDbSymbolTableRecord
100
AcDbTextStyleTableRecord
70
0
0
ENDTAB
0
TABLE
2
LAYER
70
9
100
AcDbSymbolTable
100
AcDbLayerTable
0
LAYER
100
AcDbSymbolTableRecord
100
AcDbLayerTableRecord
2
0
70
0
62
7
6
CONTINUOUS
0
LAYER
100
AcDbSymbolTableRecord
100
AcDbLayerTableRecord
2
HIDDEN_YELLOW
70
0
62
2
6
HIDDEN
0
LAYER
100
AcDbSymbolTableRecord
100
AcDbLayerTableRecord
2
CENTER_RED
70
0
62
1
6
CENTER
0
LAYER
100
AcDbSymbolTableRecord
100
AcDbLayerTableRecord
2
DOT_GREEN
70
0
62
3
6
DOT
0
LAYER
100
AcDbSymbolTableRecord
100
AcDbLayerTableRecord
2
DASHDOT_CYAN
70
0
62
4
6
DASHDOT
0
LAYER
100
AcDbSymbolTableRecord
100
AcDbLayerTableRecord
2
DIVIDE_BLUE
70
0
62
5
6
DIVIDE
0
LAYER
100
AcDbSymbolTableRecord
100
AcDbLayerTableRecord
2
BORDER_MAGENTA
70
0
62
6
6
BORDER
0
LAYER
100
AcDbSymbolTableRecord
100
AcDbLayerTableRecord
2
CONTINUOUS_GRAY
70
0
62
8
6
CONTINUOUS
0
LAYER
100
AcDbSymbolTableRecord
100
AcDbLayerTableRecord
2
MYLAYER
70
0
62
5
6
MJLINE
0
ENDTAB
0
TABLE
2
DIMSTYLE
70
2
100
AcDbSymbolTable
100
AcDbDimStyleTable
0
DIMSTYLE
100
AcDbSymbolTableRecord
100
AcDbDimStyleTableRecord
2
GENERIC
70
0
77
0
176
256
177
256
178
256
41
0.18
46
0.00
44
0.18
42
0.06
147
0.09
140
0.18
3

4

5

6

7

40
1.0
43
0.38
45
0.0
47
0.0
48
0.0
141
0.09
142
0.0
143
25.39999
144
1.0
145
0.0
146
1.0
71
0
72
0
73
1
74
1
75
0
76
0
78
0
170
0
171
2
172
0
173
0
174
0
175
0
0
DIMSTYLE
100
AcDbSymbolTableRecord
100
AcDbDimStyleTableRecord
2
CUSTOM
70
0
77
0
176
3
177
3
178
3
41
0.18
46
0.00
44
0.18
42
0.06
147
0.09
140
0.18
3

4

5

6

7

40
1.0
43
0.38
45
0.0
47
0.0
48
0.0
141
0.09
142
0.0
143
25.39999
144
1.0
145
0.0
146
1.0
71
0
72
0
73
1
74
1
75
0
76
0
78
0
170
0
171
2
172
0
173
0
174
0
175
0
0
ENDTAB
0
ENDSEC
0
SECTION
2
BLOCKS
0
ENDSEC
0
SECTION
2
ENTITIES
0
CIRCLE
100
AcDbEntity
8
BORDER_MAGENTA
62
256
6
BYLAYER
39
0.00
100
AcDbCircle
10
6.00
20
4.00
30
0.00
40
1.20
0
ARC
100
AcDbEntity
8
MYLAYER
62
256
6
BYLAYER
39
0.00
100
AcDbCircle
10
10.00
20
6.00
30
0.00
40
1.20
100
AcDbArc
50
10.00
51
80.00
0
POLYLINE
100
AcDbEntity
8
MYLAYER
62
256
6
BYLAYER
100
AcDb2dPolyline
70
0
66
1
0
VERTEX
100
AcDbEntity
8
MYLAYER
62
256
6
BYLAYER
39
0.00
100
AcDbVertex
100
AcDb2dVertex
10
0.00
20
0.00
30
0.0
0
VERTEX
100
AcDbEntity
8
MYLAYER
62
256
6
BYLAYER
39
0.00
100
AcDbVertex
100
AcDb2dVertex
10
0.00
20
3.00
30
0.0
0
VERTEX
100
AcDbEntity
8
MYLAYER
62
256
6
BYLAYER
39
0.00
100
AcDbVertex
100
AcDb2dVertex
10
1.50
20
1.50
30
0.0
0
VERTEX
100
AcDbEntity
8
MYLAYER
62
256
6
BYLAYER
39
0.00
100
AcDbVertex
100
AcDb2dVertex
10
3.00
20
3.00
30
0.0
0
VERTEX
100
AcDbEntity
8
MYLAYER
62
256
6
BYLAYER
39
0.00
100
AcDbVertex
100
AcDb2dVertex
10
3.00
20
0.00
30
0.0
0
SEQEND
0
POLYLINE
100
AcDbEntity
8
DOT_GREEN
62
256
6
BYLAYER
100
AcDb2dPolyline
70
1
66
1
0
VERTEX
100
AcDbEntity
8
DOT_GREEN
62
256
6
BYLAYER
39
0.00
100
AcDbVertex
100
AcDb2dVertex
10
-1.00
20
-1.00
30
0.0
0
VERTEX
100
AcDbEntity
8
DOT_GREEN
62
256
6
BYLAYER
39
0.00
100
AcDbVertex
100
AcDb2dVertex
10
-1.00
20
4.00
30
0.0
0
VERTEX
100
AcDbEntity
8
DOT_GREEN
62
256
6
BYLAYER
39
0.00
100
AcDbVertex
100
AcDb2dVertex
10
4.00
20
4.00
30
0.0
0
VERTEX
100
AcDbEntity
8
DOT_GREEN
62
256
6
BYLAYER
39
0.00
100
AcDbVertex
100
AcDb2dVertex
10
5.00
20
-3.00
30
0.0
0
SEQEND
0
ENDSEC
0
EOF

0 个答案:

没有答案