JSCAD User Group
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Home
    2. jess yan
    3. Topics
    Offline
    • Profile
    • Following 1
    • Followers 0
    • Topics 6
    • Posts 16
    • Groups 0

    Topics

    • jess yanJ

      How to get the coordinate value through the mouse?

      Watching Ignoring Scheduled Pinned Locked Moved Development Discussions
      2
      1
      0 Votes
      2 Posts
      893 Views
      jess yanJ
      I use camera-unproject to do coordinate mapping, but the obtained coordinates are obviously wrong. code: const regl = this.$el const handleMouseDown = (e) => { const x = 1 - (e.offsetX / regl.clientWidth) * 2 const y = (e.offsetY / regl.clientHeight) * 2 - 1 const point = vec3.fromValues(x, y, 0.5) const { projection, view, viewport } = this.camera const combinedProjView = mat4.multiply([], projection, view) const invProjView = mat4.invert([], combinedProjView) const result = unproject([], point, viewport, invProjView) console.log('convasSize: ', [regl.clientWidth, regl.clientHeight]) console.log('viewport: ', viewport) console.log('clickPoint: ', [x, y]) console.log('unproject result:', result) } this.$el.addEventListener('mousedown', handleMouseDown.bind(this)) [image: 1632904246061-4a0979ad-ef8d-4af6-80d6-b7a52f92e8f9-image.png] Could it be that I did something wrong?
    • jess yanJ

      A questions about project()

      Watching Ignoring Scheduled Pinned Locked Moved Development Discussions
      3
      2
      0 Votes
      3 Posts
      1k Views
      jess yanJ
      @z3dev Ok, I have submitted an issue on github. https://github.com/jscad/OpenJSCAD.org/issues/916
    • jess yanJ

      AutoCAD Text conversion fails

      Watching Ignoring Scheduled Pinned Locked Moved Development Discussions
      2
      0 Votes
      2 Posts
      918 Views
      z3devZ
      @jess-yan DXF is a old nasty file format so don’t expect much. JSCAD only converts certain DXF entities. Please see the README here… https://github.com/jscad/OpenJSCAD.org/tree/master/packages/io/dxf-deserializer There’s a nice library that will convert from DXF to SVG. https://github.com/bjnortier/dxf
    • jess yanJ

      How to select the rendered model with the mouse?

      Watching Ignoring Scheduled Pinned Locked Moved Development Discussions
      5
      0 Votes
      5 Posts
      1k Views
      hrgdavorH
      @z3dev @jess-yan yup. it is not implemented right now. But such feature has a lot more to consider to be implemented. It may be beneficial to start a discussion on git to see what would be expectation of such functionality and what it would take to implement it.
    • jess yanJ

      How to edit the converted model

      Watching Ignoring Scheduled Pinned Locked Moved Development Discussions
      2
      0 Votes
      2 Posts
      726 Views
      z3devZ
      @jess-yan another good question! there's an issue with the internal logic of the WEB UI that prevents the 'script' to be shown. it's not that easy to fix either. you can use the CLI (command line) application to convert the DXF file to a script. you can find instructions on how to use the CLI in the README file at... https://github.com/jscad/OpenJSCAD.org/tree/master/packages/cli
    • 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.