Submit manuscript...
Journal of
eISSN: 2574-8114

Textile Engineering & Fashion Technology

Research Article Volume 1 Issue 4

The Research of outputting iges file of fabric geometry

Tianyong Zheng, Jing Wei

School of Textile Engineering, Zhongyuan University of Technology, China

Correspondence: Tianyong Zheng, School of Textile Engineering, Zhongyuan University of Technology, No 41, Zhongyuan Road (Middle), Zhengzhou City, Henan Prov., China, Tel 0086 3716 2506 976

Received: March 27, 2017 | Published: April 10, 2017

Citation: Zheng T, Wei J. The research of outputting IGES file of fabric geometry. J Textile Eng Fashion Techno. 2017;1(4):115-119. DOI: 10.15406/jteft.2017.01.00021

Download PDF

Abstract

Most of the fabric CAD systems lack the function of exchanging or outputting the accurate geometry structure of the fabric. In this research, the geometric structure of the yarn and the fabric modeled by B-spline surface are tried to be saved in IGES file for exchanging the information. IGES format is one of the most widely used file formats in graphics exchange; most of the entities are mentioned in the standard. In this paper, the file format of yarn and fabric structure is transferred from a special TXT to IGES. In the special TXT file, a yarn only has yarn body data modeled by B-spline surface; it will be transferred into hollow tube when opened by other 3D entity software browser. Therefore, 2 end faces are also modeled by B-spline surface to cover the hollow tube to ensure the yarn body to be sealed. Thus, 3 NURBS entities are required to write in an IGES file to form a complete yarn. To give an example, 4 yarns which construct a plain weave fabric are written in an IGES file and are opened by Pro/E. The result shows that the 3D information of the fabric structure can be progressed by other software.

Keywords: 3d simulation, fabric structure, b-spline surface, iges file, fabric geometry, geometrical structure, woven fabrics, geometrical configuration, revised algorithm, knitted fabrics, b-spline curve, yarn, parameter data line count, polygon, weave fabric entity

Abbreviations

3D, 3 dimensional; NURBS, non-uniform rational b-splines; IGES, initial graphics exchange specification; CAD, computer aided design; CAM, computer aided manufacturing; FEM, finite element

Introduction

The geometrical structure of the woven fabrics, knitted fabrics or braided fabrics affects the physical properties of the fabric to a great extent. In order to predict the properties of the component made of fabric, the fabric geometry usually has to be modeled manually in some special finite element (FEM) software such as ANSYS and ABAQUS.1,2 Obviously, it is a tedious process and the worse thing is that the 3D model of fabric geometric structure by hand is not accurate. There is a lot of CAD software3,4 that can simulate the 3D model of the fabric geometry, but they lack of modeling the 3D geometry of the fabric of various yarns with changing cross-sections. However, the yarns in the fabric must be pressed to irregular shape. In other words, the geometric structure might not be accurate enough. Therefore, the purpose of the paper is to study how to output a standard and universal accepted 3D file (such as IGES 5.3 or STEP format) that can accurately describe the fabric geometric structure.

Format of the existing woven structure

Fabric structure based on B-spline curve technology

Most fabrics are composed of yarns; therefore, the 3D geometrical configuration of the yarn has to be modeled before the 3D geometrical structure of the fabrics is to be modeled. After each yarn has been modeled, the fabric structure will be modeled as well. In this research, the yarns or fabric will be modeled based on B-spline curve technology.5 B-spline curve and surface are defined by Riesenfeld, see Pigel.6 In order to give a robust and accurate result, shape preserving cubic B-spline curve is used to model the yarn along its central line while quasi quadratic B-spline curve for the cross-section of the yarn are based on the algorithm by Zheng.7

