JSCAD User Group
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Home
    2. Popular
    Log in to post
    • All Time
    • Day
    • Week
    • Month
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics

    • All categories
    • gilboonetG

      Unfolder V2, stress test on FF and Chrome

      Watching Ignoring Scheduled Pinned Locked Moved Comments & Feedback
      10
      0 Votes
      10 Posts
      4k Views
      hrgdavorH
      @gilboonet that is excellent, it may be possible later on to integrate that one with jscad or at least take your experience for ideas how to improve 2D use-cases in jscad.
    • ajw1970A

      Using JSCAD to build meshes for BabylonJS

      Watching Ignoring Scheduled Pinned Locked Moved Design Discussions
      10
      0 Votes
      10 Posts
      3k Views
      z3devZ
      @ajw1970 super! I'm interested in the final application. Why did you want to use Babylon for rendering? And do you further plans to create some online designs?
    • Hermann-SWH

      JSCAD for planar graph embeddings onto (unit) sphere

      Watching Ignoring Scheduled Pinned Locked Moved Design Discussions
      10
      0 Votes
      10 Posts
      3k Views
      Hermann-SWH
      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! [image: file.php?id=56198]
    • hg42H

      V2 status and testing environments

      Watching Ignoring Scheduled Pinned Locked Moved Development Discussions
      9
      0 Votes
      9 Posts
      2k Views
      z3devZ
      @hg42 you might be able to use the regl-renderer module directly. there's a couple of demo applications, which could be tweeked to reload a design.
    • gilboonetG

      V2 Feedback : converting V1 examples

      Watching Ignoring Scheduled Pinned Locked Moved Development Discussions
      9
      1
      0 Votes
      9 Posts
      2k Views
      gilboonetG
      Eighth example, lookup : [image: 1598797062213-capture-d-%C3%A9cran-de-2020-08-30-16-16-04.png] It looks ok, but my lookup function is maybe buggy, I needed to stretch return value (x2) to have same lengths as V1, and to add a center to each cylinders to make it look the same. // title : Lookup // author : OpenSCAD.org, adapted by Rene K. Mueller // description: testing lookup() function // file : lookup.jscad // from http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Mathematical_Functions const jscad = require('@jscad/modeling') const { primitives, transforms, colors, maths } = jscad const { cylinder } = primitives const { translate } = transforms const { colorize, hslToRgb } = colors const { vec2 } = maths const { lerp } = vec2 function getCylinderH (p) { return lookup(p, [ [ -200, 5 ], [ -50, 20 ], [ -20, 18 ], [ +80, 25 ], [ +150, 2 ] ]); } function main () { var w = []; for (var i = -100; i <= 100; i += 5) { w.push(colorize(hslToRgb([((i + 100) / 200) * 0.3 + 0.6, 1, 0.5]), translate([i, 0, -30], cylinder({radius: 4, height: getCylinderH(i) * 3 *2, segments: 16 , center : [i,0,getCylinderH(i) * 3] })))); } return w; } function lookup(ix, L){ // L = [ [ i0, v0], ..., [iN, vN] ] if (ix <= L[0][0]) return L[0][0]; var i = L.length-1; if (ix >= L[i][0]) return L[i][0]; i = L.findIndex( x => x[0] >= ix); v1 = L[i-1][1]; v2 = L[i][1]; if (ix === L[i-1][0]) return v1; if (ix === L[i][0]) return v2; var i1 = L[i-1][0], i2 = L[i][0]; var r = v1 + (v2-v1) / (i2-i1) * (ix-i1); return r; } module.exports = { main }
    • BarbourSmithB

      Generating project thumbnails

      Watching Ignoring Scheduled Pinned Locked Moved General Discussions
      9
      0 Votes
      9 Posts
      2k Views
      gilboonetG
      @gilboonet It works. I needed to specify ... while pushing content into the return variable. I still need to stop the animation so my video capture will perfectly loop. And there's something that I didn't manage to do, it's creating a new project, for the moment I'm changing demo-web.js, otherwise there is an error (cannot find myAnim.js when I try to run npù run myAnim.js) [image: ours342.gif]
    • gilboonetG

      Error when saving 2d rendering

      Watching Ignoring Scheduled Pinned Locked Moved General Discussions
      9
      1
      0 Votes
      9 Posts
      2k Views
      gilboonetG
      @z3dev Thanks a lot for your suggestions, I will try to implement them. I have some marginal cases where it will certainly help to have exact vertices
    • IonI

      2D slice from extruded polygon after substraction

      Watching Ignoring Scheduled Pinned Locked Moved Development Discussions
      9
      5
      0 Votes
      9 Posts
      2k Views
      gilboonetG
      @Ion-0 That's great !
    • T

      As jscad.xyz is down, where to get more doc?

      Watching Ignoring Scheduled Pinned Locked Moved General Discussions
      9
      0 Votes
      9 Posts
      3k Views
      danmarshallD
      @z3dev thank you, that is really helpful!
    • gilboonetG

      basic design for projection

      Watching Ignoring Scheduled Pinned Locked Moved Design Discussions
      9
      1
      0 Votes
      9 Posts
      2k Views
      z3devZ
      @gilboonet excellent! You are the super user!
    • gilboonetG

      V2 feedback

      Watching Ignoring Scheduled Pinned Locked Moved Development Discussions
      9
      0 Votes
      9 Posts
      2k Views
      gilboonetG
      @hrgdavor Thank you, that's very nice. It's not that I like folding things but it's a process I use to build them with cardboard
    • gilboonetG

      V2 Unfolder complete, multipage pdf creation from its 2d output

      Watching Ignoring Scheduled Pinned Locked Moved Design Discussions
      9
      2
      1 Votes
      9 Posts
      2k Views
      hrgdavorH
      @gilboonet that is definitely something worth considering either as part of jscad or an addon library. I think we will have better idea after I have some time to cooperate with you on your project. It is definitely an interesting use-case, and a real project will give much needed insight on how to proceed with it.
    • samuelwang48S

      an ios app that embeds jscad

      Watching Ignoring Scheduled Pinned Locked Moved General Discussions
      9
      2
      3 Votes
      9 Posts
      3k Views
      samuelwang48S
      @z3dev hi, yes, it can be found in Apple App Store if you search for "Rukkou". Or use this link directly on a Mac OS. Do let me know your feedbacks
    • udifU

      Dynamically updating the parameter array returned by getParameterDefinitions() ?

      Watching Ignoring Scheduled Pinned Locked Moved General Discussions
      9
      0 Votes
      9 Posts
      2k Views
      Antoine GuillaumeA
      @hrgdavor for the moment i have create only one field and i serialize all datas of form and i check the values in the openjscad script
    • hpb-htwH

      Using JScad just to display 3D-Object

      Watching Ignoring Scheduled Pinned Locked Moved General Discussions
      9
      0 Votes
      9 Posts
      2k Views
      z3devZ
      @hpb-htw Nice! You might be the first person using V3. So, V3 is currently in Alpha release. Or course, V3 is in the same GIT repository but on the V3 branch. So, you can get all the packages by checking out the branch. git checkout V3 Again, take a look at the demos in regl-rendering
    • gilboonetG

      V2 Feedback : script hangs

      Watching Ignoring Scheduled Pinned Locked Moved Development Discussions
      8
      1
      0 Votes
      8 Posts
      2k Views
      gilboonetG
      @z3dev You're right, the problem was about winding and by correcting it for MeasureArea() < 0 and triangulating was enough to make it work. I updated my source here : https://github.com/gilboonet/gilboonet.github.io/blob/master/demos/gigi.js It contains a volume exported from Wings3d, with Cube1_default() that contains data with quads and table() with this : function table() { var a = Cube1_default(); var tmp = []; for(var i = 0; i < a.polygons.length; i++){ if (measureArea(a.polygons[i]) < 0){ a.polygons[i] = a.polygons[i].reverse(); } for(var j = 1; j< a.polygons[i].length-1; j++){ tmp.push([a.polygons[i][0], a.polygons[i][j], a.polygons[i][j+1]]); } } return scale([8,8,8], polyhedron({points:a.points, faces:tmp})); } There is certainly a way to write this code a more modern way with map() to speed it up.
    • gilboonetG

      About polygons winding

      Watching Ignoring Scheduled Pinned Locked Moved Development Discussions
      8
      2
      0 Votes
      8 Posts
      1k Views
      gilboonetG
      I'm trying now csg on a .obj file imported (require) into V2. It works fine with an intersect, but when I try to make lots of intersect, the return statement has errors. [image: 1600244901822-capture-d-%C3%A9cran-de-2020-09-16-10-22-07-resized.png] On my example, height is 104 units, I can return a slice every 3 units, but when I try to return a slice every 2 units (and my real process needs smaller slices) it bugs : elapse for solid generation: 39 design.js total time for design regeneration 7015 17 design.js Uncaught (in promise) TypeError: a is undefined (2 times)
    • Alasdair McAndrewA

      Issues on Linux - designs not rendering in html viewers

      Watching Ignoring Scheduled Pinned Locked Moved General Discussions
      8
      0 Votes
      8 Posts
      2k Views
      z3devZ
      @Alasdair-McAndrew sure. check out the recent post by @crysislinux i haven't seen anyone embed V2 into a web page yet, but that will happen soon.
    • jess yanJ

      Use jscad in vue

      Watching Ignoring Scheduled Pinned Locked Moved Development Discussions
      8
      1
      0 Votes
      8 Posts
      2k Views
      z3devZ
      @jess-yan Super! Please let us know when a working website is available. There are many of us that want to extend JSCAD in various ways.
    • gilboonetG

      import/export of .obj file

      Watching Ignoring Scheduled Pinned Locked Moved Development Discussions
      8
      1
      0 Votes
      8 Posts
      2k Views
      gilboonetG
      @platypii Thank you for this investigation. I remember that I tried to get JSCAD to union those groups but then it loses colors. I use Wings 3d to colorize my models, and it does not split them into separate objects (on my screenshot I have only one geometry), only materials are separated into groups. [image: 1655194392922-capture-d-%C3%A9cran-du-2022-06-14-10-11-33.png] [image: 1655196467063-capture-d-%C3%A9cran-du-2022-06-14-10-29-42.png] I splitted the model into 3 geometries and then exported it to .obj and the difference is that it contains 3 lines starting with "o " that defines start of an object. Maybe for the moment JSCAD translate lines starting with "g " like "o ".