Re: SLC File format (long)

From: Bill Loyd (bloyd@lwaco.com)
Date: Mon May 03 1999 - 17:29:41 EEST


Pls. remove bloyd@lwaco.com from your mailing list. Thanks
-----Original Message-----
From: Susantha Subasinghe <susantha@kcl.eureka.lk>
To: bohez@ait.ac.th <bohez@ait.ac.th>
Cc: rp-ml@bart.lpt.fi <rp-ml@bart.lpt.fi>
Date: Sunday, May 02, 1999 10:52 PM
Subject: RE: SLC File format (long)

>
>
>
>
>
>
>Bharath,
>
>Always check the archives for info before asking -- it saves everyone
>time. Now as I have posted before, the 3D Systems document listing the
>specs for the SLC format:
>
>++++++++++++++++++++++++++++++
>
>SLC was a proposed new RP standard file format from 3D Systems. It has
>some very good features, but never really caught on. Below is the SLC
>specification and source code for a viewer courtesy of 3D. Cheers!
>
>*****************************************************
>
>Dear SLC Developer,
>
>Enclosed is the SLC file format information you requested. The SLC
>format is a contour-based, layer representation of CAD data. It is a
>complement to the standard STL tessellated format, which is widely used
>for many rapid prototyping applications. This format is ideal for solid
>modeling as well as surface models and other
>data that is already arranged in a layer format, such as CT-scan data.
>
>Attached is the SLC File Specification technical description along with
>a disk containing a sample SLC file. You may use these to assist in your
>development of the SLC interface for your system.
>
>If you have any technical questions regarding this specification please
>contact Chris Manners at 3D Systems, (805) 295-5600 ext. 416
>
>Best Regards,
>
>Jenine McQuaid
>Product Marketing Manager
>3D Systems
>
>
>
>
>
>1. Introduction
>
>The SLC file format is a "21/2D" contour representation of a CAD
>model. It consists of successive cross-sections taken at ascending Z
>intervals in which solid material is represented by interior and
>exterior boundary polylines. SLC data can be generated from various
>sources, either by conversion from CAD solid or surface models or more
>directly from systems that produce data arranged in layers, such as
>CT-scanners.
>
>2. Definition of Terms
>
>2.1 Segment
>
>A segment is a straight line connecting two X/Y vertice points.
>
>2.2 Polyline
>
>A polyline is an ordered list of X/Y vertice points connected
>continuously by each successive line segment. The polyline must be
>closed whereby the last point must equal the first point in the vertice
>list.
>
>2.3 Contour Boundary
>
>A boundary is a closed polyline representing interior or
>exterior solid material. An exterior boundary has its polyline list in
>counter-clockwise order. The solid material is inside the polyline.
>An interior boundary has its polyline list in clockwise order and solid
>material is outside the polyline.
>
>Figure 1: Contour Boundary Description
>
>2.4 Contour Layer
>
>A contour layer is a list of exterior and interior boundaries
>representing the solid material at a specified Z cross-section of the
>CAD model. The cross-section slice is taken parallel to the X/Y plane
>and has a specified layer thickness.
>3. Data Formats
>
>Byte 8 bits
>Character 1 Byte
>Unsigned Integer 4 Bytes
>Float 4 Bytes
>IEEE Format
>
>Most significant byte of FLOAT is
>specified in the highest addressed byte. The byte ordering follows the
>Intel PC Little Indian/Big Indian scheme.
>
>Address 0 1 2
>3
>Low Word
>High Word
>LSB MSB LSB MSB
>
>Most UNIX RISC Workstations are Big
>Indian/Little Indian, therefore they need to byte swap all Unsigned
>Integers and Floats before outputting to the SLC file.
>4. Overview of the SLC File Structure
>
>The SLC file is divided into a header
>section, a 3D reserved section, a sample table section, and the contour
>data section.
>4.1 Header Section
>
>The Header section is an ASCII character
>string containing global information about the part and how it was
>prepared.
>
>The header is terminated by a carriage
>return, line feed and control-Z character (0x0d,0x0a,0x1a) and can be a
>maximum of 2048 bytes including the termination characters.
>
>The syntax of the header section is a
>keyword followed by its appropriate parameter.
>
>4.2 Header Keywords
>
>4.2.1 "-SLCVER <X.X>" specifies the SLC
>file format version number. The version number of this specification is
>2.0.
>
>4.2.2 "-UNIT <INCH/MM>" indicates which
>units the SLC data is represented in.
>
>4.2.3 "-TYPE <PART/SUPPORT/WEB>"
>specifies the CAD model type. PART and SUPPORT must be closed
>contours. WEB types can be open polylines or line segments.
>
>4.2.4 "-PACKAGE <vendor specific>"
>identifies the vendor package and version number that produced the SLC
>file. A maximum of 32 bytes.
>
>4.2.5 "-EXTENTS <minx,maxx miny,maxy
>minz,maxz>" describes the X, Y, and Z extents of the CAD model.
>
>4.2.6 "-CHORDDEV <value>" specifies the
>cordal deviation, if used, to generate the SLC data.
>
>4.2.7 "-ARCRES <value in degrees>"
>specifies the arc resolution, if used, to generate the SLC data.
>
>4.2.8 "-SURFTOL <value>" specifies the
>surface tolerance, if used, to generate the SLC data.
>
>4.2.9 "-GAPTOL <value>" specifies the
>gap tolerance, if used, to generate the SLC data.
>
>4.2.10 "-MAXGAPFOUND <value>" specifies
>the maximum gap size found when generating the SLC data.
>
>4.2.11 "-EXTLWC <value>" specifies if
>any line width compensation has been applied to the SLC data by the CAD
>vendor.
>
>4.3 3D Reserved Section
>
>This 256-byte section is reserved for
>future use.
>
>4.4 Sampling Table Section
>
>The sample table describes the sampling
>thickness (layer thickness or slice thickness) of the part. There can
>be up to 256 entries in the table. Each entry describes the Z start,
>the slice thickness, and what line width compensation is desired for
>that sampling range.
>Sampling Table Size
>1 Byte
>Sampling Table Entry
>4 Floats
>
>Minimum Z Level
>1 Float
>Layer Thickness
>1 Float
>Line Width Compensation
>1 Float
>Reserved
>1 Float
>
>The first sampling table entry Z start
>value must be the very first Z contour layer. For example, if the
>cross-sections were produced with a single thickness of 0.006 inches and
>the first Z level of the part is 0.4 inches and a line width
>compensation value of 0.005 is desired, then the sampling table will
>look like the following:
>
>Sample Table Size
>1
>Sample Table Entry
>0.4 0.006 0.005 0.0
>
>If for example, the part was sliced with
>2 different layer thickness the Sample Table could look like the
>following:
>
>Sample Table Size
>2
>Sample Table Entry 1
>0.4 0.005 0.004 0.0
>Sample Table Entry 2
>2.0 0.010 0.005 0.0
>
>Slice thickness must be even multiples
>of one other to avoid processing problems.
>
>4.5 Contour Data Section
>
>The contour data section is a series of
>successive ascending Z cross-sections or layers with the accompanying
>contour data. Each Contour Layer contains the minimum Z layer value,
>number of boundaries followed by the list of individual boundary data.
>The boundary data contains the number of x,y vertices for that boundary,
>the number of gaps, and finally the list of floating point vertice
>points.
>
>The location of a gap can be determined
>when a vertice point repeats itself.
>To illustrate, given the contour layer
>in section 2.4 the contour section could be as follows:
>Z Layer
>0.4
>Number of Boundaries
>2
>Number of Vertices for the 1st
>Boundary 5
>Number of Gaps for the 1st
>Boundary 0
>Vertex List for 1st Boundary
>0.0, 0.0
>
>1.0, 0.0
>
>1.0, 1.0
>
>0.0, 1.0
>
>0.0, 0.0
>
>* Notice the direction of the vertice
>list is counter-clockwise indicating the solid material is inside the
>polylist. Also, notice that the polylist is closed because the last
>vertice is equal to the first vertice.
>
>Number of Vertices for the 2nd
>Boundary 5
>Number of Gaps for the 2nd
>Boundary 0
>Vertex List for 2nd Boundary
>0.2, 0.2
>
>0.2, 0.8
>
>0.8, 0.8
>
>0.8, 0.2
>
>0.2, 0.2
>
>* Notice the direction of the vertice
>list is clockwise indicating the solid material is outside the polylist.
>Also, notice that the polylist is closed because the last vertice is
>equal to the first vertice.
>
>The Contour Layers are stacked in
>ascending order until the top of the part. The last layer, or the top
>of the part, is indicated by the Z level and a termination unsigned
>integer (0xFFFFFFFF).
>
>Contour Layer Section Description
>
>Contour Layer
>Minimum Z Level
>Float
>Number of Boundaries
>Unsigned Integer
>Number of
>Vertices Unsigned Integer
>Number of Gaps
>Unsigned Integer
>Vertices List
>(X/Y) Number of Vertices * 2 Float
>
>Repeat Number of Boundaries
>1
>
>Repeat Contour Layer until Top of
>Part
>Top of Part
>Maximum Z Level
>1 Float
>Termination Value
>Unsigned Integer (0xFFFFFFFF)
>Minimum Z Level for a given Contour Layer
>
>Note that a one-inch cube based at the
>origin 0,0,0 can be represented simply by only one contour layer and the
>Top of Part Layer data.
>
>Suppose the cube was to be imaged in
>0.010 layers. The sample table would have a single entry with its
>starting Z level at 0.0 and layer thickness at 0.01. The contour layer
>data section could be as follows:
>
>Z Layer
>0.0
>Number of Boundaries
>1
>Number of Vertices for the 1st
>Boundary 5
>Number of Gaps for the 1st
>Boundary 0
>Vertex List for 1st Boundary
>0.0, 0.0
>
>1.0, 0.0
>
>1.0, 1.0
>
>0.0, 1.0
>
>0.0, 0.0
>Z Layer
>1.0
>Termination Value
>0xFFFFFFFF
>
>Notice that only one contour was
>necessary to describe the entire part. The initial contour will be
>imaged until the next minimum contour layer or the top of the part at
>the specified layer thickness described in the sampling table. This
>part could have had 100 identical contour layers, but that would have
>been redundant. This is why the contour Z value is referred to as the
>minimum Z value. It gets repeated until the next contour or top of the
>part.
>5. Dumpslc Program
>
>Included with this specification is the source code to a
>program that displays the contents of an SLC file. This program should
>be used to verify the format of the SLC file and display its contents.
>
>/* Program dumpslc.c
>SGI compile: % CC -DSWAP -o dumpslc dumpslc.c
>
>This Program is a utility program that dumps out slc files.
>
>Author: Chris R. Manners
>Date: 10/11/91
>
>SLC File Format:
>Ascii Header Max length 2048 ; ends with
>character 0x1A
>Reserved section 256 bytes
>Sampling table section
>Table Size (number of entries) 1 byte
>Table entry 16 bytes
>Minimum Z value Float
>Layer Thickness Float
>LineWidth Compensation Float
>Reserved Float
>

For more information about the rp-ml, see http://ltk.hut.fi/rp-ml/



This archive was generated by hypermail 2.1.2 : Tue Jun 05 2001 - 22:51:38 EEST