Table of Contents
Fetching ...

Introducing Bidirectional Programming in Constructive Solid Geometry-Based CAD

J. Felipe Gonzalez, Danny Kieken, Thomas Pietrzak, Audrey Girouard, Géry Casiez

TL;DR

This work introduces bidirectional programming for constructive solid geometry (CSG) CAD to bridge code-centric and direct-manipulation workflows. It combines user studies with a design process to identify navigation and spatial-editing challenges, then delivers a proof-of-concept by patching OpenSCAD with bidirectional navigation (reverse/forward search) and direct-manipulation transformations. The approach uses an AST/CSG/Geometric Tree pipeline to connect code statements with 3D view elements, enabling coherent updates in both directions and supporting intuitive edits through on-screen gizmos. The findings suggest that bidirectional navigation can significantly improve navigability and spatial editing in programming-based CAD, while also highlighting areas for refinement, such as handling ambiguities when multiple code statements affect the same geometry and extending support for complex transformation constraints.

Abstract

3D Computer-Aided Design (CAD) users need to overcome several obstacles to benefit from the flexibility of programmatic interface tools. Besides the barriers of any programming language, users face challenges inherent to 3D spatial interaction. Scripting simple operations, such as moving an element in 3D space, can be significantly more challenging than performing the same task using direct manipulation. We introduce the concept of bidirectional programming for Constructive Solid Geometry (CSG) CAD tools, informed by interviews we performed with programmatic interface users. We describe how users can navigate and edit the 3D model using direct manipulation in the view or code editing while the system ensures consistency between both spaces. We also detail a proof-of-concept implementation using a modified version of OpenSCAD.

Introducing Bidirectional Programming in Constructive Solid Geometry-Based CAD

TL;DR

This work introduces bidirectional programming for constructive solid geometry (CSG) CAD to bridge code-centric and direct-manipulation workflows. It combines user studies with a design process to identify navigation and spatial-editing challenges, then delivers a proof-of-concept by patching OpenSCAD with bidirectional navigation (reverse/forward search) and direct-manipulation transformations. The approach uses an AST/CSG/Geometric Tree pipeline to connect code statements with 3D view elements, enabling coherent updates in both directions and supporting intuitive edits through on-screen gizmos. The findings suggest that bidirectional navigation can significantly improve navigability and spatial editing in programming-based CAD, while also highlighting areas for refinement, such as handling ambiguities when multiple code statements affect the same geometry and extending support for complex transformation constraints.

Abstract

3D Computer-Aided Design (CAD) users need to overcome several obstacles to benefit from the flexibility of programmatic interface tools. Besides the barriers of any programming language, users face challenges inherent to 3D spatial interaction. Scripting simple operations, such as moving an element in 3D space, can be significantly more challenging than performing the same task using direct manipulation. We introduce the concept of bidirectional programming for Constructive Solid Geometry (CSG) CAD tools, informed by interviews we performed with programmatic interface users. We describe how users can navigate and edit the 3D model using direct manipulation in the view or code editing while the system ensures consistency between both spaces. We also detail a proof-of-concept implementation using a modified version of OpenSCAD.
Paper Structure (28 sections, 9 figures)

This paper contains 28 sections, 9 figures.

Figures (9)

  • Figure 1: A battery box model from Thingiverse Left: After 3D printing. Right: 3D view in OpenSCAD
  • Figure 2: Reverse navigation. \ref{['feature:browsecsg']}: (1) The user hovers items in the contextual menu and selects an element. \ref{['feature:highlightcode']}: (2) The code of the selected element is highlighted in green. (3) Instantiating statements are also highlighted in green and marked in the margin with the call order. \ref{['feature:highlight3dview']}: (4) The 3D view shows ghosts of removed elements from differences, highlights the selected element in green and impacted elements in pink
  • Figure 3: Forward navigation. \ref{['feature:fwdsearchelements']}: After selecting a portion of an instantiating statement, (1) all the instance creations of the selected code are highlighted in pink, and (2) all the resulting elements are highlighted in pink in the 3D view (3).
  • Figure 4: 3D view edition. \ref{['feature:translate']}: (1) After selecting an element, the user enters editing mode by clicking on the translate button and a gizmo appears. (2) The user clicks and holds the z-axis and moves the pointer to the desired position. (3) The system adds a translate statement. (4) All elements impacted are also updated in the view.
  • Figure 5: 3D View when highlighting a) the union item; b) the difference item.
  • ...and 4 more figures