webview python program version 3.1

2 views
Skip to first unread message

Roger Kaufman

unread,
Jun 20, 2024, 4:20:15 PMJun 20
to anti...@googlegroups.com
Hi All,

I have migrated my site to Wagyx's multi-off-view. Thanks to Wagyx for
the new viewer!

In kind, I have now updated webview to 3.1 so the offview.py python can
take advantage of the new features.

Version 3.1
06-18-24 Roger Kaufman <polyhed...@gmail.com>
         Changes
            offview.py
               Check color input strings for 6 to 8 hex digits or
'invisible'
               Allow invisible backgrounds

Transparencies of individual faces, edges and vertices are now possible.
The effect makes the models look the same as they do with the X_ite vrml
browser.

conway etI -m map_0:0:0:red:darkorange1:yellow:xffffffcc | offview.py

the same command could be directed to the X_ite browser with

conway etI -m map_0:0:0:red:darkorange1:yellow:xffffffcc | off2vrml |
x3dview.py


https://www.interocitors.com/polyhedra/webview/

The python scripts have been tested under Windows WSL2 running Ubuntu
and native Ubuntu. Does anyone have any experience in running python in
native Windows?

The help is below.

Roger

usage: offview.py [-h] [-v VERTEX_RADIUS] [-e EDGE_RADIUS]
                  [-x {v,e,f} [{v,e,f} ...]] [-l] [-V VERTEX_COLOR]
                  [-E EDGE_COLOR] [-F FACE_COLOR] [-B BACKGROUND_COLOR]
                  [-rot ROTATION_SPEED] [-rotax ROTATION_AXIS]
                  [-t TRANSPARENCY] [-url {number from 0 to 3}]
                  [-browser {number from 0 to 3}]
                  [-port {number from 0 to 65535}]
                  [-sleep from 1 to 3600 seconds] [--version]
                  [off_file]

View an OFF file with an online html browser OFF file viewer.

Written by Roger Kaufman <polyhed...@gmail.com>

positional arguments:
  off_file              OFF file. can also be from standard input

options:
  -h, --help            show this help message and exit
  -v VERTEX_RADIUS, --vertex_radius VERTEX_RADIUS
                        vertex sphere radius (range 0.0-1.0) (default:
0.03)
  -e EDGE_RADIUS, --edge_radius EDGE_RADIUS
                        edge cylinder radius (range 0.0-1.0) (default:
0.02)
  -x {v,e,f} [{v,e,f} ...], --hide_elements {v,e,f} [{v,e,f} ...]
                        hide elements. to hide vertices, edges and faces
  -l, --black_edges     paint edges black (overrides -V,-E) (default: use
                        defined colors)
  -V VERTEX_COLOR, --vertex_color VERTEX_COLOR
                        vertex color override. hexadecimal value of
length 6
                        or 8 or "invisible" (url 1,2)
  -E EDGE_COLOR, --edge_color EDGE_COLOR
                        edge color override. hexadecimal value of
length 6 or
                        8 or "invisible" (url 1,2)
  -F FACE_COLOR, --face_color FACE_COLOR
                        face color override. hexadecimal value of
length 6 or
                        8 or "invisible" (url 1,2)
  -B BACKGROUND_COLOR, --background_color BACKGROUND_COLOR
                        background color. hexadecimal value of length 6 or
                        "invisible" (default: cccccc)
  -rot ROTATION_SPEED, --rotation_speed ROTATION_SPEED
                        rotational speed (url 1,2) (default: 0)
  -rotax ROTATION_AXIS, --rotation_axis ROTATION_AXIS
                        rotational axis as x,y,z (url 1,2) (default: 0,1,0)
  -t TRANSPARENCY, --transparency TRANSPARENCY
                        face transparency. from 0 (invisible) to 1.0
(opaque)
                        (url 3 only) (default: 1.0)
  -url {number from 0 to 3}, --url {number from 0 to 3}
                        url of online viewer, 0 to list (default: 1)
  -browser {number from 0 to 3}, --browser {number from 0 to 3}
                        browser, 0 to list (default: 1)
  -port {number from 0 to 65535}, --port {number from 0 to 65535}
                        port number for server (default: 8080)
  -sleep from 1 to 3600 seconds, --sleep from 1 to 3600 seconds
                        time in seconds before server shutdown (default: 4)
  --version             show program's version number and exit
Reply all
Reply to author
Forward
0 new messages