GETTING STARTED
Here is some introductory information to help you get started.
Programming Styles
The DesignScript Language is unique in that it introduces multiple styles of programming within a single language. Programming (as with exploratory design) is all about control. Different styles of programming give the programmer access to different approaches to flow control. Imperative programming is characterized by explicit 'flow control' used for loops (for iteration) and if statements (for conditionals) as found in familiar scripting and programming languages such as Python.
On the other hand, Associative programming uses the concept of graph dependencies to establish 'flow control.' Changes to 'upstream' variables are automatically propagated changes to downstream variables.
Imperative programming is appropriate for conventional scripting while Associative programming is an appropriate way to represent complex geometric modeling operations. Any serious design project is likely to require both approaches. Therefore it is highly desirable that the border between Imperative and Associative programing can be as porous as possible.
In DesignScript this is achieved by using a common programming notation for both Imperative and Associative programing.
The DesignScript Geometry
DesignScript supports an extensive range of geometric types and operations by harnessing the Autodesk Shape Manager geometry library and other libraries. The geometric types include points, planes, coordinate systems, curves (lines, arc, circles, bspline curves), polygons, surfaces (including bspline surfaces and sub division meshes), and solids. Within this library more complex geometry can be built from primitive geometry. The geometric operations include intersect, project, trim, solid booleans, and transformations (scale, rotate, translate, and shear). The geometry library is continuously being extended and refined.
By combining scripting with geometry, the designer is able to define complex modeling processes where the output of one geometric operation can be used as the input to successive geometric operations. This gives an infinite scope for exploratory design - limited only by the designer's imagination. A sequence of such geometric modeling operations created and tested by the user can be used to define a new function or class within DesignScript and these can be re-used in other scripts. This enables the creative user to extend DesignScript with his own function or class library.
The DesignScript IDE
The IDE enables scripts to be created, edited, executed, and debugged. During debugging, the user can 'single step' through the execution of his script (and observe the resulting geometry being created or modified). To control debugging, the user can set break points at specific statements and step into functions and methods. The IDE also supports the ability to 'watch' the value of specific variables.
The DesgnScript Analysis and Simulation tools
DesignScript combines the programmatic construction of design geometry together with analysis and simulation. Analysis tools can be used to evaluate generated geometry, and simulation tools be used to create or modify design geometry. For example, the user can make the analysis dependent on the model geometry. If the geometry model is changed, then this will trigger an automatic re-analysis. As this example illustrates, DesignScript is set up to support an iterative approach to design. Currently, the following tools are being integrated with DesignScript:
- Robot (Structural Analysis)
- Ecotect environmental analysis
- Green Building Studio (Building performance analysis and simulation),
- SMARTform (form finding)
- Genetic Algorithm (optimization solver) [The latter two applications have been developed using DesignScript by our colleagues at Buro Happold].
These analysis and simulation tools were built using the DesignScript API either by Autodesk or by third parties. This demonstrates that DesignScript is easy to extend, including being extensible by users, specifically applications written in C# can be directly used from within DesignScript.
When we take all this functionality together (the language, geometry, IDE and analysis and simulation tools) then we can appreciate just how powerful DesignScript really is. The designer can start with a relatively simple geometric model and gradually build up to a complex model and integrated analysis which is being iteratively refined.
EARLY STAGES
We want to emphasize that this is a technology preview of an initial version of DesignScript. DesignScript is still under development and there are many more aspects of DesignScript and its supporting tools that have yet to emerge. So at this time DesignScript is not being presented as a complete, finished system, but an interesting ‘work in progress’ which demonstrates some highly innovative features of script based design. Never the less, even in its initial form DesignScript can already be used for some important forms of design exploration, which would be practically impossible to achieve with existing applications or indeed with existing scripting tools.
Some the current aspects of DesignScript that might be of interest:
- DesignScript works in its own environment within AutoCAD.
- In the future, other environments will be selected to host DesignScript.
- The geometry created by DesignScript can be saved as a DWG file.
- In the future, geometry created by DesignScript can be saved in other formats.
- Blocks previously created in AutoCAD can be programmatically placed by DesignScript.
- In the future, design data in other formats will also be capable of being worked with programmatically by DesignScript.
- After the DesignScript session is complete, a file created by DesignScript can be edited by regular AutoCAD commands, but then it may no longer accurately represent the result of running the DesignScript.
- Planned future enhancements include the ability to interactively modify DesignScript-generated-geometry during a DesignScript session. This will enable the user to capture an interactive design session as a script in a similar way to a ‘record’ function.
- DesignScript offers many different programing possibilities which overlap with AutoLisp, but it is not a replacement for AutoLisp.
DesignScript is addressing a different set of user needs than AutoLisp and other scripting languages. It is intended to be used on complex modeling and analysis projects where the whole process of geometry generation and the application of analysis is required to be script driven. DesignScript is also a useful entry point for computational design optimization.
DesignScript enables perceptive designers to generate complex building forms and to easily create and evaluate alternative concepts. Instead of directly designing the building, the user designs a script which in turn generates the building. This may be a change in thought process and workflow, but one which allows the generation of designs that might be impossible to create by traditional direct modeling techniques. DesignScript is based on the idea of exploratory design through exploratory programming.
DesignScript is combined with many advanced geometry modeling features and with analysis and simulation tools from both structural engineering and building performance. Therefore the design exploration supported by DesignScript can be embrace architecture, structural engineering, and building performance. This supports a broad, integrated and multi-disciplinary approach to design.
The DesignScript geometry library also supports a range of modeling, from spatial modeling (at a conceptual architectural scale) through to detailed solid modeling (for example, for the digital fabrication of individual building components). This supports a depth of modeling spanning different levels of scale and detail.
The DesignScript language supports different types of design abstraction through the provision of different styles of programming: Associative and Imperative.
DesignScript supports a breadth design by integrating the work of different design and engineering disciplines and also supports a depth of design by allowing the users to work at different levels of scale, levels of detail, and levels of abstraction. This breadth and depth is all combined into a single exploratory computational design tool.