Navigation

    JSCAD User Group

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. Popular
    Log in to post
    • All categories
    • Announcements
    • General Discussions
    • Comments & Feedback
    • Development Discussions
    • Archives (Google+)
    • All Topics
    • New Topics
    • Watched Topics
    • Unreplied Topics
    • All Time
    • Day
    • Week
    • Month

    • hrgdavor

      V2: Feedback render sluggish on GTX1070
      Development Discussions • • hrgdavor  

      16
      0
      Votes
      16
      Posts
      53
      Views

      z3dev

      @hrgdavor don't panic. i understand just fine. but i wanted to make sure that everything has been tried before making changes. also, i'm not certain why 'exact' mouse position is important. i'm just fine working with V2, and don't find the inertia to be troublesome. so, maybe this would be a user preference. no?
    • K

      Has anyone had success using openjscad in react?
      General Discussions • • kevinos  

      15
      0
      Votes
      15
      Posts
      39
      Views

      N

      @z3dev thank you. For now I would only like create a viewer element within an angular application. Is there a release of v2 on the public npm registry? I've had a look but can't seem to find it. If not, please could you point me to instructions on how to build it? I'd like to host it on my private registry for the rest of the work I intend to do.
    • z3dev

      V2 Update
      Development Discussions • • z3dev  

      14
      1
      Votes
      14
      Posts
      77
      Views

      BarbourSmith

      Thank you for the Windows fix It is working great for me now.
    • sheffieldnick

      Website "load a file" functionality?
      General Discussions • • sheffieldnick  

      14
      0
      Votes
      14
      Posts
      28
      Views

      z3dev

      @zorglups there's a bug in the V1 proxy script, remote.pl, and this prevents files to be loaded properly if the file (URL) does not have a proper extention. a fix has been made, and the V2 website is running the fixed version of remote.pl but you need to provide a URL which accesses a V2 design, such as... https://www.jscad.xyz?uri=https://www.thingiverse.com/download:8705160 OR https://www.jscad.xyz#https://www.thingiverse.com/download:8705160
    • gilboonet

      little V2 feedback
      Development Discussions • • gilboonet  

      12
      0
      Votes
      12
      Posts
      470
      Views

      gilboonet

      @z3dev I update the docs with "npm run docs" and now documentation about color is available.
    • paul a golder

      Help me understand the structure of a project.
      General Discussions • • paul a golder  

      11
      1
      Votes
      11
      Posts
      32
      Views

      z3dev

      @BarbourSmith a very good question. In V2, the best approach is to make a project folder. And then organize the parts as desired, including sub-directories. project/ - index.js // this file is the entry point, and exports main - tube.js - subassembly/ - index.js By the way, if the project works with the CLI, then the same project should work with the WEB UI as well.
    • B

      A little web app using OpenJsCad
      Development Discussions • • benkei  

      10
      0
      Votes
      10
      Posts
      4049
      Views

      kaosat-dev

      @William-Adams that is very nice indeed ! Jscad is just a shorter name and less of a mouthful, either is fine @benkei it does indeed work like that, the parameter definitions are parsed by the internals of jscad to be displayed in the UI
    • BarbourSmith

      Generating project thumbnails
      General Discussions • • BarbourSmith  

      9
      0
      Votes
      9
      Posts
      28
      Views

      gilboonet

      @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)
    • hg42

      V2 status and testing environments
      Development Discussions • • hg42  

      9
      0
      Votes
      9
      Posts
      460
      Views

      z3dev

      @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.
    • gilboonet

      Error when saving 2d rendering
      General Discussions • • gilboonet  

      9
      0
      Votes
      9
      Posts
      16
      Views

      gilboonet

      @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
    • gilboonet

      V2 Feedback : converting V1 examples
      Development Discussions • • gilboonet  

      9
      0
      Votes
      9
      Posts
      14
      Views

      gilboonet

      Eighth example, lookup : 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 }
    • Alasdair McAndrew

      Issues on Linux - designs not rendering in html viewers
      General Discussions • • Alasdair McAndrew  

      8
      0
      Votes
      8
      Posts
      22
      Views

      z3dev

      @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.
    • gilboonet

      V2 Feedback : script hangs
      Development Discussions • • gilboonet  

      8
      0
      Votes
      8
      Posts
      14
      Views

      gilboonet

      @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.
    • gilboonet

      About polygons winding
      Development Discussions • • gilboonet  

      8
      0
      Votes
      8
      Posts
      15
      Views

      gilboonet

      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. 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)
    • Cid Zhang

      Initial release of FlexiSystem
      General Discussions • • Cid Zhang  

      7
      0
      Votes
      7
      Posts
      22
      Views

      Cid Zhang

      @z3dev Got it! I'll try to update the engine with this: https://github.com/jscad/OpenJSCAD.org/tree/master/packages/web
    • WolfgangFahl

      dockerized OpenJSCAD
      Development Discussions • • WolfgangFahl  

      7
      0
      Votes
      7
      Posts
      3990
      Views

      WolfgangFahl

      There was only a very small difference ... diff main.jscad /Users/wf/source/scad/testinclude/main.jscad 6c6 < return myLib().b(2); --- > return myLib.b(2); I 'v fixed the dockerized github repo and will try to fix the wiki now, too. Thanks for all the help finally I am going to work on my own designs now ...
    • WolfgangFahl

      Displaying JScad designs in media wiki / or plain html for a start ...
      Development Discussions • • WolfgangFahl  

      7
      0
      Votes
      7
      Posts
      2625
      Views

      gilboonet

      @wolfgangfahl To make it work without having to move examples folder, you can run it from your local webserver. I did so from my local apache http server
    • gilboonet

      V2 feedback : extrudeRotate
      Development Discussions • • gilboonet  

      7
      0
      Votes
      7
      Posts
      11
      Views

      gilboonet

      @z3dev the svg is here : https://github.com/gilboonet/gilboonet.github.io/blob/master/demos/demi_l.svg What I'm trying to do is a composite volume made of half a revolution of extrudeRotate then extrudeLinear with the same shape. I was able to have both extrusion method return a volume, but they don't coincide.
    • gilboonet

      V2 Feedback : about slicing
      Development Discussions • • gilboonet  

      7
      0
      Votes
      7
      Posts
      16
      Views

      gilboonet

      @z3dev I'm currently working with furniture models, they are all hand made. I sliced 8 models (they are available here https://github.com/gilboonet/designs/blob/master/MEUBLES/readme.md, each picture open the corresp. model into jscad) and they are clean because my scripts (slicer and unflattener) can only produce patterns for models without errors (holes, non-manifold). It's certainly my process that met an unhandled condition. To produce 2 axes imbricated crosspieces, I need to slice and then split slices that are made of multiple separated pieces because crosspiece cut need to be done for each piece. As you said it is too complex to debug. I need to simplify my process, maybe voxelization could help.
    • z3dev

      V2 Update 2021 Jan 02
      Development Discussions • • z3dev  

      7
      0
      Votes
      7
      Posts
      10
      Views

      gilboonet

      @WolfgangFahl V2 Web is at https://jscad.xyz/