top of page

Feature Scripts

Drive Train Generator

While working for Onshape, a CAD software fully in the cloud, I developed several features using FeatureScript, Onshape's open source programming language, that are now public. The features I developed range from standard CAD features to high-level design optimizing features. 

One high level feature is the Drive Train Generator. It simply requires the user to input the axles of the desired drive train (i.e. sketch points) and the desired reduction ratio, and the feature will produce a gear drive that is either exactly the desired ratio, or a close approximation. Closer approximations can be achieved using the built in discrete optimizer.

Sculpt Surface

Although Onshape is a tool designed for Mechanical Engineering, occasionally more free form design is desired. I built a sculpt-surface tool that allows the user to manipulate a solid's surface by simply dragging manipulator arrows which transform the underlying surface. The feature works by using the Parasolid Kernel's UV paramaterization of the surface as a template for the new surface,  and builds the new surface using a series of controlled lofts.

Ray Tracer

Ray tracing is the process of following rays of light as they interact with objects. Ray tracing is especially useful in Engineering for optics design. I wrote a ray tracer using FeatureScript that allows the user to trace light throughout their existing Onshape model, using custom material properties such as index of refraction. Reflection and refraction are modeled precisely, and the depth of ray tracing can be easily controlled by the user. 

Surface Pattern

Being able to pattern linearly in multiple directions is a current feature in Onshape. In order to cover more organic use-cases, I developed a surface pattern feature, which allows the user to take any pattern object they want, and pattern across a surface which is not necessarily flat. This ability allows texturing such as knurling and other textures like dragon scales to be easily applied to a design.

This feature also works by using the underlying paramaterization of the surface, and applies transforms to the pattern entity and the grid array to allow for patterns in any direction. 

​

These are just a few examples. See Extend SurfacePlanetary Gear Generator, and Radiate Surface

bottom of page