The Internet DXF Manipulation Software - PowerPoint PPT Presentation

1 / 27
About This Presentation
Title:

The Internet DXF Manipulation Software

Description:

Using the Puma 560 Example. Defining the Local Coordinate Systems ... The Following Screen Captures of Puma 560 Illustrate the Algorithm ... – PowerPoint PPT presentation

Number of Views:107
Avg rating:3.0/5.0
Slides: 28
Provided by: jb66
Category:

less

Transcript and Presenter's Notes

Title: The Internet DXF Manipulation Software


1
The InternetDXF ManipulationSoftware
  • Petar Gacesa
  • University of Bridgeport
  • January 13, 2000

2
The Purpose
To provide an Internet-based solution for
manipulation and display of the DXF graphics
exchange files. The software needs to allow the
user to parse the DXF file and to establish the
order of layers. Additionally, it needs to
enable the user to perform any of the 3D
transformations on any of the layers while
preserving the relative positions and orientation
relationships between the layer that undergoes
the transformation and all the subsequent layers.

3
The Breakdown of the Software Functionality
  • Ability to read the DXF file and parse the
    relevant DXF objects while keeping their
    association with their corresponding layers.
  • Interface that permits the user to select the
    order of layers.
  • Interface that allows the user to define a new
    local coordinate system for each layer.
  • Interface to control the motion of layers.
  • Display that shows the layers current positions.

4
The Development Environemt
  • The Java programming language is most suited for
    this type of software because of its wide range
    of graphics and Internet capabilities.
  • Perl is also needed, as the most widely used CGI
    platform, to perform the access to the users
    local hard disk as the security manager prevents
    Java applet from accessing any files except those
    located on the same server where applet is
    located.

5
The DXF File
  • The DXF file consists of the following sections
  • HEADER
  • CLASSES
  • TABLES
  • BLOCKS
  • ENTITIES
  • OBJECTS

6
The Entities Section
The entities is the only relevant DXF section for
this project as it contains the geometry
definitions for all the items in a DXF file
drawing. In addition it also associates every
item with its corresponding layer.
7
The Entity Definition
The definitions of the Entities section item
begin with the name of the item. The next
relevant entry is AcDbEntity which is
immediately followed by the number 8 and the name
of the layer to which the entity belongs.
Following are the first set of the x, y, and z
coordinates that are each preceded with the
number 10, 20, and 30 respectively. Then the
next vertex is determined by the x, y, and z
coordinates whose values are preceded with 11,
21, and 31 respectively.
8
The Line Entity Example
LINE The name of the entity 5 619 100 AcDbEntity
8 The layer marker SECOND_LINK The layer
name 100 AcDbLine 10 The 1st vertexs x
coordinate marker 0.0 The 1st vertexs x
coordinate value 20 The 1st vertexs y
coordinate marker 0.0 The 1st vertexs y
coordinate value 30 The 1st vertexs z
coordinate marker 0.0 The 1st vertexs z
coordinate value 11 The 2nd vertexs x
coordinate marker 10.0 The 2nd vertexs x
coordinate value 21 The 2nd vertexs y
coordinate marker 10.0 The 2nd vertexs y
coordinate value 31 The 2nd vertexs z
coordinate marker 10.0 The 2nd vertexs z
coordinate value 0 The end of the entity marker
9
The Perl File Upload Script
  • Perl is the most suitable method for the file
    upload for the following reasons

Perl is readily available on most servers so it
would generally not require any additional server
configuration. It is does not take the constant
CPU time. Perl or CGI scripts in general are more
stable than alternatives.
10
The DXF File Access and Parsing
Once the file is on the server side, the applet
uses hypertext transfer protocol to access it.
Unlike the socket connection, HTTP does not
require an application to run on the server side.
In addition, it avoids all the possible problems
caused by particular server port being in use by
another application or the fire wall
issues. Once the file is accessed by the applet
it is parsed for the supported entities as well
as their layer associations.
11
Selecting the Layer OrderUsing the Puma 560
Example
12
Defining the Local Coordinate Systems
After selecting the proper layout order the next
step is to select the local coordinate system for
each layer. Each layers coordinate system is
relative to the previous layers coordinate
system and its position.
13
The 3D Transformations
The transformations are based on the standard 3D
transformation matrices. The three rotational
matrices and the translation matrix are
pre-multiplied to obtain the composite
transformation matrix in the following order x,
y, and z rotation, followed by the translations.
14
The Transformations Tracking
Throughout the session, the coordinate values for
all the drawing items do not change. They keep
their initial values. The changes of the local
coordinate systems and each objects
transformation relative to its local coordinate
system are the only variables that change once
the local coordinate system changes or
transformation is performed. Instead of actually
changing the value of the points, the set of
temporary coordinates is formed that has the
after-transformation values relative of the
global coordinate system.
15
The Transformations Tracking Method
The actual transformations tracking is performed
by using two 44 transformation matrices. The
first matrix keeps track of the layers local
coordinate system position relative to all the
previous coordinate system positions. The second
matrix keeps track of the layers position
relative to all the previous layers local
coordinate system positions as well as their
current positions relative to their local
coordinate systems.
16
The First Transformation Matrix
Before processing each layer first transformation
matrix is first multiplied by the layers local
coordinate system transformation matrix, which is
relative to the preceding objects coordinate
system. This matrix is then used to solve for the
coordinate values relative to the layers local
coordinate system.
17
The Second Transformation Matrix
The second transformation matrix is
pre-multiplied by each preceding layers local
coordinate system transformation matrix as well
as with the transformation matrix that defines
the position of each preceding layer relative to
its local coordinate system. The new position is
determined when the result obtained from the
first matrix calculation is pre-multiplied by the
second matrix.
18
The Following Screen Captures of Puma 560
Illustrate the Algorithm
The DXF drawing of the Puma 560 is curtesy of
Damir Vamoser
19
(No Transcript)
20
(No Transcript)
21
(No Transcript)
22
(No Transcript)
23
Hiding of the Invisible Surfaces
In this project the DXF drawing is presented as a
wire frame. Also, the polygons are not drawn by
filling but as a wire frame representation. The
invisible surface hiding algorithm implements the
invisible elements hiding by checking each point
against every polygon to determine if it is
visible before actually displaying it. In order
to be displayed the point needs to pass three
tests.
24
The Proximity Test
The proximity test checks if the point is inside
the smallest polygon bounding rectangle. If it
is it moves on to the next test. This test is
for the optimization purpose only
25
The Inside Test
The inside test uses the odd-even edge
interception algorithm to check if the point is
actually inside the 2D polygon projection.
26
The Depth Test
The depth test uses the plane equation generated
from the polygon geometry to see if the point is
actually in front or behind the polygon
27
The Analysis of Results
  • The local DXF file access
  • The DXF parsing
  • The object transformations
  • The invisible surface hiding
  • The portability of the code issues
Write a Comment
User Comments (0)
About PowerShow.com