Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
@jscad/desktop
Advanced tools
Experimental desktop jscad (openjscad) client, built using Electron
A LOT OF THE THINGS HERE CAN AND WILL CHANGE!! This softare is pre-alpha, use at your own risk etc !
require(<moduleName>)
calls to include other functions, shapes etcjavascript module.exports = {main, getParameterDefinitions}
require()
all the OpenJSCAD modules you use (like @jscad/csg
etc) yourself: if the app detects that you do not have module.exports
, then it will inject all the OpenJSCAD api itself, with a MAJOR limitation at this time:
you cannot make require() calls from anything but the root level file, and you do not have access to the API (this will get fixed)there will NOT be out of the box support for es6 modules anytime soon, please use a transpiler (Babel.js etc) if you want to use es modules
this is an experimental feature that adds a HUGE performance boost by turning the various geometry creation functions (so cube(), sphere(), union(), difference() etc into a virtual tree, and caching each of the items in the tree when evaluating the tree into actual csg/cag object you can see more information about it here
Tip: to take even more advantage of this feature, please have your main() script return an array of shapes if there are multiple independant shapes/parts, as union() operations are more costly
This desktop app also saves your current design's cache to the hard drive, making a reload after restarting the app very fast! IF you follow the instructions/limitations below
LIMITATION 1 : this ONLY WORKS WITH THE FUNCTIONAL API !! ie cube(), sphere(), union(), difference(), translate(), scale() etc but NOT CSG.cube(), csgObject.union(xxx), csgObject.translate(xxx)
LIMITATION 2: because of the limitation above you CANNOT mix the two coding styles: so this is FUNCTIONAL API ONLY, NO MIXING !! since the non functional api will become deprecated soon, this is future facing decision regardless :)
Note: this is experimental, and somewhat clunky, will VERY LIKELY change in the future !!!
1 - with explicit require() calls (prefered method)
toggle the 'Experimental geometry caching:' setting in the options panel (turned off by default)
install the following package in your design
npm install kaosat-dev/jscad-tree-experiments
replace your require('@jscad/csg/api')
calls with require('jscad-tree-experiment').api
example :
this script
const {cylinder} = require('@jscad/csg/api').primitives3d
const {color} = require('@jscad/csg/api').color
const {difference} = require('@jscad/csg/api').booleanOps
const {translate} = require('@jscad/csg/api').transformations
module.exports = function assemblyMount (params) {
const {plateThickness, plateOffset, assemblyMountDia, assemblyMountBoltDia} = params
return translate([0, 0, plateThickness], color('gray',
difference(
cylinder({h: plateOffset - plateThickness, d: assemblyMountDia}),
cylinder({h: plateOffset - plateThickness, d: assemblyMountBoltDia})
)
))
}
should become
const {cylinder} = require('jscad-tree-experiment').api.primitives3d
const {color} = require('jscad-tree-experiment').api.color
const {difference} = require('jscad-tree-experiment').api.booleanOps
const {translate} = require('jscad-tree-experiment').api.transformations
module.exports = function assemblyMount (params) {
const {plateThickness, plateOffset, assemblyMountDia, assemblyMountBoltDia} = params
return translate([0, 0, plateThickness], color('gray',
difference(
cylinder({h: plateOffset - plateThickness, d: assemblyMountDia}),
cylinder({h: plateOffset - plateThickness, d: assemblyMountBoltDia})
)
))
}
you can find an example design that uses these imports and makes full use of the speedups here: https://github.com/kaosat-dev/Isolos
2 - For old still scripts without explicit require() calls
just toggle the 'Experimental geometry caching:' setting in the options panel (turned off by default) be warned however that a lot of the official examples etc will not work with this out of the box
This version of Jscad has support for multiple languages (as in text for the UI, not programming languages):
you can find the language files in the locales folder
pre-alpha, expect bugs!
git clone this repository
cd jscad-desktop
npm i
For now , dev mode only! to start the app, in the root folder , type
npm run dev
* t
: top view
b
: bottom viewl
: left viewr
: right viewf
: front viewb
: back view
(yes 'b' is bound to both bottom & back views, whoops)p
: perspective projectiono
: orthographic projectionThe MIT License (MIT) (unless specified otherwise)
FAQs
jscad desktop application
The npm package @jscad/desktop receives a total of 0 weekly downloads. As such, @jscad/desktop popularity was classified as not popular.
We found that @jscad/desktop demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.