• ### BREP face tessellation implemented!

10/12/2017 at 06:25 0 comments

Tessellating of BREP(trimmed) surfaces is done.  Check out the example of a bounded BREP surface with a hole inside tessellated.

• ### NURBS Support

10/12/2017 at 06:23 0 comments

After getting some success with the BREP boolean algorithm next step should be  supporting all other kinds of surfaces. I decided to start with the NURBS surfaces because it is possible to represent almost any other surface like cylindrical, spherical, conical, torus and etc… by NURBS.  For NURBS evaluation a picked only available for javascript library: http://verbnurbs.com/.  Also I have compiled opennurbs (a NURBS library written in C++) to javascript. Still haven't decided which library to use. At that point, I had to implement the following in order to move on:

1. Enhance my BREP boolean algorithm to support curves and NURBS surfaces.
2. Trimmed by loops NURBS surface tessellation which is needed for visualization.  vernurbs is only able to tessellate un-treamed surfaces.
• ### BREP testing framework and 73 unit test for BREP boolean operations

10/12/2017 at 06:21 0 comments

After my first implementation of BREP boolean algorithm I started running into the corner cases like coincident vertices/edges/surfaces and etc.

It was a time to create a testing framework  for BREP sub-system to track the regressions and to test the quality of the boolean algorithm on the crazy data.

Here is the view of my testing framework. I have creates 73 automated  tests for brep boolean so far:

Here are some examples of the corner case. All these objects are created by applying the boolean operations on a box.

• ### BREP and first approach to Boolean algorithm

10/12/2017 at 06:13 0 comments

After the implementation of the 2d sketcher I decided to come up with a proof of concept of designing things in 3d where one can:

1. pick a face and then draw a sketch on a that face
2. Convert the 2d sketch to 3d by either extruding or revolving it
3. Perform a Boolean operation: either union or subtract

My first implementation of 3D sub-system was based on csg.js library https://evanw.github.io/csg.js/. It’s a great library and allowed me to put 2d and 3d sub-systems together and come up with the first prof of concept. This library gave me the most important piece I didn't have is to perform the 3d operations on 3d objects(union,  intersect and subtract).

CSG.js uses the mesh representation which means I had to tessellate the faces to triangles in order to perform a boolean operation loosing the information about  a face boundary such as kind of line(circle, arc, line…) and its parameters. This fact means that it's not really possible to draw a sketch applying constraints to the face boundary.

The second big limitation of the csg approach was unable to perform any operations on edges like facets or fillet. Neither on vertices. Because all this information gets lost after the tessellation.

Recovering the boundaries  information wasn't really possible and I hade few failed attempts to solve this problem.

So taking into account that such implementation of 3d was a just proof of concept it was a time to move on and coming up with a better engine for the 3d part.

The industrial standard for 3d  CADs is BREP - boundary representation. Unlike mesh-based data structures which is just a big set of triangles(or maybe convex polygons) the BREP is a collection of connected surfaces where each surface can be for example a plane or a conical surface or a NURBS. A surface is trimmed by a set of edges. A trimmed surface  is connected to other trimmed surfaces through those edges.

Another big advantage of BREP is that after applying boolean operation the boundary information(edges and vertices etc.) doesn't get lost. No tessellation is required for the boolean operations. Tessellation is only needed for visualizing the BREP.

My plan was to define the BREP data-structures and try to implement the boolean algorithm on them. I started only with supporting planes as a surface. And then after awhile I was able to perform see first real results of my BREP boolean algorithm:

• ### jSketcher is truly a wonderful development in cad software.

09/09/2017 at 05:14 0 comments

just to clarify I am not the amazing dev behind this project. Val Erastov has done an amazing job of bringing parametric 3d solid modeling to the web. He has been worries to move from nurbs to brep and that is an admirable goal with real practical application.

jSketcher and web-cad.org are cross platform cad tools that enable people to design 3d models with out having to install any software locally. A web browser is all that is need.

That simple change is a paradigm shift for 3d modeling software and cad packages. The fact that it is open source and can be run on a variety of platforms is a change from existing packages.

I really hope you give the jSketcher a shot and send this guy some cash. There is a PayPal link at the bottom of the page at http://web-cad.org . It would be awsome to support this project and get cad tools in to the hands of any one with a web browser.