JSCAD User Group

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. Hermann-SW
    • Profile
    • Following 0
    • Followers 0
    • Topics 7
    • Posts 22
    • Best 1
    • Controversial 0
    • Groups 0

    Hermann-SW

    @Hermann-SW

    1
    Reputation
    3
    Profile views
    22
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Hermann-SW Unfollow Follow

    Best posts made by Hermann-SW

    • JSCAD preview faster than "same" model OpenSCAD preview

      I completed implentation of 6coloring for JSCAD, JSCAD_ and OpenSCAD today:
      https://forums.raspberrypi.com/viewtopic.php?p=2032727#p2032727

      My planar graph playground tool "node.tetra.js" now creates planar graph sphere embeddings for JSCAD/OpenSCAD using the "same" spherical polygon and great circle arc (for graph edges) implementations:
      https://forums.raspberrypi.com/download/file.php?id=56354

      When playing with both models, JSCAD preview mode is much faster than OpenSCAD preview for rotating the model, not sure whether it is a simpler preview or just better. Has anybody noticed similar?

      Here is sample JSCAD model to play with online:
      https://www.openjscad.xyz/?uri=https://stamm-wilbrandt.de/en/forum/JSCAD.C60.6coloring.vtype.js

      20KB JSCAD file:
      https://stamm-wilbrandt.de/en/forum/JSCAD.C60.6coloring.vtype.js

      Here is "same" sample OpenSCAD model (32KB) for download:
      https://stamm-wilbrandt.de/en/forum/C60.6coloring.vtype.scad

      posted in Design Discussions
      Hermann-SW
      Hermann-SW

    Latest posts made by Hermann-SW

    • RE: Are there JSCAD user callbacks?

      Not exactly what I asked for, but OpenSCAD shows stack trace when right clicking on an object, here for "edge2()":
      https://forums.raspberrypi.com/viewtopic.php?t=333342&start=50#p2022797
      Has JSCAD similar functionality?
      https://stamm-wilbrandt.de/en/forum/OpenSCAD.object.stack_trace.png

      posted in Development Discussions
      Hermann-SW
      Hermann-SW
    • Are there JSCAD user callbacks?

      I have a JSCAD model of C36.10 fullerene graph embedded onto sphere:
      https://openjscad.xyz/?uri=https://stamm-wilbrandt.de/en/forum/C36.10.concave.jscad

      I would like to be able to click on a vertex, and then that vertex should be moved to centroid polar coordinate of its neighbors, like vertex 7 here:
      C36.10.concave.jscad.anim.gif

      Since JSCAD is JavaScript in browser, it should be possible to add callback for mouse click event.
      But is there some helper function that tells me which JSCAD object I have clicked on I can use in callback?

      posted in Development Discussions
      Hermann-SW
      Hermann-SW
    • JSCAD preview faster than "same" model OpenSCAD preview

      I completed implentation of 6coloring for JSCAD, JSCAD_ and OpenSCAD today:
      https://forums.raspberrypi.com/viewtopic.php?p=2032727#p2032727

      My planar graph playground tool "node.tetra.js" now creates planar graph sphere embeddings for JSCAD/OpenSCAD using the "same" spherical polygon and great circle arc (for graph edges) implementations:
      https://forums.raspberrypi.com/download/file.php?id=56354

      When playing with both models, JSCAD preview mode is much faster than OpenSCAD preview for rotating the model, not sure whether it is a simpler preview or just better. Has anybody noticed similar?

      Here is sample JSCAD model to play with online:
      https://www.openjscad.xyz/?uri=https://stamm-wilbrandt.de/en/forum/JSCAD.C60.6coloring.vtype.js

      20KB JSCAD file:
      https://stamm-wilbrandt.de/en/forum/JSCAD.C60.6coloring.vtype.js

      Here is "same" sample OpenSCAD model (32KB) for download:
      https://stamm-wilbrandt.de/en/forum/C60.6coloring.vtype.scad

      posted in Design Discussions
      Hermann-SW
      Hermann-SW
    • RE: How to generate JSCAD model in browser JS and display like demo.html?

      @hrgdavor I tried that with openjscad.xyz and it did not work. But it does work with locally hosted demo.html !
      Thanks, until now I had browser console open right, editor in middle and only half of 3D view left. After drag and drop, I can close the editor and see new graphs whenever I run node.tetra.js to produce a different x.jscad. So much easier to work now ...

      posted in Design Discussions
      Hermann-SW
      Hermann-SW
    • RE: How to generate JSCAD model in browser JS and display like demo.html?

      @hrgdavor I follow up on graph algorithm work I stopped 28 years ago:
      https://stamm-wilbrandt.de/en/TR/IAI-TR-93-10.ps.pdf
      I built undirected graph library as basis already, it will grow over time. Currently output formats of the tools are SVG, PostScript, and OpenSCAD and JSCAD for sphere embeddings:
      https://github.com/Hermann-SW/planar_graph_playground

      All planar graphs can be 4-colored (face as well as vertex, faces/vertices sharing an edge have to get different colors), there is a linear time algorithm for 5coloring, and I have built an even simpler 6coloring algorithm: https://github.com/Hermann-SW/planar_graph_playground/blob/main/undirected_graph.js#L311-L332
      Yesterday I made 6coloring work for JSCAD sphere embedding, 6coloring for embedding into the plane worked long ago:
      https://forums.raspberrypi.com/viewtopic.php?p=2032214#p2032214
      6coloring algorithm did use 5 colors only for sphere spherical face coloring (of C60 fullerene) left:
      https://www.youtube.com/watch?v=Zl-KumZDBbQ
      https://stamm-wilbrandt.de/en/forum/6coloring.spherical_plane.png

      posted in Design Discussions
      Hermann-SW
      Hermann-SW
    • RE: How to generate JSCAD model in browser JS and display like demo.html?

      Thanks for the pointers, I will look into. Yesterday I found a solution myself, I just had incorrect mindset. Details of the (surprisingly small) diff needed in this posting:
      https://forums.raspberrypi.com/viewtopic.php?p=2031648#p2031648

      This is new mode JSCAD_ running graph algorithms, system of linear equations solver and "main()" for viewing in browser:
      https://openjscad.xyz/?uri=https://stamm-wilbrandt.de/en/forum/JSCAD_.1.js

      Should show like this browser with Auto-zoom enabled:
      https://forums.raspberrypi.com/download/file.php?id=56287

      JSCAD_ takes longer than JSCAD mode, because running graph algorithms ...
      Also JSCAD_ output is 36KB, JSCAD only 19KB.

      posted in Design Discussions
      Hermann-SW
      Hermann-SW
    • How to generate JSCAD model in browser JS and display like demo.html?

      Creating JSCAD model with functionality inside works pretty well with NodeJS:
      https://forums.raspberrypi.com/viewtopic.php?p=2030878#p2030878

      https://www.openjscad.xyz/?uri=https://stamm-wilbrandt.de/en/forum/JSCAD.C60_vtype_b.js
      alt text

      I can create planar embedding into plane in browser JS and display using SVG:
      https://hermann-sw.github.io/planar_graph_playground/

      Now I want to create new JSCAD model in browser JS and then display it as with "demo.html" in local webserver or openjscad.xyz.
      Is that possible?
      If so, where can I find doc or an example?

      posted in Design Discussions
      Hermann-SW
      Hermann-SW
    • RE: JSCAD for planar graph embeddings onto (unit) sphere

      I implemented optional JSCAD output for planar graph playground "node.tetra.js", details here:
      https://forums.raspberrypi.com/viewtopic.php?p=2030546#p2030546

      Until now I played with C20 hand edited for JSCAD, this is newly created C60 fullerene with 60 vertices and 90 edges:
      https://www.openjscad.xyz/?uri=https://stamm-wilbrandt.de/en/forum/JSCAD.C60_vtype.js

      More vertices and edges than for C20, but design regeneration still done in less than 10 seconds on Intel it Linux Chrome!
      https://forums.raspberrypi.com/download/file.php?id=56198

      posted in Design Discussions
      Hermann-SW
      Hermann-SW
    • RE: openscad.xyz support for "data:" URI scheme would be cool

      @z3dev Thanks, I see your point wrt security.

      But what is the difference of ...uri=data:... to this openscad.xyz link with model wrt security? In case you eval the uri= specified file (and that seems to be the case because the model gets rendered in browser) you break the same security rules ...
      https://www.openjscad.xyz/?uri=https://stamm-wilbrandt.de/en/forum/JSCAD.minimal.js

      posted in Development Discussions
      Hermann-SW
      Hermann-SW
    • RE: JSCAD for planar graph embeddings onto (unit) sphere

      I answered the question on whether JSCAD will be performant enough for low design regeneration with 12 spherical pentagons (it is, takes less than 5 seconds on Intel i7 Chrome, with carefully chosen values for gray points/segments), because all fullerenes have exactly 12 pentagons (12*3*2=72 sp_tria2() calls, ...), details here:
      https://forums.raspberrypi.com/viewtopic.php?p=2029576#p2029576

      https://www.openjscad.xyz/?uri=https://stamm-wilbrandt.de/en/forum/JSCAD.C20_params.js
      alt text

      posted in Design Discussions
      Hermann-SW
      Hermann-SW