JSCAD User Group

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. jess yan
    3. Topics
    • Profile
    • Following 1
    • Followers 0
    • Topics 6
    • Posts 16
    • Best 0
    • Controversial 0
    • Groups 0

    Topics created by jess yan

    • jess yan

      How to get the coordinate value through the mouse?
      Development Discussions • • jess yan

      2
      0
      Votes
      2
      Posts
      353
      Views

      jess yan

      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))

      4a0979ad-ef8d-4af6-80d6-b7a52f92e8f9-image.png
      Could it be that I did something wrong?

    • jess yan

      A questions about project()
      Development Discussions • • jess yan

      3
      0
      Votes
      3
      Posts
      468
      Views

      jess yan

      @z3dev
      Ok, I have submitted an issue on github.
      https://github.com/jscad/OpenJSCAD.org/issues/916

    • jess yan

      AutoCAD Text conversion fails
      Development Discussions • • jess yan

      2
      0
      Votes
      2
      Posts
      317
      Views

      z3dev

      @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 yan

      How to select the rendered model with the mouse?
      Development Discussions • • jess yan

      5
      0
      Votes
      5
      Posts
      589
      Views

      hrgdavor

      @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 yan

      How to edit the converted model
      Development Discussions • • jess yan

      2
      0
      Votes
      2
      Posts
      323
      Views

      z3dev

      @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 yan

      Use jscad in vue
      Development Discussions • • jess yan

      8
      0
      Votes
      8
      Posts
      811
      Views

      z3dev

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