meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:design_guide_offset [2020/12/06 06:13]
JSCAD Editor created
en:design_guide_offset [2020/12/08 06:56] (current)
JSCAD Editor
Line 1: Line 1:
 ==== Offset ==== ==== Offset ====
  
 +{{ :wiki:jscad-offset.png?nolink | Offset}}
  
 +//Note: The original shape is black.//
 +
 +Offsetting two or three dimensional shapes can be performed, which maintains a specific ''delta'' distance from the shape. The ''corners'' can be filled with 'edge', 'round", or 'chamfer' edges.
 +
 +The opposite is also possible by specifying a negative (-) ''delta''.
 +
 +Defaults:
 +  * delta : 1
 +  * corners : 'edge'
 +  * segments : 16
 +
 +<code javascript>
 +const myshape = offset({corners: 'round'}, shape1)
 +const myshape = offset({delta: -2}, shape2)
 +const myshape = offset({delta: 2}, shape3)
 +</code>
 +
 +//Note: Offsetting three dimensional shapes NOT possible today. This is a known issue.//