distCAD Viewer

Author: Matthias Krüger


Parameter description

Parameter Value Description Default Remark
model file Name File to display, relative to applet's path 2 triangles required
bgcolor #RRGGBB background color Applet's bgcolor optional
color #RRGGBB surface color #3EAF2E optional
startangle aaa bbb a- and b-angle [0..380°] rotate the model at first 0 0 optional
turnspeed aaa bbb a- and b-speed [0..380°/s] 48 38 optional
shift xxx yyy x- and y-shift [-500..+500 pixel] auto Centering optional
zoom zzz ppp z: [pixel/model-unit] p: perspective [0..1] all (auto Zoom) optional
turn 0 or 1 switch turn off or on 1 optional
bonds 0 or 1 switch bonds off or on 1 optional
surfaces 0 or 1 switch surfaces off or on 0 optional
scansurfaces 0 or 1 scan surfaces in lattice model 1 optional

Here are some examples:

Example HTML-Code
<applet code="distCADViewer" archive="distCADViewerApplet_V1.jar" width="100" height="100">
<param name="model" value="Test.txt">
</applet>
<applet code="distCADViewer" archive="distCADViewerApplet_V1.jar" width="100" height="100">
<param name="model" value="Test.txt">
<param name="bgcolor" value="#E9E6DA">
<param name="bonds" value="0">
</applet>
<applet code="distCADViewer" archive="distCADViewerApplet_V1.jar" width="100" height="100">
<param name="model" value="Test.txt">
<param name="bgcolor" value="#E9E6DA">
</applet>
<applet code="distCADViewer" archive="distCADViewerApplet_V1.jar" width="100" height="100">
<param name="model" value="Test.txt">
<param name="bgcolor" value="#E9E6DA">
<param name="surfaces" value="1">
</applet>
<applet code="distCADViewer" archive="distCADViewerApplet_V1.jar" width="100" height="100">
<param name="model" value="Test.txt">
<param name="bgcolor" value="#000000">
<param name="surfaces" value="1">
<param name="color" value="#DDDD00">
</applet>
<applet code="distCADViewer" archive="distCADViewerApplet_V1.jar" width="100" height="100">
<param name="model" value="Test.txt">
<param name="bgcolor" value="#E9E6DA">
<param name="turn" value="0">
</applet>
<applet code="distCADViewer" archive="distCADViewerApplet_V1.jar" width="100" height="100">
<param name="model" value="Test.txt">
<param name="bgcolor" value="#E9E6DA">
<param name="turn" value="0">
<param name="startangle" value="10 5">
</applet>
<applet code="distCADViewer" archive="distCADViewerApplet_V1.jar" width="100" height="100">
<param name="model" value="Test.txt">
<param name="bgcolor" value="#E9E6DA">
<param name="turnspeed" value="10 5">
</applet>
<applet code="distCADViewer" archive="distCADViewerApplet_V1.jar" width="100" height="100">
<param name="model" value="Test.txt">
<param name="bgcolor" value="#E9E6DA">
<param name="shift" value="50 20">
</applet>
<applet code="distCADViewer" archive="distCADViewerApplet_V1.jar" width="100" height="100">
<param name="model" value="Test.txt">
<param name="bgcolor" value="#E9E6DA">
<param name="zoom" value="20 0">
</applet>
<applet code="distCADViewer" archive="distCADViewerApplet_V1.jar" width="100" height="100">
<param name="model" value="Test.txt">
<param name="bgcolor" value="#E9E6DA">
<param name="surfaces" value="1">
<param name="scansurfaces" value="0">
</applet>

Here is the file with the model data :

Test.txt

;4 corners
0.500 -0.289 -0.203
-0.500 -0.289 -0.203
0.000 0.577 -0.203
0.000 0.000 0.612
;0 bonds
;3 surfaces
1 2 3
0 1 3
2 0 3
 
At first in the file stay all corners
with her X- ,Y-, Z-coordinates.

After the semicolon(;) stay comments.
But at the next line begin a new segment (bonds, surfaces)

When exist zero bonds the viewer look for bonds with distance=1 and add them.

Normally the viewer scan for surfaces. You can switch off this function like the last example.

 


home > viewer | viewer deutsch > parameter description
last update: