Running the Examples
List of: Discussion Topic
Contents: Getting Started Guide

In order to run the examples in this chapter, you must first establish the appropriate environment for running Scheme AIDE. Because Scheme AIDE is an end-user application, you only need to start the application, set up for display, and then enter the commands from a Scheme example at the command prompt. Refer to Chapter 6, Using Scheme AIDE, for more information.

Starting Scheme AIDE

To start Scheme AIDE, simply run the application's executable file. The exact name of the file depends on your platform and the components you have installed. Refer to Chapter 6, Using Scheme AIDE, for instructions on starting the executable on your platform. If you have not already familiarized yourself with using Scheme AIDE, you should review the information in Chapter 6 to help get you started.

Creating a Viewport

In order to display the entities you create in Scheme AIDE, you need to define a viewport (view window). A display list viewport is created using the view:dl command. If you are running Scheme AIDE in Windows on a PC, the view:gl command can be used to create an OpenGL viewport that renders surfaces and solid objects. All Scheme examples in this chapter assume that you already have a viewport defined. Your acisinit.scm file could be updated such that it always creates a viewport. Display list viewports and other types are viewports are covered in more detail in the Graphic Interaction Component Manual.

In the following example, a display list viewport is created and then a simple linear edge is created that starts at the origin and ends at the xyz location (30, 30, 0). In this example, if a viewport had already been created when Scheme AIDE was started, the view:dl command would simply create another display list viewport of the same model. The order of creation of the model versus the viewport is not important.

Scheme Example

; Create a view for display.
(define my_view (view:dl))
;; my_view
; Create a linear edge.
(define my_linear (edge:linear (position 0 0 0)

(position 25 0 0)))
;; my_linear

Clearing the Part

After you've run one example and are ready to start the next during a single Scheme AIDE session, you might want to clear out the entities from the previous example. The part:clear Scheme extension deletes the entities in the part. It is entered as:

(part:clear)
PDF/GET/08CREAT.PDF
HTM/DATA/ACIS/GET/08CREAT/0001.HTM