There are many algorithms to calculate the geometry of the fabrics. Peirce model8 were universal accepted for woven structure, Zheng9 proposed a revised algorithm based on progressive iteration of spring-slide model. As for the knitted fabrics and the braided fabrics, they have their special calculating model.10,11 Whatever the type of the fabric, the positions of the central points and the shapes of the cross-section of all the control key points for a single yarn have to be determined, and the geometric structure of the yarn and then the fabric will be reconstructed and imitated by B-spline surface.

TXT format file of free yarn or fabric

Zheng7 proposed a '.txt' 3D file format for yarn and fabric which can be edited by Notebook or Office. In the file, the thickness, twist, color, number of the yarns, property of the yarn (warp or weft), the grid of the control points by the central line and the cross-section are recorded. As for the format of '.txt', see Zheng.7 The following is a typical file of 3D fabric structure in '.txt' file format as shown in Figure 1.

From the file, it can be concluded that there are 3 yarns. All the yarns are 30tex, the diameters are all 0.0912mm, and all the yarns are controlled by 6 cross-sections. To the first yarn, the color components are 200 for Red, 205 for Green and 0 for Blue respectively.

Figure 1 Structure of the yarn of fabric data in a '.txt' file format.

Format of the IGES 5.3 file for 3D objects

The Initial Graphics Exchange Specification (IGES) is defined as ANSI standard to exchange the information from different Computer-Aided Design (CAD) & Computer-Aided Manufacturing (CAM) systems. The latest version is IGES 5.3.12

IGES file consists of 80-column lines which are grouped into 5 sections. Each line contains section-specific data field(s) in columns 1-72, an identifying letter code in column 72, and an ascending sequence number in columns from 74 to 80. Within each section, the sequence No. starts at 1 and is increased by 1 for each line. All the sections in the IGES shall appear in the following order as shown in Table 1.

1--8

9--16

17--24

25--32

33--40

41--48

49--56

57--64

65--72

73--80

Start Section: Annotation of the file, it can be empty.

S 1

S a

Global Section: Information of sending system.

G 1

G b

Directory entry Section: Index of parameter section and entity information.

D 1

D 2

Parameter Section: Entity data.

P 1

P 2

...

P c

Terminate Section: Line count of every part.

empty

T 1

Table 1 Structure of IGES file

Within an IGES file, the entity type number of NURBS surface is 128, and the directory entry section can be set according to Table 2.

1--8

9--16

17--24

25--32

33--40

41--48

49--56

57--64

65--72

73--80

Entity type number

Parameter data start line

Structure

Line pattern

Level

View

Transformation matrix

Associativity

State number

Serial number

Entity type number

Line width

Color number

Parameter data line count

Form number

Keep

Keep

Entity label

Entity subscript

Serial number

Table 2 The directory entry section

The parameter data section of NURBS surface is free format. The data can be written in this order:

  1. Entity type number.
  2. K1, the section direction control points number minus 1.
  3. K2, the center line direction control point’s number minus 1.
  4. M1, the number of times of section direction.
  5. M2, the number times of center line direction.
  6. PROP1, the curve of section direction is close or not.
  7. PORP2, the curve of the center line direction is close or not.
  8. PROP3, rational or polynomial.
  9. PROP4, periodical in the section direction or not.
  10. PROP5, periodical in the center line direction or not.
  11. The knot sequence in section direction.
  12. The knot sequence in center line direction.
  13. Weight of all control points.
  14. Coordinate of all control points.
  15. The start value in section direction and the final value.
  16. The start value in center line direction and the final value. Figure 2 demonstrates a NURBS surface in an IGES file.
Figure 2 An IGES file for a NURBS surface (middle data is omitted).

Algorithm of writing the yarn data into IGES file

After the control grid of a single yarn is calculated, the shape of the yarn is determined. However, it is still not enough to input a 128 entity into an IGES file to model the yarn since the object is just a hollow tube when the file is opened by a Pro/E or Solid Works, see Figure 3. It is necessary to construct 2 end faces to cover the hollow tube to ensure the yarn body to be sealed.

Figure 3 A hollow yarn body.

Modeling the two end faces by B-spline surface

