Hi @LinGuanfu !
Visually that seeems correct: if you click on help/question mark do you have a menu with a list of examples ?
also looking at the console output it seems the two instances are created correctly.
Please try opening a design in both panels (or drag & droping a jscad file/folder).
The css is not finished and could use some tweaking (or might not be a perfect fit for all use cases, but should be easy to change
RE: how to run demo in V2/web?
Hi @LinGuanfu !
V2 Deserializers (Import)
There are some functional changes coming in the V2 deserializers, i.e. importing AMF, DXF, OBJ, STL, and SVG files.
The first major changes is that both translation and instantiation is possible. Like before, translation of found geometries to JSCAD scripts is possible. In addition, found geometries can instantiated directly in object form.
The second major change is that ALL found geometries are returned. No more unions. So, you can directly work with any one of geometries.
The third major change is...
... geometries can have color. This conversion was from a large DXF with lots of 2D lines.
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.
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.
Hope you like this one!
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.
RE: Slicing again... simplifying code
The simple solutions are always the best. Taking a super thin slice is a great idea, and maybe even the best.
The core library will be for core functions, as we expect others (like you) to contribute some really nice high level functionality, such as slicing. If we get the core library rock solid then anything is possible.
Projections on to arbitrary planes is on the wish list, but not there yet.
Thanks for the awesome posts!