JSCAD User Group

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. z3dev
    3. Best
    • Profile
    • Following 0
    • Followers 4
    • Topics 139
    • Posts 458
    • Best 68
    • Controversial 0
    • Groups 5

    Best posts made by z3dev

    • Release : 2022 FEB 19

      Release : 2022 FEB 19

      There's a new release of JSCAD, including changes from several pull requests.

      Bug Fixes

      web: corrected touch handing to skip rotation while pinching

      Performance Improvements

      modeling: use hypot instead of sqrt when possible
      modeling: changed geom2.toOutlines to use a map when creating unique edges

      Thanks to @platypii and @samuelwang48 for the fixes!

      Successfully published:

      • @jscad/cli@2.2.14
      • @jscad/core@2.5.4
      • @jscad/examples@2.3.2
      • @jscad/amf-deserializer@2.2.6
      • @jscad/amf-serializer@2.1.3
      • @jscad/dxf-deserializer@2.3.10
      • @jscad/dxf-serializer@2.1.3
      • @jscad/io-utils@2.0.13
      • @jscad/io@2.2.4
      • @jscad/json-deserializer@2.0.14
      • @jscad/json-serializer@2.0.13
      • @jscad/obj-deserializer@2.0.13
      • @jscad/obj-serializer@2.1.3
      • @jscad/stl-deserializer@2.1.10
      • @jscad/stl-serializer@2.1.3
      • @jscad/svg-deserializer@2.4.6
      • @jscad/svg-serializer@2.3.1
      • @jscad/x3d-deserializer@2.1.2
      • @jscad/x3d-serializer@2.3.3
      • @jscad/modeling@2.7.2
      • @jscad/img-utils@2.0.2
      • @jscad/regl-renderer@2.5.4
      • @jscad/vtree@2.0.14
      • @jscad/web@2.5.4

      lerna success published 24 packages

      posted in Announcements
      z3dev
      z3dev
    • Access to the (fake) FileSystem in WEB Applications

      Here's something for those wanting 'more' from JSCAD designs.

      The 'fs' (File System) module is available to designs, both NODE.js and WEB versions.

      const fs = require('fs')
      

      The WEB versions is not 100% compatible, but it can provide access to other data. For example, fonts can be added to the contents of a JSCAD project. And the font can be read via the 'fs' module.

      const data = fs.readFileSync('project_text/Osaka.ttf')
      

      And used with the jscad-text project, outlines of characters can be created very easily.

      const {primitives} = require('@jscad/modeling')
      
      const { loadFontFromData, textToPaths } = require('./jscad-text')
      
      const fs = require('fs')
      
      const main = (params) => {
        const data = fs.readFileSync('project_text/Osaka.ttf')
      
        const font = loadFontFromData(data)
      
        const paths = textToPaths({font, segments: 144}, 'JSCAD! 大好きです!')
      
        return paths
      }
      
      module.exports = { main }
      

      5.png

      posted in Development Discussions
      z3dev
      z3dev
    • 2000 ⭐️ ⭐️ ⭐️

      2000 ⭐️ ⭐️ ⭐️

      Hopefully everyone is watching the progress of JSCAD. It continues to build popularity, and now has 2000 stars. Please visit the JSCAD project at GitHub.

      posted in Announcements
      z3dev
      z3dev
    • Release : 2022 JUN 12

      Release : 2022 JUN 12

      There's a new release of JSCAD, including changes from several pull requests.

      Features

      • x3d-serializer: enhanced to convert 2D geometry and path to X3D Polyline2D

      Bug Fixes

      • examples: create uniform segments for involute gear example
      • modeling: use special trig functions for rotations in maths and primitives

      Performance Improvements

      • modeling: optimize poly3.measureBoundingSphere and cache results for performance
      • modeling: replace Math.hypot with faster Math.sqrt()

      Thanks to @briansturgill for providing performance hints in the BSP trees.
      Those hints have resulted in 40 to 50% boosts in performance.

      Also, improved TypeScript definitions for all geometries.

      Successfully published:

      • @jscad/cli@2.2.21
      • @jscad/core@2.6.1
      • @jscad/examples@2.4.1
      • @jscad/3mf-serializer@2.1.4
      • @jscad/amf-deserializer@2.3.0
      • @jscad/amf-serializer@2.1.10
      • @jscad/dxf-deserializer@2.3.17
      • @jscad/dxf-serializer@2.1.10
      • @jscad/io-utils@2.0.20
      • @jscad/io@2.4.0
      • @jscad/json-deserializer@2.0.21
      • @jscad/json-serializer@2.0.20
      • @jscad/obj-deserializer@2.0.20
      • @jscad/obj-serializer@2.1.10
      • @jscad/stl-deserializer@2.1.17
      • @jscad/stl-serializer@2.1.10
      • @jscad/svg-deserializer@2.5.0
      • @jscad/svg-serializer@2.3.8
      • @jscad/x3d-deserializer@2.2.0
      • @jscad/x3d-serializer@2.4.0
      • @jscad/modeling@2.9.5
      • @jscad/regl-renderer@2.6.1
      • @jscad/vtree@2.0.21
      • @jscad/web@2.5.11

      lerna success published 24 packages

      posted in Announcements
      z3dev
      z3dev
    • V2 Update 2020 Nov 11

      Please get the latest version of JSCAD V2, as there have been some changes as well as bug fixes.

      There are now four pre-packed libraries. NOTE: Some of the library names have been changed.

      • core: jscad-core.min.js, UMD library exporting 'jscadCore'
      • modeling: jscad-modeling.min.js, UMD library exporting 'jscadModeling'
      • web: jscad-web.min.js, UMD library exporting 'jscadWeb'
      • regl-renderer: jscad-regl-renderer.min.js, UMD library exporting 'jscadReglRenderer'

      For more information see the README file for the packages.

      New Features:
      all: standardize package contents, improving published packages
      core: added build script and configuration for publishing

      Bug Fixes:
      io: corrected all meta data in deserializer and serializers, and corrected to use package version in meta data
      io-utils: split out Blob and converted to ES5 class, added test suite
      io-utils: converted BinaryReader to ES5 class
      modeling: corrected extrudeWalls to ignore invalid polygons(walls) which occurs if slices overlap
      modeling: corrected slice creation for negative (-x) biased shapes
      regl-renderer: corrected orientation of presets
      regl-renderer: adjusted default rotation rate for auto-rotate
      regl-renderer: corrected entitiesFromSolids to use transforms from geometries
      regl-renderer: corrected zoomToFit to ignore 2D geomerties and visual entites (draw commands)
      web: corrected keyboard shortcuts and selection of auto-rotate
      web: changed the file system watcher to use setTimeout(), and calculate dynamic delays
      web: changed intial camera position so X and Y axis point to positive coordinates

      Successfully published:

      • @jscad/cli@2.0.0-alpha.10
      • @jscad/core@2.0.0-alpha.10
      • @jscad/examples@2.0.0-alpha.5
      • @jscad/amf-deserializer@2.0.0-alpha.7
      • @jscad/amf-serializer@2.0.0-alpha.8
      • @jscad/dxf-deserializer@2.0.0-alpha.7
      • @jscad/dxf-serializer@2.0.0-alpha.7
      • @jscad/io-utils@2.0.0-alpha.7
      • @jscad/io@2.0.0-alpha.9
      • @jscad/json-deserializer@2.0.0-alpha.7
      • @jscad/json-serializer@2.0.0-alpha.7
      • @jscad/obj-deserializer@2.0.0-alpha.7
      • @jscad/stl-deserializer@2.0.0-alpha.8
      • @jscad/stl-serializer@2.0.0-alpha.7
      • @jscad/svg-deserializer@2.0.0-alpha.7
      • @jscad/svg-serializer@2.0.0-alpha.8
      • @jscad/x3d-serializer@2.0.0-alpha.8
      • @jscad/modeling@2.0.0-alpha.7
      • @jscad/array-utils@2.0.0-alpha.4
      • @jscad/img-utils@2.0.0-alpha.4
      • @jscad/regl-renderer@2.0.0-alpha.9
      • @jscad/vtree@2.0.0-alpha.8
      • @jscad/web@2.0.0-alpha.12

      BIG NOTE: The V2 website is also using this release.

      There's on-line documentation as well for those needing additional information about the modeling API.

      For those using a local copy of JSCAD V2, be sure to run the following commands.

      git pull
      npm run clean (and answer Y)
      npm run bootstrap
      

      Both CLI and WEB UI are usable for creating designs. In the WEB UI, it's best to drag-n-drop project folders to the window, and work with the pieces via a favorite editor. If "Enable auto reload" is checked then changes will be detected, and rendered again.

      For those wanting to get hold of JSCAD V2, it's still in 'early adoption' mode. But you can get started here.

      And a BIG THANKS for everyone that has provided feedback. Keep those comments coming!

      posted in Development Discussions
      z3dev
      z3dev
    • Maker Faire Tokyo 2019

      We had a great time showing JSCAD at Maker Faire, showing both V1 and V2 (alpha alpha) to folks, as well as entertaining kids with a small toy designed with JSCAD. As usual, the faire was packed both Saturday and Sunday.

      3_1565402041636_IMG_1700.JPG 2_1565402041636_IMG_1699.JPG 1_1565402041636_IMG_1716.JPG 0_1565402041636_IMG_1719.JPG

      posted in General Discussions
      z3dev
      z3dev
    • Release : 2021 OCT 04

      There's a new release of JSCAD, including changes from several pull requests.

      Bug Fixes

      core: fix missing json5 dependency
      dxf-serializer: corrected selection of color palettes
      modeling: corrected vec2.rotate, and enhanced test cases:w

      Thanks to @platypil for the fix to the dxf-serializer

      Successfully published:

      • @jscad/cli@2.2.8
      • @jscad/core@2.3.8
      • @jscad/amf-deserializer@2.2.1
      • @jscad/amf-serializer@2.0.9
      • @jscad/dxf-deserializer@2.3.5
      • @jscad/dxf-serializer@2.0.9
      • @jscad/io-utils@2.0.8
      • @jscad/io@2.0.9
      • @jscad/json-deserializer@2.0.9
      • @jscad/json-serializer@2.0.8
      • @jscad/obj-deserializer@2.0.8
      • @jscad/stl-deserializer@2.1.5
      • @jscad/stl-serializer@2.0.9
      • @jscad/svg-deserializer@2.4.1
      • @jscad/svg-serializer@2.2.6
      • @jscad/x3d-serializer@2.2.7
      • @jscad/modeling@2.5.3
      • @jscad/regl-renderer@2.4.1
      • @jscad/vtree@2.0.9
      • @jscad/web@2.4.3
      posted in Announcements
      z3dev
      z3dev
    • polygonjs

      Here's some inspiration for those wanting to build something cool. @frading has created a completely new WEB UI for creating interactive designs, called polygonjs

      posted in Design Discussions
      z3dev
      z3dev
    • Release : 2022 MAR 03

      Release : 2022 MAR 03

      There's a new release of JSCAD, including changes from several pull requests.

      Bug Fixes

      io: removed size limitation in Blob
      modeling: fixed TS type of relativeTo in align() options
      web: corrected uncaught type error in viewer

      Features

      modeling: enchanced extrudeLinear to support path2

      Performance Improvements

      modeling: improved performace of path2 offsets
      modeling: improved performance of expanding geom3, and bug fix
      modeling: use Set to create unique points in hullPath2

      And lots of API documentation fixes and enhancements.

      Thanks to @platypii @samuelwang48 @kume-negitoro for the great changes!

      Successfully published:

      • @jscad/cli@2.2.15
      • @jscad/core@2.5.5
      • @jscad/amf-deserializer@2.2.7
      • @jscad/amf-serializer@2.1.4
      • @jscad/dxf-deserializer@2.3.11
      • @jscad/dxf-serializer@2.1.4
      • @jscad/io-utils@2.0.14
      • @jscad/io@2.2.5
      • @jscad/json-deserializer@2.0.15
      • @jscad/json-serializer@2.0.14
      • @jscad/obj-deserializer@2.0.14
      • @jscad/obj-serializer@2.1.4
      • @jscad/stl-deserializer@2.1.11
      • @jscad/stl-serializer@2.1.4
      • @jscad/svg-deserializer@2.4.7
      • @jscad/svg-serializer@2.3.2
      • @jscad/x3d-deserializer@2.1.3
      • @jscad/x3d-serializer@2.3.4
      • @jscad/modeling@2.8.0
      • @jscad/array-utils@2.1.2
      • @jscad/regl-renderer@2.5.5
      • @jscad/vtree@2.0.15
      • @jscad/web@2.5.5
        lerna success published 23 packages
      posted in Announcements
      z3dev
      z3dev
    • Release : 2022 APR 24

      Release : 2022 APR 24

      There's a new release of JSCAD, including changes from several pull requests.

      Bug Fixes

      • modeling: corrected torus manifolds
      • modeling: removed path2.eachPoint which was broken and unused
      • modeling: reworked project to correct union of small polygons
      • regl-render: removed unnecessary preventDefault in demo.html
      • web: remove unused file handling and storage path options

      Performance Improvements

      • modeling: changed internals to use geom3.create(), path2.create(), poly3.create()
      • modeling: faster geom2.toOutlines
      • modeling: performance improvements to mergePolygons and triangulatePolygons

      There have also been some style changes to the website, so please let us know if anything looks strange.

      Successfully published:

      • @jscad/cli@2.2.19
      • @jscad/core@2.5.9
      • @jscad/examples@2.3.4
      • @jscad/3mf-serializer@2.1.2
      • @jscad/amf-deserializer@2.2.11
      • @jscad/amf-serializer@2.1.8
      • @jscad/dxf-deserializer@2.3.15
      • @jscad/dxf-serializer@2.1.8
      • @jscad/io-utils@2.0.18
      • @jscad/io@2.3.2
      • @jscad/json-deserializer@2.0.19
      • @jscad/json-serializer@2.0.18
      • @jscad/obj-deserializer@2.0.18
      • @jscad/obj-serializer@2.1.8
      • @jscad/stl-deserializer@2.1.15
      • @jscad/stl-serializer@2.1.8
      • @jscad/svg-deserializer@2.4.11
      • @jscad/svg-serializer@2.3.6
      • @jscad/x3d-deserializer@2.1.5
      • @jscad/x3d-serializer@2.3.8
      • @jscad/modeling@2.9.3
      • @jscad/array-utils@2.1.4
      • @jscad/img-utils@2.0.5
      • @jscad/regl-renderer@2.5.9
      • @jscad/vtree@2.0.19
      • @jscad/web@2.5.9
      posted in Announcements
      z3dev
      z3dev
    • RE: basic design for projection

      @hrgdavor thanks for the prerelease event. 🙂

      There’s one more special function coming; scission()

      This one is totally inspired by @gilboonet

      FYI, this is tied to a MAJOR RELEASE of the modeling library, so please pay close attention to the release notes.

      posted in Design Discussions
      z3dev
      z3dev
    • Maker Faire Tokyo 2019

      Maker Faire Tokyo 2019
      日時:2019年8月3日(土)、8月4日(日)
      会場:東京ビッグサイト(東京都江東区有明3-11-1)
      アナウンス: https://makezine.jp/blog/2019/01/mft2019_announce.html

      Maker Faire Tokyo 2019
      Dates: August 3rd to August 4th
      Place: Tokyo Big Site
      Announcement: https://makezine.jp/blog/2019/01/mft2019_announce.html

      I’m hoping to show JSCAD again this year. Let me know if you’re in town.

      posted in General Discussions
      z3dev
      z3dev
    • RE: V2 JSCAD Packages Available!

      @BarbourSmith Thanks.

      I noticed that as well. For now, you'll have to manually switch the version to 'alpha'.

      posted in Announcements
      z3dev
      z3dev
    • RE: Empty object

      @udif great question!

      There are three main objects; geom3, geom2, and path2. You can create empty versions of these…

      const a = geom3.create()
      const b = geom2.create()
      const c = path2.create()
      
      posted in Design Discussions
      z3dev
      z3dev
    • RE: How do I share the parametric model without sharing the code?

      @kevinos welcome!

      The JSCAD model (code) is required as the compilation is completed by the browser. So, you will have to find ways to obfuscate the code.

      posted in General Discussions
      z3dev
      z3dev
    • JSCAD V2 Update

      It’s been a while since we have posted any update on V2, so here’s a few notes on what’s going on.

      First, the reorganization of the CSG library is almost done, but like always the last 5% takes the most time. Once again, the major goals are:

      • Move to functional API, i.e. no more monolithic objects
      • Standardized function names, parameters, error checks, etc.
      • Lots of small modules to allow more reuse
      • Math and Geometry data structures based on arrays
      • Tests for everything

      There have been some name changes to functions, but the new names are clear. Parameter names haven’t changed much, but one major change is the usage of RADIANS for all angles and rotations. There are several bug fixes and improvements as well. Tests… yeah… lots… 394 test suites with over 90% coverage.. and this will continue to improve.

      Second, all JSCAD libraries are being brought together into one repository; OpenJSCAD.org. This allows the libraries to be managed together, and produce releases faster. And hopefully, contributions from anyone at any level will be easier. This includes the CSG library, IO library, and new viewer.

      Third, you can start following along. There are still a few major changes coming, but you can already get a good feel for things by cloning the OpenJSCAD.org repository, and looking at the V2 branch.

      Feel free to ask any questions about V2.

      posted in Development Discussions
      z3dev
      z3dev
    • Release : 2021 APR 15

      There's a new release of JSCAD, including changes from several previous pull requests.

      Fixes:
      modeling: correced snapPolygons to remove duplicate vertices which is possible (#791) (1eaf86f)
      regl-renderer: corrected zoomToFit for 2D geometries (#793) (2a05d3e)

      Successfully published:

      • @jscad/cli@2.1.0
      • @jscad/core@2.1.0
      • @jscad/examples@2.1.0
      • @jscad/amf-deserializer@2.0.1
      • @jscad/amf-serializer@2.0.1
      • @jscad/dxf-deserializer@2.1.0
      • @jscad/dxf-serializer@2.0.1
      • @jscad/io-utils@2.0.1
      • @jscad/io@2.0.1
      • @jscad/json-deserializer@2.0.1
      • @jscad/json-serializer@2.0.1
      • @jscad/obj-deserializer@2.0.1
      • @jscad/stl-deserializer@2.0.1
      • @jscad/stl-serializer@2.0.1
      • @jscad/svg-deserializer@2.1.0
      • @jscad/svg-serializer@2.1.0
      • @jscad/x3d-serializer@2.1.0
      • @jscad/modeling@2.1.0
      • @jscad/array-utils@2.0.1
      • @jscad/img-utils@2.0.1
      • @jscad/regl-renderer@2.0.1
      • @jscad/vtree@2.0.1
      • @jscad/web@2.1.0
        lerna success published 23 packages
      posted in Announcements
      z3dev
      z3dev
    • RE: Has anyone had success using openjscad in react?

      @kevinos no problem.

      so, JSCAD designs are actually Javascript functions which perform calcuations, create geometry, perform operations with geometry, and finally return the geometry of interest.

      const {primitives} = require('@jscad/modeling')
      
      const main = () => {
        let object1 = primitives.circle({radius: 22, segments: 36})
        object1.color = [1,0,0,1]
      
        return object1
      }
      module.exports = {main}
      

      The return of object1 from main() is a 2D geometry, i.e. a geom2 object. In the WEB UI, this object is passed to the 'rendering' function, and shows up on the screen as a red circle.

      The Vue component requires 2D/3D geometries as well. And as a Vue component, it can live inside another Vue component (or application). This is the rendering piece only.

      The JSCAD WEB UI is doing a whole lot more underneath. It loads all the code, evaluates (compiles?) each piece of code, and finally executes the main() function.

      If you want this functionality then there's some more plumbing required.

      posted in General Discussions
      z3dev
      z3dev
    • V2 Offset

      There's some new functionality coming with V2, which is pretty exciting. So, I thought a little preview would be nice.

      This is the new offset() function, which can calculate the offset of a path or a 2D geometry.

      Here's a photo of a line (black) being offset both positive (green) and negative (red), with rounded corners.

      0_1565853648828_offset_path_4.png

      And here's a simular image of a 2D geometry, but note that this geometry has a hole. So, offsets are applied to both inside and outside edges. In this case, the corners are only connected at the intersection of the edges.

      0_1565853755948_offset_geom2_5.png

      Hope you like this one!

      posted in Development Discussions
      z3dev
      z3dev
    • Release : 2021 MAY 16

      There's a new release of JSCAD, including changes from several pull requests.

      Bug Fixes

      examples: corrected sphere, text, balloon examples, added orientation example (#840)
      regl-renderer: added reasonable defaults for drawGrid
      regl-renderer: corrected conversion of empty solids to entities, updated tests
      regl-renderer: corrected determination of camera position change in orbitControls
      web: another attempt to fix performance / elasticity issues of viewer
      web: replaced JSON comparisons with ID comparisons in viewer

      FYI, the most-gestures package has been integrated into the web package.

      Successfully published:

      • @jscad/cli@2.2.2
      • @jscad/core@2.3.2
      • @jscad/examples@2.2.0
      • @jscad/regl-renderer@2.1.1
      • @jscad/web@2.3.1

      Thanks to @hrgdavor for the viewer improvements.

      posted in Announcements
      z3dev
      z3dev