Research Article Volume 1 Issue 4
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
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
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
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.
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:
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.
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.
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
Parameters output
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.
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.
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.
None.
Author declares there is no conflict of interest in publishing the article.
©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.