Although the end face is a flat surface, it can be modeled by a cubic NURBS (Non-Uniform Rational B-Splines) surface as long as all the control points are on the same plane. Since the contour of the end faces are determined by the first and the last cross-sections respectively while the center of the end faces are calculated as well, it is necessary to find at least 2 control points along each control polygon to form a control grid. Obviously, the simplest way is to ensure these 2 points on the segment line determined by the centre of the end face and the outmost control points on the border. Therefore, the control gird of the end face is shown in Figure 4. To some extent, the end face can be regarded as a distorted yarn body only is different in that 4 cross-sections of are in the same plane. Thus, the way to write the NURBS entity of end face is the same as the yarn body.

Figure 4 Control points mesh of end face.

Flow chart of writing the IGES file

In an IGES file, the line occupied by the NURBS surface varies according to the number of the cross-sections. Thus, the Parameter Data Line Count in Directory entry Section is variable.

To obtain the Line Count, it is necessary to record the current position in Line of parameter section when each data of the NURBS parameter is written in the file. Function Write a Float to IGES_Para is designed to write a float data into parameter section.

Prototype: void Write a Float to IGES_Para (BOOL bEnd, FILE *fp, int nEntityIndex, float fDataToWrite, int& nCurLineParaSection, int& nCur XPos In Line).

Function: To write a float data into the parameter section in IGES file. If there is enough room to write the float, the index of the Entity of this line will be finished first, and then letter 'P' and the index of line will be written.

Parameters input

  1. bEnd: Is the float the last data of the NURBS or not.
  2. FILE *fp: File pointer of the IGES file.
  3. Int nEntity Index: Index of the NURBS.
  4. Float fData To Write: The float to write.
  5. Int & nCurLineParaSection: Line index in the parameter section.
  6. Int & nCurX Pos in Line: Position index at the line of the parameter section, from 0-63.

Parameters output

  1. Int & nCur Line Para Section: Current line index after writing the float.
  2. Int & nCur XPos in Line: Current position in line after writing the float.
  3. To each NURBS entity, the algorithm can be described in the following flow-chart. To save a single yarn, three NURBS entities including 2 end faces and a yarn body are required.

Outputting the fabric IGES file

When 2 end faces and a yarn body are written in an IGES file according to NURBS surface, a closed yarn entity is formed as shown in Figure 5 & 6.

Figure 5 Flow chart of writing a NURBS entity into an IGES file.
Figure 6 Yarn with 2 end faces to form a closed entity.
Figure 7 Plain weave fabric entity.

More than a yarn can be written in an IGES file. The simplest plain weave fabric includes at least 4 yarns, 2 of them for warp and 2 for weft. In other words, this file made up of 12 B-Spline surface entities, 4 for yarn body and the rest are end faces. Figure 7 demonstrates a plain weave fabric entity.

Application of the IGES file

The above IGES file containing the plain structure can be opened by Pro/E as shown in Figure 8. By further processing, i.e., adding mesh control to the surface of each yarn, all the yarn can be divided into triangle facets, which means the fabric structure can be processed by finite element software such as Ansys or Abacus. Similarly, the fabric structure in IGES file can be transferred to other standard 3D file such as STEP for further processing.

Figure 8 Plain weave fabric with triangle facets processed by Pro/E.

Conclusion

Yarn or fabric geometric structure can be accurately modeled by NURBS. By adding two end faces, a yarn can be modeled by 3 NURBS surfaces and written into a universal accepted 3D IGES file. By opening and processing the IGES file with Pro/E, it can be concluded that the information of yarn or fabric structure can be well exchanged and further processed by other 3D modeling software or FE software.

Acknowledgements

None.

Conflict of interest

Author declares there is no conflict of interest in publishing the article.

References

Creative Commons Attribution License

©2017 Zheng, et al. This is an open access article distributed under the terms of the, which permits unrestricted use, distribution, and build upon your work non-commercially.