diff --git a/documentation/tutorial/examples/gwl-1.gdl b/documentation/tutorial/examples/gwl-1.gdl deleted file mode 100644 index ffe80f1b9e8cce91cbab05acba9f07a6779a74a8..0000000000000000000000000000000000000000 --- a/documentation/tutorial/examples/gwl-1.gdl +++ /dev/null @@ -1,19 +0,0 @@ -(in-package :gwl-user) - -(define-object president (base-html-sheet) - :input-slots - ((name "Carter") (term 1976) (table-border 1)) - - :functions - ((write-html-sheet - () (with-cl-who (:indent t) - (:html (:head (:title (fmt "Info on President: ~a" - (the name)))) - (:body ((:table :border (the table-border)) - (:tr (:th "Name") (:th "Term")) - (:tr (:td (str (the name))) - (:td (str (the term))))))))))) -;; -;; Access the above example with -;; http://localhost:9000/make?object=gwl-user::president -;; diff --git a/documentation/tutorial/examples/gwl-1.html b/documentation/tutorial/examples/gwl-1.html deleted file mode 100644 index e1aaebe4fb3b6067423c3a692c0cda0b6b876897..0000000000000000000000000000000000000000 --- a/documentation/tutorial/examples/gwl-1.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - Info on President: Carter - - - - - - - - - - -
NameTerm
Carter1976
- diff --git a/documentation/tutorial/examples/gwl-2.gdl b/documentation/tutorial/examples/gwl-2.gdl deleted file mode 100644 index 71111fb1039c2301dbda7a93da95de383d63f4e1..0000000000000000000000000000000000000000 --- a/documentation/tutorial/examples/gwl-2.gdl +++ /dev/null @@ -1,38 +0,0 @@ -(in-package :gwl-user) - -(define-object presidents (base-html-sheet) - :input-slots - ((presidents (list (list :name "Ford" - :term 1974) - (list :name "Carter" - :term 1976) - (list :name "Clinton" - :term 1992) - (list :name "Bush" - :term 2000) - (list :name "Obama" - :term 2008))) - - (table-border 1)) - - :functions - ((write-html-sheet - () - (with-cl-who (:indent t) - (let ((title (format nil "Info on ~a Presidents:" - (length (the presidents))))) - (htm - (:html - (:head (:title (str title))) - (:body - (:p (:c (:h3 (str title)))) - ((:table :border (the table-border)) - (:tr (:th "Name") (:th "Term")) - (dolist (president (the presidents)) - (htm - (:tr (:td (str (getf president :name))) - (:td (str (getf president :term))))))))))))))) -;; -;; Access the above example with -;; http://localhost:9000/make?object=gwl-user::presidents -;; diff --git a/documentation/tutorial/examples/gwl-3.gdl b/documentation/tutorial/examples/gwl-3.gdl deleted file mode 100644 index b50bed9c7929cd71c2ab75511e1c734118df493f..0000000000000000000000000000000000000000 --- a/documentation/tutorial/examples/gwl-3.gdl +++ /dev/null @@ -1,46 +0,0 @@ -(in-package :gwl-user) - -(define-object presidents-with-pages (base-html-sheet) - :input-slots - ((presidents (list (list :name "Ford" :term 1974) - (list :name "Carter" :term 1976) - (list :name "Clinton" :term 1992) - (list :name "Bush" :term 2000) - (list :name "Obama" :term 2008))) - - (table-border 1)) - - - :objects - ((president-pages :type 'president-page - :sequence (:size (length (the presidents))) - :name (getf (nth (the-child index) (the presidents)) - :name) - :term (getf (nth (the-child index) (the presidents)) - :term))) - - - :functions - ((write-html-sheet - () - (with-cl-who (:indent t) - (let ((title (format nil "Info on ~a Presidents:" - (length (the presidents))))) - (htm - (:html - (:head (:title (str title))) - (:body - (:p (:c (:h3 (str title)))) - (:ol - (dolist (page (list-elements (the president-pages))) - (htm - (:li - (the-object - page - (write-self-link :display-string - (the-object page name))))))))))))))) - -;; -;; Access the above example with -;; http://localhost:9000/make?object=gwl-user::presidents-with-pages -;; diff --git a/documentation/tutorial/examples/gwl-3a.gdl b/documentation/tutorial/examples/gwl-3a.gdl deleted file mode 100644 index 528fa88880a13b118b558ea2e0385d1558ffd190..0000000000000000000000000000000000000000 --- a/documentation/tutorial/examples/gwl-3a.gdl +++ /dev/null @@ -1,21 +0,0 @@ -(in-package :gwl-user) - -(define-object president-page (base-html-sheet) - :input-slots - (name term) - - :functions - ((write-html-sheet - () - (with-cl-who () - (let ((title (format nil "Term for President ~a:" - (the name)))) - (htm - (:html - (:head (:title (str title))) - (:body - (the (write-back-link :display-string "<Back")) - (:p (:c (:h3 (str title)))) - (:p (str (the term))))))))))) - - diff --git a/documentation/tutorial/examples/gwl-4.gdl b/documentation/tutorial/examples/gwl-4.gdl deleted file mode 100644 index d65b6f30765760de2ebac48abd9f6dd24ce0fcc8..0000000000000000000000000000000000000000 --- a/documentation/tutorial/examples/gwl-4.gdl +++ /dev/null @@ -1,60 +0,0 @@ -(in-package :gwl-user) - -(define-object revenue-lookup (base-ajax-sheet) - - :input-slots - - ((revenue-data '(2003 25000 - 2004 34000 - 2005 21000 - 2006 37000 - 2007 48000 - 2008 54000 - 2009 78000))) - - :computed-slots - - ((main-sheet-body - (with-cl-who-string () - (str (the main-section main-div))))) - - :objects - - ((table-border :type 'menu-form-control - :size 1 - :choice-list '(0 1) - :default 0 - :ajax-submit-on-change? t) - - (cell-padding :type 'menu-form-control - :size 1 - :choice-list '(0 3 6 9 12) - :default 0 - :ajax-submit-on-change? t) - - (selected-year :type 'menu-form-control - :size 1 - :choice-list (plist-keys (the revenue-data)) - :default (first (the-child choice-list)) - :ajax-submit-on-change? t) - - (main-section - :type 'sheet-section - :inner-html (with-cl-who-string () - (:p (str (the development-links))) - (:p (str (the table-border html-string))) - (:p (str (the cell-padding html-string))) - (:p (str (the selected-year html-string))) - (:p ((:table :border (the table-border value) - :cellpadding (the cell-padding value)) - (:tr (:th (fmt "Revenue for Year ~a:" - (the selected-year value))) - (:td (str (getf (the revenue-data) - (the selected-year value))))))))))) - -(publish-gwl-app "/revenue-lookup" - "gwl-user::revenue-lookup") - - - - diff --git a/documentation/tutorial/examples/gwl-5-one-viewport.gdl b/documentation/tutorial/examples/gwl-5-one-viewport.gdl deleted file mode 100644 index 308cded88bdd5214c64d02ad5d6a64ca234779d8..0000000000000000000000000000000000000000 --- a/documentation/tutorial/examples/gwl-5-one-viewport.gdl +++ /dev/null @@ -1,64 +0,0 @@ -(in-package :gwl-user) - -(define-object x3dom-basic (base-ajax-sheet) - - :computed-slots - ((use-raphael? t) - (use-x3dom? t) - - (main-sheet-body - (with-cl-who-string () - (:p (when *developing?* (str (the development-links)))) - (:p (str (the inputs-section main-div))) - (:table - (:tr - (dolist (viewport (list (the (viewport-sections 1)))) - (htm (:td (:td (str (the-object viewport main-div))))))))))) - - :objects - ((box :type 'box - :display-controls (list :color :blue :transparency 0.2) - :height (the inputs-section box-height value) - :width (the inputs-section box-width value) - :length (the inputs-section box-length value)) - - (inputs-section :type 'inputs-section) - - (viewport-sections - :type 'base-ajax-graphics-sheet - :sequence (:size 2) - :view-direction-default (ecase (the-child index) - (0 :top) (1 :trimetric)) - :image-format-default :raphael - :display-list-objects (list (the box)) - :length 500 :width 500))) - - - -(define-object inputs-section (sheet-section) - - :computed-slots - ((inner-html (with-cl-who-string () - (:p (str (the box-length html-string))) - (:p (str (the box-width html-string))) - (:p (str (the box-height html-string)))))) - - :objects - ((box-length :type 'text-form-control - :default 25 - :ajax-submit-on-change? t) - (box-width :type 'text-form-control - :default 35 - :ajax-submit-on-change? t) - (box-height :type 'text-form-control - :default 45 - :ajax-submit-on-change? t))) - - -(publish-gwl-app "/x3dom-basic" - "gwl-user::box-one-viewport") - -;; -;; Access the above example with -;; http://localhost:9000/make?object=gwl-user::box-with-inputs -;; diff --git a/documentation/tutorial/examples/gwl-hello-world-ajax.gdl b/documentation/tutorial/examples/gwl-hello-world-ajax.gdl new file mode 100644 index 0000000000000000000000000000000000000000..77c90a7f560bb9b358aa40376edaeb0287080892 --- /dev/null +++ b/documentation/tutorial/examples/gwl-hello-world-ajax.gdl @@ -0,0 +1,38 @@ +(in-package :gwl-user) + +;; http://localhost:9000/make?object=gwl-user::hello-world-ajax +(define-object hello-world-ajax (base-ajax-sheet) + :input-slots + ((greetings '("Hello" + "Hola" + "Bonjour" + "Habari" + "Namaste" + "Aloha" + "Ciao"))) + + :objects + ((username-control :type 'text-form-control + :prompt "Enter new name: " + :default "World" + :ajax-submit-on-change? t) + (greeting-control :type 'menu-form-control + :prompt "Select Greeting: " + :size 1 :choice-list (the greetings) + :default (first (the greetings)) + :ajax-submit-on-change? t) + + (main-section + :type 'sheet-section + :inner-html (with-cl-who-string () + (:p (fmt "~a ~a!" (the greeting-control value) (the username-control value))) + (:hr) + (with-html-form (:cl-who? t) + (:p (str (the greeting-control html-string))) + (:p (str (the username-control html-string))))))) + + :computed-slots + ((title (format nil "Greeting for ~a" (the username-control value))) + (main-sheet-body + (with-cl-who-string () + (str (the main-section main-div)))))) diff --git a/documentation/tutorial/examples/gwl-hello-world-controls.gdl b/documentation/tutorial/examples/gwl-hello-world-controls.gdl new file mode 100644 index 0000000000000000000000000000000000000000..55a47b11ec5240007eb77c986bffb501c749784d --- /dev/null +++ b/documentation/tutorial/examples/gwl-hello-world-controls.gdl @@ -0,0 +1,32 @@ +(in-package :gwl-user) + +;; http://localhost:9000/make?object=gwl-user::hello-world-controls +(define-object hello-world-controls (base-ajax-sheet) + :input-slots + ((greetings '("Hello" + "Hola" + "Bonjour" + "Habari" + "Namaste" + "Aloha" + "Ciao"))) + + :objects + ((username-control :type 'text-form-control + :prompt "Enter new name: " + :default "World") + (greeting-control :type 'menu-form-control + :prompt "Select Greeting: " + :size 1 :choice-list (the greetings) + :default (first (the greetings)))) + + :computed-slots + ((title (format nil "Greeting for ~a" (the username-control value))) + (main-sheet-body + (with-cl-who-string () + (:p (fmt "~a ~a!" (the greeting-control value) (the username-control value))) + (:hr) + (with-html-form (:cl-who? t) + (:p (str (the greeting-control html-string))) + (:p (str (the username-control html-string))) + (:p (:button :type :submit "UPDATE"))))))) diff --git a/documentation/tutorial/examples/gwl-hello-world-form.gdl b/documentation/tutorial/examples/gwl-hello-world-form.gdl new file mode 100644 index 0000000000000000000000000000000000000000..b7d0a27d7f15c92714cb86bf00c96891cfeb8275 --- /dev/null +++ b/documentation/tutorial/examples/gwl-hello-world-form.gdl @@ -0,0 +1,35 @@ +(in-package :gwl-user) + +;; http://localhost:9000/make?object=gwl-user::hello-world-form +(define-object hello-world-form (base-ajax-sheet) + :input-slots + ((greetings '("Hello" + "Hola" + "Bonjour" + "Habari" + "Namaste" + "Aloha" + "Ciao"))) + + :computed-slots + ((username "World" :settable) + (greeting (first (the greetings)) :settable) + + (title (format nil "Greeting for ~a" (the username))) + (main-sheet-body + (with-cl-who-string () + (:p (fmt "~a ~a!" (the greeting) (the username))) + (:hr) + (with-html-form (:cl-who? t) + (:p + (:label :for 'greeting "Select greeting: ") + ((:select :name 'greeting) + (dolist (val (the greetings)) + (with-cl-who () + ((:option :value val + :selected (and (equalp val (the greeting)) "selected")) + (esc val)))))) + (:p + (:label :for 'username "Enter new name: ") + (:input :type :text :name 'username :value (the username))) + (:p (:button :type :submit "UPDATE"))))))) \ No newline at end of file diff --git a/documentation/tutorial/examples/gwl-hello-world.gdl b/documentation/tutorial/examples/gwl-hello-world.gdl new file mode 100644 index 0000000000000000000000000000000000000000..6cfddf2b7329e079ff4937cc37157e6c876d9346 --- /dev/null +++ b/documentation/tutorial/examples/gwl-hello-world.gdl @@ -0,0 +1,8 @@ +(in-package :gwl-user) + +;; http://localhost:9000/make?object=gwl-user::hello-world +(define-object hello-world (base-ajax-sheet) + :computed-slots + ((main-sheet-body + (with-cl-who-string () + (:p "Hello World!"))))) diff --git a/documentation/tutorial/examples/gwl-president-links.gdl b/documentation/tutorial/examples/gwl-president-links.gdl new file mode 100644 index 0000000000000000000000000000000000000000..50aae0ba4d0b1dc63ab312770a31f5fdd7c3cd96 --- /dev/null +++ b/documentation/tutorial/examples/gwl-president-links.gdl @@ -0,0 +1,47 @@ +(in-package :gwl-user) + +(define-object president-page (base-ajax-sheet) + :input-slots + (name term) + + :computed-slots + ((title + (format nil "Term for President ~a:" (the name))) + (main-sheet-body + (with-cl-who-string (:indent t) + (the (write-back-link :display-string "<Back")) + (:p (:c (:h3 (the title)))) + (:p (str (the term))))))) + + +;; http://localhost:9000/make?object=gwl-user::presidents-with-links +(define-object presidents-with-links (base-ajax-sheet) + :input-slots + ((data (list (list :name "Carter" :term 1976) + (list :name "Reagan" :term 1980) + (list :name "Bush" :term 1988) + (list :name "Clinton" :term 1992))) + (table-border 1)) + + :objects + ((presidents :type 'president-page + :sequence (:size (length (the data))) + :name (getf (nth (the-child index) (the data)) :name) + :term (getf (nth (the-child index) (the data)) :term))) + + :computed-slots + ((title (format nil "Links to ~a Presidents:" + (length (list-elements (the presidents))))) + (main-sheet-body + (with-cl-who-string (:indent t) + (htm + (:p (:c (:h3 (the title)))) + ((:table :border (the table-border)) + (:tr (:th "Name")) + (dolist (president (list-elements (the presidents))) + (htm + (:tr (:td (the-object + president + (write-self-link :display-string + (the-object president name))))))))))))) + diff --git a/documentation/tutorial/examples/gwl-president-table.gdl b/documentation/tutorial/examples/gwl-president-table.gdl new file mode 100644 index 0000000000000000000000000000000000000000..f1db62eac978bd0982a55ad343de0c1d993b685c --- /dev/null +++ b/documentation/tutorial/examples/gwl-president-table.gdl @@ -0,0 +1,32 @@ +(in-package :gwl-user) + +(define-object president () + :input-slots + (name term)) + +;; http://localhost:9000/make?object=gwl-user::presidents +(define-object presidents (base-ajax-sheet) + :input-slots + ((data (list (list :name "Carter" :term 1976) + (list :name "Reagan" :term 1980) + (list :name "Bush" :term 1988) + (list :name "Clinton" :term 1992)))) + + :objects + ((presidents :type 'president + :sequence (:size (length (the data))) + :name (getf (nth (the-child index) (the data)) :name) + :term (getf (nth (the-child index) (the data)) :term))) + + :computed-slots + ((main-sheet-body + (with-cl-who-string (:indent t) + (htm + (:p (:c (:h3 (fmt "Info on ~a Presidents:" + (length (list-elements (the presidents))))))) + ((:table :border 1) + (:tr (:th "Name") (:th "Term")) + (dolist (president (list-elements (the presidents))) + (htm + (:tr (:td (str (the-object president name))) + (:td (str (the-object president term)))))))))))) diff --git a/documentation/tutorial/images/gwl-1.png b/documentation/tutorial/images/gwl-1.png deleted file mode 100644 index c7ce1de8003fecb7de75c23f37d4be6b5b081fe7..0000000000000000000000000000000000000000 Binary files a/documentation/tutorial/images/gwl-1.png and /dev/null differ diff --git a/documentation/tutorial/images/gwl-2.png b/documentation/tutorial/images/gwl-2.png deleted file mode 100644 index 4930eec8747d6832a69f2f004c9df3e5665c405c..0000000000000000000000000000000000000000 Binary files a/documentation/tutorial/images/gwl-2.png and /dev/null differ diff --git a/documentation/tutorial/images/gwl-3.png b/documentation/tutorial/images/gwl-3.png deleted file mode 100644 index 458191ec605b6adbd8e470669b0369cb052854a0..0000000000000000000000000000000000000000 Binary files a/documentation/tutorial/images/gwl-3.png and /dev/null differ diff --git a/documentation/tutorial/pdf/tutorial.pdf b/documentation/tutorial/pdf/tutorial.pdf index d514edeadcecd66ef88126e7b64515bed2b37ebf..b98cd3f5dc0b739cc8971011a1959c2254eb1950 100644 Binary files a/documentation/tutorial/pdf/tutorial.pdf and b/documentation/tutorial/pdf/tutorial.pdf differ diff --git a/documentation/tutorial/pdf/tutorial.tex b/documentation/tutorial/pdf/tutorial.tex index 99ff2ee99cefa18d60ad9bfe1257e09926bdb2a2..a2c4b2c1bfa13239a98dec8a368c13aa6ab45aff 100644 --- a/documentation/tutorial/pdf/tutorial.tex +++ b/documentation/tutorial/pdf/tutorial.tex @@ -49,8 +49,7 @@ \maketitle -\footnotetext{Copyright -\copyright{} 2012, Genworks International. Duplication, by any means, in whole or in part, requires +\footnotetext{Copyright \copyright 2012, Genworks International. Duplication, by any means, in whole or in part, requires written consent from Genworks International.} \tableofcontents @@ -850,7 +849,7 @@ few seconds to several minutes for the Genworks GDL Console (or *inferior-lisp* buffer) to settle down and give you a \texttt{gdl-user(): } prompt. This window is where you will see most of your program's textual output, any error messages, warnings, etc. -\item In Emacs, type: \texttt{C-x \&} (or select Emacs menu item Buffers$\rightarrow$*slime-repl...*) to visit the ``*slime-repl ...*'' buffer. The full name +\item In Emacs, type: \texttt{C-x \&} (or select Emacs menu item \emph{Buffers$\rightarrow$*slime-repl...*}) to visit the ``*slime-repl ...*'' buffer. The full name of this buffer depends on the specific CL/GDL platform which you are running. This buffer contains an interactive prompt, labeled \texttt{gdl-user>}, where you will enter most of your commands to interact with your running GDL session for testing, debugging, etc. There is also a web-based graphical interactive environment called \emph{tasty} which will be discussed in Chapter @@ -1446,7 +1445,7 @@ A common way to produce a string in CL is with the \texttt{format} function. Alt As the above example demonstrates, \texttt{format} takes a \emph{stream designator} or \texttt{nil} as its first argument, then a \emph{format-string}, then enough arguments to match the \emph{format directives} in the format-string. Format directives begin with the -tilde character (\~). The format-directive \texttt{~a} indicates that the printed representation of the corresonding argument should simpy be +tilde character (\texttt{~}). The format-directive \texttt{~a} indicates that the printed representation of the corresonding argument should simpy be substituted into the format-string at the point where it occurs. @@ -3207,32 +3206,34 @@ GUI applications. Although the host Common Lisp environment (e.g. Allegro CL or LispWorks) may contain a GUI builder and Integrated Development Environment, and you are free to use these, GDL does not provide specific support for them.}. Using the same \texttt{define-object} syntax which you have already encountered, you can define -web pages, sections of web pages, and \emph{form control} elements such as type-in fields, checkboxes, and choice -lists [using this capability does require a basic working knowledge of -the HTML language].\footnote{We will not cover HTML in this manual, but -plentiful resources are available online and in print.}. +web pages, sections of web pages, and form elements. +Your UI elements generate standard HTML, CSS, JavaScript, and can use +any external client-side libraries as with any standard web application. AJAX support is +built-in, making it easy for server and UI elements to communicate asynchronously. -Any web extensions such as custom JavaScript and JavaScript libraries -can also be used, as with any standard web application. +In order to create a web application in GDL, you should have a working +knowledge of the semantics of HTML, for which many explanations are available +online and in print. For syntax, you can use an HTML-generation library such as \href{http://weitz.de/cl-who}{CL-WHO}\footnote{http://weitz.de/cl-who} or \href{http://www.franz.com/support/documentation/current/doc/aserve/htmlgen.html}{HTMLGen}\footnote{http://www.franz.com/support/documentation/current/doc/aserve/htmlgen.html}, both of which are built into GDL. In this tutorial we will use CL-WHO, so in what folows, +we will assume that you are already familiar with its features as documented in \href{http://weitz.de/cl-who}{http://weitz.de/cl-who}. -With the primitive objects and functions in its \texttt{:gwl} package, GDL supports both the traditional ``Web 1.0'' -interfaces (with fillout forms, page submittal, and complete page -refresh) as well as so-called ``Web 2.0'' interaction with AJAX. +\section{Package and Environment for Web Development} +\label{sec:packageandenvironmentforwebdevelopment} -\section{Package and Environment for Web Development} -\label{sec:packageandenvironmentforwebdevelopment} +The \texttt{:gwl} package\footnote{The acronym "GWL" stands +for Generative Web Language} contains a set of primitive objects and functions provided by +GDL for building web applications. -Similarly to \texttt{gdl:define-package}, you can use \texttt{gwl:define-package} in order to create a working -package which has access to the symbols you will need for building a +Similarly to \texttt{gdl:define-package}, you can use \texttt{gwl:define-package} +to create a working package which has access to the symbols you will need for building a web application (in addition to the other GDL symbols). @@ -3242,18 +3243,14 @@ work. For real projects, you should define your own package using \texttt{gwl:de -The acronym ``GWL'' stands for Generative Web Language, -which is not a separate language from GDL itself, but rather is a set -of primitive objects and functions available within GDL for building -web applications. The YADD reference documentation for package -``Generative Web Language'' provides detailed specifications for all -the primitive objects and functions. +The YADD\footnote{YADD is accessible with \texttt{http://localhost:9000/yadd}.} reference documentation for package +GWL provides detailed specifications for all the primitive objects and functions. -\section{Traditional Web Pages and Applications} +\section{Web Page Objects} -\label{sec:traditionalwebpagesandapplications} +\label{sec:webpageobjects} @@ -3262,351 +3259,267 @@ steps are needed: \begin{enumerate} -\item Mix \texttt{base-html-sheet} into the object definition. +\item Mix \texttt{base-ajax-sheet} into the object definition. -\item define a GDL function called \texttt{main-sheet} within the object definition. +\item Within the object, define the GDL message \texttt{main-sheet-body} returning an HTML string. \end{enumerate} -The \texttt{main-sheet} function should return valid -HTML for the page. The easiest way to produce HTML is with the use of -an HTML generating library, such as \href{http://weitz.de/cl-who}{CL-WHO}\footnote{http://weitz.de/cl-who} or \href{http://www.franz.com/support/documentation/current/doc/aserve/htmlgen.html}{HTMLGen}\footnote{http://www.franz.com/support/documentation/current/doc/aserve/htmlgen.html}, both of which are built into GDL. -For our examples we will use cl-who, which is currently the -standard default HTML generating library used internally by GDL. Here -we will make note of the major features of cl-who while introducing -the examples. For complete documentation on cl-who, please visit the -page at Edi Weitz' website linked above and listed in the footnote -below. +As soon the object is defined, the object's page becomes accessible at the URL +\begin{quote} +\texttt{http://localhost:9000/make?object=\emph{classname}} + +\end{quote} +where \texttt{\emph{classname}} is the object name (including the package name). Connecting to this +URL starts a new web server session and creates an instance of the object unique to that session\footnote{This is done by redirecting the response to a unique URL identified by a \emph{session ID}. +The session ID is constructed from a combination of the current date and time, along with a pseudo-random number.}. +This ensures that each user of your application site will see their own specific instance of the object. -\subsection{A Simple Static Page Example} -\label{subsec:asimplestaticpageexample} +The \texttt{main-sheet-body} message can be either a computed slot or a GDL function. It should +produce a string of the HTML to be placed in the body of the page, i.e. between the \texttt{} and +\texttt{} tags. The \texttt{} of the page is filled in automatically by GDL, and can be +customized in various ways. -In Figure -\ref{fig:gwl-1}, GWL convenience macro \texttt{with-cl-who} is used; this sets up a standard default environment for outputting HTML -within a GWL application. + +The easiest way to produce a valid \texttt{main-sheet-body} string is with the GWL convenience macro +\texttt{with-cl-who-string}. This is a wrapper for the CL-WHO macro \texttt{with-html-output} which +additionally establishes the default environment for outputting an HTML string within a GWL application. + + + +Figure +\ref{fig:gwl-hello-world} is an example of a simple static web page. \begin{figure} \begin{lrbox}{\boxedverb} \begin{minipage}{\linewidth} +{\small \begin{verbatim}(in-package :gwl-user) -(define-object president (base-html-sheet) - :input-slots - ((name "Carter") (term 1976) (table-border 1)) - - :functions - ((write-html-sheet - () (with-cl-who (:indent t) - (:html (:head (:title (fmt "Info on President: ~a" - (the name)))) - (:body ((:table :border (the table-border)) - (:tr (:th "Name") (:th "Term")) - (:tr (:td (str (the name))) - (:td (str (the term))))))))))) -;; -;; Access the above example with -;; http://localhost:9000/make?object=gwl-user::president -;; +;; http://localhost:9000/make?object=gwl-user::hello-world +(define-object hello-world (base-ajax-sheet) + :computed-slots + ((main-sheet-body + (with-cl-who-string () + (:p "Hello World!"))))) -\end{verbatim} +\end{verbatim}} \end{minipage} \end{lrbox} \fbox{\usebox{\boxedverb}} -\caption{Simple Static Page Example} +\caption{Simple Static Page} -\label{fig:gwl-1} +\label{fig:gwl-hello-world} \end{figure} -The code in Figure -\ref{fig:gwl-1} produces HTML output as shown in Figure -\ref{fig:gwl-1-html} which looks similar to Figure -\ref{fig:gwl-1-image} in a web browser. +This simple framework can also be used to create dynamic content, as illustrated in figure +\ref{fig:gwl-president-table}. +Note that CL-WHO symbols such as \texttt{htm}, \texttt{str}, and \texttt{fmt} are available in GWL without +package qualification. See \href{http://weitz.de/cl-who}{http://weitz.de/cl-who} for an explanation of +dynamic HTML generation in CL-WHO. \begin{figure} \begin{lrbox}{\boxedverb} \begin{minipage}{\linewidth} +{\small -\begin{verbatim} - - - Info on President: Carter - - - - - - - - - - -
NameTerm
Carter1976
- +\begin{verbatim}(in-package :gwl-user) -\end{verbatim} +(define-object president () + :input-slots + (name term)) + +;; http://localhost:9000/make?object=gwl-user::presidents +(define-object presidents (base-ajax-sheet) + :input-slots + ((data (list (list :name "Carter" :term 1976) + (list :name "Reagan" :term 1980) + (list :name "Bush" :term 1988) + (list :name "Clinton" :term 1992)))) + + :objects + ((presidents :type 'president + :sequence (:size (length (the data))) + :name (getf (nth (the-child index) (the data)) :name) + :term (getf (nth (the-child index) (the data)) :term))) + + :computed-slots + ((main-sheet-body + (with-cl-who-string (:indent t) + (htm + (:p (:c (:h3 (fmt "Info on ~a Presidents:" + (length (list-elements (the presidents))))))) + ((:table :border 1) + (:tr (:th "Name") (:th "Term")) + (dolist (president (list-elements (the presidents))) + (htm + (:tr (:td (str (the-object president name))) + (:td (str (the-object president term)))))))))))) + +\end{verbatim}} \end{minipage} \end{lrbox} \fbox{\usebox{\boxedverb}} -\caption{Simple Static Page Example} +\caption{Dynamic Content Using CL-WHO} -\label{fig:gwl-1-html} +\label{fig:gwl-president-table} \end{figure} -\begin{figure} -\begin{center} -\includegraphics[width=4in,height=3in]{../images/gwl-1.png} -\end{center} -\caption{Simple Static Page Example} -\label{fig:gwl-1-image} -\end{figure} +\section{Page URLs} + +\label{sec:pageurls} + + + +Objects based on \texttt{base-ajax-sheet} are automatically available from the server at the +URL of the form \texttt{http://localhost:9000/make?object=\emph{classname}}. This is useful during +debugging, but for real projects, you should define a more direct URL. You do that using the +CL function \texttt{(gwl:publish-gwl-app \emph{path} \emph{classname})}. For example, + +\begin{quote} +\texttt{(gwl:publish-gwl-app "/greeting" "gwl-user::hello-world")} + +\end{quote} +will make the \texttt{gwl-user::hello-world} object accessible at the URL \texttt{http://localhost:9000/greeting}. + +\section{Page Customizations} +\label{sec:pagecustomizations} -Several important concepts are lumped into this - example. Note the following: + + +In addition to specifying the body html via \texttt{main-sheet-body}, you can +customize the page by optionally adding certain messages to your object: \begin{itemize} -\item Our convenience macro \texttt{with-cl-who} is used to wrap the native \texttt{with-html-output} macro which comes with the cl-who library. - -\item We use the keyword argument \texttt{:indent t} in order to pretty-print the generated HTML. This does - not affect the browser display but can make the generated HTML - easier to read and debug. This option should be left as nil (the - default) for production deployments. - -\item The \texttt{fmt} symbol has special meaning - within the cl-who environment and works the same as a Common - Lisp \texttt{(format nil ...)} in order to evaluate a format - string together with matching arguments, and produce a string at - runtime. - -\item The \texttt{str} symbol has special meaning - within the cl-who environment and works by evaluating an - expression at runtime to return a string or other printable - object, which is then included at that point in the HTML output. - -\item Expressions within the \texttt{body} of an - HTML tag have to be evaluated, usually by use of the \texttt{fmt} or \texttt{str} in cl-who. There are three examples of this in the - above sample: one \texttt{fmt} and two \texttt{str}. - -\item Expressions within a \emph{tag attribute} are always evaluated automatically, and so do -\textbf{not} require a \texttt{str} or other special symbol to force evaluation at - runtime. Tag attributes in HTML (or XML) are represented as a - plist spliced in after a tag name, wrapped in extra parentheses - around the tag name. In the sample above, the \texttt{:border (the table-border)} is an example of a tag attribute on the \texttt{:table} tag. Notice that the expression \texttt{(the table-border)} does not need \texttt{str} in order to be evaluated - it gets evaluated automatically. - -\item In cl-who, if a tag attribute evaluates to \texttt{nil}, then that tag attribute will be left out of the output - completely. For example if \texttt{(the table-border)} evaluates to nil, then the \texttt{:table} tag will be outputted without any attributes at - all. This is a convenient way to conditionalize tag - attributes. - -\item The URL \texttt{http://localhost:9000/make?object=gwl-user::president} is published automatically based on the package and - name of the object definition. When you visit this URL, the - response is redirected to a unique URL identified by - a \emph{session ID}. This ensures that each user to your - application site will see their own specific instance of the - page object. The session ID is constructed from a combination of - the current date and time, along with a pseudo-random - number. +\item Message \texttt{title} can be used to specify the title of the web page -\end{itemize} +\item Message \texttt{doctype-string} is the string to place at the very start +of the document (it defaults to \texttt{""}) +\item Message \texttt{additional-header-content} can contain any additional +HTML you want to go into the page's \texttt{} section. +\item Message \texttt{body-class} can specify the CSS \texttt{class} attribute for the \texttt{} tag. +\item Message \texttt{body-onload} can be a string of Javascript to go +into the \texttt{onload} event attribute of the \texttt{} tag. +\item Message \texttt{body-onpageshow} can be a string of Javascript to go +into the \texttt{onpageshow} event attribute of the \texttt{} tag. -\subsection{A Simple Dynamic Page which Mixes HTML and Common Lisp/GDL} +\end{itemize} -\label{subsec:asimpledynamicpagewhichmixeshtmlandcommonlisp/gdl} -Within the cl-who environment it is possible to include any standard -Common Lisp structures such as \texttt{let}, \texttt{dolist} , \texttt{dotimes}, etc, which accept a \emph{body} of code. The requirement is that any internal code body - must be wrapped in a list beginning with the special symbol \texttt{htm}, which has meaning to cl-who. +We will be using some of these customizations in the examples below. -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small -\begin{verbatim}(in-package :gwl-user) -(define-object presidents (base-html-sheet) - :input-slots - ((presidents (list (list :name "Ford" - :term 1974) - (list :name "Carter" - :term 1976) - (list :name "Clinton" - :term 1992) - (list :name "Bush" - :term 2000) - (list :name "Obama" - :term 2008))) - - (table-border 1)) +\section{Debugging} - :functions - ((write-html-sheet - () - (with-cl-who (:indent t) - (let ((title (format nil "Info on ~a Presidents:" - (length (the presidents))))) - (htm - (:html - (:head (:title (str title))) - (:body - (:p (:c (:h3 (str title)))) - ((:table :border (the table-border)) - (:tr (:th "Name") (:th "Term")) - (dolist (president (the presidents)) - (htm - (:tr (:td (str (getf president :name))) - (:td (str (getf president :term))))))))))))))) -;; -;; Access the above example with -;; http://localhost:9000/make?object=gwl-user::presidents -;; +\label{sec:debugging} -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} -\caption{Mixing Static HTML and Dynamic Content} -\label{fig:gwl-2} +\texttt{base-ajax-sheet} provides the \texttt{development-links} message with +links for functionality useful during development, currently consisting of a Refresh! link and a Break +link. It is typically used as follows: -\end{figure} +\begin{verbatim}(main-sheet-body + (with-cl-who-string () + (when *developing?* (str (the development-links))) + ;; Rest of page definition goes here + ...)) +\end{verbatim} -\begin{figure} -\begin{center} -\includegraphics[width=4in,height=3in]{../images/gwl-2.png} -\end{center} -\caption{Mixing Static HTML and Dynamic Content} -\label{fig:gwl-2-image} +\section{Page Links} -\end{figure} +\label{sec:pagelinks} -The example in Figure -\ref{fig:gwl-2} uses this technique to output an HTML table row for each ``row'' of data in a list of lists. -The output looks similar to Figure -\ref{fig:gwl-2-image} in a web browser. +In order to allow HTML links between page objects, GDL implements a scheme that assigns +URL's to individual page instances. In order to do this efficiently, GDL maintains a table of +root-level instances, and identifies page instances relative to their root instance. For this reason, +and in order for dependency-tracking to work properly, all pages in a GDL application must belong to +the same tree, i.e. they must share a common root page object. -Note the following from this example: + +You can generate a hyperlink (an \texttt{} tag) to a particular \texttt{base-ajax-sheet} page +by invoking the \texttt{write-self-link} GDL function on the page instance. \texttt{write-self-link} accepts +a number of keyword arguments to customize the link: \begin{itemize} -\item \texttt{title} is a \texttt{let} variable, so we use \texttt{(str title)} to evaluate it as a string. We do not use \texttt{(str (the title))} because \texttt{title} is a local variable and not a message (i.e. slot) in the object. +\item You specify the text to be displayed as the link with the \texttt{:display-string} argument -\item Inside the \texttt{dolist}, we ``drop back into'' HTML mode using the \texttt{htm} operator. +\item You can direct the link to a specific anchor within the page with the \texttt{:local-anchor} argument -\end{itemize} +\item You can specify various tag attributes of the \texttt{} tag: +\begin{itemize} +\item Argument \texttt{:target} for the \texttt{target} attribute +\item Argument \texttt{:on-mouse-over} for the \texttt{onmouseover} attribute +\item Argument \texttt{:on-mouse-out} for the \texttt{onmouseout} attribute -\subsection{Linking to Multiple Pages} +\item Argument \texttt{:on-click} for the \texttt{onclick} attribute -\label{subsec:linkingtomultiplepages} +\item Argument \texttt{:title} for the \texttt{title} attribute +\item Argument \texttt{:class} for the \texttt{class} attribute +\item Argument \texttt{:id} for the \texttt{id} attribute -The base-html-sheet mixin provides a \texttt{self-link} message for the purpose of generating a hyperlink to that -page. Typically you will have a ``parent'' page object which links to -its ``child'' pages, but GDL pages can link to other pages anywhere -in the GDL tree\footnote{In order for dependency-tracking to work -properly, the pages must all belong to the same tree, i.e. they must -share a common root object.}. -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small +\end{itemize} -\begin{verbatim}(in-package :gwl-user) -(define-object presidents-with-pages (base-html-sheet) - :input-slots - ((presidents (list (list :name "Ford" :term 1974) - (list :name "Carter" :term 1976) - (list :name "Clinton" :term 1992) - (list :name "Bush" :term 2000) - (list :name "Obama" :term 2008))) - - (table-border 1)) - - - :objects - ((president-pages :type 'president-page - :sequence (:size (length (the presidents))) - :name (getf (nth (the-child index) (the presidents)) - :name) - :term (getf (nth (the-child index) (the presidents)) - :term))) - - - :functions - ((write-html-sheet - () - (with-cl-who (:indent t) - (let ((title (format nil "Info on ~a Presidents:" - (length (the presidents))))) - (htm - (:html - (:head (:title (str title))) - (:body - (:p (:c (:h3 (str title)))) - (:ol - (dolist (page (list-elements (the president-pages))) - (htm - (:li - (the-object - page - (write-self-link :display-string - (the-object page name))))))))))))))) -;; -;; Access the above example with -;; http://localhost:9000/make?object=gwl-user::presidents-with-pages -;; +\end{itemize} -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} -\caption{Linking to Multiple Pages} -\label{fig:gwl-3} -\end{figure} +In order to help create hierarchical multi-page sites, \texttt{base-ajax-sheet} also provides +a \texttt{write-back-link} GDL function for the purpose of generating a link back to the parent page object. +It accepts all the same arguments as \texttt{write-self-link}. + + + +Figure +\ref{fig:gwl-president-links} shows a modification of +\ref{fig:gwl-president-table} +where we put detailed information about each president on a separate page, and provide links to these individual +pages from a summary page. Each child page contains a link to return back to the summary. \begin{figure} \begin{lrbox}{\boxedverb} \begin{minipage}{\linewidth} @@ -3614,64 +3527,87 @@ share a common root object.}. \begin{verbatim}(in-package :gwl-user) -(define-object president-page (base-html-sheet) +(define-object president-page (base-ajax-sheet) :input-slots (name term) - - :functions - ((write-html-sheet - () - (with-cl-who () - (let ((title (format nil "Term for President ~a:" - (the name)))) - (htm - (:html - (:head (:title (str title))) - (:body - (the (write-back-link :display-string "<Back")) - (:p (:c (:h3 (str title)))) - (:p (str (the term))))))))))) - + :computed-slots + ((title + (format nil "Term for President ~a:" (the name))) + (main-sheet-body + (with-cl-who-string (:indent t) + (the (write-back-link :display-string "<Back")) + (:p (:c (:h3 (the title)))) + (:p (str (the term))))))) + + +;; http://localhost:9000/make?object=gwl-user::presidents-with-links +(define-object presidents-with-links (base-ajax-sheet) + :input-slots + ((data (list (list :name "Carter" :term 1976) + (list :name "Reagan" :term 1980) + (list :name "Bush" :term 1988) + (list :name "Clinton" :term 1992))) + (table-border 1)) + + :objects + ((presidents :type 'president-page + :sequence (:size (length (the data))) + :name (getf (nth (the-child index) (the data)) :name) + :term (getf (nth (the-child index) (the data)) :term))) + + :computed-slots + ((title (format nil "Links to ~a Presidents:" + (length (list-elements (the presidents))))) + (main-sheet-body + (with-cl-who-string (:indent t) + (htm + (:p (:c (:h3 (the title)))) + ((:table :border (the table-border)) + (:tr (:th "Name")) + (dolist (president (list-elements (the presidents))) + (htm + (:tr (:td (the-object + president + (write-self-link :display-string + (the-object president name))))))))))))) + \end{verbatim}} \end{minipage} \end{lrbox} \fbox{\usebox{\boxedverb}} -\caption{Linking to Multiple Pages} +\caption{Hyperlinking} -\label{fig:gwl-3a} +\label{fig:gwl-president-links} \end{figure} - In Figures -\ref{fig:gwl-3} and -\ref{fig:gwl-3a}, we provide links from a parent page into a child page -with detailed information on each president. The output looks similar -to Figure -\ref{fig:gwl-3-image} in a web browser. -\begin{figure} -\begin{center} -\includegraphics[width=4in,height=3in]{../images/gwl-3.png} -\end{center} -\caption{Linking to Multiple Pages} -\label{fig:gwl-3-image} -\end{figure} +\section{Input Using Forms} +\label{sec:inputusingforms} - Note the following from this example: + +GWL provides a macro \texttt{with-html-form} to obtain input from the user +with an HTML form. In the body of the form, you specify input fields using standard HTML +form controls. When the user submits the form, GDL processes the form input values in two +ways: \begin{itemize} -\item The \texttt{write-self-link} message is a function which can take a keyword argument - of \texttt{:display-string}. This string is used for the actual hyperlink text. +\item When the name of an form field matches the name of a \texttt{:settable} computed-slot in the object, GDL will automatically infer its type, do +appropriate conversions, and set the slot the its new value\footnote{If the type of a slot +can vary, it is best to make its default be a string and parse the string yourself e.g. with +the \texttt{read-safe-string} function.}. -\item There is a \texttt{write-back-link} message which similarly can take a keyword argument of \texttt{:display-string}. This generates a link back to \texttt{(the return-object)} which, by default in base-html-sheet, is \texttt{(the parent).} +\item Any input values that do not match a suitable slot are available +from the \texttt{query-plist} message, which returns a plist mapping +keywords representing form field names to the corresponding input value strings \end{itemize} @@ -3679,33 +3615,82 @@ to Figure -\subsection{Form Controls and Fillout-Forms} +Figure +\ref{fig:gwl-hello-world-form} shows how we can extend the simple +Hello World application of +\ref{fig:gwl-hello-world} to allow the user to +customize both the name and the greeting. +\begin{figure} +\begin{lrbox}{\boxedverb} +\begin{minipage}{\linewidth} +{\small + +\begin{verbatim}(in-package :gwl-user) + +;; http://localhost:9000/make?object=gwl-user::hello-world-form +(define-object hello-world-form (base-ajax-sheet) + :input-slots + ((greetings '("Hello" + "Hola" + "Bonjour" + "Habari" + "Namaste" + "Aloha" + "Ciao"))) + + :computed-slots + ((username "World" :settable) + (greeting (first (the greetings)) :settable) + + (title (format nil "Greeting for ~a" (the username))) + (main-sheet-body + (with-cl-who-string () + (:p (fmt "~a ~a!" (the greeting) (the username))) + (:hr) + (with-html-form (:cl-who? t) + (:p + (:label :for 'greeting "Select greeting: ") + ((:select :name 'greeting) + (dolist (val (the greetings)) + (with-cl-who () + ((:option :value val + :selected (and (equalp val (the greeting)) "selected")) + (esc val)))))) + (:p + (:label :for 'username "Enter new name: ") + (:input :type :text :name 'username :value (the username))) + (:p (:button :type :submit "UPDATE"))))))) + +\end{verbatim}} +\end{minipage} +\end{lrbox} +\fbox{\usebox{\boxedverb}} + +\caption{Input Using Forms} + +\label{fig:gwl-hello-world-form} -\label{subsec:formcontrolsandfillout-forms} +\end{figure} -\subsubsection{Form Controls} -\label{subsubsec:formcontrols} +\subsection{Form Controls} +\label{subsec:formcontrols} -GDL provides a set of primitives useful for generating the - standard HTML form-controls\footnote{http://www.w3.org/TR/html401/interact/forms.html} such as text, checkbox, radio, submit, menu, etc. These - should be instantiated as child objects in the page, then - included in the HTML for the page - using \texttt{str} within an - HTML \texttt{form} tag (see next section). +GDL provides a set of primitives useful for generating the +standard HTML form controls in the body of \texttt{with-html-form}. +These should be instantiated as child objects in the page. They provide a +\texttt{html-string} message which returns the HTML for the control. -The form-controls provided by GDL are documented in YADD accessible with -\begin{verbatim}http://localhost:9000/yadd -\end{verbatim} and in Chapter -\ref{chap:gdlreference} of this Manual. Examples of -available form-controls are: +The form controls provided by GDL are documented in YADD\footnote{YADD +is accessible with \texttt{http://localhost:9000/yadd}.} and in the reference appendix +of this manual. Examples of available form controls are: \begin{itemize} @@ -3727,354 +3712,210 @@ available form-controls are: -These form-controls are customizable by mixing them into - your own specific form-controls (although this often is not - necessary). New form-controls such as for numbers, dates, +These form controls are customizable by mixing them into + your own specific form controls (although this often is not + necessary). New form controls such as for numbers, dates, etc will soon be added to correspond to latest HTML standards. -\subsubsection{Fillout Forms} - -\label{subsubsec:filloutforms} - - - -A traditional web application must enclose form controls inside a \texttt{form} tag and specify an \texttt{action} (a web URL) to receive and respond to the -form submission. The response will cause the entire page to refresh with -a new page. In GDL, such a form can be generated by wrapping the layout -of the form controls within the \texttt{with-html-form} macro. - - +Figure +\ref{fig:gwl-hello-world-controls} reimplements the Hello World form from the last section +using form controls. The functionality is the same but the source is shorter and simpler to read and understand. \begin{figure} \begin{lrbox}{\boxedverb} \begin{minipage}{\linewidth} -\tiny{ +{\small \begin{verbatim}(in-package :gwl-user) -(define-object revenue-lookup-old-school (base-ajax-sheet) - +;; http://localhost:9000/make?object=gwl-user::hello-world-controls +(define-object hello-world-controls (base-ajax-sheet) :input-slots - - ((revenue-data '(2003 25000 - 2004 34000 - 2005 21000 - 2006 37000 - 2007 48000 - 2008 54000 - 2009 78000))) - - :functions - - ((write-html-sheet - () - (with-cl-who () - (when *developing?* (str (the development-links))) - (with-html-form (:cl-who? t) - (:p (str (the table-border html-string))) - (:p (str (the cell-padding html-string))) - (:p (str (the selected-year html-string))) - (:p ((:input :type :submit :value " OK ")))) - (:p ((:table :border (the table-border value) - :cellpadding (the cell-padding value)) - (:tr (:th (fmt "Revenue for Year ~a:" - (the selected-year value))) - (:td (str (getf (the revenue-data) - (the selected-year value)))))))))) + ((greetings '("Hello" + "Hola" + "Bonjour" + "Habari" + "Namaste" + "Aloha" + "Ciao"))) :objects - - ((table-border :type 'menu-form-control - :size 1 :choice-list '(0 1) - :default 0) - - (cell-padding :type 'menu-form-control - :size 1 :choice-list '(0 3 6 9 12) - :default 0) - - (selected-year :type 'menu-form-control - :size 1 :choice-list (plist-keys (the revenue-data)) - :default (first (the-child choice-list))))) - - -(publish-gwl-app "/revenue-lookup-old-school" - "gwl-user::revenue-lookup-old-school") - + ((username-control :type 'text-form-control + :prompt "Enter new name: " + :default "World") + (greeting-control :type 'menu-form-control + :prompt "Select Greeting: " + :size 1 :choice-list (the greetings) + :default (first (the greetings)))) -;; -;; Access the above example with -;; http://localhost:9000/make?object=gwl-user::revenue-lookup-old-school -;; + :computed-slots + ((title (format nil "Greeting for ~a" (the username-control value))) + (main-sheet-body + (with-cl-who-string () + (:p (fmt "~a ~a!" (the greeting-control value) (the username-control value))) + (:hr) + (with-html-form (:cl-who? t) + (:p (str (the greeting-control html-string))) + (:p (str (the username-control html-string))) + (:p (:button :type :submit "UPDATE"))))))) \end{verbatim}} \end{minipage} \end{lrbox} \fbox{\usebox{\boxedverb}} -\caption{Form Controls and Fillout Forms} +\caption{Using Form Controls} -\label{fig:gwl-3b} +\label{fig:gwl-hello-world-controls} \end{figure} -\begin{figure} -\begin{center} -\includegraphics[width=4in,height=3in]{../images/gwl-3b.png} -\end{center} -\caption{Form Controls and Fillout Forms} -\label{fig:gwl-3b-image} -\end{figure} +\section{Interactive Applications using AJAX} + +\label{sec:interactiveapplicationsusingajax} -Figure -\ref{fig:gwl-3b} is an example which allows the user to enter a year, and the -application will respond with the revenue amount for that year. Additional -form controls are also provided to adjust the table border and cell padding. +Input using traditional HTML forms requires the user to explicitly "submit" each update +request, and then the application responds by reloading the whole page. The \href{http://en.wikipedia.org/wiki/Ajax\_(programming)}{AJAX}\footnote{http://en.wikipedia.org/wiki/Ajax\_(programming)} methodology allows web +applications to autonomously contact the server, and to change page content dynamically in +response, leading to a more interactive user experience. -This example, when instantiated in a web browser, might look as shown in Figure -\ref{fig:gwl-3b-image}. +GDL has built-in support for AJAX, using its usual convenient generative approach. +You use child objects to model independently updatable sections of the web pgae, and the dependency +tracking engine which is built into GDL automatically manages of which sections of the +page need to be updated after a request. -\section{Partial Page Updates with gdlAjax} -\label{sec:partialpageupdateswithgdlajax} +Moreover, the state of the internal GDL model which +represents the page and the page sections is kept identical to the +displayed state of the page. This means that if the user hits the +``Refresh'' button in the browser, the state of the page will remain +unchanged. This ability is not available in some other AJAX +frameworks. -\index{AJAX}AJAX stands for Asynchronous JavaScript and -XML \footnote{http://en.wikipedia.org/wiki/Ajax\_(programming)}, and allows for more interactive web applications which -respond to user events by updating only part of the web page. The -``Asynchronous'' in Ajax refers to a web page's ability to continue -interacting while one part of the page is being updated by a server -response. Requests need not be Asynchronous, they can also be -Synchronous (``SJAX''), which would cause the web browser to block -execution of any other tasks while the request is being carried -out. The ``XML'' refers to the format of the data that is typically -returned from an AJAX request. +\subsection{AJAX Event Handling} +\label{subsec:ajaxeventhandling} -GDL contains a simple framework referred to as \emph{gdlAjax} which supports a uniquely convenient and generative -approach to AJAX (and SJAX). With gdlAjax, you use standard GDL -object definitions and child objects in order to model the web page -and the sections of the page, and the dependency tracking engine which -is built into GDL automatically keeps track of which sections of the -page need to be updated after a request. +An AJAX application works by contacting the server +in response to \href{https://en.wikipedia.org/wiki/DOM\_events}{HTML events}\footnote{https://en.wikipedia.org/wiki/DOM\_events} such as "onclick" +or "onfocus". GDL provides the function \texttt{gdl-ajax-call} to generate +the JavaScript to handle such events by invoking GDL functionality on the server. -Moreover, the state of the internal GDL model which -represents the page and the page sections is kept identical to the -displayed state of the page. This means that if the user hits the -``Refresh'' button in the browser, the state of the page will remain -unchanged. This ability is not available in some other Ajax -frameworks. +For example, the following snippet +\begin{verbatim}((:span :onclick (the (gdl-ajax-call :function-key :restore-defaults!))) + "Press Me") +\end{verbatim}will produce a piece of text ''Press Me'' which, when pressed, will call \texttt{restore-defaults!} +in the page's object on the server. If \texttt{restore-defaults!} is not defined, an error will result. -\subsection{Steps to Create a gdlAjax Application} -\label{subsec:stepstocreateagdlajaxapplication} +\texttt{gdl-ajax-call} can also update form control values on the server by using the \texttt{:form-controls} keyword argument. For details, see the \texttt{gdl-ajax-call} documentation in +YADD\footnote{YADD is accessible with \texttt{http://localhost:9000/yadd}.} and the reference appendix. -Initially, it is important to appreciate that the -fundamentals from the previous section on Standard Web Applications -still apply for gdlAjax applications --- that is, HTML generation, -page linking, etc. These techniques will all still work in a gdlAjax -application. +For convenience, GDL form-controls provide direct support for AJAX with the \texttt{:ajax-submit-on-change?} +argument, which is equivalent to invoking \texttt{gdl-ajax-call} for the control's "onchange" event. -To produce a gdlAjax application entails three main differences from -a standard web application: -\begin{enumerate} +\subsection{AJAX Page Updating} -\item You mix in \texttt{base-ajax-sheet} instead of \texttt{base-html-sheet}. \texttt{base-ajax-sheet} mixes in \texttt{base-html-sheet}, so it will still provide all the functionality of that - mixin. In fact, you can use \texttt{base-ajax-sheet} in standard web applications and you won't notice any difference if you do - everything else the same. +\label{subsec:ajaxpageupdating} -\item Instead of a \texttt{write-html-sheet} message, you specify a \texttt{main-sheet-body} message. The \texttt{main-sheet-body} can be a computed-slot or GDL function, - and unlike the \texttt{write-html-sheet} message, it should - simply return a string, not send output to a stream. Also, it only - fills in the body of the page --- everything between the - and tags. The head tag of the page is filled in - automatically and can be customized in various ways. -\item Any sections of the page which you want to have the - capacity to change themselves in response to an Ajax call must - be made into separate page sections, or ``sheet sections,'' and - the HTML for their \texttt{main-div} included in the main - page's \texttt{main-sheet-body} by use of cl-who's \texttt{str} directive. -\end{enumerate} +In order to have the capacity to change itself in response to AJAX calls, a page must be structured +as one or more \texttt{sheet-section} child objects. Sheet sections provide a \texttt{main-div} message +which computes the HTML for the section and registers the section as subject to AJAX update handling. The +main page should include the \texttt{main-div} of each child sheet section in its \texttt{main-sheet-body}. + + +The sheet section definition should specify the section's HTML in the \texttt{inner-html} input slot. +This plays the same role as the \texttt{main-sheet-body} does in the page. + + +Figure +\ref{fig:gwl-hello-world-ajax} reimplements the Hello World form from the last section +using AJAX. Note that we don't need the explicit UPDATE button any more, as the changes the user makes take effect +immediately due to the use of \texttt{:ajax-submit-on-change?} argument in each of the form controls. \begin{figure} \begin{lrbox}{\boxedverb} \begin{minipage}{\linewidth} -\tiny{ +{\small \begin{verbatim}(in-package :gwl-user) -(define-object revenue-lookup (base-ajax-sheet) - +;; http://localhost:9000/make?object=gwl-user::hello-world-ajax +(define-object hello-world-ajax (base-ajax-sheet) :input-slots - - ((revenue-data '(2003 25000 - 2004 34000 - 2005 21000 - 2006 37000 - 2007 48000 - 2008 54000 - 2009 78000))) - - :computed-slots - - ((main-sheet-body - (with-cl-who-string () - (str (the main-section main-div))))) - + ((greetings '("Hello" + "Hola" + "Bonjour" + "Habari" + "Namaste" + "Aloha" + "Ciao"))) + :objects - - ((table-border :type 'menu-form-control - :size 1 - :choice-list '(0 1) - :default 0 - :ajax-submit-on-change? t) - - (cell-padding :type 'menu-form-control - :size 1 - :choice-list '(0 3 6 9 12) - :default 0 - :ajax-submit-on-change? t) - - (selected-year :type 'menu-form-control - :size 1 - :choice-list (plist-keys (the revenue-data)) - :default (first (the-child choice-list)) - :ajax-submit-on-change? t) - - (main-section + ((username-control :type 'text-form-control + :prompt "Enter new name: " + :default "World" + :ajax-submit-on-change? t) + (greeting-control :type 'menu-form-control + :prompt "Select Greeting: " + :size 1 :choice-list (the greetings) + :default (first (the greetings)) + :ajax-submit-on-change? t) + + (main-section :type 'sheet-section :inner-html (with-cl-who-string () - (:p (str (the development-links))) - (:p (str (the table-border html-string))) - (:p (str (the cell-padding html-string))) - (:p (str (the selected-year html-string))) - (:p ((:table :border (the table-border value) - :cellpadding (the cell-padding value)) - (:tr (:th (fmt "Revenue for Year ~a:" - (the selected-year value))) - (:td (str (getf (the revenue-data) - (the selected-year value))))))))))) - -(publish-gwl-app "/revenue-lookup" - "gwl-user::revenue-lookup") - - - + (:p (fmt "~a ~a!" (the greeting-control value) (the username-control value))) + (:hr) + (with-html-form (:cl-who? t) + (:p (str (the greeting-control html-string))) + (:p (str (the username-control html-string))))))) + :computed-slots + ((title (format nil "Greeting for ~a" (the username-control value))) + (main-sheet-body + (with-cl-who-string () + (str (the main-section main-div)))))) \end{verbatim}} \end{minipage} \end{lrbox} \fbox{\usebox{\boxedverb}} -\caption{Partial Page Updates with GdlAjax} +\caption{AJAX} -\label{fig:gwl-4} +\label{fig:gwl-hello-world-ajax} \end{figure} -Note the following from the example in Figure -\ref{fig:gwl-4}: - -\begin{itemize} - -\item We mix in \texttt{base-ajax-sheet} and specify a \texttt{main-sheet-body} slot, which uses \texttt{with-cl-who-string} to compute a string - of HTML. This approach is also easier to debug, - since the \texttt{main-sheet-body} string - can be evaluated in the tasty inspector or at the - command-line. - -\item We use \texttt{str} to include the string for the main page - section (called \texttt{main-section} in this example) into the \texttt{main-sheet-body}. - -\item In the \texttt{main-section}, we also - use \texttt{str} to include the html-string for each of - three form-controls. We have provided a form control for the - table border, the table padding, and the revenue year to look - up. - -\item The only page section in this example is \texttt{(the main-section)}. This is defined as a child object, and has its \texttt{inner-html} computed in the parent and passed in as an input. The \texttt{sheet-section} will automatically compute a \texttt{main-div} message based on the \texttt{inner-html} that we are passing in. The \texttt{main-div} is simply the \texttt{inner-html}, wrapped with - an HTML DIV (i.e. ``division'') tag which contains a unique - identifier for this section, derived from the root-path - to the GDL object in the tree which represents the - sheet section. - -\item We introduce the CL function \texttt{gwl:publish-gwl-app}, which makes available a simplified URL for visiting an instance of this - object in the web browser. In this case, we can access the - instance using \texttt{http://localhost:9000/revenue-lookup} - -\end{itemize} - - - - - -Notice also the use of \texttt{:ajax-submit-on-change? ...} in each of the form-controls. This directs the gdlAjax - system to ``scrape'' the values of these form controls - and ``bash'' them into the \texttt{value} slot of the corresponding object on the server, whenever -they are changed in the browser. No ``Submit'' button press is -necessary. - - - -It is also possible programmatically to send form-control - values, and/or call a GDL Function, on the server, by - using the \texttt{\index{gdl-ajax-call}gdl-ajax-call} GDL function. This function will emit the necessary - JavaScript code to use as an event handler, e.g. for an - ``onclick'' event. For example, you could have the following snippet somewhere in your page: - -\begin{verbatim}((:span :onclick (the (gdl-ajax-call :function-key :restore-defaults!))) "Press Me" ) -\end{verbatim}This will produce a piece of text ``Press Me,'' which, - when pressed, will have the effect of calling a function named \texttt{restore-defaults!} in the page's object on the server. If the function \texttt{restore-defaults!} is not defined, an error will result. The \texttt{gdl-ajax-call} GDL function can also send arbitrary form-control values - to the server by using the \texttt{:form-controls} keyword argument, and listing the relevant form-control objects. The \texttt{gdl-ajax-call} GDL function is fully documented in YADD and the reference appendix. - - - -If for some reason you want to do more than one \texttt{gdl-ajax-call} sequentially, then it is best to use \texttt{gdl-sjax-call} instead. This variant will cause the browser to wait until - each call completes, before making the next call. To achieve - this, you would want to append the strings together, e.g: - -\begin{verbatim} - ((:span :onclick (string-append (the (gdl-sjax-call ...)) - (the (gdl-sjax-call ...)) - (the (gdl-sjax-call ...))) ... )) -\end{verbatim}With that said, it is rarely necessary to do these calls - sequentially like this, because you can use :form-controls - and :function-key simultaneously. As long as your logic - works correctly when the form-controls are set before the - function is called, then you can group the functions - together into a ``wrapper-function,'' and do the entire - processing with a single Ajax (or Sjax) call. This would be - be the recommended approach whenever possible. - - - \subsection{Including Graphics} \label{subsec:includinggraphics} @@ -4089,7 +3930,7 @@ can be controlled with other optional input-slots. \begin{figure} \begin{lrbox}{\boxedverb} \begin{minipage}{\linewidth} -\tiny{ +{\small \begin{verbatim}(in-package :gwl-user) @@ -4292,7 +4133,7 @@ system. -\section{cl-lite (Compile-and-Load Lite Utility)} +\section{CL-LITE (Compile-and-Load Lite Utility)} \label{sec:cl-lite(compile-and-loadliteutility)} @@ -4308,13 +4149,13 @@ system. \begin{itemize} -\item \index{codebase-directory-node} +\item \index{CODEBASE-DIRECTORY-NODE} \label{prim:codebase-directory-node} -\textbf{codebase-directory-node} +\textbf{CODEBASE-DIRECTORY-NODE} \textbf{ -\underline{Mixins:}} directory-node +\underline{Mixins:}} DIRECTORY-NODE @@ -4478,11 +4319,11 @@ sequence. \begin{itemize} -\item \index{cl-patch} +\item \index{CL-PATCH} \label{prim:cl-patch} -\textbf{cl-patch} +\textbf{CL-PATCH} -(type nil intro +(TYPE NIL INTRO Traverses pathname in a manner identical to cl-lite, but only those files for which the source is newer than the corresponding fasl binary file (or for which the corresponding fasl binary file does @@ -4499,7 +4340,7 @@ files. -\section{com.genworks.dom } +\section{COM.GENWORKS.DOM } \label{sec:com.genworks.dom} @@ -4509,7 +4350,7 @@ files. -\section{com.genworks.dom-html } +\section{COM.GENWORKS.DOM-HTML } \label{sec:com.genworks.dom-html} @@ -4519,7 +4360,7 @@ files. -\section{com.genworks.dom-latex } +\section{COM.GENWORKS.DOM-LATEX } \label{sec:com.genworks.dom-latex} @@ -4529,7 +4370,7 @@ files. -\section{com.genworks.dom-writers } +\section{COM.GENWORKS.DOM-WRITERS } \label{sec:com.genworks.dom-writers} @@ -4539,7 +4380,7 @@ files. -\section{com.yoyodyne.booster-rocket } +\section{COM.YOYODYNE.BOOSTER-ROCKET } \label{sec:com.yoyodyne.booster-rocket} @@ -4549,7 +4390,7 @@ files. -\section{enterprise } +\section{ENTERPRISE } \label{sec:enterprise} @@ -4559,7 +4400,7 @@ files. -\section{gendl (Base Core Kernel Engine) Nicknames: Gdl, Genworks, Base} +\section{GENDL (Base Core Kernel Engine) Nicknames: Gdl, Genworks, Base} \label{sec:gendl(basecorekernelengine)nicknames:gdl,genworks,base} @@ -4575,13 +4416,13 @@ files. \begin{itemize} -\item \index{base-rule-object} +\item \index{BASE-RULE-OBJECT} \label{prim:base-rule-object} -\textbf{base-rule-object} +\textbf{BASE-RULE-OBJECT} \textbf{ -\underline{Mixins:}} vanilla-mixin +\underline{Mixins:}} VANILLA-MIXIN @@ -4694,13 +4535,13 @@ the \texttt{rule-title}, or "Unnamed Rule" if \texttt{rule-title} is NIL. -\item \index{matrix-sequence} +\item \index{MATRIX-SEQUENCE} \label{prim:matrix-sequence} -\textbf{matrix-sequence} +\textbf{MATRIX-SEQUENCE} \textbf{ -\underline{Mixins:}} standard-sequence, vanilla-mixin +\underline{Mixins:}} STANDARD-SEQUENCE, VANILLA-MIXIN @@ -4764,13 +4605,13 @@ a single number as with a normal sequence. -\item \index{null-object} +\item \index{NULL-OBJECT} \label{prim:null-object} -\textbf{null-object} +\textbf{NULL-OBJECT} \textbf{ -\underline{Mixins:}} vanilla-mixin +\underline{Mixins:}} VANILLA-MIXIN @@ -4797,13 +4638,13 @@ conditional \texttt{:type} expression if you want to turn off a branch of the tr -\item \index{quantification} +\item \index{QUANTIFICATION} \label{prim:quantification} -\textbf{quantification} +\textbf{QUANTIFICATION} \textbf{ -\underline{Mixins:}} vanilla-mixin +\underline{Mixins:}} VANILLA-MIXIN @@ -4846,6 +4687,15 @@ internal. It can be used, and returns an integer representing the cardinality of +\item [Index] +\index{Index +[quantification]}\emph{Integer} + + Sequential index number for elements of a sequence, NIL for singular objects. + + + + \item [Last] \index{Last [quantification]}\emph{GDL Object} @@ -4863,13 +4713,13 @@ internal. It can be used, and returns an integer representing the cardinality of -\item \index{radial-sequence} +\item \index{RADIAL-SEQUENCE} \label{prim:radial-sequence} -\textbf{radial-sequence} +\textbf{RADIAL-SEQUENCE} \textbf{ -\underline{Mixins:}} standard-sequence, vanilla-mixin +\underline{Mixins:}} STANDARD-SEQUENCE, VANILLA-MIXIN @@ -4896,13 +4746,13 @@ A radial sequence quantification is generated as a result of specifying -\item \index{standard-query-row} -\label{prim:standard-query-row} -\textbf{standard-query-row} +\item \index{STANDARD-SEQUENCE} +\label{prim:standard-sequence} +\textbf{STANDARD-SEQUENCE} \textbf{ -\underline{Mixins:}} vanilla-mixin +\underline{Mixins:}} QUANTIFICATION @@ -4914,64 +4764,11 @@ A radial sequence quantification is generated as a result of specifying \underline{Description}] -Represents a row of data. - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Type] -\index{Type -[standard-query-row]}\emph{Symbol} - - The GDL Type of this object. - - - - -\end{description} - - - - - - - -\item \index{standard-sequence} -\label{prim:standard-sequence} -\textbf{standard-sequence} - - -\textbf{ -\underline{Mixins:}} quantification - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -A standard sequence quantification is generated as a result of specifying -\texttt{:sequence (:size [number-expression]))} in an \texttt{:objects} specification. Unlike a variable-sequence -quantification (specified with \texttt{:sequence (:indices ...))}), elements cannot be surgically inserted or -deleted from a standard sequence. If a value upon which the [number-expression] depends becomes modified, -each member of the sequence will be reinstantiated as it is demanded. +A standard sequence quantification is generated as a result of specifying +\texttt{:sequence (:size [number-expression]))} in an \texttt{:objects} specification. Unlike a variable-sequence +quantification (specified with \texttt{:sequence (:indices ...))}), elements cannot be surgically inserted or +deleted from a standard sequence. If a value upon which the [number-expression] depends becomes modified, +each member of the sequence will be reinstantiated as it is demanded. @@ -5015,13 +4812,13 @@ each member of the sequence will be reinstantiated as it is demanded. -\item \index{vanilla-mixin*} +\item \index{VANILLA-MIXIN*} \label{prim:vanilla-mixin*} -\textbf{vanilla-mixin*} +\textbf{VANILLA-MIXIN*} \textbf{ -\underline{Mixins:}} standard-object +\underline{Mixins:}} STANDARD-OBJECT @@ -5521,13 +5318,13 @@ current instance. Typically this file can be read back into the system using the -\item \index{variable-sequence} +\item \index{VARIABLE-SEQUENCE} \label{prim:variable-sequence} -\textbf{variable-sequence} +\textbf{VARIABLE-SEQUENCE} \textbf{ -\underline{Mixins:}} quantification +\underline{Mixins:}} QUANTIFICATION @@ -5637,46 +5434,39 @@ re-evaluates the expression to compute the original list of indices) \begin{itemize} -\item \index{alist2plist} +\item \index{ALIST2PLIST} \label{prim:alist2plist} -\textbf{alist2plist} +\textbf{ALIST2PLIST} -(type Plist intro Converts an assoc-list to a plist. - arguments (alist Assoc-List)) +(TYPE Plist INTRO Converts an assoc-list to a plist. + ARGUMENTS (ALIST Assoc-List)) -\item \index{always} +\item \index{ALWAYS} \label{prim:always} -\textbf{always} +\textbf{ALWAYS} -(type T intro - Always returns the value T regardless of arg. - arguments (arg Lisp object. Ignored)) +(TYPE T INTRO Always returns the value T regardless of arg. + ARGUMENTS (ARG Lisp object. Ignored)) -\item \index{append-elements} +\item \index{APPEND-ELEMENTS} \label{prim:append-elements} -\textbf{append-elements [Macro]} +\textbf{APPEND-ELEMENTS [Macro]} -(type List of Objects [Macro] intro - Returns an appended list of expression from each element of an aggregate, +(TYPE List of Objects [Macro] INTRO Returns an appended list of expression from each element of an aggregate, with an optional filter. - arguments - (aggregate - GDL aggregate object. (e.g. from a :sequence (:size ..) :object specification).) - \&optional - (expression - Expression using the-element. Similar to a the-object reference, which should return a list.)) + ARGUMENTS (AGGREGATE GDL aggregate object. (e.g. from a :sequence (:size ..) :object specification).) \&OPTIONAL (EXPRESSION Expression using the-element. Similar to a the-object reference, which should return a list.)) -\item \index{check-computed-slots} +\item \index{CHECK-COMPUTED-SLOTS} \label{prim:check-computed-slots} -\textbf{check-computed-slots} +\textbf{CHECK-COMPUTED-SLOTS} -(type nil intro computed-slots grammar: +(TYPE Void INTRO COMPUTED-SLOTS grammar:
= :computed-slots (*) = | (* + +) = :settable | :uncached @@ -5685,42 +5475,38 @@ Also check for special case in which only strings without a symbol following. -\item \index{check-documentation} +\item \index{CHECK-DOCUMENTATION} \label{prim:check-documentation} -\textbf{check-documentation} +\textbf{CHECK-DOCUMENTATION} -(type nil intro - plist containing keys :description :author :examples :date :version +(TYPE NIL INTRO plist containing keys :description :author :examples :date :version ) -\item \index{check-floating-string} +\item \index{CHECK-FLOATING-STRING} \label{prim:check-floating-string} -\textbf{check-floating-string} +\textbf{CHECK-FLOATING-STRING} -(type nil intro - check for special case in which documentation isn't followed by symbol spec +(TYPE NIL INTRO check for special case in which documentation isn't followed by symbol spec ) -\item \index{check-form} +\item \index{CHECK-FORM} \label{prim:check-form} -\textbf{check-form} +\textbf{CHECK-FORM} -(type nil intro - general function that, given a predicate, validates all tokens in a slot declaration form +(TYPE NIL INTRO general function that, given a predicate, validates all tokens in a slot declaration form ) -\item \index{check-functions} +\item \index{CHECK-FUNCTIONS} \label{prim:check-functions} -\textbf{check-functions} +\textbf{CHECK-FUNCTIONS} -(type Void intro - Checks :functions or :methods grammar according to following BNF: +(TYPE Void INTRO Checks :functions or :methods grammar according to following BNF: = :functions | :methods (*) = (* + ) = :cached | :cached-eql | :cached-= | :cached-eq | :cached-equal | :cached-equalp @@ -5728,11 +5514,11 @@ Also check for special case in which only strings without a symbol following. -\item \index{check-input-slots} +\item \index{CHECK-INPUT-SLOTS} \label{prim:check-input-slots} -\textbf{check-input-slots} +\textbf{CHECK-INPUT-SLOTS} -(type nil intro input-slots grammar: +(TYPE Void INTRO INPUT-SLOTS grammar: = :input-slots (*) = | | (* + *) = :settable | :defaulting @@ -5741,11 +5527,11 @@ Also check for special case in which only strings without a symbol following. -\item \index{check-objects} +\item \index{CHECK-OBJECTS} \label{prim:check-objects} -\textbf{check-objects} +\textbf{CHECK-OBJECTS} -(type nil intro (hidden-) grammar: +(TYPE Void INTRO HIDDEN-OBJECTS and :objects grammar: = (hidden-):objects (*) = (* *) = @@ -5753,31 +5539,30 @@ Also check for special case in which only strings without a symbol following. -\item \index{check-query-slots} +\item \index{CHECK-QUERY-SLOTS} \label{prim:check-query-slots} -\textbf{check-query-slots} +\textbf{CHECK-QUERY-SLOTS} -(type nil intro unknown what is is +(TYPE NIL INTRO unknown what is is ) -\item \index{check-trickle-down-slots} +\item \index{CHECK-TRICKLE-DOWN-SLOTS} \label{prim:check-trickle-down-slots} -\textbf{check-trickle-down-slots} +\textbf{CHECK-TRICKLE-DOWN-SLOTS} -(type nil intro functions | :methods grammar: +(TYPE NIL INTRO FUNCTIONS | :methods grammar: = :trickle-down-slots (*) ) -\item \index{cl-lite} +\item \index{CL-LITE} \label{prim:cl-lite} -\textbf{cl-lite} +\textbf{CL-LITE} -(type nil intro - Traverses pathname in an alphabetical depth-first order, compiling +(TYPE NIL INTRO Traverses pathname in an alphabetical depth-first order, compiling and loading any lisp files found in source/ subdirectories. A lisp source file will only be compiled if it is newer than the corresponding compiled fasl binary file, or if the corresponding @@ -5815,79 +5600,59 @@ given as keyword args to this function). -\item \index{cyclic-nth} +\item \index{CYCLIC-NTH} \label{prim:cyclic-nth} -\textbf{cyclic-nth} +\textbf{CYCLIC-NTH} -(type Lisp object intro - Returns nth from the list, or wraps around if nth is greater than the length of the list. +(TYPE Lisp object INTRO Returns nth from the list, or wraps around if nth is greater than the length of the list. ) -\item \index{defaulting} +\item \index{DEFAULTING} \label{prim:defaulting} -\textbf{defaulting [Macro]} +\textbf{DEFAULTING [Macro]} -(type Lisp object intro - Returns a default value if the reference-chain is not handled. - arguments - (form Reference-chain with the or the-object default - Lisp expression. Default value to return if reference-chain cannot be handled.)) +(TYPE Lisp object INTRO Returns a default value if the reference-chain is not handled. + ARGUMENTS (FORM Reference-chain with the or the-object DEFAULT Lisp expression. Default value to return if reference-chain cannot be handled.)) -\item \index{define-format} +\item \index{DEFINE-FORMAT} \label{prim:define-format} -\textbf{define-format [Macro]} +\textbf{DEFINE-FORMAT [Macro]} -(type Standard-class [Macro] intro - Defines a standard GDL output format for use with GDL views. - arguments (name Symbol. mixin-list List of symbols.) \&key - (documentation Plist containing keys and strings for author, description, etc. - slots - List of lists or symbols. If a list, the list should contain a symbol, a default value, and optionally a documentation string. If -a symbol, this is the name of the slot and there will be no default value. - functions - List of format-function definitions. Each definition is made up of a symbol, an argument-list, and a body.)) +(TYPE Standard-class [Macro] INTRO Defines a standard GDL output format for use with GDL views. + ARGUMENTS (NAME Symbol. MIXIN-LIST List of symbols.) \&KEY (DOCUMENTATION Plist containing keys and strings for author, description, etc. SLOTS List of lists or symbols. If a list, the list should contain a symbol, a default value, and optionally a documentation string. If +a symbol, this is the name of the slot and there will be no default value. FUNCTIONS List of format-function definitions. Each definition is made up of a symbol, an argument-list, and a body.)) -\item \index{define-lens} +\item \index{DEFINE-LENS} \label{prim:define-lens} -\textbf{define-lens [Macro]} +\textbf{DEFINE-LENS [Macro]} -(type Void [Macro] intro - Defines output-functions for the combination of the given output-format and GDL object. - arguments - (format-and-object - List of two symbols. The first should name an output-format previously -defined with define-format, and the second should name a GDL object previously defined with define-object. - mixin-list - NIL. This is not supported and should be left as NIL or an empty list for now.) - \&key - ((skin t) - Name of a skin defined with define-skin. This allows a class hierarchy of look and feel for each view combination. Defaults to T, a generic skin.)) +(TYPE Void [Macro] INTRO Defines output-functions for the combination of the given output-format and GDL object. + ARGUMENTS (FORMAT-AND-OBJECT List of two symbols. The first should name an output-format previously +defined with define-format, and the second should name a GDL object previously defined with define-object. MIXIN-LIST NIL. This is not supported and should be left as NIL or an empty list for now.) \&KEY ((SKIN T) Name of a skin defined with define-skin. This allows a class hierarchy of look and feel for each view combination. Defaults to T, a generic skin.)) -\item \index{define-object} +\item \index{DEFINE-OBJECT} \label{prim:define-object} -\textbf{define-object [Macro]} +\textbf{DEFINE-OBJECT [Macro]} -(type Defines a standard GDL object intro - Please see the document USAGE.TXT for an +(TYPE Defines a standard GDL object INTRO Please see the document USAGE.TXT for an overview of define-object syntax. ) -\item \index{define-object-amendment} +\item \index{DEFINE-OBJECT-AMENDMENT} \label{prim:define-object-amendment} -\textbf{define-object-amendment [Macro]} +\textbf{DEFINE-OBJECT-AMENDMENT [Macro]} -(type Supplements or alters an existing GDL object definition intro - Syntax is similar to that for define-object. +(TYPE Supplements or alters an existing GDL object definition INTRO Syntax is similar to that for define-object. Note that there is currently no way to undefine messages defined with this macro, other than redefining the original object or restarting the GDL session. Support for surgically removing messages will be added in a future GenDL release. @@ -5895,55 +5660,49 @@ future GenDL release. -\item \index{div} +\item \index{DIV} \label{prim:div} -\textbf{div} +\textbf{DIV} -(type Floating-point number intro - Divides using rational division and converts the result (which may be a pure rational number) +(TYPE Floating-point number INTRO Divides using rational division and converts the result (which may be a pure rational number) to a floating-point number. - arguments (numerator Number. denominator Number.) \&optional - (more-denominators (\&rest). More numbers to divide by.)) + ARGUMENTS (NUMERATOR Number. DENOMINATOR Number.) \&OPTIONAL (MORE-DENOMINATORS (\&rest). More numbers to divide by.)) -\item \index{ensure-list} +\item \index{ENSURE-LIST} \label{prim:ensure-list} -\textbf{ensure-list} +\textbf{ENSURE-LIST} -(type List intro - If argument is not list, returns it in a list. If argument is +(TYPE List INTRO If argument is not list, returns it in a list. If argument is a list, returns it unchanged. - arguments (possible-list Lisp object)) + ARGUMENTS (POSSIBLE-LIST Lisp object)) -\item \index{find-dependants} +\item \index{FIND-DEPENDANTS} \label{prim:find-dependants} -\textbf{find-dependants} +\textbf{FIND-DEPENDANTS} -(type List of pairs of instance/keyword intro - Synonymous with find-messages-used-by. +(TYPE List of pairs of instance/keyword INTRO Synonymous with find-messages-used-by. ) -\item \index{find-dependencies} +\item \index{FIND-DEPENDENCIES} \label{prim:find-dependencies} -\textbf{find-dependencies} +\textbf{FIND-DEPENDENCIES} -(type List of pairs of instance/keyword intro - Synonymous with find-messages-which-use. +(TYPE List of pairs of instance/keyword INTRO Synonymous with find-messages-which-use. ) -\item \index{find-messages-used-by} +\item \index{FIND-MESSAGES-USED-BY} \label{prim:find-messages-used-by} -\textbf{find-messages-used-by} +\textbf{FIND-MESSAGES-USED-BY} -(type List of pairs of instance/keyword intro - This returns the list of direct dependants of a given +(TYPE List of pairs of instance/keyword INTRO This returns the list of direct dependants of a given message in a given instance. Note that this is not recursive; if you want to generate a tree, then you have to call this recursively yourself. If you want an easy way to remember the meaning of dependant and dependency: @@ -5952,12 +5711,11 @@ You have a dependency on caffeine. Your children are your dependants. -\item \index{find-messages-which-use} +\item \index{FIND-MESSAGES-WHICH-USE} \label{prim:find-messages-which-use} -\textbf{find-messages-which-use} +\textbf{FIND-MESSAGES-WHICH-USE} -(type List of pairs of instance/keyword intro - This returns the list of direct dependencies of a given +(TYPE List of pairs of instance/keyword INTRO This returns the list of direct dependencies of a given message in a given instance. Note that this is not recursive; if you want to generate a tree, then you have to call this recursively yourself. If you want an easy way to remember the meaning of dependant and dependency: @@ -5966,400 +5724,342 @@ You have a dependency on caffeine. Your children are your dependants. -\item \index{flatten} +\item \index{FLATTEN} \label{prim:flatten} -\textbf{flatten} +\textbf{FLATTEN} -(type List intro - Returns a new list consisting of only the leaf-level atoms from list. +(TYPE List INTRO Returns a new list consisting of only the leaf-level atoms from list. Since nil is technically a list, flatten also has the effect of removing nils from list, but may be inefficient if used only for this purpose. For removing nil values from a list, consider using remove nil ... instead. - note from On Lisp by Paul Graham, code as follows: -
-  (if (atom tree)
-      (ensure-list tree)
-    (nconc (flatten (car tree))
-           (if (cdr tree) (flatten (cdr tree)))))
+ NOTE from Stack Overflow forum: http://stackoverflow.com/questions/25866292/flatten-a-list-using-common-lisp 
+ NOTE Creative Commons license 
+
+ (defun flatten (lst \&aux (result '()))
+   (labels ((rflatten (lst1)
+              (dolist (el lst1 result)
+                (if (listp el)
+                  (rflatten el)
+                  (push el result)))))
+       (nreverse (rflatten lst))))
 
- arguments (list List) see-also remove + ARGUMENTS (LIST List) SEE-ALSO remove ) -\item \index{format-slot} +\item \index{FORMAT-SLOT} \label{prim:format-slot} -\textbf{format-slot [Macro]} +\textbf{FORMAT-SLOT [Macro]} -(type Lisp object [Macro] intro - Returns the value of the given slot within the context of the current +(TYPE Lisp object [Macro] INTRO Returns the value of the given slot within the context of the current with-format output format object. - arguments (slot-name Symbol.)) + ARGUMENTS (SLOT-NAME Symbol.)) -\item \index{fround-to-nearest} +\item \index{FROUND-TO-NEAREST} \label{prim:fround-to-nearest} -\textbf{fround-to-nearest} +\textbf{FROUND-TO-NEAREST} -(type Number intro Rounds number to the nearest interval, +(TYPE Number INTRO Rounds number to the nearest interval, using type contagion rules for floating-point similar to the CL "fround" function. - arguments (number Number interval Number)) + ARGUMENTS (NUMBER Number INTERVAL Number)) -\item \index{half} +\item \index{HALF} \label{prim:half} -\textbf{half} +\textbf{HALF} -(type Number intro - Returns the result of dividing num by the integer 2. +(TYPE Number INTRO Returns the result of dividing num by the integer 2. The type of the returned number will depend on the type of num. - arguments (num Number)) + ARGUMENTS (NUM Number)) -\item \index{ignore-errors-with-backtrace} +\item \index{IGNORE-ERRORS-WITH-BACKTRACE} \label{prim:ignore-errors-with-backtrace} -\textbf{ignore-errors-with-backtrace [Macro]} +\textbf{IGNORE-ERRORS-WITH-BACKTRACE [Macro]} -(type - Like IGNORE-ERRORS, but in case of failure, return backtrace string as third value - intro . +(TYPE Like IGNORE-ERRORS, but in case of failure, return backtrace string as third value INTRO . ) -\item \index{index-filter} +\item \index{INDEX-FILTER} \label{prim:index-filter} -\textbf{index-filter} +\textbf{INDEX-FILTER} -(type List intro - Returns all elements of list for whose index (starting at zero) the +(TYPE List INTRO Returns all elements of list for whose index (starting at zero) the function fn returns non-NIL. - arguments (fn Function object (e.g. a lambda expression) list List)) + ARGUMENTS (FN Function object (e.g. a lambda expression) LIST List)) -\item \index{iso-8601-date} +\item \index{ISO-8601-DATE} \label{prim:iso-8601-date} -\textbf{iso-8601-date} +\textbf{ISO-8601-DATE} -(type String intro - Returns the ISO8601 formatted date and possibly time from a +(TYPE String INTRO Returns the ISO8601 formatted date and possibly time from a Common Lisp universal time integer, e.g. 2007-11-30 or 2007-11-30T13:45:10 ) -\item \index{lastcar} +\item \index{LASTCAR} \label{prim:lastcar} -\textbf{lastcar} +\textbf{LASTCAR} -(type Lisp Object intro Returns the last element of list. - arguments (list List)) +(TYPE Lisp Object INTRO Returns the last element of list. + ARGUMENTS (LIST List)) -\item \index{least} +\item \index{LEAST} \label{prim:least} -\textbf{least} +\textbf{LEAST} -(type List intro - Returns the member of list which returns the minimum numerical value +(TYPE List INTRO Returns the member of list which returns the minimum numerical value when function is applied to it. As second value is returned which is the actual minimum value (the return-value of function as applied). This function comes from the Paul Graham book ANSI Common Lisp. - arguments (function Function list List)) + ARGUMENTS (FUNCTION Function LIST List)) -\item \index{list-elements} +\item \index{LIST-ELEMENTS} \label{prim:list-elements} -\textbf{list-elements [Macro]} +\textbf{LIST-ELEMENTS [Macro]} -(type List of GDL Objects [Macro] intro - Returns a listing of the elements of an aggregate, +(TYPE List of GDL Objects [Macro] INTRO Returns a listing of the elements of an aggregate, with an optional the-element expression and filter. If an expression is given, the list of results from the expressions is returned. If no expression is given, a list of the objects themselves is returned. - arguments - (aggregate - GDL aggregate object. (e.g. from a :sequence (:size ..) :object specification).) - \&optional - (expression - Expression using the-element. Similar to a the-object reference. - filter - Function of one argument. Can be used to filter the result list.)) + ARGUMENTS (AGGREGATE GDL aggregate object. (e.g. from a :sequence (:size ..) :object specification).) \&OPTIONAL (EXPRESSION Expression using the-element. Similar to a the-object reference. FILTER Function of one argument. Can be used to filter the result list.)) -\item \index{list-of-n-numbers} +\item \index{LIST-OF-N-NUMBERS} \label{prim:list-of-n-numbers} -\textbf{list-of-n-numbers} +\textbf{LIST-OF-N-NUMBERS} -(type - Returns a list of n numbers equally spaced between bounds num1 and num2, inclusive - intro . +(TYPE Returns a list of n numbers equally spaced between bounds num1 and num2, inclusive INTRO . ) -\item \index{list-of-numbers} +\item \index{LIST-OF-NUMBERS} \label{prim:list-of-numbers} -\textbf{list-of-numbers} +\textbf{LIST-OF-NUMBERS} -(type List of Numbers intro - Returns a list of incrementing numbers starting +(TYPE List of Numbers INTRO Returns a list of incrementing numbers starting from num1 and ending with num2, inclusive. Increment can be positive for num1 < num2, or negative for num1 > num2. This version was contributed by Reinier van Dijk. - arguments (num1 Number num2 Number) \&optional - ((increment 1) - Number. The distance between the returned listed numbers. - (tolerance (/ increment 10)) Number. tolerance for increment.)) + ARGUMENTS (NUM1 Number NUM2 Number) \&OPTIONAL ((INCREMENT 1) Number. The distance between the returned listed numbers. (TOLERANCE (/ INCREMENT 10)) Number. tolerance for increment.)) + + + +\item \index{LOAD-GLIME} +\label{prim:load-glime} +\textbf{LOAD-GLIME} + +(TYPE Void INTRO If the Glime (Slime Gendl auto-completion extensions) file exists, load it. +Path is currently hardcoded to (merge-pathnames "emacs/glime.lisp" glime:*gdl-home*) +or ~/genworks/gendl/emacs/glime.lisp. +) -\item \index{load-quicklisp} +\item \index{LOAD-QUICKLISP} \label{prim:load-quicklisp} -\textbf{load-quicklisp} +\textbf{LOAD-QUICKLISP} -(type Void intro - This is intended for pre-built Gendl or GDL images. If the +(TYPE Void INTRO This is intended for pre-built Gendl or GDL images. If the preconfigured quicklisp load file exists, load it. You can customize quicklisp location by setting global *quicklisp-home* or passing :path keyword argument to this function. - \&key ((path *quicklisp-home*) Pathname or string. Quicklisp location.)) + \&KEY ((PATH *QUICKLISP-HOME*) Pathname or string. Quicklisp location.)) -\item \index{make-keyword} +\item \index{MAKE-KEYWORD} \label{prim:make-keyword} -\textbf{make-keyword} +\textbf{MAKE-KEYWORD} -(type Keyword symbol intro Converts given strings to a keyword. +(TYPE Keyword symbol INTRO Converts given strings to a keyword. If any of the given arguments is not a string, it will be converted to one with (format nil "~a" string). - arguments (strings \&rest Strings)) + ARGUMENTS (STRINGS \&rest Strings)) -\item \index{make-object} +\item \index{MAKE-OBJECT} \label{prim:make-object} -\textbf{make-object} +\textbf{MAKE-OBJECT} -(type GDL Object intro - Instantiates an object with specified initial values for input-slots. - arguments - (object-name Symbol. Should name a GDL object type. arguments - spliced-in plist. A plist of keyword symbols and values for initial input-slots.)) +(TYPE GDL Object INTRO Instantiates an object with specified initial values for input-slots. + ARGUMENTS (OBJECT-NAME Symbol. Should name a GDL object type. ARGUMENTS spliced-in plist. A plist of keyword symbols and values for initial input-slots.)) -\item \index{mapsend} +\item \index{MAPSEND} \label{prim:mapsend} -\textbf{mapsend} +\textbf{MAPSEND} -(type List intro - Returns a new list which is the result of sending message to each GDL +(TYPE List INTRO Returns a new list which is the result of sending message to each GDL object in object-list. - arguments (object-list List of GDL objects. message Keyword symbol.)) + ARGUMENTS (OBJECT-LIST List of GDL objects. MESSAGE Keyword symbol.)) -\item \index{maptree} +\item \index{MAPTREE} \label{prim:maptree} -\textbf{maptree} +\textbf{MAPTREE} -(type List intro - Returns the results of applying fn to each GDL object in the object +(TYPE List INTRO Returns the results of applying fn to each GDL object in the object tree rooted at node in a ``depth-first'' tree traversal. - arguments - (node GDL object fn - Function. Operates on a single argument which is a GDL object) - \&optional - ((accept? \#'always) - Function. Determines which nodes to accept in the final result - (prune? \#'never) - Function. Determines which nodes to prune from the tree traversal - (get-children children) - Keyword symbol :children or Function. Function applied to + ARGUMENTS (NODE GDL object FN Function. Operates on a single argument which is a GDL object) \&OPTIONAL ((ACCEPT? \#'ALWAYS) Function. Determines which nodes to accept in the final result (PRUNE? \#'NEVER) Function. Determines which nodes to prune from the tree traversal (GET-CHILDREN CHILDREN) Keyword symbol :children or Function. Function applied to a given node to get its children. The default, keyword symbol :children, uses the node's normal children as returned by (the-object node children).)) -\item \index{max-of-elements} +\item \index{MAX-OF-ELEMENTS} \label{prim:max-of-elements} -\textbf{max-of-elements [Macro]} +\textbf{MAX-OF-ELEMENTS [Macro]} -(type Number [Macro] intro - Returns the maximum of expression from each element of an aggregate, +(TYPE Number [Macro] INTRO Returns the maximum of expression from each element of an aggregate, with an optional filter. - arguments - (aggregate - GDL aggregate object. (e.g. from a :sequence (:size ..) :object specification).) - \&optional - (expression - Expression using the-element. Similar to a the-object reference, which should return a number.)) + ARGUMENTS (AGGREGATE GDL aggregate object. (e.g. from a :sequence (:size ..) :object specification).) \&OPTIONAL (EXPRESSION Expression using the-element. Similar to a the-object reference, which should return a number.)) -\item \index{min-of-elements} +\item \index{MIN-OF-ELEMENTS} \label{prim:min-of-elements} -\textbf{min-of-elements [Macro]} +\textbf{MIN-OF-ELEMENTS [Macro]} -(type Number [Macro] intro - Returns the minimum of expression from each element of an aggregate, +(TYPE Number [Macro] INTRO Returns the minimum of expression from each element of an aggregate, with an optional filter. - arguments - (aggregate - GDL aggregate object. (e.g. from a :sequence (:size ..) :object specification).) - \&optional - (expression - Expression using the-element. Similar to a the-object reference, which should return a number.)) + ARGUMENTS (AGGREGATE GDL aggregate object. (e.g. from a :sequence (:size ..) :object specification).) \&OPTIONAL (EXPRESSION Expression using the-element. Similar to a the-object reference, which should return a number.)) -\item \index{most} +\item \index{MOST} \label{prim:most} -\textbf{most} +\textbf{MOST} -(type List intro - Returns the member of list which returns the maximum numerical value +(TYPE List INTRO Returns the member of list which returns the maximum numerical value when function is applied to it. As second value is returned which is the actual maximum value (the return-value of function as applied). This function comes from the Paul Graham book ANSI Common Lisp. - arguments (function Function list List)) + ARGUMENTS (FUNCTION Function LIST List)) -\item \index{near-to?} +\item \index{NEAR-TO?} \label{prim:near-to?} -\textbf{near-to?} +\textbf{NEAR-TO?} -(type Boolean intro Predicate to test if number is within tolerance of +(TYPE Boolean INTRO Predicate to test if number is within tolerance of near-to. The default tolerance is the value of the parameter *zero-epsilon*. - arguments (number Number near-to Number) \&optional - ((tolerance *zero-epsilon*) Number)) + ARGUMENTS (NUMBER Number NEAR-TO Number) \&OPTIONAL ((TOLERANCE *ZERO-EPSILON*) Number)) -\item \index{near-zero?} +\item \index{NEAR-ZERO?} \label{prim:near-zero?} -\textbf{near-zero?} +\textbf{NEAR-ZERO?} -(type Boolean intro - Returns non-NIL iff number is greater than tolerance different +(TYPE Boolean INTRO Returns non-NIL iff number is greater than tolerance different from zero. - arguments (number Number) \&optional - ((tolerance *zero-epsilon*) Number) see-also - zerop (Common Lisp function) + ARGUMENTS (NUMBER Number) \&OPTIONAL ((TOLERANCE *ZERO-EPSILON*) Number) SEE-ALSO zerop (Common Lisp function) ) -\item \index{never} +\item \index{NEVER} \label{prim:never} -\textbf{never} +\textbf{NEVER} -(type NIL intro - Always returns the value NIL regardless of arg. - arguments (arg Lisp object. Ignored)) +(TYPE NIL INTRO Always returns the value NIL regardless of arg. + ARGUMENTS (ARG Lisp object. Ignored)) -\item \index{number-format} +\item \index{NUMBER-FORMAT} \label{prim:number-format} -\textbf{number-format} +\textbf{NUMBER-FORMAT} -(type String intro - Returns a string displaying number rounded to decimal-places decimal places. - arguments (number Number decimal-places Integer)) +(TYPE String INTRO Returns a string displaying number rounded to decimal-places decimal places. + ARGUMENTS (NUMBER Number DECIMAL-PLACES Integer)) -\item \index{number-round} +\item \index{NUMBER-ROUND} \label{prim:number-round} -\textbf{number-round} +\textbf{NUMBER-ROUND} -(type Number intro - Returns number rounded to decimal-places decimal places. - arguments (number Number decimal-places Integer)) +(TYPE Number INTRO Returns number rounded to decimal-places decimal places. + ARGUMENTS (NUMBER Number DECIMAL-PLACES Integer)) -\item \index{plist-keys} +\item \index{PLIST-KEYS} \label{prim:plist-keys} -\textbf{plist-keys} +\textbf{PLIST-KEYS} -(type List of keyword symbols intro Returns the keys from a plist. - arguments (plist Plist)) +(TYPE List of keyword symbols INTRO Returns the keys from a plist. + ARGUMENTS (PLIST Plist)) -\item \index{plist-values} +\item \index{PLIST-VALUES} \label{prim:plist-values} -\textbf{plist-values} +\textbf{PLIST-VALUES} -(type List of Lisp objects intro Returns the values from a plist. - arguments (plist Plist)) +(TYPE List of Lisp objects INTRO Returns the values from a plist. + ARGUMENTS (PLIST Plist)) -\item \index{print-messages} +\item \index{PRINT-MESSAGES} \label{prim:print-messages} -\textbf{print-messages [Macro]} +\textbf{PRINT-MESSAGES [Macro]} -(type [Macro] Void intro - Prints the specified GDL object messages (i.e. slots) and their current values to standard output. - arguments (vars unquoted symbols (\&rest argument))) +(TYPE [Macro] Void INTRO Prints the specified GDL object messages (i.e. slots) and their current values to standard output. + ARGUMENTS (VARS unquoted symbols (\&rest argument))) -\item \index{print-variables} +\item \index{PRINT-VARIABLES} \label{prim:print-variables} -\textbf{print-variables [Macro]} - -(type [Macro] Void intro - Prints the specified variables and current values to standard output. - arguments (vars unquoted symbols (\&rest argument))) - +\textbf{PRINT-VARIABLES [Macro]} +(TYPE [Macro] Void INTRO Prints the specified variables and current values to standard output. + ARGUMENTS (VARS unquoted symbols (\&rest argument))) -\item \index{query-collect} -\label{prim:query-collect} -\textbf{query-collect} -(type List of row objects intro - Returns all the rows from a query, or if a key is given, returns the values from the column named with the key. - \&optional - (key - Keyword symbol. If given, the values from this named column will be returned, rather than the entire row objects.)) - - -\item \index{read-safe-string} +\item \index{READ-SAFE-STRING} \label{prim:read-safe-string} -\textbf{read-safe-string} +\textbf{READ-SAFE-STRING} -(type Lisp object intro - Reads an item from string, protecting against lisp evaluation with +(TYPE Lisp object INTRO Reads an item from string, protecting against lisp evaluation with the `\#.' reader macro. Throws an error if evaluation would have occured. - arguments (string string)) + ARGUMENTS (STRING string)) -\item \index{read-snapshot} +\item \index{READ-SNAPSHOT} \label{prim:read-snapshot} -\textbf{read-snapshot} +\textbf{READ-SNAPSHOT} -(type GDL Instance intro - Reads the snapshot data from stream, from the string, +(TYPE GDL Instance INTRO Reads the snapshot data from stream, from the string, or from file indicated by filename. If no optional keyword object argument is given, a new GDL instance based on the data in the snapshot file is returned. If an object is given, @@ -6367,152 +6067,113 @@ the object should be compatible in type to that specified in the snapshot file, and this existing object will be modified to contain the set slot values and toplevel inputs as specified in the snapshot file. - \&key - ((filename /tmp/snap.gdl) - String or pathname. File to be read. If either string or stream is specified, this will not be used. - (string nil) - String of data. The actual snapshot contents, stored in a string. If stream is specified, this will not be used. - (stream nil) - Stream open for input. A stream from which the snapshot data can be read. - (keep-bashed-values? nil) - Boolean. Indicates whether to keep the currently bashed values in object before reading snap values into it. - (object nil) - GDL object. Existing object to be modified with restored values.)) + \&KEY ((FILENAME /tmp/snap.gdl) String or pathname. File to be read. If either string or stream is specified, this will not be used. (STRING NIL) String of data. The actual snapshot contents, stored in a string. If stream is specified, this will not be used. (STREAM NIL) Stream open for input. A stream from which the snapshot data can be read. (KEEP-BASHED-VALUES? NIL) Boolean. Indicates whether to keep the currently bashed values in object before reading snap values into it. (OBJECT NIL) GDL object. Existing object to be modified with restored values.)) -\item \index{remove-plist-entry} +\item \index{REMOVE-PLIST-ENTRY} \label{prim:remove-plist-entry} -\textbf{remove-plist-entry} +\textbf{REMOVE-PLIST-ENTRY} -(type Plist intro - Returns a new plist sans any key/value pairs where the plist key is eql to the given key. +(TYPE Plist INTRO Returns a new plist sans any key/value pairs where the plist key is eql to the given key. Optionally a different test than \#'eql can be specified with the :test keyword argument. - arguments - (plist Plist. The source plist. key - matching key, typically a keyword symbol. The key to target for removal.) - \&key - ((test \#'eql) - predicate equality function taking two arguments. The function to use for matching.) - examples (remove-plist-entry (list :a "a" :b :a) :a) + ARGUMENTS (PLIST Plist. The source plist. KEY matching key, typically a keyword symbol. The key to target for removal.) \&KEY ((TEST \#'EQL) predicate equality function taking two arguments. The function to use for matching.) EXAMPLES (remove-plist-entry (list :a "a" :b :a) :a) ) -\item \index{round-to-nearest} +\item \index{ROUND-TO-NEAREST} \label{prim:round-to-nearest} -\textbf{round-to-nearest} +\textbf{ROUND-TO-NEAREST} -(type Number intro Rounds number to the nearest interval. - arguments (number Number interval Number)) +(TYPE Number INTRO Rounds number to the nearest interval. + ARGUMENTS (NUMBER Number INTERVAL Number)) -\item \index{safe-float} +\item \index{SAFE-FLOAT} \label{prim:safe-float} -\textbf{safe-float} +\textbf{SAFE-FLOAT} -(type Double-float Number intro - Coerces number to a double-precision floating-point +(TYPE Double-float Number INTRO Coerces number to a double-precision floating-point number if possible. If this is not possible, returns 0.0d0 (i.e. zero in the form of a double-precision floating-point number). - arguments (number Number)) + ARGUMENTS (NUMBER Number)) -\item \index{safe-sort} +\item \index{SAFE-SORT} \label{prim:safe-sort} -\textbf{safe-sort} +\textbf{SAFE-SORT} -(type List intro - Nondestructive analog of the Common Lisp sort function. +(TYPE List INTRO Nondestructive analog of the Common Lisp sort function. Returns a freshly created list. - arguments (list List. The list to be sorted.) \&rest - (args - Argument list. Identical to the arguments for Common Lisp sort.)) + ARGUMENTS (LIST List. The list to be sorted.) \&REST (ARGS Argument list. Identical to the arguments for Common Lisp sort.)) -\item \index{set-format-slot} +\item \index{SET-FORMAT-SLOT} \label{prim:set-format-slot} -\textbf{set-format-slot [Macro]} +\textbf{SET-FORMAT-SLOT [Macro]} -(type Void [Macro] intro - Sets the value of the given slot within the context of the current +(TYPE Void [Macro] INTRO Sets the value of the given slot within the context of the current with-format output format object. - arguments (slot-name Symbol. value Lisp Value)) + ARGUMENTS (SLOT-NAME Symbol. VALUE Lisp Value)) -\item \index{split} +\item \index{SPLIT} \label{prim:split} -\textbf{split} +\textbf{SPLIT} -(type List of Strings intro - Returns a list containing the elements of string after having +(TYPE List of Strings INTRO Returns a list containing the elements of string after having been split according to split-chars as delimiting characters. - arguments (string String) \&optional - ((split-chars - (list - )) - List of characters) - see-also glisp:split-regexp + ARGUMENTS (STRING String) \&OPTIONAL ((SPLIT-CHARS (LIST + )) List of characters) SEE-ALSO glisp:split-regexp ) -\item \index{status-message} +\item \index{STATUS-MESSAGE} \label{prim:status-message} -\textbf{status-message} +\textbf{STATUS-MESSAGE} -(type NIL intro - Prints string, followed by a newline, to *trace-output*, +(TYPE NIL INTRO Prints string, followed by a newline, to *trace-output*, which is generally the system console. - arguments (string String)) + ARGUMENTS (STRING String)) -\item \index{string-append} +\item \index{STRING-APPEND} \label{prim:string-append} -\textbf{string-append} +\textbf{STRING-APPEND} -(type String intro - Returns a new string made up of concatenating the arguments. - arguments (\&rest (args strings))) +(TYPE String INTRO Returns a new string made up of concatenating the arguments. + ARGUMENTS (\&REST (ARGS strings))) -\item \index{sum-elements} +\item \index{SUM-ELEMENTS} \label{prim:sum-elements} -\textbf{sum-elements [Macro]} +\textbf{SUM-ELEMENTS [Macro]} -(type Number [Macro] intro - Returns the sum of expression from each element of an aggregate, +(TYPE Number [Macro] INTRO Returns the sum of expression from each element of an aggregate, with an optional filter. - arguments - (aggregate - GDL aggregate object. (e.g. from a :sequence (:size ..) :object specification).) - \&optional - (expression - Expression using the-element. Similar to a the-object reference, which should return a number.)) + ARGUMENTS (AGGREGATE GDL aggregate object. (e.g. from a :sequence (:size ..) :object specification).) \&OPTIONAL (EXPRESSION Expression using the-element. Similar to a the-object reference, which should return a number.)) -\item \index{the} +\item \index{THE} \label{prim:the} -\textbf{the [Macro]} +\textbf{THE [Macro]} -(type Lisp object intro - Sends the reference-chain to self, which typically means it is +(TYPE Lisp object INTRO Sends the reference-chain to self, which typically means it is used within the context of a define-object where self is automatically lexically bound. - arguments - (reference-chain - (\&rest). A spliced-in list of symbols naming messages, which can + ARGUMENTS (REFERENCE-CHAIN (\&rest). A spliced-in list of symbols naming messages, which can be slots or objects starting from self. For referring to elements of a quantified set, or for passing arguments to GDL functions which take arguments, use parentheses around the message name and enclose the quantified element index or function arguments after the message -name.) - example +name.) EXAMPLE This example sends the length message to the ``zeroth'' element of the quantified set of arms contained in the body which is contained in the robot which is contained in self:
@@ -6522,49 +6183,39 @@ set of arms contained in the body which is contained in the robot which is conta
 
 
 
-\item \index{the-child}
+\item \index{THE-CHILD}
 \label{prim:the-child}
-\textbf{the-child [Macro]}
+\textbf{THE-CHILD [Macro]}
 
-(type
- similar to ``the,'' but used to refer to the child part from within an :objects or :hidden-objects specification
- intro .
+(TYPE similar to ``the,'' but used to refer to the child part from within an :objects or :hidden-objects specification INTRO .
 This is often used for sending the index message to an element of a quantified set.
- arguments
- (reference-chain
-  (\&rest). A spliced-in list of symbols naming messages relative to the child object.))
+ ARGUMENTS (REFERENCE-CHAIN (\&rest). A spliced-in list of symbols naming messages relative to the child object.))
 
 
 
-\item \index{the-element}
+\item \index{THE-ELEMENT}
 \label{prim:the-element}
-\textbf{the-element [Macro]}
+\textbf{THE-ELEMENT [Macro]}
 
-(type Lisp Object [Macro] intro
-  Acts similarly to the-object for each element of an aggregate,
+(TYPE Lisp Object [Macro] INTRO  Acts similarly to the-object for each element of an aggregate,
 within the context of a list-elements, append-elements, max-of-elements,
 min-of-elements, sum-elements, or a query operator (query operators are not
 yet documented).
- arguments
- (args (\&rest). Standard reference chain applicable to the element.))
+ ARGUMENTS (ARGS (\&rest). Standard reference chain applicable to the element.))
 
 
 
-\item \index{the-object}
+\item \index{THE-OBJECT}
 \label{prim:the-object}
-\textbf{the-object [Macro]}
+\textbf{THE-OBJECT [Macro]}
 
-(type Lisp object intro
-  Sends the reference-chain to object, which must be specified
+(TYPE Lisp object INTRO  Sends the reference-chain to object, which must be specified
 as a Lisp expression (e.g. a variable) which evaluates to a GDL object.
- arguments
- (reference-chain
-  (\&rest). A spliced-in list of symbols naming messages, which can 
+ ARGUMENTS (REFERENCE-CHAIN (\&rest). A spliced-in list of symbols naming messages, which can 
 be slots or objects starting from object. For referring to elements of a quantified set,
 or for passing arguments to GDL functions which take arguments, use parentheses around the
 message name and enclose the quantified element index or function arguments after the message
-name.)
- example 
+name.) EXAMPLE 
 This example sends the length message to the ``zeroth'' element of the quantified
 set of arms contained in the body which is contained in the robot which is contained in object:
 
@@ -6574,62 +6225,54 @@ set of arms contained in the body which is contained in the robot which is conta
 
 
 
-\item \index{twice}
+\item \index{TWICE}
 \label{prim:twice}
-\textbf{twice}
+\textbf{TWICE}
 
-(type Number intro
-  Returns the result of multiplying num by the integer 2.
+(TYPE Number INTRO  Returns the result of multiplying num by the integer 2.
 The type of the returned number will depend on the type of num.
- arguments (num Number))
+ ARGUMENTS (NUM Number))
 
 
 
-\item \index{undefine-object}
+\item \index{UNDEFINE-OBJECT}
 \label{prim:undefine-object}
-\textbf{undefine-object}
+\textbf{UNDEFINE-OBJECT}
 
-(type NIL intro
-  Clears all definitions associated with object-name from the
+(TYPE NIL INTRO  Clears all definitions associated with object-name from the
 currently running GDL session.
- arguments (object-name Non-keyword Symbol naming a GDL object type))
+ ARGUMENTS (OBJECT-NAME Non-keyword Symbol naming a GDL object type))
 
 
 
-\item \index{universal-time-from-iso-8601}
+\item \index{UNIVERSAL-TIME-FROM-ISO-8601}
 \label{prim:universal-time-from-iso-8601}
-\textbf{universal-time-from-iso-8601}
+\textbf{UNIVERSAL-TIME-FROM-ISO-8601}
 
-(type Integer representing Common Lisp Universal Time intro
-  Returns the universal time from a date formatted as
+(TYPE Integer representing Common Lisp Universal Time INTRO  Returns the universal time from a date formatted as
 an iso-8601 date, optionally with time, e.g. 2012-07-08 or 2012-07-08T13:33 or 2012-07-08T13:33:00
 )
 
 
 
-\item \index{with-error-handling}
+\item \index{WITH-ERROR-HANDLING}
 \label{prim:with-error-handling}
-\textbf{with-error-handling [Macro]}
+\textbf{WITH-ERROR-HANDLING [Macro]}
 
-(type [Macro] intro
-  Wraps the body of code with error-trapping and system timeout.
+(TYPE [Macro] INTRO  Wraps the body of code with error-trapping and system timeout.
 A warning is given if an error condition occurs with body.
- \&key
- ((timeout 2) Timeout in Seconds. timeout-body
-  Body of code to evaluate if timeout occurs.
-Default is to print a warning and return nil.)
- \&rest (body Body of code to be wrapped))
+ \&KEY ((TIMEOUT 2) Timeout in Seconds. TIMEOUT-BODY Body of code to evaluate if timeout occurs.
+Default is to print a warning and return nil.) \&REST (BODY Body of code to be wrapped))
 
 
 
-\item \index{with-format}
+\item \index{WITH-FORMAT}
 \label{prim:with-format}
-\textbf{with-format [Macro]}
+\textbf{WITH-FORMAT [Macro]}
 
-(type Void [Macro] intro
-  Used to establish an output format and a stream to which data is to be sent. This
+(TYPE Void [Macro] INTRO  Used to establish an output format and a stream to which data is to be sent. This
 supports a full range of output options such as page dimensions, view transforms, view scales, etc.
- example 
+ EXAMPLE 
 
  (gdl::with-format (pdf "/tmp/box.pdf" :view-transform (getf *standard-views* :trimetric)) 
     (write-the-object (make-instance 'box :length 100 :width 100 :height 100) cad-output))
@@ -6638,29 +6281,24 @@ supports a full range of output options such as page dimensions, view transforms
 
 
 
-\item \index{with-format-slots}
+\item \index{WITH-FORMAT-SLOTS}
 \label{prim:with-format-slots}
-\textbf{with-format-slots [Macro]}
+\textbf{WITH-FORMAT-SLOTS [Macro]}
 
-(type Void [Macro] intro
-  Wrap this around a body of code which should have access to multiple slots from the context
+(TYPE Void [Macro] INTRO  Wrap this around a body of code which should have access to multiple slots from the context
 of the current with-format output format object.
- arguments (slots List of Symbols.))
+ ARGUMENTS (SLOTS List of Symbols.))
 
 
 
-\item \index{write-env}
+\item \index{WRITE-ENV}
 \label{prim:write-env}
-\textbf{write-env [Macro]}
+\textbf{WRITE-ENV [Macro]}
 
-(type Void [Macro] (usually used just for outputting) intro
-  Within the context of a with-format, calls functions of
+(TYPE Void [Macro] (usually used just for outputting) INTRO  Within the context of a with-format, calls functions of
 the format object, optionally with arguments. Typically these functions will output data to the
 stream established by the with-format.
- arguments
- (function-calls
-  (\&rest). Functions on the named output-format to be called.)
- example 
+ ARGUMENTS (FUNCTION-CALLS (\&rest). Functions on the named output-format to be called.) EXAMPLE 
 
  (with-format (base-format my-object) (write-env (:a "Hello World, my object's length is: ")
                                                  (:a (the length))))
@@ -6669,33 +6307,27 @@ the format object, optionally with arguments. Typically these functions will out
 
 
 
-\item \index{write-plist}
+\item \index{WRITE-PLIST}
 \label{prim:write-plist}
-\textbf{write-plist}
+\textbf{WRITE-PLIST}
 
-(type Pretty-prints a plist to a file with standard I/O syntax intro .
- \&key
- ((plist nil) List. The list to be printed to the file
-  (output-path nil)
-  Pathname of a file. The file to be created or superseded.))
+(TYPE Pretty-prints a plist to a file with standard I/O syntax INTRO .
+ \&KEY ((PLIST NIL) List. The list to be printed to the file (OUTPUT-PATH NIL) Pathname of a file. The file to be created or superseded.))
 
 
 
-\item \index{write-the}
+\item \index{WRITE-THE}
 \label{prim:write-the}
-\textbf{write-the [Macro]}
+\textbf{WRITE-THE [Macro]}
 
-(type Lisp object [Macro] intro
-  Typcially used only to send output, not for the return value. This macro
+(TYPE Lisp object [Macro] INTRO  Typcially used only to send output, not for the return value. This macro
 is used within the body of a with-format. It sends the reference-chain to
 self, which typically means it is used within the context of a define-object where
 self is automatically lexically bound.
 The reference-chain must terminate with an output-function defined for
 the combination of the output-format specified in the enclosing
 with-format, and the object identified by self.
- arguments
- (reference-chain
-  (\&rest). A spliced-in list of symbols naming messages, which can 
+ ARGUMENTS (REFERENCE-CHAIN (\&rest). A spliced-in list of symbols naming messages, which can 
 be slots or objects starting from self, terminating with the name of an output-function.
 For referring to elements of a quantified set, or for passing arguments to GDL functions which
 take arguments, use parentheses around the message name and enclose the quantified element index
@@ -6703,21 +6335,18 @@ or function arguments after the message name.))
 
 
 
-\item \index{write-the-object}
+\item \index{WRITE-THE-OBJECT}
 \label{prim:write-the-object}
-\textbf{write-the-object [Macro]}
+\textbf{WRITE-THE-OBJECT [Macro]}
 
-(type Lisp object [Macro] intro
-  Typcially used only to send output, not for the return value. This macro
+(TYPE Lisp object [Macro] INTRO  Typcially used only to send output, not for the return value. This macro
 is used within the body of a with-format. It sends the reference-chain to
 object, which must be specified as a Lisp expression (e.g. a variable) which
 evaluates to a GDL object.
 The reference-chain must terminate with an output-function defined for the combination of
 the output-format specified in the enclosing with-format, and the object
 identified by object.
- arguments
- (reference-chain
-  (\&rest). A spliced-in list of symbols naming messages, which can 
+ ARGUMENTS (REFERENCE-CHAIN (\&rest). A spliced-in list of symbols naming messages, which can 
 be slots or objects starting from object, terminating with the name of an output-function.
 For referring to elements of a quantified set, or for passing arguments to GDL functions which
 take arguments, use parentheses around the message name and enclose the quantified element index
@@ -6729,8 +6358,8 @@ or function arguments after the message name.))
 \label{prim:hat-2}
 \textbf{hat-2}
 
-(type Number intro  Return number raised to the power two (2).
- arguments (number Number))
+(TYPE Number INTRO  Return number raised to the power two (2).
+ ARGUMENTS (NUMBER Number))
 
 
 
@@ -6746,241 +6375,257 @@ or function arguments after the message name.))
 
 \begin{itemize}
 
-\item \index{*color-plist*}
+\item \index{*ALLOW-NIL-LIST-OF-NUMBERS?*}
+\label{prim:*allow-nil-list-of-numbers?*}
+\textbf{*ALLOW-NIL-LIST-OF-NUMBERS?*}
+
+
+
+
+
+\item \index{*BIAS-TO-DOUBLE-FLOAT?*}
+\label{prim:*bias-to-double-float?*}
+\textbf{*BIAS-TO-DOUBLE-FLOAT?*}
+
+
+
+
+
+\item \index{*COLOR-PLIST*}
 \label{prim:*color-plist*}
-\textbf{*color-plist*}
+\textbf{*COLOR-PLIST*}
 
 
 
 
 
-\item \index{*color-table*}
+\item \index{*COLOR-TABLE*}
 \label{prim:*color-table*}
-\textbf{*color-table*}
+\textbf{*COLOR-TABLE*}
 
 
 
 
 
-\item \index{*color-table-decimal*}
+\item \index{*COLOR-TABLE-DECIMAL*}
 \label{prim:*color-table-decimal*}
-\textbf{*color-table-decimal*}
+\textbf{*COLOR-TABLE-DECIMAL*}
 
 
 
 
 
-\item \index{*colors-default*}
+\item \index{*COLORS-DEFAULT*}
 \label{prim:*colors-default*}
-\textbf{*colors-default*}
+\textbf{*COLORS-DEFAULT*}
 
 
 
 
 
-\item \index{*compile-circular-reference-detection?*}
+\item \index{*COMPILE-CIRCULAR-REFERENCE-DETECTION?*}
 \label{prim:*compile-circular-reference-detection?*}
-\textbf{*compile-circular-reference-detection?*}
+\textbf{*COMPILE-CIRCULAR-REFERENCE-DETECTION?*}
 
 
 
 
 
-\item \index{*compile-dependency-tracking?*}
+\item \index{*COMPILE-DEPENDENCY-TRACKING?*}
 \label{prim:*compile-dependency-tracking?*}
-\textbf{*compile-dependency-tracking?*}
+\textbf{*COMPILE-DEPENDENCY-TRACKING?*}
 
 
 
 
 
-\item \index{*compile-documentation-database?*}
+\item \index{*COMPILE-DOCUMENTATION-DATABASE?*}
 \label{prim:*compile-documentation-database?*}
-\textbf{*compile-documentation-database?*}
+\textbf{*COMPILE-DOCUMENTATION-DATABASE?*}
 
 
 
 
 
-\item \index{*compile-for-dgdl?*}
+\item \index{*COMPILE-FOR-DGDL?*}
 \label{prim:*compile-for-dgdl?*}
-\textbf{*compile-for-dgdl?*}
+\textbf{*COMPILE-FOR-DGDL?*}
 
 
 
 
 
-\item \index{*compile-source-code-database?*}
+\item \index{*COMPILE-SOURCE-CODE-DATABASE?*}
 \label{prim:*compile-source-code-database?*}
-\textbf{*compile-source-code-database?*}
+\textbf{*COMPILE-SOURCE-CODE-DATABASE?*}
 
 
 
 
 
-\item \index{*curve-chords*}
+\item \index{*CURVE-CHORDS*}
 \label{prim:*curve-chords*}
-\textbf{*curve-chords*}
+\textbf{*CURVE-CHORDS*}
 
 
 
 
 
-\item \index{*ensure-lists-when-bashing?*}
+\item \index{*ENSURE-LISTS-WHEN-BASHING?*}
 \label{prim:*ensure-lists-when-bashing?*}
-\textbf{*ensure-lists-when-bashing?*}
+\textbf{*ENSURE-LISTS-WHEN-BASHING?*}
 
 
 
 
 
-\item \index{*load-documentation-database?*}
+\item \index{*LOAD-DOCUMENTATION-DATABASE?*}
 \label{prim:*load-documentation-database?*}
-\textbf{*load-documentation-database?*}
+\textbf{*LOAD-DOCUMENTATION-DATABASE?*}
 
 
 
 
 
-\item \index{*load-source-code-database?*}
+\item \index{*LOAD-SOURCE-CODE-DATABASE?*}
 \label{prim:*load-source-code-database?*}
-\textbf{*load-source-code-database?*}
+\textbf{*LOAD-SOURCE-CODE-DATABASE?*}
 
 
 
 
 
-\item \index{*on-syntax-error*}
+\item \index{*ON-SYNTAX-ERROR*}
 \label{prim:*on-syntax-error*}
-\textbf{*on-syntax-error*}
+\textbf{*ON-SYNTAX-ERROR*}
 
 
 
 
 
-\item \index{*out-of-bounds-sequence-reference-action*}
+\item \index{*OUT-OF-BOUNDS-SEQUENCE-REFERENCE-ACTION*}
 \label{prim:*out-of-bounds-sequence-reference-action*}
-\textbf{*out-of-bounds-sequence-reference-action*}
+\textbf{*OUT-OF-BOUNDS-SEQUENCE-REFERENCE-ACTION*}
 
 
 
 
 
-\item \index{*remember-previous-slot-values?*}
+\item \index{*REMEMBER-PREVIOUS-SLOT-VALUES?*}
 \label{prim:*remember-previous-slot-values?*}
-\textbf{*remember-previous-slot-values?*}
+\textbf{*REMEMBER-PREVIOUS-SLOT-VALUES?*}
 
 
 
 
 
-\item \index{*root-checking-enabled?*}
+\item \index{*ROOT-CHECKING-ENABLED?*}
 \label{prim:*root-checking-enabled?*}
-\textbf{*root-checking-enabled?*}
+\textbf{*ROOT-CHECKING-ENABLED?*}
 
 
 
 
 
-\item \index{*run-with-circular-reference-detection?*}
+\item \index{*RUN-WITH-CIRCULAR-REFERENCE-DETECTION?*}
 \label{prim:*run-with-circular-reference-detection?*}
-\textbf{*run-with-circular-reference-detection?*}
+\textbf{*RUN-WITH-CIRCULAR-REFERENCE-DETECTION?*}
 
 
 
 
 
-\item \index{*run-with-dependency-tracking?*}
+\item \index{*RUN-WITH-DEPENDENCY-TRACKING?*}
 \label{prim:*run-with-dependency-tracking?*}
-\textbf{*run-with-dependency-tracking?*}
+\textbf{*RUN-WITH-DEPENDENCY-TRACKING?*}
 
 
 
 
 
-\item \index{*sort-children?*}
+\item \index{*SORT-CHILDREN?*}
 \label{prim:*sort-children?*}
-\textbf{*sort-children?*}
+\textbf{*SORT-CHILDREN?*}
 
 
 
 
 
-\item \index{*undeclared-parameters-enabled?*}
+\item \index{*UNDECLARED-PARAMETERS-ENABLED?*}
 \label{prim:*undeclared-parameters-enabled?*}
-\textbf{*undeclared-parameters-enabled?*}
+\textbf{*UNDECLARED-PARAMETERS-ENABLED?*}
 
 
 
 
 
-\item \index{*with-format-direction}
+\item \index{*WITH-FORMAT-DIRECTION}
 \label{prim:*with-format-direction}
-\textbf{*with-format-direction}
+\textbf{*WITH-FORMAT-DIRECTION}
 
 
 
 
 
-\item \index{*with-format-element-type*}
+\item \index{*WITH-FORMAT-ELEMENT-TYPE*}
 \label{prim:*with-format-element-type*}
-\textbf{*with-format-element-type*}
+\textbf{*WITH-FORMAT-ELEMENT-TYPE*}
 
 
 
 
 
-\item \index{*with-format-external-format*}
+\item \index{*WITH-FORMAT-EXTERNAL-FORMAT*}
 \label{prim:*with-format-external-format*}
-\textbf{*with-format-external-format*}
+\textbf{*WITH-FORMAT-EXTERNAL-FORMAT*}
 
 
 
 
 
-\item \index{*with-format-if-does-not-exist*}
+\item \index{*WITH-FORMAT-IF-DOES-NOT-EXIST*}
 \label{prim:*with-format-if-does-not-exist*}
-\textbf{*with-format-if-does-not-exist*}
+\textbf{*WITH-FORMAT-IF-DOES-NOT-EXIST*}
 
 
 
 
 
-\item \index{*with-format-if-exists*}
+\item \index{*WITH-FORMAT-IF-EXISTS*}
 \label{prim:*with-format-if-exists*}
-\textbf{*with-format-if-exists*}
+\textbf{*WITH-FORMAT-IF-EXISTS*}
 
 
 
 
 
-\item \index{*zero-epsilon*}
+\item \index{*ZERO-EPSILON*}
 \label{prim:*zero-epsilon*}
-\textbf{*zero-epsilon*}
+\textbf{*ZERO-EPSILON*}
 
 
 
 
 
-\item \index{+phi+}
+\item \index{+PHI+}
 \label{prim:+phi+}
-\textbf{+phi+}
+\textbf{+PHI+}
 
 
 
 
 
-\item \index{2pi}
+\item \index{2PI}
 \label{prim:2pi}
-\textbf{2pi}
+\textbf{2PI}
 
 
 
 
 
-\item \index{pi/2}
+\item \index{PI/2}
 \label{prim:pi/2}
-\textbf{pi/2}
+\textbf{PI/2}
 
 
 
@@ -6992,7 +6637,7 @@ or function arguments after the message name.))
 
 
 
-\section{gdl-user }
+\section{GDL-USER }
 
 \label{sec:gdl-user}
 
@@ -7002,7 +6647,7 @@ or function arguments after the message name.))
 
 
 
-\section{gendl-doc }
+\section{GENDL-DOC }
 
 \label{sec:gendl-doc}
 
@@ -7012,17 +6657,7 @@ or function arguments after the message name.))
 
 
 
-\section{genworks-gdl (Genworks® GDL)}
-
-\label{sec:genworks-gdl(genworks®gdl)}
-
-
-
-
-
-
-
-\section{geom-base (Wireframe Geometry)}
+\section{GEOM-BASE (Wireframe Geometry)}
 
 \label{sec:geom-base(wireframegeometry)}
 
@@ -7038,13 +6673,13 @@ or function arguments after the message name.))
 
 \begin{itemize}
 
-\item \index{angular-dimension}
+\item \index{ANGULAR-DIMENSION}
 \label{prim:angular-dimension}
-\textbf{angular-dimension}
+\textbf{ANGULAR-DIMENSION}
 
 
 \textbf{
-\underline{Mixins:}} linear-dimension, vanilla-mixin
+\underline{Mixins:}} LINEAR-DIMENSION, VANILLA-MIXIN
 
 
 
@@ -7104,9 +6739,9 @@ This dimensional object produces a clear and concise arc dimensional annotation.
 \end{lrbox}
 \fbox{\usebox{\boxedverb}}
 
-\caption{Example Code for angular-dimension}
+\caption{Example Code for ANGULAR-DIMENSION}
 
-\label{fig:example-code-angular-dimension}
+\label{fig:example-code-ANGULAR-DIMENSION}
 
 \end{figure}
 
@@ -7115,9 +6750,9 @@ This dimensional object produces a clear and concise arc dimensional annotation.
 \includegraphics[width=3in,height=3in]{../images/example-angular-dimension.pdf}
 \end{center}
 
-\caption{angular-dimension example}
+\caption{ANGULAR-DIMENSION example}
 
-\label{fig:angular-dimension}
+\label{fig:ANGULAR-DIMENSION}
 
 \end{figure}
 
@@ -7255,13 +6890,13 @@ Defaults to nil.
 
 
 
-\item \index{arc}
+\item \index{ARC}
 \label{prim:arc}
-\textbf{arc}
+\textbf{ARC}
 
 
 \textbf{
-\underline{Mixins:}} arcoid-mixin, base-object
+\underline{Mixins:}} ARCOID-MIXIN, BASE-OBJECT
 
 
 
@@ -7304,9 +6939,9 @@ angles are measured anti-clockwise.
 \end{lrbox}
 \fbox{\usebox{\boxedverb}}
 
-\caption{Example Code for arc}
+\caption{Example Code for ARC}
 
-\label{fig:example-code-arc}
+\label{fig:example-code-ARC}
 
 \end{figure}
 
@@ -7315,9 +6950,9 @@ angles are measured anti-clockwise.
 \includegraphics[width=3in,height=3in]{../images/example-arc.pdf}
 \end{center}
 
-\caption{arc example}
+\caption{ARC example}
 
-\label{fig:arc}
+\label{fig:ARC}
 
 \end{figure}
 
@@ -7474,13 +7109,13 @@ the start and end point of the arc.
 
 
 
-\item \index{arcoid-mixin}
+\item \index{ARCOID-MIXIN}
 \label{prim:arcoid-mixin}
-\textbf{arcoid-mixin}
+\textbf{ARCOID-MIXIN}
 
 
 \textbf{
-\underline{Mixins:}} vanilla-mixin
+\underline{Mixins:}} VANILLA-MIXIN
 
 
 
@@ -7559,13 +7194,13 @@ For developers it should be used as a mixin.
 
 
 
-\item \index{base-coordinate-system}
+\item \index{BASE-COORDINATE-SYSTEM}
 \label{prim:base-coordinate-system}
-\textbf{base-coordinate-system}
+\textbf{BASE-COORDINATE-SYSTEM}
 
 
 \textbf{
-\underline{Mixins:}} base-object, vanilla-mixin
+\underline{Mixins:}} BASE-OBJECT, VANILLA-MIXIN
 
 
 
@@ -7595,13 +7230,13 @@ This provides a default 3D Cartesian
 
 
 
-\item \index{base-drawing}
+\item \index{BASE-DRAWING}
 \label{prim:base-drawing}
-\textbf{base-drawing}
+\textbf{BASE-DRAWING}
 
 
 \textbf{
-\underline{Mixins:}} base-object
+\underline{Mixins:}} BASE-OBJECT
 
 
 
@@ -7664,9 +7299,9 @@ makes sense for viewing it.
 \end{lrbox}
 \fbox{\usebox{\boxedverb}}
 
-\caption{Example Code for base-drawing}
+\caption{Example Code for BASE-DRAWING}
 
-\label{fig:example-code-base-drawing}
+\label{fig:example-code-BASE-DRAWING}
 
 \end{figure}
 
@@ -7675,9 +7310,9 @@ makes sense for viewing it.
 \includegraphics[width=3in,height=3in]{../images/example-base-drawing.pdf}
 \end{center}
 
-\caption{base-drawing example}
+\caption{BASE-DRAWING example}
 
-\label{fig:base-drawing}
+\label{fig:BASE-DRAWING}
 
 \end{figure}
 
@@ -7746,13 +7381,13 @@ The default is (* 8.5 72) points, or 8.5 inches, corresponding to US standard le
 
 
 
-\item \index{base-object}
+\item \index{BASE-OBJECT}
 \label{prim:base-object}
-\textbf{base-object}
+\textbf{BASE-OBJECT}
 
 
 \textbf{
-\underline{Mixins:}} vanilla-mixin
+\underline{Mixins:}} VANILLA-MIXIN
 
 
 
@@ -7842,9 +7477,9 @@ gdl-user(53):
 \end{lrbox}
 \fbox{\usebox{\boxedverb}}
 
-\caption{Example Code for base-object}
+\caption{Example Code for BASE-OBJECT}
 
-\label{fig:example-code-base-object}
+\label{fig:example-code-BASE-OBJECT}
 
 \end{figure}
 
@@ -8200,13 +7835,13 @@ based on the orientation and center of the object to which the local-to-global m
 
 
 
-\item \index{base-view}
+\item \index{BASE-VIEW}
 \label{prim:base-view}
-\textbf{base-view}
+\textbf{BASE-VIEW}
 
 
 \textbf{
-\underline{Mixins:}} base-object
+\underline{Mixins:}} BASE-OBJECT
 
 
 
@@ -8287,9 +7922,9 @@ makes sense for viewing it.
 \end{lrbox}
 \fbox{\usebox{\boxedverb}}
 
-\caption{Example Code for base-view}
+\caption{Example Code for BASE-VIEW}
 
-\label{fig:example-code-base-view}
+\label{fig:example-code-BASE-VIEW}
 
 \end{figure}
 
@@ -8298,9 +7933,9 @@ makes sense for viewing it.
 \includegraphics[width=3in,height=3in]{../images/example-base-view.pdf}
 \end{center}
 
-\caption{base-view example}
+\caption{BASE-VIEW example}
 
-\label{fig:base-view}
+\label{fig:BASE-VIEW}
 
 \end{figure}
 
@@ -8477,13 +8112,13 @@ the box should be facing. Defaults to \texttt{*nominal-y-vector*}.
 
 
 
-\item \index{bezier-curve}
+\item \index{BEZIER-CURVE}
 \label{prim:bezier-curve}
-\textbf{bezier-curve}
+\textbf{BEZIER-CURVE}
 
 
 \textbf{
-\underline{Mixins:}} base-object
+\underline{Mixins:}} BASE-OBJECT
 
 
 
@@ -8537,9 +8172,9 @@ vector pointing from the end point to the third control point.
 \end{lrbox}
 \fbox{\usebox{\boxedverb}}
 
-\caption{Example Code for bezier-curve}
+\caption{Example Code for BEZIER-CURVE}
 
-\label{fig:example-code-bezier-curve}
+\label{fig:example-code-BEZIER-CURVE}
 
 \end{figure}
 
@@ -8548,9 +8183,9 @@ vector pointing from the end point to the third control point.
 \includegraphics[width=3in,height=3in]{../images/example-bezier-curve.pdf}
 \end{center}
 
-\caption{bezier-curve example}
+\caption{BEZIER-CURVE example}
 
-\label{fig:bezier-curve}
+\label{fig:BEZIER-CURVE}
 
 \end{figure}
 
@@ -8646,13 +8281,13 @@ which should be between 0 and 1.
 
 
 
-\item \index{box}
+\item \index{BOX}
 \label{prim:box}
-\textbf{box}
+\textbf{BOX}
 
 
 \textbf{
-\underline{Mixins:}} base-object
+\underline{Mixins:}} BASE-OBJECT
 
 
 
@@ -8697,9 +8332,9 @@ messages as base-object, which knows how to output itself in various formats.
 \end{lrbox}
 \fbox{\usebox{\boxedverb}}
 
-\caption{Example Code for box}
+\caption{Example Code for BOX}
 
-\label{fig:example-code-box}
+\label{fig:example-code-BOX}
 
 \end{figure}
 
@@ -8708,9 +8343,9 @@ messages as base-object, which knows how to output itself in various formats.
 \includegraphics[width=3in,height=3in]{../images/example-box.pdf}
 \end{center}
 
-\caption{box example}
+\caption{BOX example}
 
-\label{fig:box}
+\label{fig:BOX}
 
 \end{figure}
 
@@ -8740,13 +8375,13 @@ messages as base-object, which knows how to output itself in various formats.
 
 
 
-\item \index{c-cylinder}
+\item \index{C-CYLINDER}
 \label{prim:c-cylinder}
-\textbf{c-cylinder}
+\textbf{C-CYLINDER}
 
 
 \textbf{
-\underline{Mixins:}} cylinder
+\underline{Mixins:}} CYLINDER
 
 
 
@@ -8794,9 +8429,9 @@ Provides a simple way to create a cylinder, by specifying a start point and an e
 \end{lrbox}
 \fbox{\usebox{\boxedverb}}
 
-\caption{Example Code for c-cylinder}
+\caption{Example Code for C-CYLINDER}
 
-\label{fig:example-code-c-cylinder}
+\label{fig:example-code-C-CYLINDER}
 
 \end{figure}
 
@@ -8805,9 +8440,9 @@ Provides a simple way to create a cylinder, by specifying a start point and an e
 \includegraphics[width=3in,height=3in]{../images/example-c-cylinder.pdf}
 \end{center}
 
-\caption{c-cylinder example}
+\caption{C-CYLINDER example}
 
-\label{fig:c-cylinder}
+\label{fig:C-CYLINDER}
 
 \end{figure}
 
@@ -8894,13 +8529,13 @@ Provides a simple way to create a cylinder, by specifying a start point and an e
 
 
 
-\item \index{center-line}
+\item \index{CENTER-LINE}
 \label{prim:center-line}
-\textbf{center-line}
+\textbf{CENTER-LINE}
 
 
 \textbf{
-\underline{Mixins:}} outline-specialization-mixin, base-object
+\underline{Mixins:}} OUTLINE-SPECIALIZATION-MIXIN, BASE-OBJECT
 
 
 
@@ -8956,9 +8591,9 @@ Creates a dashed single centerline or crosshair centerline on a circle.
 \end{lrbox}
 \fbox{\usebox{\boxedverb}}
 
-\caption{Example Code for center-line}
+\caption{Example Code for CENTER-LINE}
 
-\label{fig:example-code-center-line}
+\label{fig:example-code-CENTER-LINE}
 
 \end{figure}
 
@@ -8967,9 +8602,9 @@ Creates a dashed single centerline or crosshair centerline on a circle.
 \includegraphics[width=3in,height=3in]{../images/example-center-line.pdf}
 \end{center}
 
-\caption{center-line example}
+\caption{CENTER-LINE example}
 
-\label{fig:center-line}
+\label{fig:CENTER-LINE}
 
 \end{figure}
 
@@ -9098,13 +8733,13 @@ Creates a dashed single centerline or crosshair centerline on a circle.
 
 
 
-\item \index{circle}
+\item \index{CIRCLE}
 \label{prim:circle}
-\textbf{circle}
+\textbf{CIRCLE}
 
 
 \textbf{
-\underline{Mixins:}} arc
+\underline{Mixins:}} ARC
 
 
 
@@ -9150,9 +8785,9 @@ angles are measured anti-clockwise.
 \end{lrbox}
 \fbox{\usebox{\boxedverb}}
 
-\caption{Example Code for circle}
+\caption{Example Code for CIRCLE}
 
-\label{fig:example-code-circle}
+\label{fig:example-code-CIRCLE}
 
 \end{figure}
 
@@ -9161,9 +8796,9 @@ angles are measured anti-clockwise.
 \includegraphics[width=3in,height=3in]{../images/example-circle.pdf}
 \end{center}
 
-\caption{circle example}
+\caption{CIRCLE example}
 
-\label{fig:circle}
+\label{fig:CIRCLE}
 
 \end{figure}
 
@@ -9220,13 +8855,13 @@ angles are measured anti-clockwise.
 
 
 
-\item \index{cone}
+\item \index{CONE}
 \label{prim:cone}
-\textbf{cone}
+\textbf{CONE}
 
 
 \textbf{
-\underline{Mixins:}} cylinder
+\underline{Mixins:}} CYLINDER
 
 
 
@@ -9274,9 +8909,9 @@ the center of its base. Partial cones and hollow cones are supported.
 \end{lrbox}
 \fbox{\usebox{\boxedverb}}
 
-\caption{Example Code for cone}
+\caption{Example Code for CONE}
 
-\label{fig:example-code-cone}
+\label{fig:example-code-CONE}
 
 \end{figure}
 
@@ -9285,9 +8920,9 @@ the center of its base. Partial cones and hollow cones are supported.
 \includegraphics[width=3in,height=3in]{../images/example-cone.pdf}
 \end{center}
 
-\caption{cone example}
+\caption{CONE example}
 
-\label{fig:cone}
+\label{fig:CONE}
 
 \end{figure}
 
@@ -9374,13 +9009,13 @@ the center of its base. Partial cones and hollow cones are supported.
 
 
 
-\item \index{constrained-arc}
+\item \index{CONSTRAINED-ARC}
 \label{prim:constrained-arc}
-\textbf{constrained-arc}
+\textbf{CONSTRAINED-ARC}
 
 
 \textbf{
-\underline{Mixins:}} arc
+\underline{Mixins:}} ARC
 
 
 
@@ -9455,13 +9090,13 @@ of one (1.0).
 
 
 
-\item \index{constrained-fillet}
+\item \index{CONSTRAINED-FILLET}
 \label{prim:constrained-fillet}
-\textbf{constrained-fillet}
+\textbf{CONSTRAINED-FILLET}
 
 
 \textbf{
-\underline{Mixins:}} constrained-arc, vanilla-mixin
+\underline{Mixins:}} CONSTRAINED-ARC, VANILLA-MIXIN
 
 
 
@@ -9519,13 +9154,13 @@ and it automatically trims the result to each point of tangency
 
 
 
-\item \index{constrained-line}
+\item \index{CONSTRAINED-LINE}
 \label{prim:constrained-line}
-\textbf{constrained-line}
+\textbf{CONSTRAINED-LINE}
 
 
 \textbf{
-\underline{Mixins:}} line
+\underline{Mixins:}} LINE
 
 
 
@@ -9606,13 +9241,13 @@ Icad Compat function
 
 
 
-\item \index{cylinder}
+\item \index{CYLINDER}
 \label{prim:cylinder}
-\textbf{cylinder}
+\textbf{CYLINDER}
 
 
 \textbf{
-\underline{Mixins:}} ifs-output-mixin, arcoid-mixin, base-object
+\underline{Mixins:}} IFS-OUTPUT-MIXIN, ARCOID-MIXIN, BASE-OBJECT
 
 
 
@@ -9662,9 +9297,9 @@ Partial cylinders and hollow cylinders are supported.
 \end{lrbox}
 \fbox{\usebox{\boxedverb}}
 
-\caption{Example Code for cylinder}
+\caption{Example Code for CYLINDER}
 
-\label{fig:example-code-cylinder}
+\label{fig:example-code-CYLINDER}
 
 \end{figure}
 
@@ -9673,9 +9308,9 @@ Partial cylinders and hollow cylinders are supported.
 \includegraphics[width=3in,height=3in]{../images/example-cylinder.pdf}
 \end{center}
 
-\caption{cylinder example}
+\caption{CYLINDER example}
 
-\label{fig:cylinder}
+\label{fig:CYLINDER}
 
 \end{figure}
 
@@ -9837,13 +9472,13 @@ Partial cylinders and hollow cylinders are supported.
 
 
 
-\item \index{ellipse}
+\item \index{ELLIPSE}
 \label{prim:ellipse}
-\textbf{ellipse}
+\textbf{ELLIPSE}
 
 
 \textbf{
-\underline{Mixins:}} arcoid-mixin, base-object
+\underline{Mixins:}} ARCOID-MIXIN, BASE-OBJECT
 
 
 
@@ -9891,9 +9526,9 @@ partial ellipse. For a full ellipse, do not specify start-angle or end-angle.
 \end{lrbox}
 \fbox{\usebox{\boxedverb}}
 
-\caption{Example Code for ellipse}
+\caption{Example Code for ELLIPSE}
 
-\label{fig:example-code-ellipse}
+\label{fig:example-code-ELLIPSE}
 
 \end{figure}
 
@@ -9902,9 +9537,9 @@ partial ellipse. For a full ellipse, do not specify start-angle or end-angle.
 \includegraphics[width=3in,height=3in]{../images/example-ellipse.pdf}
 \end{center}
 
-\caption{ellipse example}
+\caption{ELLIPSE example}
 
-\label{fig:ellipse}
+\label{fig:ELLIPSE}
 
 \end{figure}
 
@@ -10012,13 +9647,13 @@ partial ellipse. For a full ellipse, do not specify start-angle or end-angle.
 
 
 
-\item \index{general-note}
+\item \index{GENERAL-NOTE}
 \label{prim:general-note}
-\textbf{general-note}
+\textbf{GENERAL-NOTE}
 
 
 \textbf{
-\underline{Mixins:}} outline-specialization-mixin, base-object
+\underline{Mixins:}} OUTLINE-SPECIALIZATION-MIXIN, BASE-OBJECT
 
 
 
@@ -10045,6 +9680,8 @@ Creates a text note in the graphical view port and in a PDF DXF output file.
 {\small
 
 \begin{verbatim} 
+ (in-package :gdl-user)
+
  (define-object general-note-test (base-object)
   
   :computed-slots
@@ -10088,9 +9725,9 @@ Creates a text note in the graphical view port and in a PDF DXF output file.
 \end{lrbox}
 \fbox{\usebox{\boxedverb}}
 
-\caption{Example Code for general-note}
+\caption{Example Code for GENERAL-NOTE}
 
-\label{fig:example-code-general-note}
+\label{fig:example-code-GENERAL-NOTE}
 
 \end{figure}
 
@@ -10099,9 +9736,9 @@ Creates a text note in the graphical view port and in a PDF DXF output file.
 \includegraphics[width=3in,height=3in]{../images/example-general-note.pdf}
 \end{center}
 
-\caption{general-note example}
+\caption{GENERAL-NOTE example}
 
-\label{fig:general-note}
+\label{fig:GENERAL-NOTE}
 
 \end{figure}
 
@@ -10332,13 +9969,13 @@ Defaults to "Courier".
 
 
 
-\item \index{global-filleted-polygon-projection}
+\item \index{GLOBAL-FILLETED-POLYGON-PROJECTION}
 \label{prim:global-filleted-polygon-projection}
-\textbf{global-filleted-polygon-projection}
+\textbf{GLOBAL-FILLETED-POLYGON-PROJECTION}
 
 
 \textbf{
-\underline{Mixins:}} global-polygon-projection
+\underline{Mixins:}} GLOBAL-POLYGON-PROJECTION
 
 
 
@@ -10399,9 +10036,9 @@ as with global-filleted-polygon.
 \end{lrbox}
 \fbox{\usebox{\boxedverb}}
 
-\caption{Example Code for global-filleted-polygon-projection}
+\caption{Example Code for GLOBAL-FILLETED-POLYGON-PROJECTION}
 
-\label{fig:example-code-global-filleted-polygon-projection}
+\label{fig:example-code-GLOBAL-FILLETED-POLYGON-PROJECTION}
 
 \end{figure}
 
@@ -10410,9 +10047,9 @@ as with global-filleted-polygon.
 \includegraphics[width=3in,height=3in]{../images/example-global-filleted-polygon-projection.pdf}
 \end{center}
 
-\caption{global-filleted-polygon-projection example}
+\caption{GLOBAL-FILLETED-POLYGON-PROJECTION example}
 
-\label{fig:global-filleted-polygon-projection}
+\label{fig:GLOBAL-FILLETED-POLYGON-PROJECTION}
 
 \end{figure}
 
@@ -10451,13 +10088,13 @@ as with global-filleted-polygon.
 
 
 
-\item \index{global-filleted-polyline}
+\item \index{GLOBAL-FILLETED-POLYLINE}
 \label{prim:global-filleted-polyline}
-\textbf{global-filleted-polyline}
+\textbf{GLOBAL-FILLETED-POLYLINE}
 
 
 \textbf{
-\underline{Mixins:}} global-filleted-polyline-mixin, vanilla-mixin
+\underline{Mixins:}} GLOBAL-FILLETED-POLYLINE-MIXIN, VANILLA-MIXIN
 
 
 
@@ -10508,9 +10145,9 @@ for documentation on the messages.
 \end{lrbox}
 \fbox{\usebox{\boxedverb}}
 
-\caption{Example Code for global-filleted-polyline}
+\caption{Example Code for GLOBAL-FILLETED-POLYLINE}
 
-\label{fig:example-code-global-filleted-polyline}
+\label{fig:example-code-GLOBAL-FILLETED-POLYLINE}
 
 \end{figure}
 
@@ -10519,9 +10156,9 @@ for documentation on the messages.
 \includegraphics[width=3in,height=3in]{../images/example-global-filleted-polyline.pdf}
 \end{center}
 
-\caption{global-filleted-polyline example}
+\caption{GLOBAL-FILLETED-POLYLINE example}
 
-\label{fig:global-filleted-polyline}
+\label{fig:GLOBAL-FILLETED-POLYLINE}
 
 \end{figure}
 
@@ -10530,13 +10167,13 @@ for documentation on the messages.
 
 
 
-\item \index{global-filleted-polyline-mixin}
+\item \index{GLOBAL-FILLETED-POLYLINE-MIXIN}
 \label{prim:global-filleted-polyline-mixin}
-\textbf{global-filleted-polyline-mixin}
+\textbf{GLOBAL-FILLETED-POLYLINE-MIXIN}
 
 
 \textbf{
-\underline{Mixins:}} global-polyline-mixin
+\underline{Mixins:}} GLOBAL-POLYLINE-MIXIN
 
 
 
@@ -10666,13 +10303,13 @@ of the filleted-polyline.
 
 
 
-\item \index{global-polygon-projection}
+\item \index{GLOBAL-POLYGON-PROJECTION}
 \label{prim:global-polygon-projection}
-\textbf{global-polygon-projection}
+\textbf{GLOBAL-POLYGON-PROJECTION}
 
 
 \textbf{
-\underline{Mixins:}} base-object, ifs-output-mixin
+\underline{Mixins:}} BASE-OBJECT, IFS-OUTPUT-MIXIN
 
 
 
@@ -10726,9 +10363,9 @@ the local center and orientation do not affect the positioning or orientation of
 \end{lrbox}
 \fbox{\usebox{\boxedverb}}
 
-\caption{Example Code for global-polygon-projection}
+\caption{Example Code for GLOBAL-POLYGON-PROJECTION}
 
-\label{fig:example-code-global-polygon-projection}
+\label{fig:example-code-GLOBAL-POLYGON-PROJECTION}
 
 \end{figure}
 
@@ -10737,9 +10374,9 @@ the local center and orientation do not affect the positioning or orientation of
 \includegraphics[width=3in,height=3in]{../images/example-global-polygon-projection.pdf}
 \end{center}
 
-\caption{global-polygon-projection example}
+\caption{GLOBAL-POLYGON-PROJECTION example}
 
-\label{fig:global-polygon-projection}
+\label{fig:GLOBAL-POLYGON-PROJECTION}
 
 \end{figure}
 
@@ -10851,13 +10488,13 @@ of the rectangular volume bounding the tree of geometric objects rooted at this
 
 
 
-\item \index{global-polyline}
+\item \index{GLOBAL-POLYLINE}
 \label{prim:global-polyline}
-\textbf{global-polyline}
+\textbf{GLOBAL-POLYLINE}
 
 
 \textbf{
-\underline{Mixins:}} global-polyline-mixin, vanilla-mixin
+\underline{Mixins:}} GLOBAL-POLYLINE-MIXIN, VANILLA-MIXIN
 
 
 
@@ -10905,9 +10542,9 @@ global-polyline-mixin for documentation on the messages.
 \end{lrbox}
 \fbox{\usebox{\boxedverb}}
 
-\caption{Example Code for global-polyline}
+\caption{Example Code for GLOBAL-POLYLINE}
 
-\label{fig:example-code-global-polyline}
+\label{fig:example-code-GLOBAL-POLYLINE}
 
 \end{figure}
 
@@ -10916,9 +10553,9 @@ global-polyline-mixin for documentation on the messages.
 \includegraphics[width=3in,height=3in]{../images/example-global-polyline.pdf}
 \end{center}
 
-\caption{global-polyline example}
+\caption{GLOBAL-POLYLINE example}
 
-\label{fig:global-polyline}
+\label{fig:GLOBAL-POLYLINE}
 
 \end{figure}
 
@@ -10927,13 +10564,13 @@ global-polyline-mixin for documentation on the messages.
 
 
 
-\item \index{global-polyline-mixin}
+\item \index{GLOBAL-POLYLINE-MIXIN}
 \label{prim:global-polyline-mixin}
-\textbf{global-polyline-mixin}
+\textbf{GLOBAL-POLYLINE-MIXIN}
 
 
 \textbf{
-\underline{Mixins:}} base-object
+\underline{Mixins:}} BASE-OBJECT
 
 
 
@@ -11011,13 +10648,13 @@ of the rectangular volume bounding the tree of geometric objects rooted at this
 
 
 
-\item \index{horizontal-dimension}
+\item \index{HORIZONTAL-DIMENSION}
 \label{prim:horizontal-dimension}
-\textbf{horizontal-dimension}
+\textbf{HORIZONTAL-DIMENSION}
 
 
 \textbf{
-\underline{Mixins:}} linear-dimension, vanilla-mixin
+\underline{Mixins:}} LINEAR-DIMENSION, VANILLA-MIXIN
 
 
 
@@ -11065,9 +10702,9 @@ Creates a dimension annotation along the horizontal axis.
 \end{lrbox}
 \fbox{\usebox{\boxedverb}}
 
-\caption{Example Code for horizontal-dimension}
+\caption{Example Code for HORIZONTAL-DIMENSION}
 
-\label{fig:example-code-horizontal-dimension}
+\label{fig:example-code-HORIZONTAL-DIMENSION}
 
 \end{figure}
 
@@ -11076,9 +10713,9 @@ Creates a dimension annotation along the horizontal axis.
 \includegraphics[width=3in,height=3in]{../images/example-horizontal-dimension.pdf}
 \end{center}
 
-\caption{horizontal-dimension example}
+\caption{HORIZONTAL-DIMENSION example}
 
-\label{fig:horizontal-dimension}
+\label{fig:HORIZONTAL-DIMENSION}
 
 \end{figure}
 
@@ -11157,13 +10794,13 @@ Must be specified in the subclass except for angular
 
 
 
-\item \index{label}
+\item \index{LABEL}
 \label{prim:label}
-\textbf{label}
+\textbf{LABEL}
 
 
 \textbf{
-\underline{Mixins:}} outline-specialization-mixin, base-object
+\underline{Mixins:}} OUTLINE-SPECIALIZATION-MIXIN, BASE-OBJECT
 
 
 
@@ -11219,9 +10856,9 @@ Produces a text label for graphical output
 \end{lrbox}
 \fbox{\usebox{\boxedverb}}
 
-\caption{Example Code for label}
+\caption{Example Code for LABEL}
 
-\label{fig:example-code-label}
+\label{fig:example-code-LABEL}
 
 \end{figure}
 
@@ -11230,9 +10867,9 @@ Produces a text label for graphical output
 \includegraphics[width=3in,height=3in]{../images/example-label.pdf}
 \end{center}
 
-\caption{label example}
+\caption{LABEL example}
 
-\label{fig:label}
+\label{fig:LABEL}
 
 \end{figure}
 
@@ -11450,13 +11087,13 @@ of one (1.0).
 
 
 
-\item \index{leader-line}
+\item \index{LEADER-LINE}
 \label{prim:leader-line}
-\textbf{leader-line}
+\textbf{LEADER-LINE}
 
 
 \textbf{
-\underline{Mixins:}} base-object
+\underline{Mixins:}} BASE-OBJECT
 
 
 
@@ -11608,13 +11245,13 @@ indicates how far into the line or curve to start the dash pattern.
 
 
 
-\item \index{line}
+\item \index{LINE}
 \label{prim:line}
-\textbf{line}
+\textbf{LINE}
 
 
 \textbf{
-\underline{Mixins:}} base-object
+\underline{Mixins:}} BASE-OBJECT
 
 
 
@@ -11658,9 +11295,9 @@ by specifying a start point and an end point.
 \end{lrbox}
 \fbox{\usebox{\boxedverb}}
 
-\caption{Example Code for line}
+\caption{Example Code for LINE}
 
-\label{fig:example-code-line}
+\label{fig:example-code-LINE}
 
 \end{figure}
 
@@ -11669,9 +11306,9 @@ by specifying a start point and an end point.
 \includegraphics[width=3in,height=3in]{../images/example-line.pdf}
 \end{center}
 
-\caption{line example}
+\caption{LINE example}
 
-\label{fig:line}
+\label{fig:LINE}
 
 \end{figure}
 
@@ -11759,13 +11396,13 @@ of the rectangular volume bounding the tree of geometric objects rooted at this
 
 
 
-\item \index{linear-dimension}
+\item \index{LINEAR-DIMENSION}
 \label{prim:linear-dimension}
-\textbf{linear-dimension}
+\textbf{LINEAR-DIMENSION}
 
 
 \textbf{
-\underline{Mixins:}} outline-specialization-mixin, base-object
+\underline{Mixins:}} OUTLINE-SPECIALIZATION-MIXIN, BASE-OBJECT
 
 
 
@@ -12223,13 +11860,13 @@ GDL
 
 
 
-\item \index{parallel-dimension}
+\item \index{PARALLEL-DIMENSION}
 \label{prim:parallel-dimension}
-\textbf{parallel-dimension}
+\textbf{PARALLEL-DIMENSION}
 
 
 \textbf{
-\underline{Mixins:}} linear-dimension
+\underline{Mixins:}} LINEAR-DIMENSION
 
 
 
@@ -12280,9 +11917,9 @@ Creates a dimension annotation along an axis from a start point to an end point.
 \end{lrbox}
 \fbox{\usebox{\boxedverb}}
 
-\caption{Example Code for parallel-dimension}
+\caption{Example Code for PARALLEL-DIMENSION}
 
-\label{fig:example-code-parallel-dimension}
+\label{fig:example-code-PARALLEL-DIMENSION}
 
 \end{figure}
 
@@ -12291,9 +11928,9 @@ Creates a dimension annotation along an axis from a start point to an end point.
 \includegraphics[width=3in,height=3in]{../images/example-parallel-dimension.pdf}
 \end{center}
 
-\caption{parallel-dimension example}
+\caption{PARALLEL-DIMENSION example}
 
-\label{fig:parallel-dimension}
+\label{fig:PARALLEL-DIMENSION}
 
 \end{figure}
 
@@ -12372,13 +12009,13 @@ Must be specified in the subclass except for angular
 
 
 
-\item \index{pie-chart}
+\item \index{PIE-CHART}
 \label{prim:pie-chart}
-\textbf{pie-chart}
+\textbf{PIE-CHART}
 
 
 \textbf{
-\underline{Mixins:}} base-object
+\underline{Mixins:}} BASE-OBJECT
 
 
 
@@ -12429,9 +12066,9 @@ cl-pdf, with contributions from Carlos Ungil (Carlos.Ungil(at)cern.ch).
 \end{lrbox}
 \fbox{\usebox{\boxedverb}}
 
-\caption{Example Code for pie-chart}
+\caption{Example Code for PIE-CHART}
 
-\label{fig:example-code-pie-chart}
+\label{fig:example-code-PIE-CHART}
 
 \end{figure}
 
@@ -12440,9 +12077,9 @@ cl-pdf, with contributions from Carlos Ungil (Carlos.Ungil(at)cern.ch).
 \includegraphics[width=3in,height=3in]{../images/example-pie-chart.pdf}
 \end{center}
 
-\caption{pie-chart example}
+\caption{PIE-CHART example}
 
-\label{fig:pie-chart}
+\label{fig:PIE-CHART}
 
 \end{figure}
 
@@ -12549,13 +12186,13 @@ Color of title text. Defaults to :black.
 
 
 
-\item \index{point}
+\item \index{POINT}
 \label{prim:point}
-\textbf{point}
+\textbf{POINT}
 
 
 \textbf{
-\underline{Mixins:}} sphere
+\underline{Mixins:}} SPHERE
 
 
 
@@ -12611,9 +12248,9 @@ color for the crosshairs is a light grey (:grey-light-very in the *color-table*)
 \end{lrbox}
 \fbox{\usebox{\boxedverb}}
 
-\caption{Example Code for point}
+\caption{Example Code for POINT}
 
-\label{fig:example-code-point}
+\label{fig:example-code-POINT}
 
 \end{figure}
 
@@ -12622,9 +12259,9 @@ color for the crosshairs is a light grey (:grey-light-very in the *color-table*)
 \includegraphics[width=3in,height=3in]{../images/example-point.pdf}
 \end{center}
 
-\caption{point example}
+\caption{POINT example}
 
-\label{fig:point}
+\label{fig:POINT}
 
 \end{figure}
 
@@ -12696,13 +12333,67 @@ of the rectangular volume bounding the tree of geometric objects rooted at this
 
 
 
-\item \index{renderer-mixin}
+\item \index{POINTS-DISPLAY}
+\label{prim:points-display}
+\textbf{POINTS-DISPLAY}
+
+
+\textbf{
+\underline{Mixins:}} OUTLINE-SPECIALIZATION-MIXIN
+
+
+
+
+
+\begin{description}
+
+\item [
+\underline{Description}]
+
+
+Product a list of hidden-children which are GDL point objects, which 
+will be displayed in normal renderings using the \texttt{outline-specialization-mixin} mechanism.
+
+
+
+\end{description}
+
+
+
+
+
+
+
+
+\textbf{
+\underline{Input slots (required):}}
+
+\begin{description}
+
+\item [Points]
+\index{Points
+[points-display]}\emph{List of 3D points (i}
+
+e. vectors). The points to be displayed.
+
+
+
+
+\end{description}
+
+
+
+
+
+
+
+\item \index{RENDERER-MIXIN}
 \label{prim:renderer-mixin}
-\textbf{renderer-mixin}
+\textbf{RENDERER-MIXIN}
 
 
 \textbf{
-\underline{Mixins:}} vanilla-mixin
+\underline{Mixins:}} VANILLA-MIXIN
 
 
 
@@ -12763,8 +12454,8 @@ a rendered perspective view, as in VRML.
 
 \begin{description}
 
-\item [3d-box]
-\index{3d-box
+\item [3D-box]
+\index{3D-box
 [renderer-mixin]}\emph{List of two 3D points}
 
  The left-front-lower and right-rear-upper corners of the axis-aligned bounding
@@ -12773,8 +12464,8 @@ box of the \texttt{object-roots} and \texttt{objects}.
 
 
 
-\item [3d-box-center]
-\index{3d-box-center
+\item [3D-box-center]
+\index{3D-box-center
 [renderer-mixin]}\emph{3D Point}
 
  The effective view center for the scene contained in this view object. Defaults to the center of the bounding sphere of all
@@ -12849,13 +12540,13 @@ the \texttt{bounding-sphere}
 
 
 
-\item \index{route-pipe}
+\item \index{ROUTE-PIPE}
 \label{prim:route-pipe}
-\textbf{route-pipe}
+\textbf{ROUTE-PIPE}
 
 
 \textbf{
-\underline{Mixins:}} global-filleted-polyline-mixin, outline-specialization-mixin
+\underline{Mixins:}} GLOBAL-FILLETED-POLYLINE-MIXIN, OUTLINE-SPECIALIZATION-MIXIN
 
 
 
@@ -12916,9 +12607,9 @@ Defines an alternating set of cylinders and torus sections for the elbows
 \end{lrbox}
 \fbox{\usebox{\boxedverb}}
 
-\caption{Example Code for route-pipe}
+\caption{Example Code for ROUTE-PIPE}
 
-\label{fig:example-code-route-pipe}
+\label{fig:example-code-ROUTE-PIPE}
 
 \end{figure}
 
@@ -12927,9 +12618,9 @@ Defines an alternating set of cylinders and torus sections for the elbows
 \includegraphics[width=3in,height=3in]{../images/example-route-pipe.pdf}
 \end{center}
 
-\caption{route-pipe example}
+\caption{ROUTE-PIPE example}
 
-\label{fig:route-pipe}
+\label{fig:ROUTE-PIPE}
 
 \end{figure}
 
@@ -13052,13 +12743,13 @@ of one (1.0).
 
 
 
-\item \index{sample-drawing}
+\item \index{SAMPLE-DRAWING}
 \label{prim:sample-drawing}
-\textbf{sample-drawing}
+\textbf{SAMPLE-DRAWING}
 
 
 \textbf{
-\underline{Mixins:}} base-drawing, vanilla-mixin
+\underline{Mixins:}} BASE-DRAWING, VANILLA-MIXIN
 
 
 
@@ -13117,13 +12808,13 @@ The default is (* 8.5 72) points, or 8.5 inches, corresponding to US standard le
 
 
 
-\item \index{sphere}
+\item \index{SPHERE}
 \label{prim:sphere}
-\textbf{sphere}
+\textbf{SPHERE}
 
 
 \textbf{
-\underline{Mixins:}} ifs-output-mixin, arcoid-mixin, base-object
+\underline{Mixins:}} IFS-OUTPUT-MIXIN, ARCOID-MIXIN, BASE-OBJECT
 
 
 
@@ -13176,9 +12867,9 @@ The set of points equidistant from a given center point.
 \end{lrbox}
 \fbox{\usebox{\boxedverb}}
 
-\caption{Example Code for sphere}
+\caption{Example Code for SPHERE}
 
-\label{fig:example-code-sphere}
+\label{fig:example-code-SPHERE}
 
 \end{figure}
 
@@ -13187,9 +12878,9 @@ The set of points equidistant from a given center point.
 \includegraphics[width=3in,height=3in]{../images/example-sphere.pdf}
 \end{center}
 
-\caption{sphere example}
+\caption{SPHERE example}
 
-\label{fig:sphere}
+\label{fig:SPHERE}
 
 \end{figure}
 
@@ -13333,13 +13024,13 @@ The set of points equidistant from a given center point.
 
 
 
-\item \index{spherical-cap}
+\item \index{SPHERICAL-CAP}
 \label{prim:spherical-cap}
-\textbf{spherical-cap}
+\textbf{SPHERICAL-CAP}
 
 
 \textbf{
-\underline{Mixins:}} ifs-output-mixin, arcoid-mixin, base-object
+\underline{Mixins:}} IFS-OUTPUT-MIXIN, ARCOID-MIXIN, BASE-OBJECT
 
 
 
@@ -13392,9 +13083,9 @@ construction and positioning since the actual center of the spherical cap is the
 \end{lrbox}
 \fbox{\usebox{\boxedverb}}
 
-\caption{Example Code for spherical-cap}
+\caption{Example Code for SPHERICAL-CAP}
 
-\label{fig:example-code-spherical-cap}
+\label{fig:example-code-SPHERICAL-CAP}
 
 \end{figure}
 
@@ -13403,9 +13094,9 @@ construction and positioning since the actual center of the spherical cap is the
 \includegraphics[width=3in,height=3in]{../images/example-spherical-cap.pdf}
 \end{center}
 
-\caption{spherical-cap example}
+\caption{SPHERICAL-CAP example}
 
-\label{fig:spherical-cap}
+\label{fig:SPHERICAL-CAP}
 
 \end{figure}
 
@@ -13569,13 +13260,13 @@ or cap-thickness, not both.
 
 
 
-\item \index{text-line}
+\item \index{TEXT-LINE}
 \label{prim:text-line}
-\textbf{text-line}
+\textbf{TEXT-LINE}
 
 
 \textbf{
-\underline{Mixins:}} base-object
+\underline{Mixins:}} BASE-OBJECT
 
 
 
@@ -13661,13 +13352,13 @@ Outputs a single line of text for graphical display.
 
 
 
-\item \index{torus}
+\item \index{TORUS}
 \label{prim:torus}
-\textbf{torus}
+\textbf{TORUS}
 
 
 \textbf{
-\underline{Mixins:}} ifs-output-mixin, arcoid-mixin, base-object
+\underline{Mixins:}} IFS-OUTPUT-MIXIN, ARCOID-MIXIN, BASE-OBJECT
 
 
 
@@ -13723,9 +13414,9 @@ Partial ``bent'' cylinders are not currently supported.
 \end{lrbox}
 \fbox{\usebox{\boxedverb}}
 
-\caption{Example Code for torus}
+\caption{Example Code for TORUS}
 
-\label{fig:example-code-torus}
+\label{fig:example-code-TORUS}
 
 \end{figure}
 
@@ -13734,9 +13425,9 @@ Partial ``bent'' cylinders are not currently supported.
 \includegraphics[width=3in,height=3in]{../images/example-torus.pdf}
 \end{center}
 
-\caption{torus example}
+\caption{TORUS example}
 
-\label{fig:torus}
+\label{fig:TORUS}
 
 \end{figure}
 
@@ -13892,13 +13583,13 @@ Partial ``bent'' cylinders are not currently supported.
 
 
 
-\item \index{typeset-block}
+\item \index{TYPESET-BLOCK}
 \label{prim:typeset-block}
-\textbf{typeset-block}
+\textbf{TYPESET-BLOCK}
 
 
 \textbf{
-\underline{Mixins:}} base-object
+\underline{Mixins:}} BASE-OBJECT
 
 
 
@@ -14017,13 +13708,13 @@ than this default, the content will be cropped.
 
 
 
-\item \index{vertical-dimension}
+\item \index{VERTICAL-DIMENSION}
 \label{prim:vertical-dimension}
-\textbf{vertical-dimension}
+\textbf{VERTICAL-DIMENSION}
 
 
 \textbf{
-\underline{Mixins:}} linear-dimension
+\underline{Mixins:}} LINEAR-DIMENSION
 
 
 
@@ -14075,9 +13766,9 @@ Creates a dimension annotation along the vertical axis.
 \end{lrbox}
 \fbox{\usebox{\boxedverb}}
 
-\caption{Example Code for vertical-dimension}
+\caption{Example Code for VERTICAL-DIMENSION}
 
-\label{fig:example-code-vertical-dimension}
+\label{fig:example-code-VERTICAL-DIMENSION}
 
 \end{figure}
 
@@ -14086,9 +13777,9 @@ Creates a dimension annotation along the vertical axis.
 \includegraphics[width=3in,height=3in]{../images/example-vertical-dimension.pdf}
 \end{center}
 
-\caption{vertical-dimension example}
+\caption{VERTICAL-DIMENSION example}
 
-\label{fig:vertical-dimension}
+\label{fig:VERTICAL-DIMENSION}
 
 \end{figure}
 
@@ -14179,64 +13870,124 @@ Must be specified in the subclass except for angular
 
 \begin{itemize}
 
-\item \index{3d-distance}
+\item \index{3D-DISTANCE}
 \label{prim:3d-distance}
-\textbf{3d-distance}
+\textbf{3D-DISTANCE}
 
-(type Number intro  The three-dimensional distance from
+(TYPE Number INTRO  The three-dimensional distance from
 point-1 to point-2.
- arguments (point-1 3D point point-1 3D point))
+ ARGUMENTS (POINT-1 3D point POINT-1 3D point))
 
 
 
-\item \index{3d-vector-to-array}
+\item \index{3D-POINT-P}
+\label{prim:3d-point-p}
+\textbf{3D-POINT-P}
+
+(TYPE Boolean INTRO .
+ FUNCTION 
+3d-point-p - predicate function to check if a make-point is 3D.  That is, the
+point has 3 dimensions, representing a 3-dimensional point.
+ USAGE 
+3d-point-p point
+ DESCRIPTION 
+A predicate function to check if a point is 3-dimensional.
+The function may also be accessed by calling the function 3d-point?.
+ EXAMPLES 
+(3d-point-p (make-point 1 2 3))
+--> t
+(3d-point-p (make-point 1 2 3 4))
+--> nil
+
+)
+
+
+
+\item \index{3D-POINT?}
+\label{prim:3d-point?}
+\textbf{3D-POINT?}
+
+(TYPE Boolean INTRO  A predicate function to check if a point is 3-dimensional.
+)
+
+
+
+\item \index{3D-VECTOR-P}
+\label{prim:3d-vector-p}
+\textbf{3D-VECTOR-P}
+
+(TYPE Boolean INTRO .
+ FUNCTION 
+3d-vector-p - predicate function to check if a vector is 3D.  That is, the
+vector has 3 dimensions, representing a 3-dimensional vector.
+ USAGE 
+3d-vector-p vector
+ DESCRIPTION 
+A predicate function to check if a vector is 3-dimensional.
+The function may also be accessed by calling the function 3d-vector?.
+ EXAMPLES 
+(3d-vector-p (make-vector 1 2 3))
+--> t
+(3d-vector-p (make-vector 1 2 3 4))
+--> nil
+
+)
+
+
+
+\item \index{3D-VECTOR-TO-ARRAY}
 \label{prim:3d-vector-to-array}
-\textbf{3d-vector-to-array}
+\textbf{3D-VECTOR-TO-ARRAY}
 
-(type 3-by-1 Lisp array of double-floats intro
-  Returns a 3-by-1 Lisp array of double-float numbers
+(TYPE 3-by-1 Lisp array of double-floats INTRO  Returns a 3-by-1 Lisp array of double-float numbers
 built from a 3D-Vector of double-floats. This can be useful for example for multiplying
 a GDL 3d-point (which is a 1-d vector) by a 3x3 matrix represented as a 2D Lisp array.
- arguments
- (vector 3D-Vector of double-floats (e.g. created with make-vector macro)))
+ ARGUMENTS (VECTOR 3D-Vector of double-floats (e.g. created with make-vector macro)))
+
+
+
+\item \index{3D-VECTOR?}
+\label{prim:3d-vector?}
+\textbf{3D-VECTOR?}
+
+(TYPE Boolean INTRO  A predicate function to check if a vector is 3-dimensional.
+)
 
 
 
-\item \index{acosd}
+\item \index{ACOSD}
 \label{prim:acosd}
-\textbf{acosd}
+\textbf{ACOSD}
 
-(type Number intro
-  Returns the arc cosine of theta, converted into degrees.
- arguments (theta Number. An angle in radians))
+(TYPE Number INTRO  Returns the arc cosine of theta, converted into degrees.
+ ARGUMENTS (THETA Number. An angle in radians))
 
 
 
-\item \index{add-matrices}
+\item \index{ADD-MATRICES}
 \label{prim:add-matrices}
-\textbf{add-matrices}
+\textbf{ADD-MATRICES}
 
-(type Lisp Array intro  Adds two matrices element-by-element.
- rest (matrics "Lisp Arrays of same dimensions") 
+(TYPE Lisp Array INTRO  Adds two matrices element-by-element.
+ REST (matrics "Lisp Arrays of same dimensions") 
 )
 
 
 
-\item \index{add-vectors}
+\item \index{ADD-VECTORS}
 \label{prim:add-vectors}
-\textbf{add-vectors}
+\textbf{ADD-VECTORS}
 
-(type Vector intro
-  Return a new vector, the result of affine vector addition.
- arguments (v1 2D, 3D, or 4D Vector v2 2D, 3D, or 4D Vector))
+(TYPE Vector INTRO  Return a new vector, the result of affine vector addition.
+ ARGUMENTS (V1 2D, 3D, or 4D Vector V2 2D, 3D, or 4D Vector))
 
 
 
-\item \index{alignment}
+\item \index{ALIGNMENT}
 \label{prim:alignment}
-\textbf{alignment}
+\textbf{ALIGNMENT}
 
-(type 3x3 Orthonormal Rotation Matrix intro  Constructs a rotation
+(TYPE 3x3 Orthonormal Rotation Matrix INTRO  Constructs a rotation
 matrix from the given axes and vectors. Up to three
 pairs of axis and vector can be given.
 If only one pair is given, then the orthogonal component of its vector with respect to
@@ -14257,36 +14008,28 @@ Axes are direction keywords which can be one of:
 
  • :bottom
  • The second axis keyword, if given, must be orthogonal to the first, and the third, if given, must be orthogonal to the first two. - arguments (axis-1 Direction Keyword vector1 3D Vector) \&optional - (axis-2 Direction Keyword vector2 3D Vector axis-3 Direction Keyword - vector3 3D Vector)) + ARGUMENTS (AXIS-1 Direction Keyword VECTOR1 3D Vector) \&OPTIONAL (AXIS-2 Direction Keyword VECTOR2 3D Vector AXIS-3 Direction Keyword VECTOR3 3D Vector)) -\item \index{angle-between-vectors} +\item \index{ANGLE-BETWEEN-VECTORS} \label{prim:angle-between-vectors} -\textbf{angle-between-vectors} +\textbf{ANGLE-BETWEEN-VECTORS} -(type Number intro - Returns the angle in radians between vector-1 and vector-2. +(TYPE Number INTRO Returns the angle in radians between vector-1 and vector-2. If no reference-vector given, the smallest possible angle is returned. If a reference-vector is given, computes according to the right-hand rule. If -ve is given, returns a negative number for angle if it really is negative according to the right-hand rule. - arguments (vector-1 3D Vector vector-2 3D Vector) \&optional - ((reference-vector nil) 3D Vector) \&key - ((epsilon *zero-epsilon*) - Number. Determines how small of an angle is considered to be zero. - (-ve nil) Boolean)) + ARGUMENTS (VECTOR-1 3D Vector VECTOR-2 3D Vector) \&OPTIONAL ((REFERENCE-VECTOR NIL) 3D Vector) \&KEY ((EPSILON *ZERO-EPSILON*) Number. Determines how small of an angle is considered to be zero. (-VE NIL) Boolean)) -\item \index{angle-between-vectors-d} +\item \index{ANGLE-BETWEEN-VECTORS-D} \label{prim:angle-between-vectors-d} -\textbf{angle-between-vectors-d} +\textbf{ANGLE-BETWEEN-VECTORS-D} -(type Number intro - This function is identical to angle-between-vectors, but returns the angle in degrees. +(TYPE Number INTRO This function is identical to angle-between-vectors, but returns the angle in degrees. Refer to angle-between-vectors for more information. Technical note: the more argument has been introduced to support both angle-between-vectors call conventions and the legacy signature: @@ -14296,468 +14039,429 @@ Optionally, a deprecation warning is printed when code invokes this legacy patte -\item \index{apply-make-point} +\item \index{APPLY-MAKE-POINT} \label{prim:apply-make-point} -\textbf{apply-make-point} +\textbf{APPLY-MAKE-POINT} -(type 2D, 3D, or 4D point intro - This function takes a list of two, three, or four numbers rather +(TYPE 2D, 3D, or 4D point INTRO This function takes a list of two, three, or four numbers rather than multiple arguments as with the make-point and make-vector macro. This is equivalent to calling the make-point or make-vector macro on the elements of this list. - arguments - (list List of 2, 3, or 4 numbers. The coordinates for the point.)) + ARGUMENTS (LIST List of 2, 3, or 4 numbers. The coordinates for the point.)) -\item \index{array-to-3d-vector} +\item \index{ARRAY-TO-3D-VECTOR} \label{prim:array-to-3d-vector} -\textbf{array-to-3d-vector} +\textbf{ARRAY-TO-3D-VECTOR} -(type 3D Vector intro - Returns a 3D-Vector of double-floats built from a 3-by-1 Lisp array of numbers. - arguments (array 3-by-1 Lisp array of numbers)) +(TYPE 3D Vector INTRO Returns a 3D-Vector of double-floats built from a 3-by-1 Lisp array of numbers. + ARGUMENTS (ARRAY 3-by-1 Lisp array of numbers)) -\item \index{array-to-list} +\item \index{ARRAY-TO-LIST} \label{prim:array-to-list} -\textbf{array-to-list} +\textbf{ARRAY-TO-LIST} -(type List intro Converts array to a list. - arguments (array Lisp Array of Numbers) \&optional - ((decimal-places 2) - Integer. Numbers will be rounded to this many decimal places.)) +(TYPE List INTRO Converts array to a list. + ARGUMENTS (ARRAY Lisp Array of Numbers) \&OPTIONAL ((DECIMAL-PLACES 2) Integer. Numbers will be rounded to this many decimal places.)) -\item \index{asind} +\item \index{ASIND} \label{prim:asind} -\textbf{asind} +\textbf{ASIND} -(type Number intro - Returns the arc sine of theta, converted into degrees. - arguments (theta Number. An angle in radians)) +(TYPE Number INTRO Returns the arc sine of theta, converted into degrees. + ARGUMENTS (THETA Number. An angle in radians)) -\item \index{atand} +\item \index{ATAND} \label{prim:atand} -\textbf{atand} +\textbf{ATAND} -(type Number intro - Returns the arc tangent of theta, converted into degrees. - arguments (theta Number. An angle in radians)) +(TYPE Number INTRO Returns the arc tangent of theta, converted into degrees. + ARGUMENTS (THETA Number. An angle in radians)) -\item \index{coincident-point?} +\item \index{COINCIDENT-POINT?} \label{prim:coincident-point?} -\textbf{coincident-point?} +\textbf{COINCIDENT-POINT?} -(type Boolean intro - Returns non-NIL iff the distance between point-1 and point-2 +(TYPE Boolean INTRO Returns non-NIL iff the distance between point-1 and point-2 is less than tolerance. - arguments (point-1 3D Point point-2 3D Point) \&key - ((tolerance *zero-epsilon*) Number)) + ARGUMENTS (POINT-1 3D Point POINT-2 3D Point) \&KEY ((TOLERANCE *ZERO-EPSILON*) Number)) -\item \index{create-obliqueness} +\item \index{CREATE-OBLIQUENESS} \label{prim:create-obliqueness} -\textbf{create-obliqueness} +\textbf{CREATE-OBLIQUENESS} -(type 3x3 Orthonormal Rotation Matrix intro - Gives the transform required +(TYPE 3x3 Orthonormal Rotation Matrix INTRO Gives the transform required to be applied to the parent's orientation to achieve alignment indicated by the arguments. The direction keywords are the same as those used with the GDL alignment function. - arguments - (vector-1 3D Vector direction-1 Direction Keyword vector-2 3D Vector - direction-2 Direction Keyword self - GDL object inheriting from base-object)) + ARGUMENTS (VECTOR-1 3D Vector DIRECTION-1 Direction Keyword VECTOR-2 3D Vector DIRECTION-2 Direction Keyword SELF GDL object inheriting from base-object)) -\item \index{cross-vectors} +\item \index{CROSS-VECTORS} \label{prim:cross-vectors} -\textbf{cross-vectors} +\textbf{CROSS-VECTORS} -(type 3D Vector intro - Returns the cross product of vector-1 and vector-2. According to +(TYPE 3D Vector INTRO Returns the cross product of vector-1 and vector-2. According to the definition of cross product, this resultant vector should be orthogonal to both vector-1 and vector-2. - arguments (vector-1 3D Vector vector-2 3D Vector)) + ARGUMENTS (VECTOR-1 3D Vector VECTOR-2 3D Vector)) -\item \index{degree} +\item \index{DEGREE} \label{prim:degree} -\textbf{degree} +\textbf{DEGREE} -(type Number intro - Converts angle in degrees, minutes, and seconds into radians. - arguments (degrees Number) \&optional ((minutes 0) Number)) +(TYPE Number INTRO Converts angle in degrees, minutes, and seconds into radians. + ARGUMENTS (DEGREES Number) \&OPTIONAL ((MINUTES 0) Number)) -\item \index{degrees-to-radians} +\item \index{DEGREES-TO-RADIANS} \label{prim:degrees-to-radians} -\textbf{degrees-to-radians} +\textbf{DEGREES-TO-RADIANS} -(type Number intro Converts degrees to radians. - arguments (degrees Number)) +(TYPE Number INTRO Converts degrees to radians. + ARGUMENTS (DEGREES Number)) -\item \index{distance-to-line} +\item \index{DISTANCE-TO-LINE} \label{prim:distance-to-line} -\textbf{distance-to-line} +\textbf{DISTANCE-TO-LINE} -(type Number intro Returns shortest distance from point to line. +(TYPE Number INTRO Returns shortest distance from point to line. ) -\item \index{dot-vectors} +\item \index{DOT-VECTORS} \label{prim:dot-vectors} -\textbf{dot-vectors} +\textbf{DOT-VECTORS} -(type Number intro Returns the dot product of vector-1 and vector-2. - arguments - (vector-1 2D, 3D, or 4D Vector vector-2 2D, 3D, or 4D Vector)) +(TYPE Number INTRO Returns the dot product of vector-1 and vector-2. + ARGUMENTS (VECTOR-1 2D, 3D, or 4D Vector VECTOR-2 2D, 3D, or 4D Vector)) -\item \index{equi-space-points} +\item \index{EQUI-SPACE-POINTS} \label{prim:equi-space-points} -\textbf{equi-space-points} +\textbf{EQUI-SPACE-POINTS} -(type List of points intro - Returns a list of equally spaced points between start and end. +(TYPE List of points INTRO Returns a list of equally spaced points between start and end. ) -\item \index{get-u} +\item \index{GET-U} \label{prim:get-u} -\textbf{get-u} +\textbf{GET-U} -(type Double-float number intro - Returns U component of 2D parameter value. - arguments (point 2D point)) +(TYPE Double-float number INTRO Returns U component of 2D parameter value. + ARGUMENTS (POINT 2D point)) -\item \index{get-v} +\item \index{GET-V} \label{prim:get-v} -\textbf{get-v} +\textbf{GET-V} -(type Double-float number intro - Returns V component of 2D parameter value. +(TYPE Double-float number INTRO Returns V component of 2D parameter value. n:arguments (point "2D point") ) -\item \index{get-w} +\item \index{GET-W} \label{prim:get-w} -\textbf{get-w} +\textbf{GET-W} -(type Double-float number intro Returns W component of point or vector - arguments - (quaternion 4D point, Quaternion, or Axis-Angle style rotation spec)) +(TYPE Double-float number INTRO Returns W component of point or vector + ARGUMENTS (QUATERNION 4D point, Quaternion, or Axis-Angle style rotation spec)) -\item \index{get-x} +\item \index{GET-X} \label{prim:get-x} -\textbf{get-x} +\textbf{GET-X} -(type Double-float number intro Returns X component of point or vector - arguments (point 2D, 3D, or 4D point)) +(TYPE Double-float number INTRO Returns X component of point or vector + ARGUMENTS (POINT 2D, 3D, or 4D point)) -\item \index{get-y} +\item \index{GET-Y} \label{prim:get-y} -\textbf{get-y} +\textbf{GET-Y} -(type Double-float number intro Returns Y component of point or vector - arguments (point 2D, 3D, or 4D point)) +(TYPE Double-float number INTRO Returns Y component of point or vector + ARGUMENTS (POINT 2D, 3D, or 4D point)) -\item \index{get-z} +\item \index{GET-Z} \label{prim:get-z} -\textbf{get-z} +\textbf{GET-Z} -(type Double-float number intro Returns Z component of point or vector - arguments (point 3D or 4D point)) +(TYPE Double-float number INTRO Returns Z component of point or vector + ARGUMENTS (POINT 3D or 4D point)) -\item \index{inter-circle-sphere} +\item \index{INTER-CIRCLE-SPHERE} \label{prim:inter-circle-sphere} -\textbf{inter-circle-sphere} +\textbf{INTER-CIRCLE-SPHERE} -(type 3D Point or NIL intro - Returns point of intersection between the circle described by circle-center, +(TYPE 3D Point or NIL INTRO Returns point of intersection between the circle described by circle-center, circle-radius, and circle-plane-normal, and the sphere described by sphere-center and sphere-radius. Iff the circle and sphere do not intersect at all, NIL is returned. - arguments - (circle-center 3D Point circle-radius Number circle-plane-normal - 3D Vector sphere-center 3D Point sphere-radius Number positive-angle? - Boolean. Controls which of two intersection points is returned) - \&key - ((tolerance *zero-epsilon*) - Controls how close the entities must come to touching to be + ARGUMENTS (CIRCLE-CENTER 3D Point CIRCLE-RADIUS Number CIRCLE-PLANE-NORMAL 3D Vector SPHERE-CENTER 3D Point SPHERE-RADIUS Number POSITIVE-ANGLE? Boolean. Controls which of two intersection points is returned) \&KEY ((TOLERANCE *ZERO-EPSILON*) Controls how close the entities must come to touching to be considered as intersecting.)) -\item \index{inter-line-plane} +\item \index{INTER-LINE-PLANE} \label{prim:inter-line-plane} -\textbf{inter-line-plane} +\textbf{INTER-LINE-PLANE} -(type 3D Point or NIL intro - Returns one point of intersection between line described by +(TYPE 3D Point or NIL INTRO Returns one point of intersection between line described by point p-line and direction-vector u-line, and plane described by p-plane and u-plane. Iff the line and plane do not intersect at all (i.e. they are parallel), NIL is returned. - arguments - (p-line 3D Point. Any point on the line. u-line - 3D Vector. Direction of the line. p-plane - 3D Point. Any point on the plane. u-plane - 3D Vector. Normal of the plane.)) + ARGUMENTS (P-LINE 3D Point. Any point on the line. U-LINE 3D Vector. Direction of the line. P-PLANE 3D Point. Any point on the plane. U-PLANE 3D Vector. Normal of the plane.)) -\item \index{inter-line-sphere} +\item \index{INTER-LINE-SPHERE} \label{prim:inter-line-sphere} -\textbf{inter-line-sphere} +\textbf{INTER-LINE-SPHERE} -(type 3D Point or NIL intro - Returns one point of intersection between line described by +(TYPE 3D Point or NIL INTRO Returns one point of intersection between line described by point p-line and direction-vector u-line, and sphere described by center and radius. Iff the line and sphere do not intersect at all, NIL is returned. - arguments - (p-line 3D Point. Any point on the line. u-line - 3D Vector. Direction of the line. center - 3D Point. Center of the sphere. radius - Number. The radius of the sphere. side-vector - 3D Vector. Controls which of two possible intersection points is returned.)) + ARGUMENTS (P-LINE 3D Point. Any point on the line. U-LINE 3D Vector. Direction of the line. CENTER 3D Point. Center of the sphere. RADIUS Number. The radius of the sphere. SIDE-VECTOR 3D Vector. Controls which of two possible intersection points is returned.)) -\item \index{length-vector} +\item \index{LENGTH-VECTOR} \label{prim:length-vector} -\textbf{length-vector} +\textbf{LENGTH-VECTOR} -(type Number intro Return the vector's magnitude - arguments (vector 3D Vector)) +(TYPE Number INTRO Return the vector's magnitude + ARGUMENTS (VECTOR 3D Vector)) -\item \index{make-point} +\item \index{MAKE-POINT} \label{prim:make-point} -\textbf{make-point [Macro]} +\textbf{MAKE-POINT [Macro]} -(type 3D Point intro - (Internally this is the same as a 3D Vector) Returns a vector of double-floats from up to 4 numbers. +(TYPE 3D Point INTRO (Internally this is the same as a 3D Vector) Returns a vector of double-floats from up to 4 numbers. ) -\item \index{make-transform} +\item \index{MAKE-TRANSFORM} \label{prim:make-transform} -\textbf{make-transform} +\textbf{MAKE-TRANSFORM} -(type Lisp array intro Builds a matrix from list-of lists. - arguments (list-of-lists List of lists of numbers)) +(TYPE Lisp array INTRO Builds a matrix from list-of lists. + ARGUMENTS (LIST-OF-LISTS List of lists of numbers)) -\item \index{make-vector} +\item \index{MAKE-VECTOR} \label{prim:make-vector} -\textbf{make-vector [Macro]} +\textbf{MAKE-VECTOR [Macro]} -(type 0D, 1D, 2D, 3D, or 4D Vector intro - (Internally this is the same as a Point) +(TYPE 0D, 1D, 2D, 3D, or 4D Vector INTRO (Internally this is the same as a Point) Returns a vector of double-floats from up to 4 numbers. ) -\item \index{matrix*vector} +\item \index{MATRIX*VECTOR} \label{prim:matrix*vector} -\textbf{matrix*vector} +\textbf{MATRIX*VECTOR} -(type Lisp array intro - Multiplies matrix by column vector of compatible dimension. - arguments (matrix Lisp Array of Numbers vector Vector)) +(TYPE Lisp array INTRO Multiplies matrix by column vector of compatible dimension. + ARGUMENTS (MATRIX Lisp Array of Numbers VECTOR Vector)) -\item \index{matrix-to-quaternion} +\item \index{MATRIX-TO-QUATERNION} \label{prim:matrix-to-quaternion} -\textbf{matrix-to-quaternion} +\textbf{MATRIX-TO-QUATERNION} -(type Quaternion represented as a 4D Vector intro - Transforms rotation matrix into the corresponding quaternion. - arguments - (matrix 3x3 Orthonormal Rotation Matrix (as a Lisp Array of Numbers))) +(TYPE Quaternion represented as a 4D Vector INTRO Transforms rotation matrix into the corresponding quaternion. + ARGUMENTS (MATRIX 3x3 Orthonormal Rotation Matrix (as a Lisp Array of Numbers))) -\item \index{merge-display-controls} +\item \index{MERGE-DISPLAY-CONTROLS} \label{prim:merge-display-controls} -\textbf{merge-display-controls [Macro]} +\textbf{MERGE-DISPLAY-CONTROLS [Macro]} -(type Plist of display controls intro - This macro "merges" the given display controls list with +(TYPE Plist of display controls INTRO This macro "merges" the given display controls list with that coming as a trickle-down slot from the parent. It will replace any common keys and add any new keys. - arguments - (display-controls - Plist. The new display controls to be merged with the defaults from the parent)) + ARGUMENTS (DISPLAY-CONTROLS Plist. The new display controls to be merged with the defaults from the parent)) -\item \index{midpoint} +\item \index{MIDPOINT} \label{prim:midpoint} -\textbf{midpoint} +\textbf{MIDPOINT} -(type 3D Point intro Returns the barycentric average (i.e. midpoint) +(TYPE 3D Point INTRO Returns the barycentric average (i.e. midpoint) of point1 and point2. - arguments (point1 3D Point point2 3D Point)) + ARGUMENTS (POINT1 3D Point POINT2 3D Point)) -\item \index{multiply-matrices} +\item \index{MULTIPLY-MATRICES} \label{prim:multiply-matrices} -\textbf{multiply-matrices} +\textbf{MULTIPLY-MATRICES} -(type Lisp Array intro - Multiplies compatible-size matrices according to normal matrix math. - arguments - (matrix-1 Lisp Array of Numbers matrix-2 Lisp Array of Numbers)) +(TYPE Lisp Array INTRO Multiplies compatible-size matrices according to normal matrix math. + ARGUMENTS (MATRIX-1 Lisp Array of Numbers MATRIX-2 Lisp Array of Numbers)) -\item \index{orthogonal-component} +\item \index{ORTHOGONAL-COMPONENT} \label{prim:orthogonal-component} -\textbf{orthogonal-component} +\textbf{ORTHOGONAL-COMPONENT} -(type 3D Unit Vector intro - Returns the unit vector orthogonal to reference-vector which +(TYPE 3D Unit Vector INTRO Returns the unit vector orthogonal to reference-vector which is as close as possible to vector. - arguments (vector 3D Vector reference-vector 3D Vector)) + ARGUMENTS (VECTOR 3D Vector REFERENCE-VECTOR 3D Vector)) -\item \index{parallel-vectors?} +\item \index{PARALLEL-VECTORS?} \label{prim:parallel-vectors?} -\textbf{parallel-vectors?} +\textbf{PARALLEL-VECTORS?} -(type Boolean intro - Returns non-nil iff vector-1 and vector-2 are pointing in the +(TYPE Boolean INTRO Returns non-nil iff vector-1 and vector-2 are pointing in the same direction or opposite directions. - arguments (vector-1 3D Vector vector-2 3D Vector) \&key - ((tolerance *zero-epsilon*) Number)) + ARGUMENTS (VECTOR-1 3D Vector VECTOR-2 3D Vector) \&KEY ((TOLERANCE *ZERO-EPSILON*) Number (DIRECTED? NIL) Boolean. If :directed? is t, the function returns t if the vectors are both parallel and point in the same direction. The default is nil, meaning that the function will return t regardless of which way the vectors point, as long as they are parallel.)) + + +\item \index{POINT-ON-PLANE?} +\label{prim:point-on-plane?} +\textbf{POINT-ON-PLANE?} +(TYPE Boolean INTRO Determines whether or not the 3d-point lies on the plane specified by plane-point +and plane-normal, within tolerance. + ARGUMENTS (3D-POINT Point in question PLANE-POINT point on the known plane PLANE-NORMAL normal to the known plane) \&KEY ((TOLERANCE *ZERO-EPSILON*) Tolerance for points to be considered coincident.)) -\item \index{proj-point-on-line} + + +\item \index{POINT-ON-VECTOR?} +\label{prim:point-on-vector?} +\textbf{POINT-ON-VECTOR?} + +(TYPE Boolean INTRO Determines whether or not the unknown-point lies on the ray specified by the vector +pointing from first-point to second-point, within tolerance. + ARGUMENTS (FIRST-POINT first point of vector SECOND-POINT second point of vector UNKNOWN-POINT point in question) \&KEY ((TOLERANCE *ZERO-EPSILON*) Tolerance for vectors to be considered same-direction.)) + + + +\item \index{PROJ-POINT-ON-LINE} \label{prim:proj-point-on-line} -\textbf{proj-point-on-line} +\textbf{PROJ-POINT-ON-LINE} -(type 3D-Point intro - Drops 3d-point onto line containing line-point +(TYPE 3D-Point INTRO Drops 3d-point onto line containing line-point and whose direction-vector is vector. - arguments - (3D-point 3D Point Line-point 3D Point vector 3D Unit Vector)) + ARGUMENTS (3D-POINT 3D Point LINE-POINT 3D Point VECTOR 3D Unit Vector)) -\item \index{projected-vector} +\item \index{PROJECTED-VECTOR} \label{prim:projected-vector} -\textbf{projected-vector} +\textbf{PROJECTED-VECTOR} -(type 3D Vector intro - Returns result of projecting vector onto the plane whose normal +(TYPE 3D Vector INTRO Returns result of projecting vector onto the plane whose normal is plane-normal. - arguments (vector 3D Vector plane-normal 3D Vector)) + ARGUMENTS (VECTOR 3D Vector PLANE-NORMAL 3D Vector)) -\item \index{pythagorize} +\item \index{PYTHAGORIZE} \label{prim:pythagorize} -\textbf{pythagorize} +\textbf{PYTHAGORIZE} -(type Number intro - Returns the square root of the sum of the squares of numbers. - \&rest (numbers List of Numbers)) +(TYPE Number INTRO Returns the square root of the sum of the squares of numbers. + \&REST (NUMBERS List of Numbers)) -\item \index{quaternion-to-matrix} +\item \index{QUATERNION-TO-MATRIX} \label{prim:quaternion-to-matrix} -\textbf{quaternion-to-matrix} +\textbf{QUATERNION-TO-MATRIX} -(type 3x3 Orthonormal Rotation Matrix intro - Transforms quaternion into a 3x3 rotation matrix. - arguments (quaternion Quaternion, represented as a 4D Vector)) +(TYPE 3x3 Orthonormal Rotation Matrix INTRO Transforms quaternion into a 3x3 rotation matrix. + ARGUMENTS (QUATERNION Quaternion, represented as a 4D Vector)) -\item \index{quaternion-to-rotation} +\item \index{QUATERNION-TO-ROTATION} \label{prim:quaternion-to-rotation} -\textbf{quaternion-to-rotation} +\textbf{QUATERNION-TO-ROTATION} -(type Euler rotation represented as a 4D Vector intro - Transforms quaternion into a +(TYPE Euler rotation represented as a 4D Vector INTRO Transforms quaternion into a Euler angle rotation consisting of an arbitrary axis and an angle of rotation about that axis. - arguments (quaternion Quaternion, represented as a 4D Vector)) + ARGUMENTS (QUATERNION Quaternion, represented as a 4D Vector)) -\item \index{radians-to-degrees} +\item \index{RADIANS-TO-DEGREES} \label{prim:radians-to-degrees} -\textbf{radians-to-degrees} +\textbf{RADIANS-TO-DEGREES} -(type Number intro Converts angle in radians to degrees. - arguments (radians Number)) +(TYPE Number INTRO Converts angle in radians to degrees. + ARGUMENTS (RADIANS Number)) -\item \index{radians-to-grads} +\item \index{RADIANS-TO-GRADS} \label{prim:radians-to-grads} -\textbf{radians-to-grads} +\textbf{RADIANS-TO-GRADS} -(type Number intro Converts angle in radians to grads. - arguments (radians Number)) +(TYPE Number INTRO Converts angle in radians to grads. + ARGUMENTS (RADIANS Number)) -\item \index{reverse-vector} +\item \index{REVERSE-VECTOR} \label{prim:reverse-vector} -\textbf{reverse-vector} +\textbf{REVERSE-VECTOR} -(type Vector intro - Return the vector pointing in the opposite direction. - arguments (vector 2D, 3D, or 4D Vector)) +(TYPE Vector INTRO Return the vector pointing in the opposite direction. + ARGUMENTS (VECTOR 2D, 3D, or 4D Vector)) -\item \index{roll} +\item \index{ROLL} \label{prim:roll} -\textbf{roll [Macro]} +\textbf{ROLL [Macro]} -(type [macro] Transformation matrix intro - In the context of a GDL object +(TYPE [macro] Transformation matrix INTRO In the context of a GDL object definition (i.e. in a define-object), returns a transformation matrix based on rotation about axis by some angle. Axis is a keyword symbol, one of: @@ -14766,138 +14470,120 @@ matrix based on rotation about axis by some angle.
  • :vertical
  • Angle is specified in radians. Any number of axis-angle pairs can be specified. - arguments (axis Keyword Symbol angle Number) \&rest - (other-axes-and-angles - Plist made from axis keyword symbols and numbers)) + ARGUMENTS (AXIS Keyword Symbol ANGLE Number) \&REST (OTHER-AXES-AND-ANGLES Plist made from axis keyword symbols and numbers)) -\item \index{rotate-point} +\item \index{ROTATE-POINT} \label{prim:rotate-point} -\textbf{rotate-point} +\textbf{ROTATE-POINT} -(type 3D Point intro - Returns the 3D Point resulting from rotating point about +(TYPE 3D Point INTRO Returns the 3D Point resulting from rotating point about center in the plane defined by normal. The rotation can specified either by an arc length (arc-length) or an angle in radians (angle). A second value is returned, which is the resulting angle of rotation in radians (this is of possible use if arc-length is used to specify the rotation). - arguments (point 3D Point center 3D Point normal 3D Vector) \&key - ((arc-length nil) Number (angle nil) Number)) + ARGUMENTS (POINT 3D Point CENTER 3D Point NORMAL 3D Vector) \&KEY ((ARC-LENGTH NIL) Number (ANGLE NIL) Number)) -\item \index{rotate-point-d} +\item \index{ROTATE-POINT-D} \label{prim:rotate-point-d} -\textbf{rotate-point-d} +\textbf{ROTATE-POINT-D} -(type 3D Point intro - Returns the 3D Point resulting from rotating point about +(TYPE 3D Point INTRO Returns the 3D Point resulting from rotating point about center in the plane defined by normal. The rotation can specified either by an arc length (arc-length) or an angle in degrees (angle). A second value is returned, which is the resulting angle of rotation in degrees (this is of possible use if arc-length is used to specify the rotation). - arguments (point 3D Point center 3D Point normal 3D Vector) \&key - ((arc-length nil) Number (angle nil) Number)) + ARGUMENTS (POINT 3D Point CENTER 3D Point NORMAL 3D Vector) \&KEY ((ARC-LENGTH NIL) Number (ANGLE NIL) Number)) -\item \index{rotate-vector} +\item \index{ROTATE-VECTOR} \label{prim:rotate-vector} -\textbf{rotate-vector} +\textbf{ROTATE-VECTOR} -(type Number intro - Rotates vector around normal by an amount of rotation +(TYPE Number INTRO Rotates vector around normal by an amount of rotation specified by angle, which is an angle measured in radians. - arguments (vector 3D Vector angle Number normal 3D Vector)) + ARGUMENTS (VECTOR 3D Vector ANGLE Number NORMAL 3D Vector)) -\item \index{rotate-vector-d} +\item \index{ROTATE-VECTOR-D} \label{prim:rotate-vector-d} -\textbf{rotate-vector-d} +\textbf{ROTATE-VECTOR-D} -(type Number intro - Rotates vector around normal by an amount of rotation +(TYPE Number INTRO Rotates vector around normal by an amount of rotation specified by degrees. - arguments (vector 3D Vector degrees Number normal 3D Vector)) + ARGUMENTS (VECTOR 3D Vector DEGREES Number NORMAL 3D Vector)) -\item \index{rotation} +\item \index{ROTATION} \label{prim:rotation} -\textbf{rotation} +\textbf{ROTATION} -(type 3x3 orthonormal rotation matrix (as a Lisp Array of Numbers) - intro . +(TYPE 3x3 orthonormal rotation matrix (as a Lisp Array of Numbers) INTRO . Returns a transformation matrix based on a rotation by angle, specified in radians, about an arbitrary vector. - arguments (vector 3D Vector angle Number)) + ARGUMENTS (VECTOR 3D Vector ANGLE Number)) -\item \index{same-direction-vectors?} +\item \index{SAME-DIRECTION-VECTORS?} \label{prim:same-direction-vectors?} -\textbf{same-direction-vectors?} +\textbf{SAME-DIRECTION-VECTORS?} -(type Boolean intro - Returns non-NIL iff vector-1 and vector-2 are pointing in the +(TYPE Boolean INTRO Returns non-NIL iff vector-1 and vector-2 are pointing in the same direction. - arguments (vector-1 3D Vector vector-2 3D Vector) \&key - ((tolerance *zero-epsilon*) Number)) + ARGUMENTS (VECTOR-1 3D Vector VECTOR-2 3D Vector) \&KEY ((TOLERANCE *ZERO-EPSILON*) Number)) -\item \index{scalar*matrix} +\item \index{SCALAR*MATRIX} \label{prim:scalar*matrix} -\textbf{scalar*matrix} +\textbf{SCALAR*MATRIX} -(type Lisp Array intro - Returns result of multiplying the scalar number by the matrix. - arguments (scalar Number matrix Lisp Array of Numbers)) +(TYPE Lisp Array INTRO Returns result of multiplying the scalar number by the matrix. + ARGUMENTS (SCALAR Number MATRIX Lisp Array of Numbers)) -\item \index{scalar*vector} +\item \index{SCALAR*VECTOR} \label{prim:scalar*vector} -\textbf{scalar*vector} +\textbf{SCALAR*VECTOR} -(type Vector intro - Returns result of multiplying the scalar number by the vector - arguments (scalar Number vector 2D, 3D, or 4D Vector)) +(TYPE Vector INTRO Returns result of multiplying the scalar number by the vector + ARGUMENTS (SCALAR Number VECTOR 2D, 3D, or 4D Vector)) -\item \index{sort-points-along-vector} +\item \index{SORT-POINTS-ALONG-VECTOR} \label{prim:sort-points-along-vector} -\textbf{sort-points-along-vector} +\textbf{SORT-POINTS-ALONG-VECTOR} -(type List of points intro Returns points in order along given vector. +(TYPE List of points INTRO Returns points in order along given vector. ) -\item \index{subtract-vectors} +\item \index{SUBTRACT-VECTORS} \label{prim:subtract-vectors} -\textbf{subtract-vectors} +\textbf{SUBTRACT-VECTORS} -(type Vector intro - Return a new vector, the result of affine vector subtraction. - arguments (v1 2D, 3D, or 4D Vector v2 2D, 3D, or 4D Vector)) +(TYPE Vector INTRO Return a new vector, the result of affine vector subtraction. + ARGUMENTS (V1 2D, 3D, or 4D Vector V2 2D, 3D, or 4D Vector)) -\item \index{transform-and-translate-point} +\item \index{TRANSFORM-AND-TRANSLATE-POINT} \label{prim:transform-and-translate-point} -\textbf{transform-and-translate-point} +\textbf{TRANSFORM-AND-TRANSLATE-POINT} -(type 3D-Point intro - Returns the product of vector and transform, +(TYPE 3D-Point INTRO Returns the product of vector and transform, translated by (i.e. added to) trans-vector. - arguments - (vector 3D Vector transform 3x3 Rotation Matrix trans-vector - 3D Vector) - examples + ARGUMENTS (VECTOR 3D Vector TRANSFORM 3x3 Rotation Matrix TRANS-VECTOR 3D Vector) EXAMPLES
     (let ((transform (make-transform '((0.0 0.0 1.0)
                                         (0.0 1.0 0.0)
    @@ -14911,13 +14597,12 @@ translated by (i.e. added to) trans-vector.
     
     
     
    -\item \index{transform-numeric-point}
    +\item \index{TRANSFORM-NUMERIC-POINT}
     \label{prim:transform-numeric-point}
    -\textbf{transform-numeric-point}
    +\textbf{TRANSFORM-NUMERIC-POINT}
     
    -(type 3D-Point intro
    -  Returns the product of vector and transform.
    - arguments (vector 3D Vector transform 3x3 Rotation Matrix) examples 
    +(TYPE 3D-Point INTRO  Returns the product of vector and transform.
    + ARGUMENTS (VECTOR 3D Vector TRANSFORM 3x3 Rotation Matrix) EXAMPLES 
     
     (let ((transform (make-transform '((0.0 0.0 1.0)
                                         (1.0 0.0 0.0)
    @@ -14930,16 +14615,13 @@ translated by (i.e. added to) trans-vector.
     
     
     
    -\item \index{translate}
    +\item \index{TRANSLATE}
     \label{prim:translate}
    -\textbf{translate [Macro]}
    +\textbf{TRANSLATE [Macro]}
     
    -(type [Macro] 3D Point intro
    -  Within the context of a GDL object definition (i.e. a define-object),
    +(TYPE [Macro] 3D Point INTRO  Within the context of a GDL object definition (i.e. a define-object),
     translate origin by any number of offsets.
    - arguments (origin 3D Point) \&rest
    - (offsets
    -  Plist consisting of direction keywords and numbers. A direction keyword can be 
    + ARGUMENTS (ORIGIN 3D Point) \&REST (OFFSETS Plist consisting of direction keywords and numbers. A direction keyword can be 
     one of: 
    • :top (or :up)
    • :bottom (or :down)
    • :left
    • @@ -14949,45 +14631,40 @@ one of:
      • :top (or :up)
      • -\item \index{translate-along-vector} +\item \index{TRANSLATE-ALONG-VECTOR} \label{prim:translate-along-vector} -\textbf{translate-along-vector} +\textbf{TRANSLATE-ALONG-VECTOR} -(type 3D Point intro - Returns a new point which is point translated +(TYPE 3D Point INTRO Returns a new point which is point translated along vector by distance - arguments (point 3D Point vector 3D Vector distance Number)) + ARGUMENTS (POINT 3D Point VECTOR 3D Vector DISTANCE Number)) -\item \index{transpose-matrix} +\item \index{TRANSPOSE-MATRIX} \label{prim:transpose-matrix} -\textbf{transpose-matrix} +\textbf{TRANSPOSE-MATRIX} -(type Lisp array intro Transposes rows and columns of matrix. - arguments (matrix Lisp Array)) +(TYPE Lisp array INTRO Transposes rows and columns of matrix. + ARGUMENTS (MATRIX Lisp Array)) -\item \index{unitize-vector} +\item \index{UNITIZE-VECTOR} \label{prim:unitize-vector} -\textbf{unitize-vector} +\textbf{UNITIZE-VECTOR} -(type Unit Vector intro - Returns the normalized unit-length vector corresponding to vector. - arguments (vector 3D Vector) \&key - ((espsilon *zero-epsilon*) - Number. How close vector should be to 1.0 to be considered unit-length.)) +(TYPE Unit Vector INTRO Returns the normalized unit-length vector corresponding to vector. + ARGUMENTS (VECTOR 3D Vector) \&KEY ((ESPSILON *ZERO-EPSILON*) Number. How close vector should be to 1.0 to be considered unit-length.)) -\item \index{zero-vector?} +\item \index{ZERO-VECTOR?} \label{prim:zero-vector?} -\textbf{zero-vector?} +\textbf{ZERO-VECTOR?} -(type Boolean intro - Returns non-NIL iff the vector has zero length according to Common Lisp zerop function. - arguments (vector 3D Vector)) +(TYPE Boolean INTRO Returns non-NIL iff the vector has zero length according to Common Lisp zerop function. + ARGUMENTS (VECTOR 3D Vector)) @@ -15003,49 +14680,49 @@ along vector by distance \begin{itemize} -\item \index{*break-leaders?*} +\item \index{*BREAK-LEADERS?*} \label{prim:*break-leaders?*} -\textbf{*break-leaders?*} +\textbf{*BREAK-LEADERS?*} -\item \index{*gs-graphics-alpha-bits*} +\item \index{*GS-GRAPHICS-ALPHA-BITS*} \label{prim:*gs-graphics-alpha-bits*} -\textbf{*gs-graphics-alpha-bits*} +\textbf{*GS-GRAPHICS-ALPHA-BITS*} -\item \index{*gs-text-alpha-bits*} +\item \index{*GS-TEXT-ALPHA-BITS*} \label{prim:*gs-text-alpha-bits*} -\textbf{*gs-text-alpha-bits*} +\textbf{*GS-TEXT-ALPHA-BITS*} -\item \index{*hash-transforms?*} +\item \index{*HASH-TRANSFORMS?*} \label{prim:*hash-transforms?*} -\textbf{*hash-transforms?*} +\textbf{*HASH-TRANSFORMS?*} -\item \index{*zero-vector-checking?*} +\item \index{*ZERO-VECTOR-CHECKING?*} \label{prim:*zero-vector-checking?*} -\textbf{*zero-vector-checking?*} +\textbf{*ZERO-VECTOR-CHECKING?*} -\item \index{+postnet-bits+} +\item \index{+POSTNET-BITS+} \label{prim:+postnet-bits+} -\textbf{+postnet-bits+} +\textbf{+POSTNET-BITS+} @@ -15057,7 +14734,7 @@ along vector by distance -\section{glm } +\section{GLM } \label{sec:glm} @@ -15067,7 +14744,7 @@ along vector by distance -\section{gwl (Generative Web Language (GWL))} +\section{GWL (Generative Web Language (GWL))} \label{sec:gwl(generativeweblanguage(gwl))} @@ -15083,13 +14760,13 @@ along vector by distance \begin{itemize} -\item \index{application-mixin} +\item \index{APPLICATION-MIXIN} \label{prim:application-mixin} -\textbf{application-mixin} +\textbf{APPLICATION-MIXIN} \textbf{ -\underline{Mixins:}} layout-mixin +\underline{Mixins:}} LAYOUT-MIXIN, VANILLA-MIXIN @@ -15117,13 +14794,13 @@ or \texttt{application-mixin} -\item \index{base-ajax-graphics-sheet} +\item \index{BASE-AJAX-GRAPHICS-SHEET} \label{prim:base-ajax-graphics-sheet} -\textbf{base-ajax-graphics-sheet} +\textbf{BASE-AJAX-GRAPHICS-SHEET} \textbf{ -\underline{Mixins:}} base-ajax-sheet, base-html-graphics-sheet +\underline{Mixins:}} BASE-AJAX-SHEET, BASE-HTML-GRAPHICS-SHEET @@ -15328,6 +15005,27 @@ Default is 1. +\textbf{ +\underline{Input slots (optional, defaulting):}} + +\begin{description} + +\item [Respondent] +\index{Respondent +[base-ajax-graphics-sheet]}\emph{GDL Object} + + Object to respond to the form submission. Defaults to self. + + + + +\end{description} + + + + + + \textbf{ \underline{Computed slots (settable):}} @@ -15506,13 +15204,13 @@ The \texttt{view-object} child should exist and be of type \texttt{web-drawing}. -\item \index{base-ajax-sheet} +\item \index{BASE-AJAX-SHEET} \label{prim:base-ajax-sheet} -\textbf{base-ajax-sheet} +\textbf{BASE-AJAX-SHEET} \textbf{ -\underline{Mixins:}} base-html-sheet +\underline{Mixins:}} BASE-HTML-SHEET @@ -15665,9 +15363,9 @@ but which you can fill in your own specific lens to do something useful for the \end{lrbox} \fbox{\usebox{\boxedverb}} -\caption{Example Code for gwl:base-ajax-sheet} +\caption{Example Code for BASE-AJAX-SHEET} -\label{fig:example-code-gwl:base-ajax-sheet} +\label{fig:example-code-BASE-AJAX-SHEET} \end{figure} @@ -15854,13 +15552,13 @@ from a saved snapshot file. -\item \index{base-form-control} +\item \index{BASE-FORM-CONTROL} \label{prim:base-form-control} -\textbf{base-form-control} +\textbf{BASE-FORM-CONTROL} \textbf{ -\underline{Mixins:}} skeleton-form-control, vanilla-mixin +\underline{Mixins:}} SKELETON-FORM-CONTROL, VANILLA-MIXIN @@ -16066,9 +15764,9 @@ Capitol Hill.") \end{lrbox} \fbox{\usebox{\boxedverb}} -\caption{Example Code for gwl:base-form-control} +\caption{Example Code for BASE-FORM-CONTROL} -\label{fig:example-code-gwl:base-form-control} +\label{fig:example-code-BASE-FORM-CONTROL} \end{figure} @@ -16577,13 +16275,13 @@ and cleared when the error is gone. -\item \index{base-html-graphics-sheet} +\item \index{BASE-HTML-GRAPHICS-SHEET} \label{prim:base-html-graphics-sheet} -\textbf{base-html-graphics-sheet} +\textbf{BASE-HTML-GRAPHICS-SHEET} \textbf{ -\underline{Mixins:}} base-html-sheet, geometry-view-mixin, base-object +\underline{Mixins:}} BASE-HTML-SHEET, GEOMETRY-VIEW-MIXIN, BASE-OBJECT @@ -16803,13 +16501,13 @@ display geometric parts in a GWL application. -\item \index{base-html-sheet} +\item \index{BASE-HTML-SHEET} \label{prim:base-html-sheet} -\textbf{base-html-sheet} +\textbf{BASE-HTML-SHEET} \textbf{ -\underline{Mixins:}} sheet-section, vanilla-mixin +\underline{Mixins:}} SHEET-SECTION, VANILLA-MIXIN @@ -17152,13 +16850,13 @@ link to the vendor on public web pages. -\item \index{checkbox-form-control} +\item \index{CHECKBOX-FORM-CONTROL} \label{prim:checkbox-form-control} -\textbf{checkbox-form-control} +\textbf{CHECKBOX-FORM-CONTROL} \textbf{ -\underline{Mixins:}} base-form-control, vanilla-mixin +\underline{Mixins:}} BASE-FORM-CONTROL, VANILLA-MIXIN @@ -17225,13 +16923,13 @@ the same name, where each can return a different value). -\item \index{color-map} +\item \index{COLOR-MAP} \label{prim:color-map} -\textbf{color-map} +\textbf{COLOR-MAP} \textbf{ -\underline{Mixins:}} base-html-sheet +\underline{Mixins:}} BASE-HTML-SHEET @@ -17281,13 +16979,13 @@ function defined in the lens. Typically a \texttt{write-html-sheet} function wou -\item \index{geometry-view-mixin} +\item \index{GEOMETRY-VIEW-MIXIN} \label{prim:geometry-view-mixin} -\textbf{geometry-view-mixin} +\textbf{GEOMETRY-VIEW-MIXIN} \textbf{ -\underline{Mixins:}} vanilla-mixin +\underline{Mixins:}} VANILLA-MIXIN @@ -17352,13 +17050,13 @@ Internal mixin for use inside e.g. base-html-graphics-sheet. -\item \index{grid-form-control} +\item \index{GRID-FORM-CONTROL} \label{prim:grid-form-control} -\textbf{grid-form-control} +\textbf{GRID-FORM-CONTROL} \textbf{ -\underline{Mixins:}} skeleton-form-control, vanilla-mixin +\underline{Mixins:}} SKELETON-FORM-CONTROL, VANILLA-MIXIN @@ -17490,13 +17188,13 @@ of type base-form-control. -\item \index{gwl-rule-object} +\item \index{GWL-RULE-OBJECT} \label{prim:gwl-rule-object} -\textbf{gwl-rule-object} +\textbf{GWL-RULE-OBJECT} \textbf{ -\underline{Mixins:}} base-html-graphics-sheet, base-rule-object +\underline{Mixins:}} BASE-HTML-GRAPHICS-SHEET, BASE-RULE-OBJECT @@ -17523,13 +17221,13 @@ Mixes together \texttt{base-html-sheet} and \texttt{base-rule-object}. -\item \index{layout-mixin} +\item \index{LAYOUT-MIXIN} \label{prim:layout-mixin} -\textbf{layout-mixin} +\textbf{LAYOUT-MIXIN} \textbf{ -\underline{Mixins:}} base-html-graphics-sheet +\underline{Mixins:}} BASE-HTML-GRAPHICS-SHEET @@ -17935,13 +17633,13 @@ descendants which are of type node-mixin or application-mixin. -\item \index{menu-form-control} +\item \index{MENU-FORM-CONTROL} \label{prim:menu-form-control} -\textbf{menu-form-control} +\textbf{MENU-FORM-CONTROL} \textbf{ -\underline{Mixins:}} base-form-control, vanilla-mixin +\underline{Mixins:}} BASE-FORM-CONTROL, VANILLA-MIXIN @@ -17992,9 +17690,9 @@ OPTIONGROUP is not yet implemented, but will be. \end{lrbox} \fbox{\usebox{\boxedverb}} -\caption{Example Code for gwl:menu-form-control} +\caption{Example Code for MENU-FORM-CONTROL} -\label{fig:example-code-gwl:menu-form-control} +\label{fig:example-code-MENU-FORM-CONTROL} \end{figure} @@ -18090,13 +17788,13 @@ eql for keywords, string-equal for strings, and equalp otherwise. -\item \index{node-mixin} +\item \index{NODE-MIXIN} \label{prim:node-mixin} -\textbf{node-mixin} +\textbf{NODE-MIXIN} \textbf{ -\underline{Mixins:}} layout-mixin +\underline{Mixins:}} LAYOUT-MIXIN, VANILLA-MIXIN @@ -18192,13 +17890,13 @@ displayed in the graphics. Defaults to the appended result of children's -\item \index{radio-form-control} +\item \index{RADIO-FORM-CONTROL} \label{prim:radio-form-control} -\textbf{radio-form-control} +\textbf{RADIO-FORM-CONTROL} \textbf{ -\underline{Mixins:}} menu-form-control, vanilla-mixin +\underline{Mixins:}} MENU-FORM-CONTROL, VANILLA-MIXIN @@ -18314,13 +18012,13 @@ Default is :paragraph-append. -\item \index{session-control-mixin} +\item \index{SESSION-CONTROL-MIXIN} \label{prim:session-control-mixin} -\textbf{session-control-mixin} +\textbf{SESSION-CONTROL-MIXIN} \textbf{ -\underline{Mixins:}} vanilla-mixin +\underline{Mixins:}} VANILLA-MIXIN @@ -18481,13 +18179,13 @@ Method which will set the expires-at slot to the current time + the session-dura -\item \index{sheet-section} +\item \index{SHEET-SECTION} \label{prim:sheet-section} -\textbf{sheet-section} +\textbf{SHEET-SECTION} \textbf{ -\underline{Mixins:}} skeleton-ui-element, vanilla-mixin +\underline{Mixins:}} SKELETON-UI-ELEMENT, VANILLA-MIXIN @@ -18531,9 +18229,9 @@ are the child of a base-ajax-sheet. \end{lrbox} \fbox{\usebox{\boxedverb}} -\caption{Example Code for gwl:sheet-section} +\caption{Example Code for SHEET-SECTION} -\label{fig:example-code-gwl:sheet-section} +\label{fig:example-code-SHEET-SECTION} \end{figure} @@ -18542,13 +18240,13 @@ are the child of a base-ajax-sheet. -\item \index{skeleton-form-control} +\item \index{SKELETON-FORM-CONTROL} \label{prim:skeleton-form-control} -\textbf{skeleton-form-control} +\textbf{SKELETON-FORM-CONTROL} \textbf{ -\underline{Mixins:}} skeleton-ui-element, vanilla-mixin +\underline{Mixins:}} SKELETON-UI-ELEMENT, VANILLA-MIXIN @@ -18597,6 +18295,15 @@ Does not perform the actual bashing and computation of result value, should be m +\item [Field-name] +\index{Field-name +[skeleton-form-control]}\emph{Keyword symbol} + + The name of this field. Computed from the object name within the tree. + + + + \item [Id] \index{Id [skeleton-form-control]}\emph{Keyword symbol} @@ -18628,15 +18335,6 @@ Defaults to nil. \begin{description} -\item [Field-name] -\index{Field-name -[skeleton-form-control]}\emph{Keyword symbol} - - The name of this field. Computed from the object name within the tree. - - - - \item [Form-control] \index{Form-control [skeleton-form-control]}\emph{String of valid HTML} @@ -18686,13 +18384,13 @@ of type base-form-control. -\item \index{skeleton-ui-element} +\item \index{SKELETON-UI-ELEMENT} \label{prim:skeleton-ui-element} -\textbf{skeleton-ui-element} +\textbf{SKELETON-UI-ELEMENT} \textbf{ -\underline{Mixins:}} vanilla-mixin +\underline{Mixins:}} VANILLA-MIXIN @@ -18741,9 +18439,9 @@ server. \end{lrbox} \fbox{\usebox{\boxedverb}} -\caption{Example Code for gwl:skeleton-ui-element} +\caption{Example Code for SKELETON-UI-ELEMENT} -\label{fig:example-code-gwl:skeleton-ui-element} +\label{fig:example-code-SKELETON-UI-ELEMENT} \end{figure} @@ -18964,13 +18662,13 @@ running the Javascript interpreter to evaluate (the js-to-eval), if any. -\item \index{text-form-control} +\item \index{TEXT-FORM-CONTROL} \label{prim:text-form-control} -\textbf{text-form-control} +\textbf{TEXT-FORM-CONTROL} \textbf{ -\underline{Mixins:}} base-form-control, vanilla-mixin +\underline{Mixins:}} BASE-FORM-CONTROL, VANILLA-MIXIN @@ -19055,13 +18753,13 @@ for that. Defaults to nil. Use password-form-control to get a default of t. -\item \index{web-drawing} +\item \index{WEB-DRAWING} \label{prim:web-drawing} -\textbf{web-drawing} +\textbf{WEB-DRAWING} \textbf{ -\underline{Mixins:}} renderer-mixin, base-drawing +\underline{Mixins:}} RENDERER-MIXIN, BASE-DRAWING @@ -19189,9 +18887,9 @@ application-mixin, you can include one object of this type in the ui-display-lis \end{lrbox} \fbox{\usebox{\boxedverb}} -\caption{Example Code for gwl:web-drawing} +\caption{Example Code for WEB-DRAWING} -\label{fig:example-code-gwl:web-drawing} +\label{fig:example-code-WEB-DRAWING} \end{figure} @@ -19324,141 +19022,93 @@ internally-computed object, this should not be overridden in user code. \begin{itemize} -\item \index{base64-decode-list} +\item \index{BASE64-DECODE-LIST} \label{prim:base64-decode-list} -\textbf{base64-decode-list} +\textbf{BASE64-DECODE-LIST} -(type List intro Decodes a base64 string into a Lisp list. - arguments (string string)) +(TYPE List INTRO Decodes a base64 string into a Lisp list. + ARGUMENTS (STRING string)) -\item \index{base64-decode-safe} +\item \index{BASE64-DECODE-SAFE} \label{prim:base64-decode-safe} -\textbf{base64-decode-safe} +\textbf{BASE64-DECODE-SAFE} -(type String intro - Decodes a base64 string without need for trailing = signs into a decoded string. - arguments (string string)) +(TYPE String INTRO Decodes a base64 string without need for trailing = signs into a decoded string. + ARGUMENTS (STRING string)) -\item \index{base64-encode-list} +\item \index{BASE64-ENCODE-LIST} \label{prim:base64-encode-list} -\textbf{base64-encode-list} +\textbf{BASE64-ENCODE-LIST} -(type String intro - Encodes a list into base64 without the trailing = signs. - arguments (list list)) +(TYPE String INTRO Encodes a list into base64 without the trailing = signs. + ARGUMENTS (LIST list)) -\item \index{base64-encode-safe} +\item \index{BASE64-ENCODE-SAFE} \label{prim:base64-encode-safe} -\textbf{base64-encode-safe} +\textbf{BASE64-ENCODE-SAFE} -(type String intro - Encodes a string into base64 without the trailing = signs. - arguments (string string)) +(TYPE String INTRO Encodes a string into base64 without the trailing = signs. + ARGUMENTS (STRING string)) -\item \index{clear-all-instances} +\item \index{CLEAR-ALL-INSTANCES} \label{prim:clear-all-instances} -\textbf{clear-all-instances} +\textbf{CLEAR-ALL-INSTANCES} -(type Void intro - Clears all instances from GWL's master table of root-level instances. +(TYPE Void INTRO Clears all instances from GWL's master table of root-level instances. The instance IDs are the numbers you see in published GWL URIs, and are available as the "instance-id" message within each GWL object which inherit from base-html-sheet. Clearing all the instances makes available for garbage collection all memory used by the object hierarchies rooted at the instances, as well as all associated published URIs. - example
         
        + EXAMPLE 
         
           (clear-all-instance)
         
        ) -\item \index{clear-instance} +\item \index{CLEAR-INSTANCE} \label{prim:clear-instance} -\textbf{clear-instance} +\textbf{CLEAR-INSTANCE} -(type Void intro - Clears the specified instance from GWL's master table of root-level instances. +(TYPE Void INTRO Clears the specified instance from GWL's master table of root-level instances. The instance ID is the same number you see in published GWL URIs, and is available as the "instance-id" message within all GWL objects which inherit from base-html-sheet. Clearing the specified instance makes available for garbage collection all memory used by the object hierarchy rooted at the instance, as well as all associated published URIs. - arguments - (id - Integer or Keyword Symbol. The key whose entry you wish to clear from the *instance-hash-table*.) - example
         
        + ARGUMENTS (ID Integer or Keyword Symbol. The key whose entry you wish to clear from the *instance-hash-table*.) EXAMPLE 
         
           (clear-instance 639)
         
        ) -\item \index{clear-old-timers} +\item \index{CLEAR-OLD-TIMERS} \label{prim:clear-old-timers} -\textbf{clear-old-timers} +\textbf{CLEAR-OLD-TIMERS} -(type Void intro - This is a lighter-weight alternative to the session-object-mixin for timing out instances +(TYPE Void INTRO This is a lighter-weight alternative to the session-object-mixin for timing out instances in a web application. - \&key - ((idle-time-required 600) - Time in seconds. The maximum age of a session for timeout.)) - - - -\item \index{crawl} -\label{prim:crawl} -\textbf{crawl} - -(type Void intro - Instantiates and ``Crawls'' a given object instance and creates static HTML pages reflecting -the instance tree. This means it will recursively follow all the links for the object. By default -the files are written into "/tmp/sites/". - arguments - (part - String. Names a package-qualified part which should mix in base-html-sheet.) - \&key - ((host localhost) String. Host on which the server is running. - (port 9000) Integer. Port on which the server is running. - (output-root /tmp/sites/[non-package-qualified-part-name]/) - String or pathname. Directory where filfes will be written - make-part-args - Plist. Other make-instance arguments to use to initialize the object.) - example -
        -    (gwl:crawl "yadd:assembly")
        -
        -) + \&KEY ((IDLE-TIME-REQUIRED 600) Time in seconds. The maximum age of a session for timeout.)) -\item \index{gwl-make-object} +\item \index{GWL-MAKE-OBJECT} \label{prim:gwl-make-object} -\textbf{gwl-make-object} +\textbf{GWL-MAKE-OBJECT} -(type Void intro - Used within the context of the body of a :function argument to Allegroserve's +(TYPE Void INTRO Used within the context of the body of a :function argument to Allegroserve's publish function, makes an instance of the specified part and responds to the request with a redirect to a URI representing the instance. - arguments - (req Allegroserve request object, as used in the function of a publish - ent Allegroserve entity object, as used in the function of a publish - package-and-part - String. Should name the colon- (or double-colon)-separated -package-qualified object name) - \&key - ((make-object-args nil) - Plist of keys and values. These are passed to the object upon instantiation. - (share? nil) - Boolean. If non-nil, the instance ID will be the constant string ``share'' rather than a real instance id.) - example
         
        + ARGUMENTS (REQ Allegroserve request object, as used in the function of a publish ENT Allegroserve entity object, as used in the function of a publish PACKAGE-AND-PART String. Should name the colon- (or double-colon)-separated
        +package-qualified object name) \&KEY ((MAKE-OBJECT-ARGS NIL) Plist of keys and values. These are passed to the object upon instantiation. (SHARE? NIL) Boolean. If non-nil, the instance ID will be the constant string ``share'' rather than a real instance id.) EXAMPLE 
         
           (publish :path "/calendar"
                    :function \#'(lambda(req ent) (gwl-make-object req ent "calendar:assembly")))
         
        @@ -19466,35 +19116,25 @@ package-qualified object name) -\item \index{publish-gwl-app} +\item \index{PUBLISH-GWL-APP} \label{prim:publish-gwl-app} -\textbf{publish-gwl-app} +\textbf{PUBLISH-GWL-APP} -(type Void intro - Publishes an application, optionally with some initial arguments to be passed in as input-slots. - arguments - (path String. The URL pathname component to be published. - string-or-symbol String or symbol. The object type to insantiate.) - \&key (make-object-args Plist. Extra arguments to pass to make-object.)) +(TYPE Void INTRO Publishes an application, optionally with some initial arguments to be passed in as input-slots. + ARGUMENTS (PATH String. The URL pathname component to be published. STRING-OR-SYMBOL String or symbol. The object type to insantiate.) \&KEY (MAKE-OBJECT-ARGS Plist. Extra arguments to pass to make-object.)) -\item \index{publish-shared} +\item \index{PUBLISH-SHARED} \label{prim:publish-shared} -\textbf{publish-shared} +\textbf{PUBLISH-SHARED} -(type Void intro - Used to publish a site which is to have a shared toplevel instance tree, +(TYPE Void INTRO Used to publish a site which is to have a shared toplevel instance tree, and no URI rewriting (i.e. no "/sessions/XXX/" at the beginning of the path). So, this site will appear to be a normal non-dynamic site even though the pages are being generated dynamically. - \&key - ((path nil) String. The URI path to be published. (object-type nil) - Symbol. The type of the toplevel object to be instantiated. - (host nil) hostname for the URI to be published. (server *wserver*) - Allegroserve server object. If you have additional servers other than the default -*wserver* (e.g. an SSL server) you may want to call this function for each server.) - example
         
        + \&KEY ((PATH NIL) String. The URI path to be published. (OBJECT-TYPE NIL) Symbol. The type of the toplevel object to be instantiated. (HOST NIL) hostname for the URI to be published. (SERVER *WSERVER*) Allegroserve server object. If you have additional servers other than the default
        +*wserver* (e.g. an SSL server) you may want to call this function for each server.) EXAMPLE 
         
           (publish-shared :path "/"
                           :object-type 'site:assembly
                           :host (list "www.genworks.com" "ww2.genworks.com" "mccarthy.genworks.com"))
        @@ -19503,65 +19143,52 @@ being generated dynamically.
         
         
         
        -\item \index{publish-string-content}
        +\item \index{PUBLISH-STRING-CONTENT}
         \label{prim:publish-string-content}
        -\textbf{publish-string-content}
        +\textbf{PUBLISH-STRING-CONTENT}
         
        -(type String (representing a url path) intro
        -  Publishes given url to respond with text content as
        +(TYPE String (representing a url path) INTRO  Publishes given url to respond with text content as
         specified by given string.
        - arguments
        - (url String. The url to be published. string
        -  String. The content to be emitted when the url is requested.)
        - \&rest
        - (publish-args
        -  plist. Arguments to be passed on to publish function, e.g. :content-type.))
        + ARGUMENTS (URL String. The url to be published. STRING String. The content to be emitted when the url is requested.) \&REST (PUBLISH-ARGS plist. Arguments to be passed on to publish function, e.g. :content-type.))
         
         
         
        -\item \index{relativize-pathname}
        +\item \index{RELATIVIZE-PATHNAME}
         \label{prim:relativize-pathname}
        -\textbf{relativize-pathname}
        +\textbf{RELATIVIZE-PATHNAME}
         
        -(type nil intro
        - Return a relative pathname for TARGET-PATHNAME that can be reached
        +(TYPE NIL INTRO Return a relative pathname for TARGET-PATHNAME that can be reached
         from the directory that TARGET-PATHNAME refers to.
         )
         
         
         
        -\item \index{session-control-auto-refresh}
        +\item \index{SESSION-CONTROL-AUTO-REFRESH}
         \label{prim:session-control-auto-refresh}
        -\textbf{session-control-auto-refresh}
        +\textbf{SESSION-CONTROL-AUTO-REFRESH}
         
        -(type
        - Adding this javascript function into the header of a web page will cause the page to timeout and reload repeatedly
        - intro  This is intended to be used such that when
        +(TYPE Adding this javascript function into the header of a web page will cause the page to timeout and reload repeatedly INTRO  This is intended to be used such that when
         an instance is open in an active browser the page will automatically update the expires-at function even if the operator takes an extended break from the application.
         It works by checking if any forms exist on this page. If they do it will submit the first form on the page when the timeout value is reached. This is done to avoid
         the Post Data confirmation warning that most browser present. If no forms are found it will use the reload(true) function to reload the page.
        - arguments (timeout Time in seconds between page reloads) \&optional
        - (html-stream
        -  Stream which the output should be sent to. Default is *html-stream*))
        + ARGUMENTS (TIMEOUT Time in seconds between page reloads) \&OPTIONAL (HTML-STREAM Stream which the output should be sent to. Default is *html-stream*))
         
         
         
        -\item \index{session-report}
        +\item \index{SESSION-REPORT}
         \label{prim:session-report}
        -\textbf{session-report}
        +\textbf{SESSION-REPORT}
         
        -(type Returns list of instances in a runtime environment intro
        -  Those that are of type session-control-mixin, it provides more detailed information, that can be useful in tracking the session life. Currently, this is intended to run from the lisp command prompt.
        +(TYPE Returns list of instances in a runtime environment INTRO  Those that are of type session-control-mixin, it provides more detailed information, that can be useful in tracking the session life. Currently, this is intended to run from the lisp command prompt.
         )
         
         
         
        -\item \index{with-cl-who}
        +\item \index{WITH-CL-WHO}
         \label{prim:with-cl-who}
        -\textbf{with-cl-who [Macro]}
        +\textbf{WITH-CL-WHO [Macro]}
         
        -(type Form intro
        -  Sets up body to be evaluated with cl-who and output the resulting string to the default *stream*
        +(TYPE Form INTRO  Sets up body to be evaluated with cl-who and output the resulting string to the default *stream*
         Note that the args are spliced into cl-who:with-html-output after *stream* nil, so for example you can do 
             (with-cl-who (:indent t) ...)
         
        @@ -19574,22 +19201,21 @@ and it will expand into: -\item \index{with-cl-who-string} +\item \index{WITH-CL-WHO-STRING} \label{prim:with-cl-who-string} -\textbf{with-cl-who-string [Macro]} +\textbf{WITH-CL-WHO-STRING [Macro]} -(type Form intro - Sets up body to be evaluated with our with-cl-who return the resulting string instead +(TYPE Form INTRO Sets up body to be evaluated with our with-cl-who return the resulting string instead of side-effecting anything at all to the default *stream*. ) -\item \index{with-html-form} +\item \index{WITH-HTML-FORM} \label{prim:with-html-form} -\textbf{with-html-form [Macro]} +\textbf{WITH-HTML-FORM [Macro]} -(type Enclose a body of code with a form intro . +(TYPE Enclose a body of code with a form INTRO . FLAG -- fill in. ) @@ -19607,127 +19233,125 @@ of side-effecting anything at all to the default *stream*. \begin{itemize} -\item \index{*break-on-set-self?*} +\item \index{*BREAK-ON-SET-SELF?*} \label{prim:*break-on-set-self?*} -\textbf{*break-on-set-self?*} +\textbf{*BREAK-ON-SET-SELF?*} -\item \index{*bypass-security-check?*} +\item \index{*BYPASS-SECURITY-CHECK?*} \label{prim:*bypass-security-check?*} -\textbf{*bypass-security-check?*} +\textbf{*BYPASS-SECURITY-CHECK?*} -\item \index{*developing?*} +\item \index{*DEVELOPING?*} \label{prim:*developing?*} -\textbf{*developing?*} +\textbf{*DEVELOPING?*} -\item \index{*ent*} +\item \index{*ENT*} \label{prim:*ent*} -\textbf{*ent*} +\textbf{*ENT*} -\item \index{*failed-request-url*} +\item \index{*FAILED-REQUEST-URL*} \label{prim:*failed-request-url*} -\textbf{*failed-request-url*} +\textbf{*FAILED-REQUEST-URL*} -\item \index{*instance-finalizers*} +\item \index{*INSTANCE-FINALIZERS*} \label{prim:*instance-finalizers*} -\textbf{*instance-finalizers*} +\textbf{*INSTANCE-FINALIZERS*} -\item \index{*instance-hash-table*} +\item \index{*INSTANCE-HASH-TABLE*} \label{prim:*instance-hash-table*} -\textbf{*instance-hash-table*} +\textbf{*INSTANCE-HASH-TABLE*} -\item \index{*jump-to-toplevel-on-set-self?*} +\item \index{*JUMP-TO-TOPLEVEL-ON-SET-SELF?*} \label{prim:*jump-to-toplevel-on-set-self?*} -\textbf{*jump-to-toplevel-on-set-self?*} +\textbf{*JUMP-TO-TOPLEVEL-ON-SET-SELF?*} -\item \index{*max-id-value*} +\item \index{*MAX-ID-VALUE*} \label{prim:*max-id-value*} -\textbf{*max-id-value*} - +\textbf{*MAX-ID-VALUE*} -\item \index{*query*} -\label{prim:*query*} -\textbf{*query*} - +\item \index{*PUBLISHERS*} +\label{prim:*publishers*} +\textbf{*PUBLISHERS*} -\item \index{*reap-expired-sessions?*} -\label{prim:*reap-expired-sessions?*} -\textbf{*reap-expired-sessions?*} - +\item \index{*QUERY*} +\label{prim:*query*} +\textbf{*QUERY*} -\item \index{*recovery-url-default*} -\label{prim:*recovery-url-default*} -\textbf{*recovery-url-default*} +\item \index{*REAP-EXPIRED-SESSIONS?*} +\label{prim:*reap-expired-sessions?*} +\textbf{*REAP-EXPIRED-SESSIONS?*} -\item \index{*req*} -\label{prim:*req*} -\textbf{*req*} +\item \index{*RECOVERY-URL-DEFAULT*} +\label{prim:*recovery-url-default*} +\textbf{*RECOVERY-URL-DEFAULT*} -\end{itemize} +\item \index{*REQ*} +\label{prim:*req*} +\textbf{*REQ*} -\section{iq } -\label{sec:iq} +\end{itemize} -\section{jquery } +\section{JQUERY } \label{sec:jquery} @@ -19737,7 +19361,7 @@ of side-effecting anything at all to the default *stream*. -\section{raphael } +\section{RAPHAEL } \label{sec:raphael} @@ -19747,7 +19371,7 @@ of side-effecting anything at all to the default *stream*. -\section{robot (Simplified Android Robot example )} +\section{ROBOT (Simplified Android Robot example )} \label{sec:robot(simplifiedandroidrobotexample)} @@ -19757,17 +19381,7 @@ of side-effecting anything at all to the default *stream*. -\section{smlib (Interface to SMLib Geometry Engine)} - -\label{sec:smlib(interfacetosmlibgeometryengine)} - - - - - - - -\section{surf (NURBS Surface and Solids Geometry Primitives)} +\section{SURF (NURBS Surface and Solids Geometry Primitives)} \label{sec:surf(nurbssurfaceandsolidsgeometryprimitives)} @@ -19775,13937 +19389,35 @@ of side-effecting anything at all to the default *stream*. -\subsection{Object Definitions} - -\label{subsec:objectdefinitions} - - - -\begin{itemize} - -\item \index{3d-approximated} -\label{prim:3d-approximated} -\textbf{3d-approximated} - - -\textbf{ -\underline{Mixins:}} approximated-curve, vanilla-mixin - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Given a curve in uv parameter space of - a surface, produce a corresponding 3d curve with brute-force fitting - techniques. - - - -\end{description} - - +\section{TASTY (Web-based Development Environment (tasty))} +\label{sec:tasty(web-baseddevelopmentenvironment(tasty))} -\textbf{ -\underline{Input slots (required):}} -\begin{description} -\item [Surface] -\index{Surface -[3d-approximated]}\emph{GDL Surface object} +\subsection{Variables and Constants} - The surface corresponding to the given uv-curve. +\label{subsec:variablesandconstants} +\begin{itemize} -\item [Uv-curve] -\index{Uv-curve -[3d-approximated]}\emph{GDL Curve object} +\item \index{*SUPPRESS-\$\$-MESSAGES?*} +\label{prim:*suppress-\$\$-messages?*} +\textbf{*SUPPRESS-\$\$-MESSAGES?*} - Curve whose points are understood to be 2D u, v -parameter values on the surface. -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Number-of-samples] -\index{Number-of-samples -[3d-approximated]}\emph{Integer} - - How many point samples to take for fitting -purposes. Default is 42. - - - - -\item [Tolerance-factor] -\index{Tolerance-factor -[3d-approximated]}\emph{Number} - - The tolerance for the final approximation, to be -multiplied by the 3d curve length. Default is 10e-5. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Computed slots:}} - -\begin{description} - -\item [Curve-in] -\index{Curve-in -[3d-approximated]}\emph{GDL Curve object} - - The curve to be approximated with this curve. - - - - -\item [Tolerance] -\index{Tolerance -[3d-approximated]}\emph{Number} - - The maximum distance deviation from the curve-in to this curve. -Defaults to 1.0e-5 times the diagonal of the bounding box of the input curve. - - - - -\end{description} - - - - - - - -\item \index{3d-curve} -\label{prim:3d-curve} -\textbf{3d-curve} - - -\textbf{ -\underline{Mixins:}} b-spline-curve, vanilla-mixin - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Given a uv on-surface curve and its -surface, produce the corresponding 3d curve. Note this must be a true -on-surface curve, not just an arbitrary curve whose domain happens to -be in the parameter space of the surface. - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Surface] -\index{Surface -[3d-curve]}\emph{GDL Surface object} - - The surface corresponding to the given uv-curve. - - - - -\item [Uv-curve] -\index{Uv-curve -[3d-curve]}\emph{GDL Curve object} - - Curve which is a proper on-surface -curve (e.g. produced by a project or drop operation -onto the surface). - - - - -\end{description} - - - - - - -\textbf{ -\underline{Computed slots:}} - -\begin{description} - -\item [Control-points] -\index{Control-points -[3d-curve]}\emph{List of 3D Points} - - The control points. - - - - -\item [Degree] -\index{Degree -[3d-curve]}\emph{Integer} - - Degree of the curve. Defaults to 3 (cubic). - - - - -\item [Knot-vector] -\index{Knot-vector -[3d-curve]}\emph{List of Numbers} - - Knots of the curve. Default is NIL, which indicates a uniform knot vector. - - - - -\item [Weights] -\index{Weights -[3d-curve]}\emph{List of numbers} - - A weight to match each control point. Should be same length as control-points. -Default is a value of 1.0 for each weight, resulting in a nonrational curve. - - - - -\end{description} - - - - - - - -\item \index{approximated-curve} -\label{prim:approximated-curve} -\textbf{approximated-curve} - - -\textbf{ -\underline{Mixins:}} curve - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -This primitive accepts a NURBS curve and -computes a new NURBS curve with presumably fewer control points, and claims -to hold it to within a certain tolerance of the original curve. - -The point at the start parameter and the end parameter in the result -curve will be fixed to be identical to the original curve. - -You can use the pinned-parameters input-slot to specify additional parameter -values where the new curve will be pinned to be identical with the original curve. - -NOTE: This object is currently non-functional and is expected to be -re-activated in GDL 1585. - - - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - - (define-object approximated-curve-test (base-object) - - :input-slots - ((sample-b-spline-data - '((#(-7.773502691896258 10.0 0.0) - #(-7.76304131662674 10.0 0.0035356993309923) - #(-7.746775287947699 10.0 0.0067001904580447) - #(-7.7253289934578415 10.0 0.0091817670732663) - #(-7.709372706886673 10.0 0.0109178383762297) - #(-7.693497618275636 10.0 0.0129741578942581) - #(-7.676981089448407 10.0 0.0152725944452429) - #(-7.660626985913543 10.0 0.0176076438762828) - #(-7.644400043044812 10.0 0.0198301741704749) - #(-7.628572854579257 10.0 0.0218811393098875) - #(-7.612456095337886 10.0 0.023892087537815) - #(-7.596123157036033 10.0 0.025876731740358) - #(-7.5797886014351645 10.0 0.0278392394943197) - #(-7.563598247718005 10.0 0.0297977372116626) - #(-7.54734474235553 10.0 0.0317827355165938) - #(-7.530817428296935 10.0 0.0338094455691551) - #(-7.514499984995836 10.0 0.0358111584598995) - #(-7.498530032892328 10.0 0.037762615650263) - #(-7.482560694806967 10.0 0.0396996233035483) - #(-7.466938587271525 10.0 0.0415717500361984) - #(-7.45613073401155 10.0 0.0428492028474684) - #(-7.445702016561547 10.0 0.04407409984323) - #(-7.439862498458236 10.0 0.0447555129227675) - #(-7.429535001467346 10.0 0.0459531655261334) - #(-7.423946015929491 10.0 0.0465975377728551) - #(-7.413554192167366 10.0 0.0477892161812883) - #(-7.407595596706495 10.0 0.0484686195293404) - #(-7.396934499325897 10.0 0.049677834187285) - #(-7.391025013196135 10.0 0.0503446277462212) - #(-7.380668397266659 10.0 0.0515077909624895) - #(-7.374959869886305 10.0 0.0521461185088044) - #(-7.36464849713204 10.0 0.05329441651439) - #(-7.3587350147730115 10.0 0.0539501551169936) - #(-7.348489965069932 10.0 0.0550810605426388) - #(-7.342793963594458 10.0 0.0557070781305422) - #(-7.332490622079339 10.0 0.0568343892437064) - #(-7.3264770440672065 10.0 0.0574891649794912) - #(-7.316219293859572 10.0 0.0586004349229853) - #(-7.310517864890045 10.0 0.0592151399809975) - #(-7.300540086253307 10.0 0.0602855343476251) - #(-7.294748391590457 10.0 0.0609037603868834) - #(-7.284555892216601 10.0 0.061985955452512) - #(-7.278577998313509 10.0 0.062617198511794) - #(-7.268114585011737 10.0 0.0637157114288265) - #(-7.261986919319522 10.0 0.0643552477004073) - #(-7.2514547970306005 10.0 0.0654480650996109) - #(-7.245363578736502 10.0 0.066076354340049) - #(-7.235168395459871 10.0 0.0671217900147562) - #(-7.2293285386923625 10.0 0.0677172614089348) - #(-7.219456797793601 10.0 0.0687181850892115) - #(-7.21363748676987 10.0 0.0693049508093313) - #(-7.203721331045569 10.0 0.0702991235190865) - #(-7.197774951476638 10.0 0.0708918760373581) - #(-7.18753366922008 10.0 0.071906820780931) - #(-7.181328324859931 10.0 0.0725180648535886) - #(-7.170908624453838 10.0 0.0735382495023682) - #(-7.164741045570452 10.0 0.0741384240225961) - #(-7.154470299979475 10.0 0.0751317627718068) - #(-7.1483716586933825 10.0 0.0757179834474372) - #(-7.138406833936611 10.0 0.0766699111117332) - #(-7.132501722803377 10.0 0.0772306457809111) - #(-7.12244815794467 10.0 0.0781794021319588) - #(-7.116194798062766 10.0 0.0787657100109435) - #(-7.105880729941813 10.0 0.0797262397246034) - #(-7.099656569353997 10.0 0.0803020171513102) - #(-7.089330480447966 10.0 0.0812507479304588) - #(-7.083006810743995 10.0 0.0818277014224611) - #(-7.0730076945596645 10.0 0.0827335903150743) - #(-7.067069212658176 10.0 0.0832680013237252) - #(-7.057382524393892 10.0 0.0841338221164179) - #(-7.0513228782074515 10.0 0.0846717275930971) - #(-7.041364101581027 10.0 0.0855495109968372) - #(-7.035106540724323 10.0 0.0860970019877134) - #(-7.024857742651612 10.0 0.0869868797241497) - #(-7.018438815809276 10.0 0.087539916228507) - #(-7.008168401811841 10.0 0.0884178150543803) - #(-7.00184087536049 10.0 0.0889544270356334) - #(-6.9919619641004545 10.0 0.0897854973995385) - #(-6.985881827579846 10.0 0.0902930555610231) - #(-6.976281029598491 10.0 0.0910882693796495) - #(-6.970184675056803 10.0 0.091589260852436) - #(-6.960320705968006 10.0 0.0923932980242485) - #(-6.953917746465384 10.0 0.0929107533519837) - #(-6.943757762558306 10.0 0.0937245181023455) - #(-6.937303992646001 10.0 0.0942367919470313) - #(-6.9271520790382235 10.0 0.0950351703452132) - #(-6.920707811824021 10.0 0.0955372165209965) - #(-6.910885266876965 10.0 0.0962951353561948) - #(-6.904716963255798 10.0 0.096766697374172) - #(-6.895200295978004 10.0 0.0974873900684733) - #(-6.889018398304428 10.0 0.0979511004533426) - #(-6.8792396786986085 10.0 0.0986773910779738) - #(-6.8727507213 10.0 0.0991543261574633) - #(-6.86267690754424 10.0 0.0998867125969024) - #(-6.856136640740504 10.0 0.100356993136921) - #(-6.846050345447107 10.0 0.1010740145138523) - #(-6.839489198598122 10.0 0.1015350665777411) - #(-6.829441747557248 10.0 0.1022327061061873) - #(-6.82289308331905 10.0 0.1026819075455008) - #(-6.813152437915218 10.0 0.1033417487088309) - #(-6.806847948189532 10.0 0.103763701703458) - #(-6.7971454958195565 10.0 0.1044050485135838) - #(-6.790595307231813 10.0 0.10483231339683) - #(-6.780922064334754 10.0 0.1054546472054939) - #(-6.77458575320461 10.0 0.1058569326392236) - #(-6.7649029807976975 10.0 0.1064632879605449) - #(-6.758284636701557 10.0 0.1068717205935851) - #(-6.748340665523174 10.0 0.1074760046701189) - #(-6.741671570163981 10.0 0.1078750063466806) - #(-6.731717886166939 10.0 0.1084609002957398) - #(-6.7250260196879 10.0 0.1088483306291875) - #(-6.715132250830737 10.0 0.1094113701746257) - #(-6.708479289674014 10.0 0.1097833660497434) - #(-6.698863733855831 10.0 0.1103113585573882) - #(-6.692407555733223 10.0 0.1106596095578191) - #(-6.683112518678094 10.0 0.1111518410008553) - #(-6.67673768062156 10.0 0.1114832653763077) - #(-6.667240402771452 10.0 0.1119675047371582) - #(-6.660514775321519 10.0 0.1123033129775543) - #(-6.650681029972996 10.0 0.1127835983503758) - #(-6.643918945899163 10.0 0.1131064056804846) - #(-6.63405272844892 10.0 0.1135663439198465) - #(-6.627254408957563 10.0 0.1138754999668116) - #(-6.617707456082231 10.0 0.1142985673023449) - #(-6.611225484562257 10.0 0.1145786891314138) - #(-6.60204805594244 10.0 0.1149649311892426) - #(-6.595561879720703 10.0 0.1152306714612809) - #(-6.586146787784009 10.0 0.1156055153436167) - #(-6.579359503332465 10.0 0.1158674765410608) - #(-6.569607126249581 10.0 0.1162316741844863) - #(-6.562716518300558 10.0 0.1164802471836087) - #(-6.552941578381875 10.0 0.1168201535727847) - #(-6.546090216293524 10.0 0.1170494074887217) - #(-6.536674084104508 10.0 0.117351835565929) - #(-6.530101252192292 10.0 0.1175545076386553) - #(-6.521003931182706 10.0 0.1178230920419217) - #(-6.514431925615438 10.0 0.1180084927017307) - #(-6.505237782335364 10.0 0.1182554027074824) - #(-6.498513444650254 10.0 0.1184266239748961) - #(-6.488983008492481 10.0 0.1186555956582973) - #(-6.48200268637703 10.0 0.1188128917257091) - #(-6.472326149681036 10.0 0.119016053562057) - #(-6.465389207391072 10.0 0.1191511200864016) - #(-6.455601236135456 10.0 0.1193262289159263) - #(-6.448443729690395 10.0 0.1194424780868816) - #(-6.438958198675441 10.0 0.1195804860871952) - #(-6.432273317606395 10.0 0.1196673012040853) - #(-6.422976238615972 10.0 0.1197731501514096) - #(-6.4159621089377605 10.0 0.1198409999468651) - #(-6.4067002169151355 10.0 0.1199142428159179) - #(-6.399997171744239 10.0 0.119956098103827) - #(-6.390775586474153 10.0 0.1199979664750528) - #(-6.383766014520722 10.0 0.1200169608096984) - #(-6.374398451275458 10.0 0.1200248790095977) - #(-6.367508232676765 10.0 0.1200180617465295) - #(-6.358204641636406 10.0 0.1199913666687163) - #(-6.351212499117087 10.0 0.1199579262946732) - #(-6.34179811653411 10.0 0.1198940830107079) - #(-6.334722008984675 10.0 0.1198318598583616) - #(-6.325243506895607 10.0 0.1197286664953724) - #(-6.3181038668924225 10.0 0.1196359024164523) - #(-6.3086233644061815 10.0 0.1194922029896446) - #(-6.301482992162023 10.0 0.1193683670372235) - #(-6.2919924776063425 10.0 0.1191825584163038) - #(-6.284793044978927 10.0 0.1190252258627906) - #(-6.2753314970647045 10.0 0.1187965753264672) - #(-6.26821135846841 10.0 0.1186078391724031) - #(-6.259162952769228 10.0 0.1183465300397597) - #(-6.252357920075809 10.0 0.1181346604145395) - #(-6.243732250120057 10.0 0.1178464349390531) - #(-6.237024615970206 10.0 0.117607149463944) - #(-6.22847504378218 10.0 0.1172819358381489) - #(-6.221661738722191 10.0 0.1170066698163893) - #(-6.212734929396275 10.0 0.1166237921552943) - #(-6.205560407960056 10.0 0.1162969301785835) - #(-6.196251975857688 10.0 0.1158468244886666) - #(-6.188964185271005 10.0 0.1154735323164374) - #(-6.179555494737541 10.0 0.1149639153426461) - #(-6.172229381962318 10.0 0.1145450494936365) - #(-6.162856146944508 10.0 0.113980051461802) - #(-6.155565515353094 10.0 0.1135177665315744) - #(-6.146209923750142 10.0 0.1128942970314755) - #(-6.138855137820279 10.0 0.112380030061237) - #(-6.129655628386858 10.0 0.1117056172410459) - #(-6.122486612998066 10.0 0.111156182233171) - #(-6.11363265472315 10.0 0.110447376638818) - #(-6.10657159410418 10.0 0.1098584591558712) - #(-6.097764739903218 10.0 0.1090932742430056) - #(-6.0906136679603495 10.0 0.1084460244904774) - #(-6.081792237411942 10.0 0.1076133101575569) - #(-6.074656622637572 10.0 0.106911620109585) - #(-6.065558573551578 10.0 0.1059791445416934) - #(-6.058094902257685 10.0 0.105180297224725) - #(-6.04902211746673 10.0 0.1041654080838163) - #(-6.041837834442202 10.0 0.1033285781165379) - #(-6.032806538284214 10.0 0.102232676388748) - #(-6.025326943718607 10.0 0.1012858590168515) - #(-6.016324551464302 10.0 0.1000962619743535) - #(-6.009099370537937 10.0 0.0991026392362128) - #(-6.000144802087108 10.0 0.0978213410260762) - #(-5.992672802847265 10.0 0.0967077356358815) - #(-5.983682684099936 10.0 0.095311303764513) - #(-5.976390894901862 10.0 0.0941327969909632) - #(-5.967597701948485 10.0 0.092651171023629) - #(-5.960300625393035 10.0 0.091369004729541) - #(-5.951819042895475 10.0 0.0898129037222759) - #(-5.944827122197059 10.0 0.0884764825079818) - #(-5.9364937900430546 10.0 0.086815333082949) - #(-5.929316123058646 10.0 0.0853215712223041) - #(-5.920853977349434 10.0 0.0834809963775036) - #(-5.913697488126982 10.0 0.081855290446912) - #(-5.905045875020715 10.0 0.0797946852900259) - #(-5.897633195865675 10.0 0.077937627548088) - #(-5.888869222952547 10.0 0.0756214894583634) - #(-5.881576422780188 10.0 0.0735895003825018) - #(-5.8730488606276685 10.0 0.071078664456186) - #(-5.865886603820401 10.0 0.0688505661471062) - #(-5.857659076163453 10.0 0.0661282191187038) - #(-5.8506956581380045 10.0 0.0636758008622684) - #(-5.8427993520796395 10.0 0.0607060179365281) - #(-5.836006841543422 10.0 0.0579805075953104) - #(-5.828141782273885 10.0 0.0545732138995477) - #(-5.821264105869612 10.0 0.0513305536611062) - #(-5.813396489418997 10.0 0.0472425696093425) - #(-5.806736741014998 10.0 0.0434068855227238) - #(-5.799296800365852 10.0 0.0385347465920627) - #(-5.793149838865298 10.0 0.0339017049050897) - #(-5.786639267262249 10.0 0.02799360148602) - #(-5.781555952133565 10.0 0.0222871988704581) - #(-5.77690049447455 10.0 0.0149171833984971) - #(-5.774143850809992 10.0 0.0076254582681704) - #(-5.773504871989952 10.0 0.0021812762824132) - #(-5.77350372489622 10.0 -5.432357e-10)) - (1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 - 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 - 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 - 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 - 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 - 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 - 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 - 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 - 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 - 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 - 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 - 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 - 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 - 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0) - (0.0 0.0 0.0 0.0 0.0160453781542143 0.0241470160269717 - 0.0317935799490915 0.0398053040025856 0.0478086834801164 - 0.0560582201696031 0.0639202701209087 0.0718503545073776 - 0.0797433850046513 0.087981750276748 0.0960087041824917 - 0.1039831218391125 0.112029495827222 0.1201752268087684 - 0.1282605498138822 0.136005192477863 0.1438242190390603 - 0.1519870644337011 0.1593306835295498 0.1598487740853562 - 0.1674658650196929 0.1680104087509454 0.175157710986505 - 0.1757272662987668 0.1833705173786548 0.183966778279312 - 0.1915177150798282 0.1921404682290536 0.1993060375256694 - 0.1999541159685396 0.2074081735084615 0.2080825976726782 - 0.2151502427534925 0.2158498418097879 0.2234099696672682 - 0.2241364268834526 0.2312069092585329 0.2319587197887401 - 0.2390267110021689 0.239803949187276 0.2470314540979864 - 0.2478347213119199 0.2551668057971311 0.2559965267399797 - 0.2633214412146924 0.2641776785913368 0.2711080693997827 - 0.271989626560843 0.2788004837617649 0.2797070543520855 - 0.2865857660092436 0.2875176520073938 0.294691617040477 - 0.2956498608401993 0.3028107414290341 0.303795386191314 - 0.3108677223812281 0.3118785660342093 0.3186289517157898 - 0.3196650325637266 0.3267875123448071 0.3278501223901527 - 0.3348376542335923 0.3359264409310518 0.343017473844114 - 0.3441328588668275 0.3507020846059745 0.3518424576829762 - 0.3585158400916831 0.3596816211629636 0.366600003006972 - 0.3677920713565625 0.3748151183901361 0.3760338998362696 - 0.3829150808161275 0.3841602009158513 0.3906373023990221 - 0.3919075328521676 0.3983652317385465 0.3996605911050301 - 0.406480133489536 0.4078018800878236 0.4145992363495962 - 0.4159473838404371 0.4227235238201337 0.4240980890623294 - 0.4304686564547328 0.4318684065502333 0.4382164439562757 - 0.4396413875379139 0.4463489290384909 0.4478003170276637 - 0.4544823491094193 0.4559601845464303 0.4626166004905004 - 0.4641208860785213 0.470751784887656 0.4722825236605759 - 0.4785036764886068 0.4800596220929673 0.486633503837215 - 0.4882158852069559 0.4943709597308301 0.4959785009914117 - 0.502479159396033 0.5041130660952415 0.5105726294674962 - 0.512232853709101 0.5186483892971976 0.5203348734927932 - 0.5267087790327916 0.5284214732034318 0.5344904142923997 - 0.5362284120119565 0.5421342182310729 0.5438970713133418 - 0.5502033260482438 0.5519924174541494 0.5583120642198542 - 0.5601275228154484 0.5665206241752909 0.5683627745511391 - 0.5742736086012711 0.5761409693620999 0.5819524448520371 - 0.5838447748901722 0.5899961210140513 0.591914606679692 - 0.5981367389758905 0.6000816954947563 0.6062612328823314 - 0.6082326078238199 0.6139891743550618 0.6159856782493418 - 0.6217020223331746 0.623723606100719 0.6295913193586837 - 0.6316385567589856 0.6377653030384736 0.6398391197873293 - 0.6458190701143912 0.6479190753033844 0.6541566170946882 - 0.6562837334911363 0.6618008400206912 0.6639528131422728 - 0.6699223065860094 0.6721006882862063 0.6775449581602477 - 0.6797481264419983 0.6856437214610128 0.6878732244971574 - 0.6935814940177247 0.695836808314546 0.7016366241440788 - 0.7039181313132697 0.709705856689687 0.7120136025880942 - 0.7177645246694223 0.7200984749442396 0.7258142875643973 - 0.7281744132589539 0.7339554983783031 0.7363420968538624 - 0.7420859180388898 0.7444989542058508 0.7497996761741695 - 0.7522377951739535 0.7574084721926538 0.7598713327198711 - 0.7650117024519579 0.7674992864084252 0.7730174533892418 - 0.7755310696517345 0.7811075108508807 0.7836474335589837 - 0.7892724115280283 0.7918388840494792 0.7974138106069117 - 0.8000067565215466 0.8056169748708625 0.8082365950205777 - 0.8135658669535445 0.816211334521307 0.8213255105466555 - 0.8239962101530169 0.829242574214828 0.8319390177427586 - 0.8370829503324179 0.8398048884169548 0.8454152884202761 - 0.8481643207745085 0.8532523057058028 0.856026821694725 - 0.8614897782714848 0.8642910800558162 0.8693003110837616 - 0.8721270103832023 0.8774885682570619 0.8803418933181856 - 0.8854532218703798 0.8883324456013311 0.8934528695387036 - 0.8963581057296763 0.9010534532900417 0.9039834043046125 - 0.9089319065807004 0.9118874759674483 0.9167609857678787 - 0.9197420129769963 0.9249624084248843 0.9279701042058975 - 0.9330316439657489 0.9360655784857183 0.9410404196288085 - 0.9441003962903061 0.9488799412961575 0.9519654097358451 - 0.9565785237508843 0.9596890256766235 0.9645868244983244 - 0.9677233670213087 0.9726644785371455 0.9758272871735215 - 0.9807483303509975 0.9839374252540747 0.9887471809818733 - 0.9919622857532446 0.996778435740851 1.0 1.0 1.0 1.0) - 3))) - - :objects ((profile :type 'b-spline-curve - :control-points (first (the sample-b-spline-data)) - :weights (second (the sample-b-spline-data)) - :knot-vector (third (the sample-b-spline-data)) - :degree (fourth (the sample-b-spline-data))) - - - (approximate :type 'approximated-curve - :display-controls (list :color :red) - :tolerance 0.01 - :pinned-parameters (list 0.1 0.5 0.7 0.9) - :match-parameterization? t - :curve-in (the profile)))) - - - - (generate-sample-drawing :object-roots (make-object 'approximated-curve-test) - :projection-direction (getf *standard-views* :front) - :page-width 1000) - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for approximated-curve} - -\label{fig:example-code-approximated-curve} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-approximated-curve.pdf} -\end{center} - -\caption{approximated-curve example} - -\label{fig:approximated-curve} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Curve-in] -\index{Curve-in -[approximated-curve]}\emph{GDL Curve object} - - The curve to be approximated with this curve. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Match-parameterization?] -\index{Match-parameterization? -[approximated-curve]}\emph{Boolean} - - Indicates whether the new-curve should contain matching parameterization between breakpoints. If nil, the -parameterization can slip a little, but not very much. Allowing the parameterization between breakpoints to slip -results in somewhat fewer control points. Use non-nil only if a parameter-to-parameter match is important to your application. -The default is nil. - - - - -\item [Pinned-parameters] -\index{Pinned-parameters -[approximated-curve]}\emph{List of numbers} - - These are parameter values from the original curve -where the approximated curve will be forced to be identical to the original -curve. Defaults to nil. - - - - -\item [Tolerance] -\index{Tolerance -[approximated-curve]}\emph{Number} - - The maximum distance deviation from the curve-in to this curve. -Defaults to 1.0e-5 times the diagonal of the bounding box of the input curve. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Computed slots:}} - -\begin{description} - -\item [Achieved-tolerance] -\index{Achieved-tolerance -[approximated-curve]}\emph{Number} - - This should reflect the actual tolerance achieved with the approximation. -In the case of smlib, it is not clear exactly what this value is supposed to mean -- -from examples we have seen so far, the value appears to range between 0.0 and 1.0, and -it appears that values close to 1.0 indicate a close approximation, and values -close to 0.0 indicate a loose approximation.. - - - - -\end{description} - - - - - - - -\item \index{arc-curve} -\label{prim:arc-curve} -\textbf{arc-curve} - - -\textbf{ -\underline{Mixins:}} curve, arc - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -An arc represented exactly as a quadratic NURBS curve. Inputs are the same as for arc. -Messages are the union of those for arc and those for curve. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :surf) - - (define-object test-arc-curve (arc-curve) - :computed-slots - ((center (make-point 0 0 0)) (radius 10) (start-angle 0) (end-angle 2pi))) - - (generate-sample-drawing :objects (make-object 'test-arc-curve)) - - - (define-object test-arc-curve2 (arc-curve) - :computed-slots - ((center (make-point 0 0 0)) (radius 5) (start-angle (* 0.25 pi)) (end-angle pi))) - - (generate-sample-drawing :objects (make-object 'test-arc-curve)) - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for arc-curve} - -\label{fig:example-code-arc-curve} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-arc-curve.pdf} -\end{center} - -\caption{arc-curve example} - -\label{fig:arc-curve} - -\end{figure} - - - - - - -\item \index{b-spline-curve} -\label{prim:b-spline-curve} -\textbf{b-spline-curve} - - -\textbf{ -\underline{Mixins:}} curve - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -A general NURBS (potentially non-Uniform, potentially Rational, b-spline) -curve specified with control points, weights, knots, and degree. - -If the knot-vector is different from the default, it is non-Uniform. - -If any of the weights are different from 1.0, it is Rational. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :surf) - - (define-object test-b-spline-curves (base-object) - - :input-slots - ((control-points (list (make-point 0 0 0) - (make-point 2 3.0 0.0) - (make-point 4 2.0 0.0) - (make-point 5 0.0 0.0) - (make-point 4 -2.0 0.0) - (make-point 2 -3.0 0.0) - (make-point 0 0 0)))) - - :objects - ((curves :type 'b-spline-curve - :sequence (:size 6) - :control-points (the control-points) - :degree (1+ (the-child :index)) - :display-controls (list :line-thickness (* 0.3 (the-child index)) - :color (ecase (the-child index) - (0 :red) (1 :orange) - (2 :yellow) (3 :green) - (4 :blue) (5 :red-violet)))) - - (points :type 'point - :sequence (:size (length (rest (the control-points)))) - :center (nth (the-child index) (rest (the control-points))) - :display-controls (list :color :green)))) - - - (generate-sample-drawing :object-roots (make-object 'test-b-spline-curves)) - - - ;; Here is another example which shows the difference between a - ;; simple bezier-curve from the :geom-base package, and a NURBS. - ;; - (define-object bezier-and-nurbs (base-object) - - :input-slots ((control-points (list (make-point 0 0 0) - (make-point 1 1 0) - (make-point 2 1 0) - (make-point 3 0 0)))) - - - :objects ((points :type 'points-display - :points (the control-points)) - - - (bezier :type 'bezier-curve - ;; This will be a geom-base:bezier-curve - :display-controls (list :color :green) - :control-points (the control-points)) - - (b-spline :type 'b-spline-curve - ;; This will be an equivalent surf:b-spline-curve. - :display-controls (list :color :red :bezier-points t) - :control-points (the bezier control-points)) - - ;; - ;; The b-spline-curve is a full NURBS curve and so has - ;; more inputs than a simple bezier-curve: degree, - ;; weights, and knot-vector, so we can do things like: - ;; - (b-spline-weighted :type 'b-spline-curve - :display-controls (list :color :purple) - :control-points (the bezier control-points) - :weights (list 1.0 1.2 1.2 1.0)) - - (b-spline-degree-2 :type 'b-spline-curve - :display-controls (list :color :orange) - :control-points (the bezier control-points) - :degree 2))) - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for b-spline-curve} - -\label{fig:example-code-b-spline-curve} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-b-spline-curve.pdf} -\end{center} - -\caption{b-spline-curve example} - -\label{fig:b-spline-curve} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Control-points] -\index{Control-points -[b-spline-curve]}\emph{List of 3D Points} - - The control points. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Degree] -\index{Degree -[b-spline-curve]}\emph{Integer} - - Degree of the curve. Defaults to 3 (cubic). - - - - -\item [Knot-vector] -\index{Knot-vector -[b-spline-curve]}\emph{List of Numbers} - - Knots of the curve. Default is NIL, which indicates a uniform knot vector. - - - - -\item [Local?] -\index{Local? -[b-spline-curve]}\emph{Boolean} - - Indicates whether the inputted control-points should be considered in local coordinate system of this object. Default is nil. - - - - -\item [Weights] -\index{Weights -[b-spline-curve]}\emph{List of numbers} - - A weight to match each control point. Should be same length as control-points. -Default is a value of 1.0 for each weight, resulting in a nonrational curve. - - - - -\end{description} - - - - - - - -\item \index{b-spline-surface} -\label{prim:b-spline-surface} -\textbf{b-spline-surface} - - -\textbf{ -\underline{Mixins:}} surface - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -A general b-spline surface specified with control points, weights, knots, and degree. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :surf) - - (define-object test-b-spline-surface (b-spline-surface) - - :computed-slots - ((points-data '(((0 0 0)(4 1 0)(8 1 0)(10 0 0)(8 -1 0)(4 -1 0)(0 0 0)) - ((0 0 2) (4 2 2) (8 2 2) (10 0 2) (8 -2 2) (4 -2 2) (0 0 2)) - ((0 0 4) (4 2 4) (8 2 4) (10 0 4) (8 -2 4) (4 -2 4) (0 0 4)) - ((0 0 7) (4 1 7) (8 1 7) (10 0 7) (8 -1 7) (4 -1 7) (0 0 7)))) - (control-points (mapcar #'(lambda(list) - (mapcar #'apply-make-point list)) - (the points-data))) - - (display-controls (list :color :periwinkle :line-thickness 2)))) - - (generate-sample-drawing :object-roots (make-object 'test-b-spline-surface) - :projection-direction :trimetric) - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for b-spline-surface} - -\label{fig:example-code-b-spline-surface} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-b-spline-surface.pdf} -\end{center} - -\caption{b-spline-surface example} - -\label{fig:b-spline-surface} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Control-points] -\index{Control-points -[b-spline-surface]}\emph{List of lists of 3D Points} - - The control net. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [U-degree] -\index{U-degree -[b-spline-surface]}\emph{Integer} - - Degree of surface in U direction. Defaults to 3. - - - - -\item [U-knot-vector] -\index{U-knot-vector -[b-spline-surface]}\emph{List of Numbers} - - Knots in U direction. Default is NIL, which indicates a uniform knot vector in U direction. - - - - -\item [V-degree] -\index{V-degree -[b-spline-surface]}\emph{Integer} - - Degree of surface in V direction. Defaults to 3. - - - - -\item [V-knot-vector] -\index{V-knot-vector -[b-spline-surface]}\emph{List of Numbers} - - Knots in V direction. Default is NIL, which indicates a uniform knot vector in V direction. - - - - -\item [Weights] -\index{Weights -[b-spline-surface]}\emph{List of lists of numbers} - - A weight to match each control point. Should be congruent with control-points -(i.e. same number of rows and columns). Default is a value of 1.0 for each weight, resulting in a nonrational surface. - - - - -\end{description} - - - - - - - -\item \index{basic-surface} -\label{prim:basic-surface} -\textbf{basic-surface} - - -\textbf{ -\underline{Mixins:}} surface - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -This routine constructs a 3D surface by interpolating - a set of four boundary 3D curves. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :gdl-user) - - (define-object test-basic-surface (base-object) - - :computed-slots - ((control-points-u-min (list (make-point 0 0 0 ) - (make-point 1 0 0 ) - (make-point 2 0 1 ) - (make-point 3 0 0 ) - (make-point 4 0 0 ))) - - (control-points-u-max (list (make-point 0 4 0 ) - (make-point 1 4 0 ) - (make-point 2 4 1 ) - (make-point 3 4 0 ) - (make-point 4 4 0 ))) - - (control-points-v-min (list (make-point 0 0 0 ) - (make-point 0 1 0 ) - (make-point 0 2 1 ) - (make-point 0 3 0 ) - (make-point 0 4 0 ))) - - (control-points-v-max (list (make-point 4 0 0 ) - (make-point 4 1 0 ) - (make-point 4 2 1 ) - (make-point 4 3 0 ) - (make-point 4 4 0 )))) - - :objects - ((surf-curve-u-min :type 'fitted-curve - :display-controls (list :color :green :line-thickness 2) - :points (the control-points-u-min)) - - (surf-curve-u-max :type 'fitted-curve - :display-controls (list :color :green :line-thickness 2) - :points (the control-points-u-max)) - - (surf-curve-v-min :type 'fitted-curve - :display-controls (list :color :blue :line-thickness 2) - :points (the control-points-v-min)) - - (surf-curve-v-max :type 'fitted-curve - :display-controls (list :color :blue :line-thickness 2) - :points (the control-points-v-max)) - - (surface :type 'basic-surface - :display-controls (list :color :red :line-thickness 0.5) - :curve-bottom (the surf-curve-u-min) - :curve-top (the surf-curve-u-max) - :curve-left (the surf-curve-v-min) - :curve-right (the surf-curve-v-max)) - - (arc-1 :type 'arc-curve - :display-controls (list :color :green :line-thickness 2) - :orientation (alignment :top (the (face-normal-vector :rear))) - :center (make-point 1 0 0) - :radius 1 - :start-angle 0 - :end-angle pi) - - (arc-2 :type 'arc-curve - :display-controls (list :color :green :line-thickness 2) - :orientation (alignment :top (the (face-normal-vector :rear))) - :center (make-point 1 -2 0) - :radius 1 - :start-angle 0 - :end-angle pi) - - (arc-3 :type 'arc-curve - :orientation (alignment :rear (the (face-normal-vector :right))) - :display-controls (list :color :blue :line-thickness 2) - :center (make-point 0 -1 0) - :radius 1 - :start-angle 0 - :end-angle pi) - - (arc-4 :type 'arc-curve - :orientation (alignment :rear (the (face-normal-vector :left))) - :display-controls (list :color :blue :line-thickness 2) - :center (make-point 2 -1 0) - :radius 1 - :start-angle 0 - :end-angle pi) - - (surf-arc :type 'basic-surface - :display-controls (list :color :red :line-thickness 0.5) - :curve-bottom (the arc-1 ) - :curve-top (the arc-2 ) - :curve-left (the arc-3 reverse ) - :curve-right (the arc-4)))) - - (generate-sample-drawing - :objects (the-object (make-object 'test-basic-surface) surface) - :projection-direction (getf *standard-views* :tri-r-r)) - - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for basic-surface} - -\label{fig:example-code-basic-surface} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-basic-surface.pdf} -\end{center} - -\caption{basic-surface example} - -\label{fig:basic-surface} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Curve-bottom] -\index{Curve-bottom -[basic-surface]}\emph{GDL curve object} - - The curve corresponding to the surface bottom boundary . - - - - -\item [Curve-left] -\index{Curve-left -[basic-surface]}\emph{GDL curve object} - - The curve corresponding to the surface left boundary. - - - - -\item [Curve-right] -\index{Curve-right -[basic-surface]}\emph{GDL curve object} - - The curve corresponding to the surface right boundary. - - - - -\item [Curve-top] -\index{Curve-top -[basic-surface]}\emph{GDL curve object} - - The curve corresponding to the surface top boundary. - - - - -\end{description} - - - - - - - -\item \index{blended-solid} -\label{prim:blended-solid} -\textbf{blended-solid} - - -\textbf{ -\underline{Mixins:}} brep - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -This primitive attempts to fillet one or more edges of a brep solid. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - (in-package :gdl-user) - - (define-object blend-sample (base-object) - - :objects - ((box :type 'box-solid - :length 10 :width 20 :height 15) - - (blend :type 'blended-solid - :display-controls (list :color :blue) - :default-radius 3 - :brep (the box)))) - - (generate-sample-drawing :objects (the-object (make-object 'blend-sample) blend) - :projection-direction (getf *standard-views* :trimetric)) - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for blended-solid} - -\label{fig:example-code-blended-solid} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-blended-solid.pdf} -\end{center} - -\caption{blended-solid example} - -\label{fig:blended-solid} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Brep] -\index{Brep -[blended-solid]}\emph{GDL Brep object} - - This is the original solid, whose edges you want to be filleted. - - - - -\item [Default-radius] -\index{Default-radius -[blended-solid]}\emph{Number} - - This will be used as the fillet radius. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Specs] -\index{Specs -[blended-solid]}\emph{Plist with key :edges} - - This specifies which edges are to be filleted. The default (nil) -means that all edges should be filleted. - - - - -\end{description} - - - - - - - -\item \index{boolean-merge} -\label{prim:boolean-merge} -\textbf{boolean-merge} - - -\textbf{ -\underline{Mixins:}} boolean-tolerance-mixin, brep - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Generalized Merge container for doing -boolean operations. This is not to be used directly, but is mixed -into subtracted-solid, united-solid, intersected-solid, and -separated-solid. The specific operation is specified in the respective -subclass. - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Other-brep] -\index{Other-brep -[boolean-merge]} - -GDL Brep object or object containing a brep, or list of brep -objects or object containing a brep. Second (or rest) of the breps to -be merged into the given \texttt{brep} - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Allow-multiple-regions?] -\index{Allow-multiple-regions? -[boolean-merge]}\emph{Boolean} - - If set to non-nil, throw warning but not error if any of -the input breps has more than one non-infinite region. Defaults to -*boolean-allow-multiple-regions?*, which itself defaults to nil. - - - - -\item [Angle-tolerance] -\index{Angle-tolerance -[boolean-merge]}\emph{Number} - - Defaults to *angle-tolerance-radians-default*. - - - - -\item [Brep] -\index{Brep -[boolean-merge]}\emph{GDL Brep object or object containing a brep} - - First of the breps to be merged - - - - -\item [Error-on-invalid?] -\index{Error-on-invalid? -[boolean-merge]}\emph{Boolean} - - If set to non-nil, we throw an error instead of a -warning if the resulting brep does not pass the built-in validation -test. If nil, we throw a warning but continue to return the resulting -brep. Defaults to *boolean-error-on-invalid-brep?* which itself -defaults to t. - - - - -\item [Sew-and-orient?] -\index{Sew-and-orient? -[boolean-merge]}\emph{Boolean} - - Indicates whether we should try to sew and orient the -resulting brep. This defaults to t for merge operation and nil otherwise. - - - - -\end{description} - - - - - - - -\item \index{boolean-tolerance-mixin} -\label{prim:boolean-tolerance-mixin} -\textbf{boolean-tolerance-mixin} - - -\textbf{ -\underline{Mixins:}} vanilla-mixin - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Implements adaptive tolerancing for certain brep objects. - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Approximation-tolerance] -\index{Approximation-tolerance -[boolean-tolerance-mixin]}\emph{Number} - - Defaults to *3d-approximation-tolerance-default* if non-nil. If this value is nil, -then this defaults to the approximation-tolerance-adaptive. - - - - -\item [Approximation-tolerance-adaptive] -\index{Approximation-tolerance-adaptive -[boolean-tolerance-mixin]}\emph{Number} - - Defaults to the minimum of the adaptive-tolerance of any of the input breps, -multiplied by the approximation-tolerance-factor, rounded to nearest multiple of -tenths (e.g. it will be 0.01, 0.001, 0.001), however if this evaluates as zerop, -*3d-approximation-tolerance-default* will be used instead. - - - - -\item [Approximation-tolerance-factor] -\index{Approximation-tolerance-factor -[boolean-tolerance-mixin]}\emph{Number} - - Defaults to *approximation-tolerance-factor*. This is multiplied by the minimum of the -adaptive-tolerance of any of the input breps to produce the approximation-tolerance-adaptive. - - - - -\end{description} - - - - - - - -\item \index{box-solid} -\label{prim:box-solid} -\textbf{box-solid} - - -\textbf{ -\underline{Mixins:}} brep, box - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -A rectangular box represented as a brep solid. Contains the union of messages (e.g. input-slots, computed-slots, etc) -from brep and box. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - (in-package :surf) - - (define-object test-box-solid (box-solid) - :computed-slots ((length 10) (width 20) (height 30))) - - (generate-sample-drawing :objects (the-object (make-object 'test-box-solid) ) - :projection-direction (getf *standard-views* :trimetric)) - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for box-solid} - -\label{fig:example-code-box-solid} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-box-solid.pdf} -\end{center} - -\caption{box-solid example} - -\label{fig:box-solid} - -\end{figure} - - - - - - -\item \index{boxed-curve} -\label{prim:boxed-curve} -\textbf{boxed-curve} - - -\textbf{ -\underline{Mixins:}} outline-specialization-mixin, b-spline-curve - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -This object behaves as a hybrid of a curve -and a normal box. You pass in a curve-in, and it essentially traps the curve -in a box, which will respond to normal GDL :center and :orientation. -You can also pass a scale, or scale-x, or scale-y, or scale-z as with -a transformed-curve. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (define-object boxed-curves-test (base-object) - - :computed-slots ((b-spline (the b-splines (curves 2)))) - - :objects - ((b-splines :type 'test-b-spline-curves) - - (boxed :type 'boxed-curve - :curve-in (the b-splines (curves 2))) - - (translated :type 'boxed-curve - :curve-in (the b-spline) - :center (translate (the center) :left 15)) - - (twisted :type 'boxed-curve - :curve-in (the boxed) - :orientation - (alignment :left (the (face-normal-vector :top)) - :rear (rotate-vector-d (the (face-normal-vector :rear)) - 30 - (the (face-normal-vector :top))))) - (rotated :type 'boxed-curve - :curve-in (the b-spline) - :display-controls (list :color :purple) - :orientation - (alignment :left - (rotate-vector-d (the (face-normal-vector :left)) - 50 - (the (face-normal-vector :rear))))) - - (rotated-about :type 'boxed-curve - :curve-in (the b-spline) - :display-controls (list :color :purple) - :orientation-center (translate (the center) :right 2.5) - ;;:center (translate (the center) :up 5) - :orientation - (alignment :left - (rotate-vector-d (the (face-normal-vector :left)) - 45 - (the (face-normal-vector :rear))))) - - (moved-up :type 'boxed-curve - :curve-in (the rotated-about) - :center (translate (the rotated-about center) - :up 7 - :left 5)) - - (straightened :type 'boxed-curve - :curve-in (the moved-up) - :orientation - (alignment - :left - (rotate-vector-d - (the-child curve-in (face-normal-vector :left)) - 45 - (the-child curve-in (face-normal-vector :rear))) - :rear (the-child curve-in (face-normal-vector :rear)))) - - (rotated-straightened :type 'boxed-curve - :curve-in (the straightened) - :orientation (the moved-up orientation) - :orientation-center - (translate (the-child curve-in center) :up 2.5)) - - (rotated-straightened-moved :type 'boxed-curve - :curve-in (the rotated-straightened) - :center (translate (the-child curve-in center) - :right 5)) - (center-sphere :type 'sphere - :radius 0.3 - :center (the moved-up-and-straightened orientation-center)) - - - (moved-up-and-straightened - :type 'boxed-curve - :curve-in (the straightened) - :center (translate (the-child orientation-center) :right 7) - :orientation - (alignment :left - (the-child curve-in (face-normal-vector :rear)) - :front - (rotate-vector-d (the-child curve-in (face-normal-vector :left)) - 45 - (the-child curve-in (face-normal-vector :rear)))) - :orientation-center (translate (the straightened center) :up 2.5)) - - (moved-up-and-straightened-1 - :type 'boxed-curve - :curve-in (the straightened) - :center (translate (the-child curve-in center) :right 14) - :orientation (the rotated-straightened orientation) - :orientation-center (translate (the straightened center) :up 2.5)) - - (moved-up-and-straightened-2 - :type 'boxed-curve - :curve-in (the straightened) - :center (translate (the-child curve-in center) :right 21) - :orientation (the rotated-straightened orientation) - :orientation-center (translate (the straightened center) :up 2.5)) - - (transformed - :type 'boxed-curve - :curve-in (the b-spline) - :center (translate (the center) :left 50) - :orientation - (alignment :rear - (rotate-vector-d (the (face-normal-vector :rear)) - 30 - (the (face-normal-vector :right))))))) - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for boxed-curve} - -\label{fig:example-code-boxed-curve} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Curve-in] -\index{Curve-in -[boxed-curve]}\emph{GDL Curve object} - - This can be any type of curve, e.g. b-spline-curve, fitted-curve, or an edge from a solid brep. -Note that the reference-box of this curve (i.e. its center and orientation) will have an effect on the resulting -boxed-curve. If you want to consider the incoming curve-in as being in global space, then make sure its center -is (0 0 0) and its orientation is nil or equivalent to geom-base::+identity-3x3+ - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Center] -\index{Center -[boxed-curve]}\emph{3D Point in global space} - - You can pass in a new center for the curve's reference box, -which will move the whole box including the curve. This defaults to the -orientation-center (if given), otherwise to the (the curve-in center). - - - - -\item [From-center] -\index{From-center -[boxed-curve]}\emph{3D Point in global space} - - The center with respect to which this object should be positioned. Normally -this should not be specified by user code, unless you know what you are doing [e.g. to override the center -of a curve-in which is meaningless and force it to be interpreted as a curve in global space, you could -specify this as (the center) when passing it in from the parent]. -Default is (the curve-in center). - - - - -\item [From-object] -\index{From-object -[boxed-curve]}\emph{GDL object which mixes in base-object} - - The current boxed-curve will be positioned and oriented with respect -to the center and orientation of this object. The default is (the curve-in). - - - - -\item [From-orientation] -\index{From-orientation -[boxed-curve]}\emph{3x3 Transformation Matrix} - - The orientation with respect to which this object should be oriented. Normally -this should not be specified by user code, unless you know what you are doing [e.g. to override the orientation -of a curve-in which is meaningless and force it to be interpreted as a curve in the parent's coordinate system, -you could specify this as (the orientation) when passing it in from the parent]. -Default is (the curve-in orientation). - - - - -\item [Orientation] -\index{Orientation -[boxed-curve]}\emph{3x3 Transformation Matrix} - - This will be the new orientation for the box and the contained curve. Default is -(the curve-in orientation) -- i.e. identical orientation with the provided curve-in. - - - - -\item [Orientation-center] -\index{Orientation-center -[boxed-curve]}\emph{3D Point in global space} - - If you provide this, the curve's reference box will be moved to have its center -at this point, before any orientation is applied. This will become the new center of the resulting boxed-curve, -unless you explicitly pass in a different center. Default is nil. - - - - -\item [Scale] -\index{Scale -[boxed-curve]}\emph{Number} - - The overall scale factor for X, Y, and Z, if no individual scales are specified. Defaults to 1. - - - - -\item [Scale-x] -\index{Scale-x -[boxed-curve]}\emph{Number} - - The scale factor for X. Defaults to 1. - - - - -\item [Scale-y] -\index{Scale-y -[boxed-curve]}\emph{Number} - - The scale factor for Y. Defaults to 1. - - - - -\item [Scale-z] -\index{Scale-z -[boxed-curve]}\emph{Number} - - The scale factor for Z. Defaults to 1. - - - - -\item [Show-box?] -\index{Show-box? -[boxed-curve]}\emph{Boolean} - - This determines whether the reference box is displayed along with the curve. Default is t (will be changed to nil). - - - - -\item [Show-control-polygon?] -\index{Show-control-polygon? -[boxed-curve]}\emph{Boolean} - - This determines whether the control polygon is displayed along with the curve. Default is nil. - - - - -\item [Show-tight-box?] -\index{Show-tight-box? -[boxed-curve]}\emph{Boolean} - - This determines whether the tight box is displayed along with the curve. Default is nil. - - - - -\item [Translation-threshold] -\index{Translation-threshold -[boxed-curve]}\emph{Number} - - Tolerance to determine whether the boxed-curve has -moved with respect to the original. Default is *zero-epsilon* - - - - -\end{description} - - - - - - -\textbf{ -\underline{Computed slots:}} - -\begin{description} - -\item [Control-points] -\index{Control-points -[boxed-curve]}\emph{List of 3D Points} - - The control points. - - - - -\item [Degree] -\index{Degree -[boxed-curve]}\emph{Integer} - - Degree of the curve. Defaults to 3 (cubic). - - - - -\item [Height] -\index{Height -[boxed-curve]}\emph{Number} - - Z-axis dimension of the reference box. Defaults to zero. - - - - -\item [Knot-vector] -\index{Knot-vector -[boxed-curve]}\emph{List of Numbers} - - Knots of the curve. Default is NIL, which indicates a uniform knot vector. - - - - -\item [Length] -\index{Length -[boxed-curve]}\emph{Number} - - Y-axis dimension of the reference box. Defaults to zero. - - - - -\item [Weights] -\index{Weights -[boxed-curve]}\emph{List of numbers} - - A weight to match each control point. Should be same length as control-points. -Default is a value of 1.0 for each weight, resulting in a nonrational curve. - - - - -\item [Width] -\index{Width -[boxed-curve]}\emph{Number} - - X-axis dimension of the reference box. Defaults to zero. - - - - -\end{description} - - - - - - - -\item \index{boxed-surface} -\label{prim:boxed-surface} -\textbf{boxed-surface} - - -\textbf{ -\underline{Mixins:}} b-spline-surface - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -This object behaves as a hybrid of a surface and a normal box. You -pass in a surface-in, and it essentially traps the surface in a box, which will respond to normal -GDL :center and :orientation. You can also pass a scale, or scale-x, or scale-y, or scale-z as with -a transformed-surface. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (define-object boxed-surfaces-test (base-object) - - ;;bounding-box-from-points gives errors - - :objects - ((b-spline :type 'test-b-spline-surface) - - (boxed :type 'boxed-surface - :surface-in (the b-spline)) - - (translated :type 'boxed-surface - :surface-in (the b-spline) - :center (translate (the center) :left 15)) - - (twisted :type 'boxed-surface - :surface-in (the boxed) - :orientation - (alignment :left (the (face-normal-vector :top)) - :rear (rotate-vector-d (the (face-normal-vector :rear)) - 30 - (the (face-normal-vector :top))))) - (rotated :type 'boxed-surface - :surface-in (the b-spline) - :display-controls (list :color :purple) - :orientation - (alignment :left - (rotate-vector-d (the (face-normal-vector :left)) - 50 - (the (face-normal-vector :rear))))) - - (rotated-about :type 'boxed-surface - :surface-in (the b-spline) - :display-controls (list :color :purple) - :orientation-center (translate (the center) :right 2.5) - ;;:center (translate (the center) :up 5) - :orientation - (alignment :left - (rotate-vector-d (the (face-normal-vector :left)) - 45 - (the (face-normal-vector :rear))))) - - (moved-up :type 'boxed-surface - :surface-in (the rotated-about) - :center (translate (the rotated-about center) - :up 7 - :left 5)) - - (straightened :type 'boxed-surface - :surface-in (the moved-up) - :orientation - (alignment :left - (rotate-vector-d - (the-child surface-in (face-normal-vector :left)) - 45 - (the-child surface-in (face-normal-vector :rear))) - :rear (the-child surface-in (face-normal-vector - :rear)))) - - (rotated-straightened :type 'boxed-surface - :surface-in (the straightened) - :orientation (the moved-up orientation) - :orientation-center - (translate (the-child surface-in center) :up 2.5)) - - (rotated-straightened-moved :type 'boxed-surface - :surface-in (the rotated-straightened) - :center (translate (the-child surface-in center) - :right 5)) - - (center-sphere :type 'sphere - :radius 0.3 - :center (the moved-up-and-straightened orientation-center)) - - (moved-up-and-straightened - :type 'boxed-surface - :surface-in (the straightened) - :center (translate (the-child orientation-center) :right 7) - :orientation - (alignment :left (the-child surface-in (face-normal-vector :rear)) - :front - (rotate-vector-d - (the-child surface-in (face-normal-vector :left)) - 45 - (the-child surface-in (face-normal-vector :rear)))) - :orientation-center (translate (the straightened center) :up 2.5)) - - (moved-up-and-straightened-1 - :type 'boxed-surface - :surface-in (the straightened) - :center (translate (the-child surface-in center) :right 14) - :orientation (the rotated-straightened orientation) - :orientation-center (translate (the straightened center) :up 2.5)) - - (moved-up-and-straightened-2 - :type 'boxed-surface - :surface-in (the straightened) - :center (translate (the-child surface-in center) :right 21) - :orientation (the rotated-straightened orientation) - :orientation-center (translate (the straightened center) :up 2.5)) - - (transformed :type 'boxed-surface - :surface-in (the b-spline) - :center (translate (the center) :left 50) - :orientation - (alignment :rear - (rotate-vector-d (the (face-normal-vector :rear)) - 30 - (the (face-normal-vector :right))))))) - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for boxed-surface} - -\label{fig:example-code-boxed-surface} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Surface-in] -\index{Surface-in -[boxed-surface]}\emph{GDL Surface object} - - This can be any type of surface, e.g. b-spline-surface, fitted-surface, or an edge from a solid brep. -Note that the reference-box of this surface (i.e. its center and orientation) will have an effect on the resulting -boxed-surface. If you want to consider the incoming surface-in as being in global space, then make sure its center -is (0 0 0) and its orientation is nil or equivalent to geom-base::+identity-3x3+ - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Center] -\index{Center -[boxed-surface]}\emph{3D Point in global space} - - You can pass in a new center for the surface's reference box, -which will move the whole box including the surface. This defaults to the -orientation-center (if given), otherwise to the (the surface-in center). - - - - -\item [From-center] -\index{From-center -[boxed-surface]}\emph{3D Point in global space} - - The center with respect to which this object should be positioned. Normally -this should not be specified by user code, unless you know what you are doing [e.g. to override the center -of a surface-in which is meaningless and force it to be interpreted as a surface in global space, you could -specify this as (the center) when passing it in from the parent]. Default is (the surface-in orientation). - - - - -\item [From-object] -\index{From-object -[boxed-surface]}\emph{GDL object which mixes in base-object} - - The current boxed-surface will be positioned and oriented with respect -to the center and orientation of this object. The default is (the surface-in). - - - - -\item [From-orientation] -\index{From-orientation -[boxed-surface]}\emph{3x3 Transformation Matrix} - - The orientation with respect to which this object should be oriented. Normally -this should not be specified by user code, unless you know what you are doing [e.g. to override the orientation -of a surface-in which is meaningless and force it to be interpreted as a surface in the parent's coordinate system, -you could specify this as (the orientation) when passing it in from the parent]. Default is (the surface-in orientation). - - - - -\item [Orientation] -\index{Orientation -[boxed-surface]}\emph{3x3 Transformation Matrix} - - This will be the new orientation for the box and the contained surface. Default is -(the surface-in orientation) -- i.e. identical orientation with the provided surface-in. - - - - -\item [Orientation-center] -\index{Orientation-center -[boxed-surface]}\emph{3D Point in global space} - - If you provide this, the surface's reference box will be moved to have its center -at this point, before any orientation is applied. This will become the new center of the resulting boxed-surface, -unless you explicitly pass in a different center. Default is nil. - - - - -\item [Scale] -\index{Scale -[boxed-surface]}\emph{Number} - - The overall scale factor for X, Y, and Z, if no individual scales are specified. Defaults to 1. - - - - -\item [Scale-x] -\index{Scale-x -[boxed-surface]}\emph{Number} - - The scale factor for X. Defaults to 1. - - - - -\item [Scale-y] -\index{Scale-y -[boxed-surface]}\emph{Number} - - The scale factor for Y. Defaults to 1. - - - - -\item [Scale-z] -\index{Scale-z -[boxed-surface]}\emph{Number} - - The scale factor for Z. Defaults to 1. - - - - -\item [Show-box?] -\index{Show-box? -[boxed-surface]}\emph{Boolean} - - This determines whether the reference box is displayed along with the surface. Default is nil. - - - - -\item [Show-control-polygon?] -\index{Show-control-polygon? -[boxed-surface]}\emph{Boolean} - - This determines whether the control polygon is displayed along with the surface. Default is t (will be changed to nil). - - - - -\item [Show-tight-box?] -\index{Show-tight-box? -[boxed-surface]}\emph{Boolean} - - This determines whether the tight box is displayed along with the surface. Default is nil. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Computed slots:}} - -\begin{description} - -\item [Control-points] -\index{Control-points -[boxed-surface]}\emph{List of lists of 3D Points} - - The control net. - - - - -\item [Height] -\index{Height -[boxed-surface]}\emph{Number} - - Z-axis dimension of the reference box. Defaults to zero. - - - - -\item [Length] -\index{Length -[boxed-surface]}\emph{Number} - - Y-axis dimension of the reference box. Defaults to zero. - - - - -\item [U-degree] -\index{U-degree -[boxed-surface]}\emph{Integer} - - Degree of surface in U direction. Defaults to 3. - - - - -\item [U-knot-vector] -\index{U-knot-vector -[boxed-surface]}\emph{List of Numbers} - - Knots in U direction. Default is NIL, which indicates a uniform knot vector in U direction. - - - - -\item [V-degree] -\index{V-degree -[boxed-surface]}\emph{Integer} - - Degree of surface in V direction. Defaults to 3. - - - - -\item [V-knot-vector] -\index{V-knot-vector -[boxed-surface]}\emph{List of Numbers} - - Knots in V direction. Default is NIL, which indicates a uniform knot vector in V direction. - - - - -\item [Weights] -\index{Weights -[boxed-surface]}\emph{List of lists of numbers} - - A weight to match each control point. Should be congruent with control-points -(i.e. same number of rows and columns). Default is a value of 1.0 for each weight, resulting in a nonrational surface. - - - - -\item [Width] -\index{Width -[boxed-surface]}\emph{Number} - - X-axis dimension of the reference box. Defaults to zero. - - - - -\end{description} - - - - - - - -\item \index{brep} -\label{prim:brep} -\textbf{brep} - - -\textbf{ -\underline{Mixins:}} geometry-kernel-object-mixin, ifs-output-mixin, base-object - - - - - -\begin{description} - -\item [ -\underline{Author}] - - -Dave Cooper, Genworks - - - -\item [ -\underline{Description}] - - -A general superclass for all boundary representation geometric entities. -This currently follows the smlib topology model, with breps containing regions, regions containing shells, -and shells containing faces and edges. Shells which completely enclose a volume are considered -to make up a solid brep. - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Brep-tolerance] -\index{Brep-tolerance -[brep]}\emph{Number} - - Overall tolerance for the created brep solid. Defaults to nil. -Note that a value of nil indicates for SMLib to use value of 1.0e-05 of the -longest diagonal length of the brep. - - - - -\item [Built-from] -\index{Built-from -[brep]}\emph{GDL Brep object} - - Defaults to nil. -Specify this if you want this brep to be a clone of an existing brep. (note - -this uses a shared underlying brep object, it does not make a copy) - - - - -\item [Face-brep-colors] -\index{Face-brep-colors -[brep]}\emph{List of Color Keywords} - - These indicate the colors -for the breps produced by (the face-breps). If the -number of face-breps exceeds the length of this list, -the colors will be repeated in order. -Defaults to a list with keys: - - -\begin{itemize} - -\item :green - -\item :red - -\item :blue - -\item :purple-dark - -\item :violet - -\item :cyan. - -\end{itemize} - - - - - -\item [Tessellation-parameters] -\index{Tessellation-parameters -[brep]}\emph{Plist of keyword symbols and numbers} - - This controls tessellation for this brep. -The keys are as follows: - - -\begin{itemize} - -\item \texttt{:min-number-of-segments} - - -\item \texttt{:max-3d-edge-factor} - - -\item \texttt{:min-parametric-ratio} - - -\item \texttt{:max-chord-height} - - -\item \texttt{:max-angle-degrees} - - -\item \texttt{:min-3d-edge} - - -\item \texttt{:min-edge-ratio-uv} - - -\item \texttt{:max-aspect-ratio} - - -\end{itemize} - - -and the defaults come from the following parameters: - - -\begin{verbatim} - (list - :min-number-of-segments *tess-min-number-of-segments* - :max-3d-edge-factor *tess-max-3d-edge-factor* - :min-parametric-ratio *tess-min-parametric-ratio* - :max-chord-height *tess-max-chord-height* - :max-angle-degrees *tess-max-angle-degrees* - :min-3d-edge *tess-min-3d-edge* - :min-edge-ratio-uv *tess-min-edge-ratio-uv* - :max-aspect-ratio *tess-max-aspect-ratio*) - -\end{verbatim} - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional, settable):}} - -\begin{description} - -\item [Density] -\index{Density -[brep]}\emph{Number} - - The density per unit volume of the brep. Defaults to 1 - - - - -\item [Display-iso-curves-wireframe?] -\index{Display-iso-curves-wireframe? -[brep]}\emph{Boolean} - - Determines whether the isoparametric curves of each face of the brep are used for wireframe display. -The default is T. - - - - -\item [Display-tessellation-lines-wireframe?] -\index{Display-tessellation-lines-wireframe? -[brep]}\emph{Boolean} - - Determines whether the tessellation grid-lines of the brep are used for wireframe display. -The default is NIL. - - - - -\item [Isos] -\index{Isos -[brep]}\emph{Plist with keys :n-u and :n-v} - - The number of isoparametric curves to be displayed in each direction. -This value comes from the value of :isos on the display-controls if that exists, and defaults -to *isos-default* otherwise. - - - - -\item [Max-3d-edge] -\index{Max-3d-edge -[brep]}\emph{Number} - - Used for tessellations. Computed from (the max-extent) and (the max-3d-edge-factor). -WARNING: Modify this value at your peril. Small values can cause intractable tessellations. -It is better to tweak max-3d-edge-factor to a small value like 0.1, as this will -be taken relative to the max-extent of the brep. - - - - -\item [Max-3d-edge-factor] -\index{Max-3d-edge-factor -[brep]}\emph{Number} - - Used for tessellations. Default comes from (the tessellation-parameters). - - - - -\item [Max-angle-degrees] -\index{Max-angle-degrees -[brep]}\emph{Number} - - Used for tessellations. Default comes from (the tessellation-parameters). - - - - -\item [Max-aspect-ratio] -\index{Max-aspect-ratio -[brep]}\emph{Number} - - Used for tessellations. Default comes from (the tessellation-parameters). - - - - -\item [Max-chord-height] -\index{Max-chord-height -[brep]}\emph{Number} - - Used for tessellations. Default comes from (the tessellation-parameters). - - - - -\item [Min-3d-edge] -\index{Min-3d-edge -[brep]}\emph{Number} - - Used for tessellations. Default comes from (the tessellation-parameters). - - - - -\item [Min-edge-ratio-uv] -\index{Min-edge-ratio-uv -[brep]}\emph{Number} - - Used for tessellations. Default comes from (the tessellation-parameters). - - - - -\item [Min-number-of-segments] -\index{Min-number-of-segments -[brep]}\emph{Integer} - - Used for tessellations. Default comes from (the tessellation-parameters). - - - - -\item [Min-parametric-ratio] -\index{Min-parametric-ratio -[brep]}\emph{Number} - - Used for tessellations. Default comes from (the tessellation-parameters). - - - - -\item [Poly-brep-smooth-results?] -\index{Poly-brep-smooth-results? -[brep]}\emph{Boolean} - - Smooth results for poly-brep? Defaults to t. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Computed slots:}} - -\begin{description} - -\item [Adaptive-tolerance] -\index{Adaptive-tolerance -[brep]}\emph{Number} - - This is the actual tolerance stored in the SMLib object. - - - - -\item [Bounding-box] -\index{Bounding-box -[brep]}\emph{List of two 3D points} - - The left front bottom and right rear top corners, in global coordinates, -of the rectangular volume bounding the tree of geometric objects rooted at this object. - - - - -\item [Local-box] -\index{Local-box -[brep]}\emph{List of two 3D points} - - The left front bottom and right rear top corners, in global coordinates, -of the rectangular volume bounding this geometric object. - - - - -\item [Min-max-x-y-z] -\index{Min-max-x-y-z -[brep]} - - - - - -\item [Triangle-data] -\index{Triangle-data -[brep]}\emph{List of Plists, one for each face, format still being determined} - -. -Contains triangle and connectivity data for the tessellation -of this brep. Exact supported format will be documented here when ready. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Hidden objects:}} - -\begin{description} - -\item [Composed-edges] -\index{Composed-edges -[brep]} - -The composed edges contained within this brep, this is valid just if the brep does not contain holes - - - - -\item [Edges-sequence] -\index{Edges-sequence -[brep]}\emph{Sequence of GDL Edge Objects} - - The Edges contained within this brep aranged clockwise or anticlockwise, -this is valid just if the brep does not contain holes - - - - -\item [Poly-brep] -\index{Poly-brep -[brep]}\emph{Polygonal Brep Object} - - This brep represented as a Polygonal Brep - - - - -\end{description} - - - - - - -\textbf{ -\underline{Hidden objects (sequence):}} - -\begin{description} - -\item [Edges] -\index{Edges -[brep]}\emph{Sequence of GDL Edge Objects} - - The Edges contained within this brep. - - - - -\item [Face-breps] -\index{Face-breps -[brep]}\emph{Sequence of GDL Brep objects} - - One brep for each face in the parent brep, containing only that face. - - - - -\item [Faces] -\index{Faces -[brep]}\emph{Sequence of GDL Face Objects} - - The Faces contained within this brep. - - - - -\item [Regions] -\index{Regions -[brep]}\emph{Sequence of GDL Region Objects} - - The Regions contained within this brep. - - - - -\item [Shells] -\index{Shells -[brep]}\emph{Sequence of GDL Shell Objects} - - The Shells contained within this brep. - - - - -\item [Vertices] -\index{Vertices -[brep]}\emph{Sequence of GDL Vertex Objects} - - The Vertices contained within this brep. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Gdl functions:}} - -\begin{description} - -\item [Area] -\index{Area -[brep]}\emph{Number} - - Area covered by the faces of the brep. - - - - -\item [Area-moments-of-inertia] -\index{Area-moments-of-inertia -[brep]}\emph{3D Vector (i} - -e. 3D Point). Returns the Area Moments of Inertia of the brep. - - - - -\item [Area-products-of-inertia] -\index{Area-products-of-inertia -[brep]}\emph{3D Vector (i} - -e. 3D Point). Returns the Area Products of Inertia of the brep. - - - - -\item [Area-second-moment-about-coordinate-axii] -\index{Area-second-moment-about-coordinate-axii -[brep]}\emph{3D Vector (i} - -e. 3D Point). Returns the Area Second Moment About Coordinate Axii of the brep. - - - - -\item [Area-static-moments] -\index{Area-static-moments -[brep]}\emph{3D Vector (i} - -e. 3D Point). Returns the Area Static Moments of the brep. - - - - -\item [Brep-intersect?] -\index{Brep-intersect? -[brep]}\emph{Value nil or t} - - This function performs an intersection between this brep and another brep. -The function returns a NIL value if no intersection is found and T if a intersection is found. - - - - -\item [Center-of-gravity] -\index{Center-of-gravity -[brep]}\emph{3D Point} - - Center of gravity of the mass of the brep. - - - - -\item [In?] -\index{In? -[brep]}\emph{Boolean} - - Returns t or nil depending on whether the point given is within the boundary of the brep (including faces). - - - - -\item [Mass] -\index{Mass -[brep]}\emph{Number} - - Mass represented by the brep, according to the density. - - - - -\item [Moments] -\index{Moments -[brep]}\emph{Plist} - - Returns the moments of the brep. The plist contains keys: :area-static-moments, :area-moments-of-inertia, - - - - -\item [Precise-properties] -\index{Precise-properties -[brep]}\emph{Multiple values: Number, Number, Number, and Plist} - - Returns the area, volume, mass, -and moments for the brep. The moments are labeled as: :area-static-moments, :area-moments-of-inertia, - - - - -\item [Precise-properties-plist] -\index{Precise-properties-plist -[brep]}\emph{Plist with keys: :area, :volume, :mass, :moments} - - Returns the area, volume, mass, -and moments for the brep. The moments are labeled as: :area-static-moments, :area-moments-of-inertia, - - - - -\item [Properties] -\index{Properties -[brep]}\emph{Plist with keys: :area, :volume, :barycenter} - - Returns the approximate area, volume, -and barycenter (center of mass) for the brep. These are computed with tessellation techniques, -which may be less precise than the analytic techniques used in precise-properties, but should -be faster to compute and exhibit more stability. - - - - - -\item [Tessellation] -\index{Tessellation -[brep]}\emph{Plist or list} - - Contains tessellation data for the brep -based on the values of the keyword args. This is used to produce -the value of (the triangle-data). - - - - -\item [Volume] -\index{Volume -[brep]}\emph{Number} - - Volume enclosed by the brep. - - - - -\item [Volume-moments-of-inertia] -\index{Volume-moments-of-inertia -[brep]}\emph{3D Vector (i} - -e. 3D Point). Returns the Volume Moments of Inertia of the brep. - - - - -\item [Volume-products-of-inertia] -\index{Volume-products-of-inertia -[brep]}\emph{3D Vector (i} - -e. 3D Point). Returns the Volume Products of Inertia of the brep. - - - - -\item [Volume-second-moment-about-coordinate-axii] -\index{Volume-second-moment-about-coordinate-axii -[brep]}\emph{3D Vector (i} - -e. 3D Point). Returns the Volume Second Moment about Coordinate Axii of the brep. - - - - -\item [Volume-static-moments] -\index{Volume-static-moments -[brep]}\emph{3D Vector (i} - -e. 3D Point). Returns the Volume Static Moments of the brep. - - - - -\end{description} - - - - - - - -\item \index{brep-intersect} -\label{prim:brep-intersect} -\textbf{brep-intersect} - - -\textbf{ -\underline{Mixins:}} base-object - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -This primitive takes two brep objects and attempts -to intersect the faces of the one with the faces of the other, yielding a -sequence of edges which also behave as curves. - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Brep] -\index{Brep -[brep-intersect]}\emph{Object of type brep} - - The first brep for intersecting its faces. - - - - -\item [Other-brep] -\index{Other-brep -[brep-intersect]}\emph{Object of type brep} - - The other brep for intersecting faces. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Angle-tolerance] -\index{Angle-tolerance -[brep-intersect]}\emph{Number} - - Defaults to (radians-to-degrees *angle-tolerance-radians-default*). - - - - -\item [Approximation-tolerance] -\index{Approximation-tolerance -[brep-intersect]}\emph{Number} - - Defaults to the max of the adaptive-tolerance of any of -the input breps. - - - - -\item [Hide-edges?] -\index{Hide-edges? -[brep-intersect]}\emph{Boolean} - - Should edges be children or hidden-children? -Defaults to nil which makes them display as children. - - - - -\item [Hide-points?] -\index{Hide-points? -[brep-intersect]}\emph{Boolean} - - Should points be children or hidden-children? -Defaults to nil which makes them display as children. - - - - -\end{description} - - - - - - - -\item \index{cad-assembly} -\label{prim:cad-assembly} -\textbf{cad-assembly} - - -\textbf{ -\underline{Mixins:}} base-object - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Represents a hierarchical CAD assembly for import into GDL. - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Center] -\index{Center -[cad-assembly]}\emph{3D Point} - - Indicates in global coordinates where the center of the reference -box of this object should be located. - - - - -\item [Display-controls] -\index{Display-controls -[cad-assembly]}\emph{Plist} - - May contain keywords and values indicating display characteristics for -this object. The following keywords are recognized currently: - - - -\begin{description} - - -\item[:color] - color keyword from the *color-table* parameter, or an HTML-style hexidecimal -RGB string value, e.g. "\#FFFFFF" for pure white. Defaults to :black. - - -\item[:line-thickness] - an integer, defaulting to 1, indicating relative line thickness for wireframe -representations of this object. - - -\item[:dash-pattern] -(currently PDF/PNG/JPEG only). This is a list of two or three numbers which indicate the length, -in pixels, of the dashes and blank spaces in a dashed line. The optional third number -indicates how far into the line or curve to start the dash pattern. - -\end{description} - - - - - -\item [Imported-assembly] -\index{Imported-assembly -[cad-assembly]}\emph{GDL smlib:assembly-import object} - - Normally this should be left to its default value. -Defaults to the assembly-import produced from the file-name. - - - - -\item [Orientation] -\index{Orientation -[cad-assembly]}\emph{3x3 Matrix of Double-Float Numbers} - - Indicates the absolute Rotation Matrix used to create -the coordinate system of this object. This matrix is given in absolute terms (i.e. with -respect to the root's orientation), and is generally created with the alignment function. -It should be an -\i{orthonormal} matrix, meaning each row is a vector with a magnitude -of one (1.0). - - - - -\item [Strings-for-display] -\index{Strings-for-display -[cad-assembly]}\emph{String or List of Strings} - - Determines how the name of objects of -this type will be printed in most places. This defaults to the -name-for-display (generally the part's name as specified in its -parent), followed by an index number if the part is an element of a -sequence. - - - - -\end{description} - - - - - - - -\item \index{cardinal-spline} -\label{prim:cardinal-spline} -\textbf{cardinal-spline} - - -\textbf{ -\underline{Mixins:}} curve - - - - - -\begin{description} - -\item [ -\underline{Author}] - - -Dave Cooper, Genworks International - - - -\item [ -\underline{Description}] - - -This object makes a Cardinal Spline, which defaults -to a Catmull-Rom Spline for nil tension-params (which means they all -default to 0.0). - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Alpha] -\index{Alpha -[cardinal-spline]}\emph{Alpha value to control parameterization} - -. -See \texttt{parameterization} input-slot for keyword equivalents. -Default is 0 - - - - -\item [Parameterization] -\index{Parameterization -[cardinal-spline]}\emph{Keyword symbol} - -\texttt{uniform} gives alpha 0, \texttt{centripetal} gives alpha 0.5, -\texttt{:chordal} gives alpha 1. Default is nil, which lets alpha defer to its default, which is 0 (uniform). - - - - -\end{description} - - - - - - - -\item \index{circular-curve} -\label{prim:circular-curve} -\textbf{circular-curve} - - -\textbf{ -\underline{Mixins:}} arc-curve - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -An full circule represented exactly as a quadratic NURBS - curve. Inputs and messages are the same as for arc-curve. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :surf) - - (define-object test-circular-curve (circular-curve) - :computed-slots - ((center (make-point 0 0 0)) (radius 10))) - - (generate-sample-drawing :objects (make-object 'test-circular-curve)) - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for circular-curve} - -\label{fig:example-code-circular-curve} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-circular-curve.pdf} -\end{center} - -\caption{circular-curve example} - -\label{fig:circular-curve} - -\end{figure} - - - - - - -\item \index{circular-surface} -\label{prim:circular-surface} -\textbf{circular-surface} - - -\textbf{ -\underline{Mixins:}} trimmed-surface, vanilla-mixin - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Represents a planar, full-circular surface controlled - by a radius, and the normal center and orientation - for base-object. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - (in-package :gdl-user) - - (define-object circular-surface-test (surf::circular-surface) - :computed-slots ((radius 108))) - - (generate-sample-drawing :objects (make-object 'circular-surface-test)) - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for circular-surface} - -\label{fig:example-code-circular-surface} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-circular-surface.pdf} -\end{center} - -\caption{circular-surface example} - -\label{fig:circular-surface} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Radius] -\index{Radius -[circular-surface]}\emph{Number} - - The radius of the resulting trimmed-surface. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Hidden objects:}} - -\begin{description} - -\item [Basis-surface] -\index{Basis-surface -[circular-surface]}\emph{GDL NURBS Surface} - - The underlying surface to be trimmed. - - - - -\item [Island] -\index{Island -[circular-surface]}\emph{Single GDL NURBS Curve or list of same} - - These curves make up the outer trimming loop. Normally should -be in counter-clockwise orientation; if not, please specify \texttt{reverse-island?} as non-NIL. - - - - -\end{description} - - - - - - - -\item \index{compatible-curves} -\label{prim:compatible-curves} -\textbf{compatible-curves} - - -\textbf{ -\underline{Mixins:}} base-object - - - - - -\begin{description} - -\item [ -\underline{Author}] - - -Dave Cooper, Genworks - - - -\item [ -\underline{Description}] - - -Experimental. This primitive takes in a list of GDL -curve objects and will compute a sequence of new curve objects which have been made -to be compatible in terms of number of control points, knot vectors, and degree. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :gdl-user) - - (define-object test-compatible-curves () - - :objects - ((b-spline :type 'b-spline-curve - :control-points (list (make-point 0 0 0) - (make-point -1 0 0) - (make-point -1 1 0) - (make-point 0 1 0))) - - (linear-curve :type 'linear-curve - :start (make-point 0 1 0) - :end (make-point 4 1 0)) - - (compatible-curves :type 'compatible-curves - :curve-list (list (the b-spline) (the linear-curve))))) - - (generate-sample-drawing :object-roots (list (make-object 'test-compatible-curves))) - - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for compatible-curves} - -\label{fig:example-code-compatible-curves} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-compatible-curves.pdf} -\end{center} - -\caption{compatible-curves example} - -\label{fig:compatible-curves} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Curve-list] -\index{Curve-list -[compatible-curves]}\emph{List of GDL curve objects} - -. - - - - -\item [Tolerance] -\index{Tolerance -[compatible-curves]}\emph{Tolerance is used to check knots removability for data reduction} - - A nil value indicates that no data reduction -is to be attempted. Defaults to nil. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Objects (sequence):}} - -\begin{description} - -\item [Curves] -\index{Curves -[compatible-curves]}\emph{Sequence of GDL Curve objects} - - These are the resultant curves which -are supposed to be compatible. - - - - -\end{description} - - - - - - - -\item \index{compatible-surfaces} -\label{prim:compatible-surfaces} -\textbf{compatible-surfaces} - - -\textbf{ -\underline{Mixins:}} base-object - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -This routine makes compatible a list of GDL surface, minimum 2 surfaces is required. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :gdl-user) - - (define-object compatible-surfaces-test (surface) - - :computed-slots ((surface-list (list (the surf-A) (the surf-B)))) - - :objects - ((make-compatible-A-and-B :type 'compatible-surfaces - :display-controls (list :line-thickness 2) - :surface-list (the surface-list)) - - (surf-A :type 'rectangular-surface - :display-controls (list :color :green-spring-medium) - :length 10 - :width 10 ) - - (surf-B :type 'rectangular-surface - :display-controls (list :color :red) - :center (make-point 10 0 0 ) - :length 10 - :width 10 ))) - - (generate-sample-drawing :object-roots - (list (the-object (make-object 'compatible-surfaces-test) - make-compatible-A-and-B))) - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for compatible-surfaces} - -\label{fig:example-code-compatible-surfaces} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-compatible-surfaces.pdf} -\end{center} - -\caption{compatible-surfaces example} - -\label{fig:compatible-surfaces} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Surface-list] -\index{Surface-list -[compatible-surfaces]}\emph{List} - - A list of Gdl surface objects. - - - - -\end{description} - - - - - - - -\item \index{composed-curve} -\label{prim:composed-curve} -\textbf{composed-curve} - - -\textbf{ -\underline{Mixins:}} curve - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Creates a single NURBS curve from a list (ordered or unordered) NURBS curves. -If the result is more than one curve, this object will throw an error and you should use \texttt{composed-curves} -instead. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - (in-package :gdl-user) - - (define-object test-global-filleted-polyline-curves (global-filleted-polyline-curves) - - :computed-slots - ((default-radius 5) - (vertex-list (list (make-point 0 0 0) - (make-point 10 10 0) - (make-point 30 10 0) - (make-point 40 0 0) - (make-point 30 -10 0) - (make-point 10 -10 0) - (make-point 0 0 0)))) - - :hidden-objects - ((points :type 'point - :sequence (:size (length (rest (the vertex-list)))) - :center (nth (the-child index) (rest (the vertex-list)))) - - (view :type 'base-view - :page-width (* 5 72) :page-height (* 5 72) - :objects (cons self (list-elements (the points)))))) - - (define-object test-composed-curve (composed-curve) - :computed-slots - ((curves (the filleted-polyline-curves ordered-curves))) - - :hidden-objects - ((filleted-polyline-curves :type 'test-global-filleted-polyline-curves))) - - (generate-sample-drawing :objects (the-object (make-object 'test-composed-curve)) - :projection-direction (getf *standard-views* :trimetric)) - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for composed-curve} - -\label{fig:example-code-composed-curve} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-composed-curve.pdf} -\end{center} - -\caption{composed-curve example} - -\label{fig:composed-curve} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Curves] -\index{Curves -[composed-curve]}\emph{List of GDL curve objects} - - These are the curves to be composed into a single curve. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Coincident-point-tolerance] -\index{Coincident-point-tolerance -[composed-curve]}\emph{Number} - - Distance two curve endpoints can be apart and be considered coincident, the composite will be built -without doing anything to the endpoints. Default is 0.01. Note: This input-slot must be non-zero. - - - - -\item [Distance-to-create-line] -\index{Distance-to-create-line -[composed-curve]}\emph{Number} - - Distance two curve endpoints can be apart and have a linear curve segment automatically added between the points. Default is 0.1. - - - - -\end{description} - - - - - - - -\item \index{composed-curves} -\label{prim:composed-curves} -\textbf{composed-curves} - - -\textbf{ -\underline{Mixins:}} base-object - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Creates multiple NURBS curves by composing a list (ordered or unordered) NURBS curves. -If the result is expected to be a single curve, you may wish to use \texttt{composed-curve} instead. - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Curves-in] -\index{Curves-in -[composed-curves]}\emph{List of GDL curve objects} - - These are the curves to be composed into a single curve. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Coincident-point-tolerance] -\index{Coincident-point-tolerance -[composed-curves]}\emph{Number} - - Distance two curve endpoints can be apart and be considered coincident, the composite will be built -without doing anything to the endpoints. Default is 0.01. Note: This input-slot must be non-zero. - - - - -\item [Distance-to-create-line] -\index{Distance-to-create-line -[composed-curves]}\emph{Number} - - Distance two curve endpoints can be apart and have a linear curve segment automatically added between the points. Default is 0.1. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Objects (sequence):}} - -\begin{description} - -\item [Curves] -\index{Curves -[composed-curves]}\emph{Sequence of GDL Curve Objects} - - The curves resulting from composition. - - - - -\end{description} - - - - - - - -\item \index{cone-solid} -\label{prim:cone-solid} -\textbf{cone-solid} - - -\textbf{ -\underline{Mixins:}} cylinder-solid, cone - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -A right cone represented as a brep solid. Contains the union of messages (e.g. input-slots, computed-slots, etc) -from brep and cone. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :surf) - - (define-object test-cone-solid-hollow () - - :objects - ((cone-solid :type 'cone-solid - :display-controls (list :isos (list :n-u 8 :n-v 8) :color :green) - :length 100 - :radius-1 10 - :radius-2 20 - :inner-radius-1 8 - :inner-radius-2 16))) - - (generate-sample-drawing :object-roots (make-object 'test-cone-solid-hollow) - :projection-direction (getf *standard-views* :trimetric)) - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for cone-solid} - -\label{fig:example-code-cone-solid} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-cone-solid.pdf} -\end{center} - -\caption{cone-solid example} - -\label{fig:cone-solid} - -\end{figure} - - - - - - -\item \index{conic-curve} -\label{prim:conic-curve} -\textbf{conic-curve} - - -\textbf{ -\underline{Mixins:}} curve - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -A curve constructed from conic inputs. Inputs are two endpoints, two end tangents, -and a point on the curve. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :gdl-user) - - (define-object conic-curve-test (conic-curve) - :computed-slots - ((start-point (make-point -10 0 0)) - (start-tangent (make-point 0.1 1 0)) - (end-point (make-point 10 0 0)) - (end-tangent (make-point -0.1 1 0)) - (point-on-curve (make-point 0 12 0)))) - - (generate-sample-drawing :objects (make-object 'conic-curve-test)) - - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for conic-curve} - -\label{fig:example-code-conic-curve} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-conic-curve.pdf} -\end{center} - -\caption{conic-curve example} - -\label{fig:conic-curve} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [End-point] -\index{End-point -[conic-curve]}\emph{3D Point} - - End Point - - - - -\item [End-tangent] -\index{End-tangent -[conic-curve]}\emph{3D Vector} - - End Tangent - - - - -\item [Point-on-curve] -\index{Point-on-curve -[conic-curve]}\emph{3D Point} - - A point on the curve. - - - - -\item [Start-point] -\index{Start-point -[conic-curve]}\emph{3D Point} - - Start Point - - - - -\item [Start-tangent] -\index{Start-tangent -[conic-curve]}\emph{3D Vector} - - Start Tangent - - - - -\end{description} - - - - - - - -\item \index{curve} -\label{prim:curve} -\textbf{curve} - - -\textbf{ -\underline{Mixins:}} geometry-kernel-object-mixin, base-object - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -A generalized NURBS curve. Usually used as a mixin in more specific curves. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :surf) - - (define-object test-curve (curve) - - :input-slots - ((built-from (the curv-in))) - - :computed-slots - ((control-pts (list (make-point 3 5 1) - (make-point 5 8.0 1) - (make-point 7 10.0 1) - (make-point 8 5.0 1) - (make-point 7 0.0 1) - (make-point 5 0.0 1) - (make-point 3 5 1)))) - - :hidden-objects - ((curv-in :type 'b-spline-curve - :control-points (the control-pts)))) - - (generate-sample-drawing :object-roots (make-object 'test-curve) - :projection-direction :top) - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for curve} - -\label{fig:example-code-curve} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-curve.pdf} -\end{center} - -\caption{curve example} - -\label{fig:curve} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Built-from] -\index{Built-from -[curve]}\emph{GDL Curve} - - Specify this if you want this curve to be a clone of -an existing curve. (note - this uses a shared underlying curve object, -it does not make a copy) - - - - -\item [Uv-curve] -\index{Uv-curve -[curve]}\emph{GDL Curve object} - - The corresponding UV curve for the primary surface on which this curve lies, if any. If -this is not a surface-curve, this will return an error. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional, settable):}} - -\begin{description} - -\item [Tolerance] -\index{Tolerance -[curve]}\emph{Number} - - Approximation tolerance for display purposes. Defaults to the tolerance of the -built-from curve, if one exists, otherwise defaults to the *display-tolerance*. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Computed slots:}} - -\begin{description} - -\item [Bounding-box] -\index{Bounding-box -[curve]}\emph{List of two 3D points} - - The left front bottom and right rear top corners, in global coordinates, -of the rectangular volume bounding the tree of geometric objects rooted at this object. - - - - -\item [Direction-vector] -\index{Direction-vector -[curve]}\emph{3D Vector} - - The direction pointing from the start to the end. - - - - -\item [End] -\index{End -[curve]}\emph{3D Point} - - The point returned by evaluating the curve function at \texttt{u2}. - - - - -\item [On-surfaces] -\index{On-surfaces -[curve]}\emph{List of GDL surfaces} - - The surfaces on which this curve lies. - - - - -\item [Start] -\index{Start -[curve]}\emph{3D Point} - - The point returned by evaluating the curve function at \texttt{u1}. - - - - -\item [Success?] -\index{Success? -[curve]}\emph{Boolean} - - This will be t if the curve is generated successfully, nil otherwise. - - - - -\item [U-max] -\index{U-max -[curve]}\emph{Number} - - The highest parameter value of the underlying mathematical definition for this parametric curve - - - - -\item [U-min] -\index{U-min -[curve]}\emph{Number} - - The lowest parameter value of the underlying mathematical definition for this parametric curve - - - - -\item [U1] -\index{U1 -[curve]}\emph{Number} - - Equal to the natural \texttt{u-min} of the curve. - - - - -\item [U2] -\index{U2 -[curve]}\emph{Number} - - Equal to the natural \texttt{u-max} of the curve. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Hidden objects:}} - -\begin{description} - -\item [First-derivative] -\index{First-derivative -[curve]}\emph{GDL Curve} - - The first derivative of this curve. The degree will be one less than the degree of this curve. - - - - -\item [Second-derivative] -\index{Second-derivative -[curve]}\emph{GDL Curve} - - The second derivative of this curve. The degree will be two less than the degree of this curve. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Gdl functions:}} - -\begin{description} - -\item [Acceleration] -\index{Acceleration -[curve]}\emph{3D Vector} - - The given parameter evaluated on the second derivative curve of this curve. Note that this is -only valid if this curve has degree of at least two (2), and will throw an error otherwise. - - - - -\item [B-spline-data] -\index{B-spline-data -[curve]}\emph{List of 3D points, List of numbers, List of numbers, and integer} - - Returns four values which are -the control points, the weights, the knots, and the degree of the curve. - - - - -\item [Check-continuity] -\index{Check-continuity -[curve]}\emph{Either T or a plist of numbers with keys \texttt{:distance}, \texttt{angle}, \texttt{:length}} - -. - - - - -\item [Closure] -\index{Closure -[curve]}\emph{Keyword symbol, :closed, :open, or :continuous} - - - - - -\item [Curvature] -\index{Curvature -[curve]}\emph{Number} - - The reciprocal of the radius of curvature at the given parameter. - - - - -\item [Curve-intersection-point] -\index{Curve-intersection-point -[curve]}\emph{Surface Point} - - First point of intersection between this curve and the other curve given as the argument. -This function also returns a second value, which is a surface point representing the end of -a contiguous segment, if any, associated with the surface point given as the primary return value. -A NIL value as this second return value indicates that there was no contiguous segment, only an -intersecting point as indicated by the surface point given as the primary return value. - - - - -\item [Curve-intersection-points] -\index{Curve-intersection-points -[curve]}\emph{Surface Points} - - Points of intersection between this curve and another curve. -This function also returns a second value, which is a list of surface points representing the ends of -contiguous segments, if any, associated with the surface point in the same position in the primary returned list. -NIL values in this second returned list indicate that there was no contiguous segment, only an intersecting point -as indicated by the surface point in the primary returned list. - - - - -\item [Dropped-curve] -\index{Dropped-curve -[curve]}\emph{List of Plists} - - The returned list of plists contains information about the points where the tangents of this curve and those of the curve given as the argument -are equal. - - - - -\item [Dropped-point] -\index{Dropped-point -[curve]}\emph{Surface Point} - - Given a 3D point, returns the point(s) projected normally onto the curve. - - - - -\item [Equi-spaced-parameters] -\index{Equi-spaced-parameters -[curve]}\emph{List of Numbers} - - Returns the specified number of parameters equally spaced along the curve. - - - - -\item [Equi-spaced-points] -\index{Equi-spaced-points -[curve]}\emph{List of 3D Points} - - Returns the specified number of points equally spaced along the curve. - - - - -\item [In-plane?] -\index{In-plane? -[curve]}\emph{Boolean} - - Given a point and a vector defining a plane, returns T or NIL depending whether this curve lies in the plane. -Also returns a second value which is the maximum distance of the curve from the plane. - - - - -\item [Local-bounding-box] -\index{Local-bounding-box -[curve]} - -Returns a bbox object, answering xmin, ymin, zmin, xmax, ymax, and zmax, for a box containing the convex hull -(i.e. the control points) of this curve and oriented according to the given \texttt{center} and \texttt{orientation}. - - - - -\item [Maximum-distance-to-curve] -\index{Maximum-distance-to-curve -[curve]}\emph{Plist} - - The returned plist contains information about the maximum distance from this curve to the curve given as the argument. - - - - -\item [Maximum-distance-to-point] -\index{Maximum-distance-to-point -[curve]}\emph{Plist} - - The returned plist contains information about the maximum distance from this curve to the point given as the argument. - - - - -\item [Minimum-distance-to-curve] -\index{Minimum-distance-to-curve -[curve]}\emph{Plist} - - The returned plist contains information about the minimum distance from this curve to the curve given as the argument. - - - - -\item [Minimum-distance-to-point] -\index{Minimum-distance-to-point -[curve]}\emph{Plist} - - The returned plist contains information about the minimum distance from this curve to the point given as the argument. - - - - -\item [Minimum-radius] -\index{Minimum-radius -[curve]}\emph{Number} - - The minimum radius of curvature for the curve. A second value is also returned, which is a surface point indicating -the point on the curve where this minimum radius occurs. A third value is also returned, which is a list of additional curve -parameters where similar minimum radii occur. - - - - -\item [Normal] -\index{Normal -[curve]}\emph{3D Vector} - - The normal of the curve at the given parameter value, i.e. the vector pointing from the point -on the curve at this parameter to the center of the osculating circle at that point. if the curve has no -curvature at the given parameter, NIL is returned. - - - - -\item [Offset-point-along] -\index{Offset-point-along -[curve]}\emph{Surface point} - - Returns point at given parameter offset by given distance. - - - - -\item [On?] -\index{On? -[curve]}\emph{Boolean} - - Returns non-NIL if the given parameter lies within the parameter range of this curve. - - - - -\item [Parameter-at-length] -\index{Parameter-at-length -[curve]}\emph{Number} - - Returns the parameter representing a point offset from the start of the curve by the given length. - - - - -\item [Parameter-at-point] -\index{Parameter-at-point -[curve]}\emph{Number} - - Returns the parameter of the given point on the curve. - - - - -\item [Parameter-bounds] -\index{Parameter-bounds -[curve]}\emph{Numbers (multiple return values)} - - The minimum and maximum parameter values for this parametric curve. - - - - -\item [Plane-intersection-point] -\index{Plane-intersection-point -[curve]}\emph{Surface Point} - - First point of intersection between this curve and the plane denoted by plane-point and plane-normal - - - - -\item [Plane-intersection-points] -\index{Plane-intersection-points -[curve]}\emph{Surface Points} - - Points of intersection between this curve and the plane denoted by plane-point and plane-normal. - - - - -\item [Point] -\index{Point -[curve]}\emph{3D Point} - - The point on the curve corresponding to the given parameter value. - - - - -\item [Radius-of-curvature] -\index{Radius-of-curvature -[curve]}\emph{Number} - - The radius of curvature (i.e. radius of the osculating circle) at the given parameter. - - - - -\item [Surface-intersection-point] -\index{Surface-intersection-point -[curve]}\emph{Surface point} - - Returns the first point of intersection between this curve and the surface given as an argument. - - - - -\item [Surface-intersection-points] -\index{Surface-intersection-points -[curve]}\emph{List of Surface points} - - Returns the point(s) of intersection between this curve and the surface given as an argument. - - - - -\item [Tangent] -\index{Tangent -[curve]}\emph{3D Vector} - - The curve tangent at the given parameter value. Supplementary values returned -are: the 3D point at the parameter value. If keyword argument \texttt{:include-curvature?} is given as non-NIL, -the radius of the osculating circle, the center for the osculating circle, the normal for the osculating circle, -and the curve normal are also returned. Note: If \texttt{:include-curvature?} is given as non-NIL and the curve -has no curvature at the specified parameter, NIL is returned for each of these four values. - - - - -\item [Tangent-points] -\index{Tangent-points -[curve]}\emph{List of Plists} - - The returned list of plists contains information about the points where the tangents of this curve and the vector given as the argument -are equal. - - - - -\item [Total-length] -\index{Total-length -[curve]}\emph{Number} - - The total length of the curve from given start-parameter to given end-parameter. - - - - -\item [Trim] -\index{Trim -[curve]}\emph{GDL Curve object} - - Returns a curve which is trimmed from parameter-1 to parameter-2. - - - - -\end{description} - - - - - - - -\item \index{cylinder-solid} -\label{prim:cylinder-solid} -\textbf{cylinder-solid} - - -\textbf{ -\underline{Mixins:}} brep, cylinder - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -A right cylinder represented as a brep solid. Contains the union of messages (e.g. input-slots, computed-slots, etc) -from brep and cylinder - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - (in-package :surf) - - (define-object test-cone-solid (cone-solid) - :computed-slots - ((display-controls (list :isos (list :n-u 8 :n-v 8) :color :green)) - (length 100) (radius-1 10) (radius-2 20))) - - (generate-sample-drawing :objects (the-object (make-object 'test-cone-solid)) - :projection-direction (getf *standard-views* :trimetric)) - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for cylinder-solid} - -\label{fig:example-code-cylinder-solid} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-cylinder-solid.pdf} -\end{center} - -\caption{cylinder-solid example} - -\label{fig:cylinder-solid} - -\end{figure} - - - - - - -\item \index{decomposed-curves} -\label{prim:decomposed-curves} -\textbf{decomposed-curves} - - -\textbf{ -\underline{Mixins:}} base-object - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Given an input curve, creates a sequence of curve segments that do not contain -knots with degree-fold mutiplicity. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :surf) - - (define-object test-global-filleted-polyline-curves (global-filleted-polyline-curves) - - :computed-slots - ((default-radius 5) - (vertex-list (list (make-point 0 0 0) - (make-point 10 10 0) - (make-point 30 10 0) - (make-point 40 0 0) - (make-point 30 -10 0) - (make-point 10 -10 0) - (make-point 0 0 0)))) - - :hidden-objects - ((points :type 'point - :sequence (:size (length (rest (the vertex-list)))) - :center (nth (the-child index) (rest (the vertex-list)))))) - - - (define-object test-composed-curve (composed-curve) - :computed-slots - ((curves (the filleted-polyline-curves ordered-curves))) - - :hidden-objects - ((filleted-polyline-curves :type 'test-global-filleted-polyline-curves))) - - (define-object test-decomposed-curves (decomposed-curves) - :computed-slots - ((curve-in (the composed-curve))) - - :objects ((composed-curve :type 'test-composed-curve))) - - (generate-sample-drawing :object-roots (make-object 'test-decomposed-curves)) - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for decomposed-curves} - -\label{fig:example-code-decomposed-curves} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-decomposed-curves.pdf} -\end{center} - -\caption{decomposed-curves example} - -\label{fig:decomposed-curves} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Curve-in] -\index{Curve-in -[decomposed-curves]}\emph{GDL Curve} - - Curve (presumably multi-segment) to be decomposed. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Objects (sequence):}} - -\begin{description} - -\item [Curves] -\index{Curves -[decomposed-curves]}\emph{Sequence of GDL curve objects} - - The resulting segment curves after decomposition. - - - - -\end{description} - - - - - - - -\item \index{dropped-curve} -\label{prim:dropped-curve} -\textbf{dropped-curve} - - -\textbf{ -\underline{Mixins:}} curve - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Creates a 3D curve which is the \texttt{curve-in} dropped normally to the \texttt{surface.}. -The resulting 3D curve contains a uv-curve which is typically useful for trimming. - - -NOTE: Change from 1577p027 and forward -- the dropped curve now is a 3D curve which -can be drawn. It contains its uv representation on the surface. Previously, the uv-curve -was the actual dropped-curve. - - - - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :surf) - - (define-object test-trimmed-from-dropped-2 (trimmed-surface) - - :computed-slots - ((uv-inputs t) - (holes (list (the hole uv-curve))) - (island (the island-3d uv-curve)) - (reverse-island? t) (reverse-holes? t) - (display-controls (list :color :blue :line-thickness 2))) - - :hidden-objects - ((basis-surface :type 'test-fitted-surface - :display-controls (list :color :grey-light-very) - :grid-length 10 :grid-width 10 :grid-height 5) - - (island-3d :type 'dropped-curve - :curve-in (the raised-island) - :surface (the basis-surface)) - - (hole :type 'dropped-curve - :curve-in (the raised-hole) - :surface (the basis-surface)) - - (raised-hole :type 'b-spline-curve - :display-controls (list :color :grey-light-very) - :control-points (list (make-point 3.5 4.5 7) - (make-point 4.5 6 7) - (make-point 5.5 7 7) - (make-point 6 4.5 7) - (make-point 5.5 2 7) - (make-point 4.5 2 7) - (make-point 3.5 4.5 7))) - - (raised-island :type 'b-spline-curve - :display-controls (list :color :grey-light-very) - :control-points (list (make-point 3 5 7) - (make-point 5 8 7) - (make-point 7 10 7) - (make-point 8 5 7) - (make-point 7 0 7) - (make-point 5 0 7) - (make-point 3 5 7))))) - - (generate-sample-drawing - :objects (let ((self (make-object 'test-trimmed-from-dropped-2))) - (list (the basis-surface) self (the raised-hole) - (the raised-island))) - :projection-direction :trimetric) - - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for dropped-curve} - -\label{fig:example-code-dropped-curve} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-dropped-curve.pdf} -\end{center} - -\caption{dropped-curve example} - -\label{fig:dropped-curve} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Curve-in] -\index{Curve-in -[dropped-curve]}\emph{GDL NURBS Curve} - - The curve to be dropped to the surface. - - - - -\item [Surface] -\index{Surface -[dropped-curve]}\emph{GDL NURBS Surface} - - The surface on which the \texttt{curve-in} is to be dropped. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Computed slots:}} - -\begin{description} - -\item [Built-from] -\index{Built-from -[dropped-curve]}\emph{GDL Curve} - - Specify this if you want this curve to be a clone of -an existing curve. (note - this uses a shared underlying curve object, -it does not make a copy) - - - - -\end{description} - - - - - - -\textbf{ -\underline{Hidden objects:}} - -\begin{description} - -\item [Uv-curve] -\index{Uv-curve -[dropped-curve]}\emph{GDL Curve object} - - The corresponding UV curve for the primary surface on which this curve lies, if any. If -this is not a surface-curve, this will return an error. - - - - -\end{description} - - - - - - - -\item \index{dual-blend-surface} -\label{prim:dual-blend-surface} -\textbf{dual-blend-surface} - - -\textbf{ -\underline{Mixins:}} general-dual-blend-surface, vanilla-mixin - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Creates a smooth blend-surface between curve-1, lying on surface-1 and curve-2 on surface-2. The local start and end directions of this surface along curve-1 and curve-2 are determined from the cross-product between the tangent of these curves and the corresponding surface-normal at the same point. In this fashion a tangent blend is created between surface-1 and surface-2 that extends in a direction perpendicular to the input-curves. Takes the same inputs as general-dual-blend-surface, except for f-tangent-1 and f-tangent-2. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :surf) - - (define-object test-d-b-s (base-object) - - :objects - ((d-b-s :type 'dual-blend-surface - :display-controls (list :color :green) - :pass-down (curve-1 surface-1 curve-2 surface-2)) - - - (surf-1-top :type 'linear-curve - :hidden? t - :start (make-point -5 -5 0) - :end (make-point 5 -5 0)) - - (surf-1-bottom :type 'linear-curve - :hidden? t - :start (make-point -7 -10 -2) - :end (make-point 7 -10 -2)) - - (surface-1 :type 'ruled-surface - :curve-1 (the surf-1-top) - :curve-2 (the surf-1-bottom)) - - (curve-1 :type 'iso-curve - :display-controls (list :color :red :line-thickness 4) - :surface (the surface-1) - :parameter 0 - :u-or-v :v) - - - (surf-2-bottom :type 'linear-curve - :hidden? t - :start (make-point -5 5 0) - :end (make-point 5 5 0)) - - (surf-2-top :type 'linear-curve - :hidden? t - :start (make-point -7 10 2) - :end (make-point 7 10 2)) - - (surface-2 :type 'ruled-surface - :curve-1 (the surf-2-bottom) - :curve-2 (the surf-2-top)) - - (curve-2 :type 'iso-curve - :display-controls (list :color :blue :line-thickness 4) - :surface (the surface-2) - :parameter 0 - :u-or-v :v))) - - (generate-sample-drawing :object-roots (list (make-object 'test-d-b-s)) - :projection-direction (getf *standard-views* :top)) - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for surf::dual-blend-surface} - -\label{fig:example-code-surf::dual-blend-surface} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-dual-blend-surface.pdf} -\end{center} - -\caption{surf::dual-blend-surface example} - -\label{fig:surf::dual-blend-surface} - -\end{figure} - - - - - -\textbf{ -\underline{Computed slots:}} - -\begin{description} - -\item [F-tangent-1] -\index{F-tangent-1 -[dual-blend-surface]}\emph{Input-function} - - Parametric function defined from 0 to 1 that outputs the blend-surface's local direction vector along curve-1. The input value of 0 corresponds to the start of curve-1, 1 to the end of curve-1. - - - - -\item [F-tangent-2] -\index{F-tangent-2 -[dual-blend-surface]}\emph{Input-function} - - Parametric function defined from 0 to 1 that outputs the blend-surface's local direction vector along curve-2. The input value of 0 corresponds to the start of curve-2, 1 to the end of curve-2. - - - - -\end{description} - - - - - - - -\item \index{edge} -\label{prim:edge} -\textbf{edge} - - -\textbf{ -\underline{Mixins:}} curve - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Represents one edge in a brep. This object is a type of curve and answers all curve messages. - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Computed slots:}} - -\begin{description} - -\item [Faces] -\index{Faces -[edge]}\emph{List of GDL Face objects} - - The faces connected to this edge. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Gdl functions:}} - -\begin{description} - -\item [Uv-curve] -\index{Uv-curve -[edge]}\emph{GDL Curve object} - - This represents the UV curve for this edge on the given surface. -Note that you have to pass in the surface, which should be the basis-surface of a face connected -to this edge. The GDL edge object will be supplemented with a sequence of faces which are connected -with this edge. - - - - -\end{description} - - - - - - - -\item \index{edge-blend-surface} -\label{prim:edge-blend-surface} -\textbf{edge-blend-surface} - - -\textbf{ -\underline{Mixins:}} general-dual-blend-surface, vanilla-mixin - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Creates a smooth blend-surface between curve-1, lying on surface-1 and curve-2 on surface-2. - -Note that curve-1 and curve-2 have to be so-called on-surface curves, which means they must answer a uv-curve message which is the UV representation of the curve on the given surface. The most common way to establish an on-surface curve is to use an iso-curve to begin with, or to use a projected-curve or dropped-curve to ensure that the curve is indeed an on-surface curve. - -The local start and end directions of this surface at any point along curve-1 and curve-2 are determined from the cross-product between the tangent to the surface's u- or v-iso-curve (the one that is closest to being parallel to curve-1 or curve-2) at this point and the corresponding surface-normal at the same point. In this fashion a tangent blend is created between surface-1 and surface-2 that extends in a direction that follows and smoothly interpolates both surface's iso-curves. Takes the same inputs as general-dual-blend-surface, except for f-tangent-1 and f-tangent-2. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :surf) - - (define-object test-e-b-s (base-object) - - - :objects - ((e-b-s :type 'edge-blend-surface - :display-controls (list :color :green) - :curve-side-1 :left-side - :curve-side-2 :left-side - :pass-down (curve-1 surface-1 curve-2 surface-2)) - - - (surf-1-top :type 'linear-curve - :hidden? t - :start (make-point -5 -5 0) - :end (make-point 5 -5 0)) - - (surf-1-bottom :type 'linear-curve - :hidden? t - :start (make-point -7 -10 -2) - :end (make-point 7 -10 -2)) - - (surface-1 :type 'ruled-surface - :curve-1 (the surf-1-top) - :curve-2 (the surf-1-bottom)) - - (curve-1 :type 'iso-curve - :display-controls (list :color :red :line-thickness 4) - :surface (the surface-1) - :parameter 0 - :u-or-v :v) - - (surf-2-bottom :type 'linear-curve - :hidden? t - :start (make-point -5 5 0) - :end (make-point 5 5 0)) - - (surf-2-top :type 'linear-curve - :hidden? t - :start (make-point -7 10 2) - :end (make-point 7 10 2)) - - (surface-2 :type 'ruled-surface - :curve-1 (the surf-2-bottom) - :curve-2 (the surf-2-top)) - - (curve-2 :type 'iso-curve - :display-controls (list :color :blue :line-thickness 4) - :surface (the surface-2) - :parameter 0 - :u-or-v :v))) - - (generate-sample-drawing :object-roots (list (make-object 'test-e-b-s)) - :projection-direction (getf *standard-views* :top)) - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for edge-blend-surface} - -\label{fig:example-code-edge-blend-surface} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-edge-blend-surface.pdf} -\end{center} - -\caption{edge-blend-surface example} - -\label{fig:edge-blend-surface} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Curve-1-uv] -\index{Curve-1-uv -[edge-blend-surface]}\emph{GDL UV curve object} - - Defaults to the curve-1 uv-curve. - - - - -\item [Curve-2-uv] -\index{Curve-2-uv -[edge-blend-surface]}\emph{GDL UV curve object} - - Defaults to the curve-2 uv-curve. - - - - -\item [Curve-side-1] -\index{Curve-side-1 -[edge-blend-surface]}\emph{Keyword} - - Used to specify the side w.r.t curve-1 in which the tangent blend-surface is to extend. Takes either :right-side or :left-side as input. Defaults to :right-side. - - - - -\item [Curve-side-2] -\index{Curve-side-2 -[edge-blend-surface]}\emph{Keyword} - - Used to specify the side w.r.t curve-2 in which the tangent blend-surface is to extend. Takes either :right-side or :left-side as input. Defaults to :right-side. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Computed slots:}} - -\begin{description} - -\item [F-tangent-1] -\index{F-tangent-1 -[edge-blend-surface]}\emph{Input-function} - - Parametric function defined from 0 to 1 that outputs the blend-surface's local direction vector along curve-1. The input value of 0 corresponds to the start of curve-1, 1 to the end of curve-1. - - - - -\item [F-tangent-2] -\index{F-tangent-2 -[edge-blend-surface]}\emph{Input-function} - - Parametric function defined from 0 to 1 that outputs the blend-surface's local direction vector along curve-2. The input value of 0 corresponds to the start of curve-2, 1 to the end of curve-2. - - - - -\end{description} - - - - - - - -\item \index{elliptical-curve} -\label{prim:elliptical-curve} -\textbf{elliptical-curve} - - -\textbf{ -\underline{Mixins:}} curve, ellipse - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -An ellipse represented exactly as a quintic NURBS curve. Inputs are the same as for ellipse. -Messages are the union of those for ellipse and those for curve. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :surf) - - (define-object test-elliptical-curve (elliptical-curve) - :computed-slots - ((center (make-point 0 0 0)) - (major-axis-length 10) - (minor-axis-length 5) - (start-angle 0) - (end-angle 2pi))) - - (generate-sample-drawing :objects (make-object 'test-elliptical-curve)) - - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for elliptical-curve} - -\label{fig:example-code-elliptical-curve} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-elliptical-curve.pdf} -\end{center} - -\caption{elliptical-curve example} - -\label{fig:elliptical-curve} - -\end{figure} - - - - - - -\item \index{extended-curve} -\label{prim:extended-curve} -\textbf{extended-curve} - - -\textbf{ -\underline{Mixins:}} curve - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Creates an extended curve extending its start or end (\texttt{u1} and \texttt{u2}). - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :gdl-user) - - (define-object test-extended-curve () - - :objects - ((b-spline-curve :type 'b-spline-curve - :display-controls (list :color :black :line-thickness 3.0) - :control-points (list (make-point -2.0 0.0 0.0) - (make-point 0.0 1.0 0.0) - (make-point 1.0 0.0 0.0) - (make-point 0.0 -1.0 0.0))) - - - (extended-curve-G1 :type 'extended-curve - :curve-in (the b-spline-curve) - :distance 2.5 - :distance-type :absolute - :extending-from :start - :continuity :g1 - :display-controls (list :color :red)) - - (extended-curve-G2 :type 'extended-curve - :curve-in (the b-spline-curve) - :distance 2.5 - :distance-type :absolute - :extending-from :start - :continuity :g2 - :display-controls (list :color :green)) - - (extended-curve-Cmax :type 'extended-curve - :curve-in (the b-spline-curve) - :distance 2.5 - :distance-type :absolute - :extending-from :start - :continuity :cmax - :display-controls (list :color :blue)))) - - (generate-sample-drawing :object-roots (make-object 'test-extended-curve)) - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for extended-curve} - -\label{fig:example-code-extended-curve} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-extended-curve.pdf} -\end{center} - -\caption{extended-curve example} - -\label{fig:extended-curve} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Curve-in] -\index{Curve-in -[extended-curve]}\emph{GDL Curve Object} - - The underlying curve from which to build this curve. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Continuity] -\index{Continuity -[extended-curve]}\emph{Keyword} - - Specified the extention continuity. If :g1 the curve is extended by a linear segment. Curve-in is at least G1(possibly C1) -where the extension joins the original curve. If :g2 the curve is extended by reflection, yielding a G2 continuous extension. -If :cmax the extension yields infinite(C) continuity at the join point(no knot there). Defaults to the \texttt{:g2}. - - - - -\item [Distance] -\index{Distance -[extended-curve]}\emph{Number} - - Specified the distance to which the curve is extended. - - - - -\item [Distance-type] -\index{Distance-type -[extended-curve]}\emph{Keyword} - - Specified if the distance is an absolute distance \texttt{:absolute} or the distance is scaled by the curve's arc length -to yield the desired extension distance \texttt{:relative}. Defaults to the \texttt{:absolute}. - - - - -\item [Extending-from] -\index{Extending-from -[extended-curve]}\emph{Keyword} - - Specified from which end the curve to be extended. If :start the curve is extended back from its start point. -If :end the the curve is extended forward from its end point. Defaults to the \texttt{:start}. - - - - -\end{description} - - - - - - - -\item \index{extended-surface} -\label{prim:extended-surface} -\textbf{extended-surface} - - -\textbf{ -\underline{Mixins:}} surface - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Extends a surface to a curve, so that curve will -become one of the new boundaries for the surface. Continuity is controlled via -options. Note that in the example, extended and extended-2 do not give a smooth -transition to the extended part of the surface because the original surface -is only degree 1 in the direction of extension. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :gdl-user) - - (define-object extended-surface-test (base-object) - - :computed-slots - ((regression-test-data (list (multiple-value-list (the extended b-spline-data)) - (multiple-value-list (the extended-2 b-spline-data)) - (multiple-value-list (the extended-3 b-spline-data)) - (multiple-value-list (the extended-4 b-spline-data)))) - - (display-list-objects (list (the loft) - (the extended) - (the extended-2)))) - - :objects - ((test3 :type 'linear-curve - :start (make-point 0 0 0) - :end (make-point 10 0 0)) - - (test4 :type 'linear-curve - :start (make-point 0 10 0) - :end (make-point 10 10 0)) - - - (mid-1 :type 'linear-curve - :start (make-point 0 5.0 1) - :end (make-point 10 5.0 1)) - - (mid-2 :type 'linear-curve - :start (make-point 0 8.0 1) - :end (make-point 10 8.0 1)) - - (bridge-1 :type 'b-spline-curve - :control-points (list (make-point 0 0 0) - (make-point -2 5.0 3) - (make-point -2 8.0 3) - (make-point 0 10 0))) - (bridge-2 :type 'b-spline-curve - :control-points (list (make-point 10 0 0) - (make-point 12 5.0 5) - (make-point 12 8.0 5) - (make-point 10 10 0))) - - (bridge-3 :type 'b-spline-curve - :control-points (list (make-point 0 -1 0) - (make-point 3 -1 5) - (make-point 7 -1 5) - (make-point 10 -1 0))) - - - (loft :type 'lofted-surface - :curves (list (the test3) (the mid-1) - (the mid-2) (the test4))) - - (extended :type 'extended-surface - :display-controls (list :color :red :line-thickness 2) - :surface (the loft) - :curve (the bridge-1) - :direction :v - :which-end :start) - - (extended-2 :type 'extended-surface - :display-controls (list :color :green :line-thickness 2) - :surface (the loft) - :curve (the bridge-1) - :direction :v - :which-end :start - :deformation-param (+ (* 0.25 (- (the-child surface v-max) - (the-child surface v-min))) - (the-child surface u-min))) - - (extended-3 :type 'extended-surface - :display-controls (list :color :orange - :isos (list :n-u 25 :n-v 25)) - :surface (the loft) - :curve (the bridge-3) - :direction :u - :continuity :cmax - :which-end :start) - - (extended-4 :type 'extended-surface - :display-controls (list :color :blue - :isos (list :n-u 25 :n-v 25)) - :surface (the loft) - :curve (the bridge-3) - :direction :u - :deformation-param (+ (* 0.25 (- (the-child surface u-max) - (the-child surface u-min))) - (the-child surface u-min)) - :continuity :cmax - :which-end :start))) - - (generate-sample-drawing :objects (the-object (make-object 'extended-surface-test) - display-list-objects) - :projection-direction (getf *standard-views* :trimetric)) - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for extended-surface} - -\label{fig:example-code-extended-surface} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-extended-surface.pdf} -\end{center} - -\caption{extended-surface example} - -\label{fig:extended-surface} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Curve] -\index{Curve -[extended-surface]}\emph{GDL curve object} - - The curve to which the surface should be extended. - - - - -\item [Surface] -\index{Surface -[extended-surface]}\emph{GDL surface object} - - The surface to be extended. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Continuity] -\index{Continuity -[extended-surface]} - -Keyword symbol, if deformation-param is given this can -be one of :c1, :c2, or :cmax, and if deformation-param is not -given this can be one of :g1 or :cmax. Default is :c1 if -deformation-param is given and :g1 if deformation-param is -not given. - - - - -\item [Deformation-param] -\index{Deformation-param -[extended-surface]}\emph{Number, either a U or a V surface parameter} - - This value, if given, controls how -far inward from the affected boundary the surface is modified. If (the direction) -is :u, then this will be a U parameter, and likewise if (the direction) is :v, -then this will be a V parameter. Default is nil which indicates no specific -control over any deformation. - - - - -\item [Direction] -\index{Direction -[extended-surface]}\emph{Keyword symbol, one of :u or :v} - - The direction of extension. Note that if -deformation-param is given, it will be a U parameter if this input :u, -and a V parameter if this input is :v. Default is :u. - - - - -\item [Which-end] -\index{Which-end -[extended-surface]}\emph{Keyword symbol, one of :start or :end} - - Default is :start. - - - - -\end{description} - - - - - - - -\item \index{extruded-solid} -\label{prim:extruded-solid} -\textbf{extruded-solid} - - -\textbf{ -\underline{Mixins:}} brep - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Generates a brep by extruding a profile along an axis vector. - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Profile] -\index{Profile -[extruded-solid]}\emph{GDL Curve object} - - The profile to be extruded into a solid. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Axis-vector] -\index{Axis-vector -[extruded-solid]}\emph{3D Vector} - - The direction of extrusion. Defaults -to (the (face-normal-vector :top)) - - - - -\item [Brep-tolerance] -\index{Brep-tolerance -[extruded-solid]}\emph{Number} - - Overall tolerance for the created brep solid. Defaults to nil. -Note that a value of nil indicates for SMLib a value of 1.0e-05 of the longest diagonal -length of the brep. - - - - -\item [Distance] -\index{Distance -[extruded-solid]}\emph{Number} - - The distance to extrude the profile along the axis-vector. -Defaults to (the height). - - - - -\end{description} - - - - - - - -\item \index{face} -\label{prim:face} -\textbf{face} - - -\textbf{ -\underline{Mixins:}} surface - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -This object represents a (possibly) trimmed surface contained within a brep. It answers -all the local messages of face, and it has surface mixed in as well, so it will answer all the surface messages. Note -however that the local surface messages will operate on the basis, not on the trimmed representation. The messages -for face will operate on the trimmed representation. - -This object is not meant for direct instantiation; rather, a brep will contain a quantified set of faces (called "faces"), -and trimmed surface also mixes in face, so a trimmed-surface will answer all the face messages. - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Brep] -\index{Brep -[face]}\emph{GDL Brep object} - - This is the brep object which contains this face object. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Basis-surface] -\index{Basis-surface -[face]}\emph{GDL NURBS Surface} - - The underlying surface, before any trimming takes place. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Computed slots:}} - -\begin{description} - -\item [Bounding-box] -\index{Bounding-box -[face]}\emph{List of two 3D points} - - The left front bottom and right rear top corners, in global coordinates, -of the rectangular volume bounding the tree of geometric objects rooted at this object. - - - - -\item [U-iso-curves] -\index{U-iso-curves -[face]}\emph{Sequence of curve objects} - - The isoparametric curves in the U direction. - - - - -\item [V-iso-curves] -\index{V-iso-curves -[face]}\emph{Sequence of curve objects} - - The isoparametric curves in the V direction. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Hidden objects (sequence):}} - -\begin{description} - -\item [Edges] -\index{Edges -[face]}\emph{Sequence of GDL Edge Objects} - - The Edges contained within this brep. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Gdl functions:}} - -\begin{description} - -\item [Area] -\index{Area -[face]}\emph{Number} - - Returns the area of the face. - - - - -\item [Area-moments-of-inertia] -\index{Area-moments-of-inertia -[face]}\emph{3D Vector (ie 3D Point)} - - Returns the Area Moments of Inertia of the face. - - - - -\item [Area-products-of-inertia] -\index{Area-products-of-inertia -[face]}\emph{3D Vector (ie 3D Point)} - - Returns the Area Products of Inertia of the face. - - - - -\item [Area-second-moment-about-coordinate-axii] -\index{Area-second-moment-about-coordinate-axii -[face]}\emph{3D Vector (ie 3D Point)} - - Returns the Area Second Moment About Coordinate Axii of the face. - - - - -\item [Area-static-moments] -\index{Area-static-moments -[face]}\emph{3D Vector (ie 3D Point)} - - Returns the Area Static Moments of the face. - - - - -\item [Moments] -\index{Moments -[face]}\emph{Plist} - - Returns the moments of the face. The plist contains keys: :area-static-moments, :area-moments-of-inertia, :area-products-of-inertia, :area-second-moment-about-coordinate-axii, :volume-static-moments, :volume-moments-of-inertia, :volume-products-of-inertia, and :volume-second-moment-about-coordinate-axii. - - - - -\item [Precise-properties] -\index{Precise-properties -[face]}\emph{Multiple values: Number, Number, and Plist} - - Returns the area, volume, and moments of the face. -The moments are labeled as: :area-static-moments, :area-moments-of-inertia, :area-products-of-inertia, :area-second-moment-about-coordinate-axii, :volume-static-moments, :volume-moments-of-inertia, :volume-products-of-inertia, and :volume-second-moment-about-coordinate-axii. - - - - -\item [Volume] -\index{Volume -[face]}\emph{Number} - - Returns the volume of the face. - - - - -\item [Volume-moments-of-inertia] -\index{Volume-moments-of-inertia -[face]}\emph{3D Vector (ie 3D Point)} - - Returns the Volume Moments of Inertia of the face. - - - - -\item [Volume-products-of-inertia] -\index{Volume-products-of-inertia -[face]}\emph{3D Vector (ie 3D Point)} - - Returns the Volume Products of Inertia of the face. - - - - -\item [Volume-second-moment-about-coordinate-axii] -\index{Volume-second-moment-about-coordinate-axii -[face]}\emph{3D Vector (ie 3D Point)} - - Returns the Volume Second Moment about Coordinate Axii of the face. - - - - -\item [Volume-static-moments] -\index{Volume-static-moments -[face]}\emph{3D Vector (ie 3D Point)} - - Returns the Volume Static Moments of the face. - - - - -\end{description} - - - - - - - -\item \index{fitted-curve} -\label{prim:fitted-curve} -\textbf{fitted-curve} - - -\textbf{ -\underline{Mixins:}} curve - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Fits a curve through a set of points with given degree -and parameterization. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - (in-package :surf) - - (define-object test-fitted-curve (fitted-curve) - - :computed-slots - ((points (the circle (equi-spaced-points 20)))) - - :hidden-objects ((circle :type 'circle :radius 10) - (spheres :type 'sphere - :sequence (:size (length (the points))) - :radius 0.2 - :center (nth (the-child :index) (the points)) - :display-controls (list :color :blue-neon)))) - - - (generate-sample-drawing :objects (let ((self (make-object 'test-fitted-curve))) - (cons self (list-elements (the spheres))))) - - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for fitted-curve} - -\label{fig:example-code-fitted-curve} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-fitted-curve.pdf} -\end{center} - -\caption{fitted-curve example} - -\label{fig:fitted-curve} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Points] -\index{Points -[fitted-curve]}\emph{List of 3D Points} - - The points for fitting. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Degree] -\index{Degree -[fitted-curve]}\emph{Integer} - - The desired degree of the resultant curve. Default is 3, unless there are fewer than four control point given, -in which case it one less than the number of control points. - - - - -\item [Interpolant?] -\index{Interpolant? -[fitted-curve]}\emph{Boolean} - - Indicates whether the curve will interpolate the points. Defaults to T . - - - - -\item [Local?] -\index{Local? -[fitted-curve]}\emph{Boolean} - - Indicates whether the inputted control-points should be considered in local coordinate system of this object. Default is nil. - - - - -\item [Parameterization] -\index{Parameterization -[fitted-curve]}\emph{Keyword symbol, one of :uniform, :chord-length, :centripetal} - - The parameterization to use in the resultant curve. -Default is :centripetal. Note that the NLib documentation states that when specifying vectors and a vector-type of \texttt{:tangents} -or \texttt{:first-last}, \texttt{:chord-length} is a recommended value for parameterization. If vectors are used and the vector-type -is \texttt{:normals}, this input has no effect. The default is \texttt{:chord-length} - - - - -\item [Tolerance] -\index{Tolerance -[fitted-curve]}\emph{Number or nil} - - The allowed tolerance for doing data reduction after the initial fitting. -A \texttt{nil} value indicates that no data reduction is to be attempted. Defaults to nil. - - - - -\item [Vector-type] -\index{Vector-type -[fitted-curve]}\emph{Keyword symbol, one of \texttt{:tangents}, \texttt{:normals}, or \texttt{:first-last}} - -\texttt{:Tangents} indicates that the \texttt{:vectors} specify -a tangent vector at each point (there should be one vector for each point), -\texttt{:normals} indicates that the \texttt{:vectors} specify a normal vector at each -point (there should be one vector for each point), and -\texttt{:first-last} indicates that the \texttt{:vectors} specify the starting and ending -tangent (in this case there should be two vectors in the \texttt{:vectors} list. Default is \texttt{:tangents}.) - - - - -\item [Vectors] -\index{Vectors -[fitted-curve]}\emph{List of 3D Vectors} - - Optional list of vectors used to influence the fitting. Default is NIL. - - - - -\end{description} - - - - - - - -\item \index{fitted-surface} -\label{prim:fitted-surface} -\textbf{fitted-surface} - - -\textbf{ -\underline{Mixins:}} surface - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Fits a surface through a net of points with given degrees and parameterizations. Currently -only interpolated surfaces are supported, this will be extended to allow smooth fitting without the surface necessarily -interpolating (going through) each of the points. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :gdl-user) - - (define-object c11-test (surface) - - :input-slots () - - :computed-slots () - - :objects - ((surf-test :type 'fitted-surface - :hidden nil - :c11? t - :points (list (list (make-point -1 0 0) - (make-point 0 0 0) - (make-point 0.001 0.0 0) - (make-point 1 1 0) - (make-point 1.001 1 0) - (make-point 2 1 0) - (make-point 2.001 1 0) - (make-point 3 2 0) - (make-point 3.001 2.001 0) - (make-point 4 3 0) - (make-point 5 4 0)) - (list - (make-point -1 0 1) - (make-point 0 0 1) - (make-point 0.001 0.0 1) - (make-point 1 1 1) - (make-point 1.001 1 1) - (make-point 2 1 1) - (make-point 2.001 1 1) - (make-point 3 2 1) - (make-point 3.001 2.001 1) - (make-point 4 3 1) - (make-point 5 4 1)))))) - - - (define-object test-fitted-surface (fitted-surface) - - :input-slots - ((display-controls (list :color :green-spring :isos (list :n-v 19 :n-u 19))) - - (grid-width 4 :settable) (grid-length 4 :settable) (grid-height 4 :settable)) - - :computed-slots - ((points (list (list (make-point 0 0 0) - (make-point (/ (the grid-width) 4) 0 0) - (make-point (half (the grid-width)) 0 0) - (make-point (* 3/4 (the grid-width)) 0 0) - (make-point (the grid-width) 0 0)) - - (list (make-point 0 (/ (the grid-length) 4) 0) - (make-point (/ (the grid-width) 4) - (/ (the grid-length) 4) - (/ (the grid-height) 4)) - (make-point (half (the grid-width)) - (/ (the grid-length) 4) - (* (/ (the grid-height) 4) 1.6)) - (make-point (* 3/4 (the grid-width)) - (/ (the grid-length) 4) - (/ (the grid-height) 4)) - (make-point (the grid-width) - (/ (the grid-length) 4) 0)) - - (list (make-point 0 (half (the grid-length)) 0) - (make-point (/ (the grid-width) 4) - (half (the grid-length)) - (* (/ (the grid-height) 4) 1.8)) - (make-point (half (the grid-width)) - (half (the grid-length)) - (the grid-height)) - (make-point (* 3/4 (the grid-width)) - (half (the grid-length)) - (* 3/4 (the grid-height))) - (make-point (the grid-width) (half (the grid-length)) 0)) - - (list (make-point 0 (* 3/4 (the grid-length)) 0) - (make-point (/ (the grid-width) 4) - (* 3/4 (the grid-length)) - (min (* (/ (the grid-height) 4) - (* (/ (the grid-height) 4) 1.4)) - (the grid-height))) - (make-point (half (the grid-width)) - (* 3/4 (the grid-length)) - (min (* (/ (the grid-height) 4) - (* (/ (the grid-height) 4) 1.8)) - (the grid-height))) - (make-point (* 3/4 (the grid-width)) - (* 3/4 (the grid-length)) - (/ (the grid-height) 4)) - (make-point (the grid-width) - (* 3/4 (the grid-length)) 0)) - - (list (make-point 0 (the grid-length) 0) - (make-point (/ (the grid-width) 4) (the grid-length) 0) - (make-point (half (the grid-width)) (the grid-length) 0) - (make-point (* 3/4 (the grid-width)) (the grid-length) 0) - (make-point (the grid-width) (the grid-length) 0)))))) - - (generate-sample-drawing :objects (make-object 'test-fitted-surface) - :projection-direction :trimetric) - - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for fitted-surface} - -\label{fig:example-code-fitted-surface} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-fitted-surface.pdf} -\end{center} - -\caption{fitted-surface example} - -\label{fig:fitted-surface} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Points] -\index{Points -[fitted-surface]}\emph{List of lists of 3D Points} - - The points for fitting, with inner lists representing U direction and outer lists V direction. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [C11?] -\index{C11? -[fitted-surface]}\emph{Boolean} - - If interpolated, indicates whether to compute a C11 continuous nonrational bicubic NURBS surface. Defaults to nil. - - - - -\item [Interpolant?] -\index{Interpolant? -[fitted-surface]}\emph{Boolean} - - Indicates whether the surface will interpolate the points. Defaults to t. - - - - -\item [Normals] -\index{Normals -[fitted-surface]}\emph{List of 3D vectors of same length as points, or nil} - - If given, these are the surface normals at each point. - - - - -\item [Parameterization] -\index{Parameterization -[fitted-surface]}\emph{Keyword symbol, one of :uniform, :chord-length, :centripetal} - - The parameterization to use in the resultant surface if -interpolant? is t. Default is :chord-length - - - - -\item [Tangent-method] -\index{Tangent-method -[fitted-surface]}\emph{Keyword symbol, one of :bessel, :akima} - - The method used to compute tangents. Defaults to :akima. - - - - -\item [Tolerance] -\index{Tolerance -[fitted-surface]}\emph{Number} - - Tolerance for fit. Defaults to *3d-approximation-tolerance-default*. - - - - -\item [U-degree] -\index{U-degree -[fitted-surface]}\emph{Integer} - - The desired degree of the resultant surface in the U direction. Default is 3. - - - - -\item [U-start] -\index{U-start -[fitted-surface]}\emph{Integer} - - The starting degree for the fit algorithm in the U direction. Default is 1. - - - - -\item [V-degree] -\index{V-degree -[fitted-surface]}\emph{Integer} - - The desired degree of the resultant surface in the V direction. Default is 3. - - - - -\item [V-start] -\index{V-start -[fitted-surface]}\emph{Integer} - - The starting degree for the fit algorithm in the V direction. Default is 1. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Computed slots:}} - -\begin{description} - -\item [Bounding-box] -\index{Bounding-box -[fitted-surface]}\emph{List of two 3D points} - - The left front bottom and right rear top corners, in global coordinates, -of the rectangular volume bounding the tree of geometric objects rooted at this object. - - - - -\end{description} - - - - - - - -\item \index{general-dual-blend-surface} -\label{prim:general-dual-blend-surface} -\textbf{general-dual-blend-surface} - - -\textbf{ -\underline{Mixins:}} b-spline-surface - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Creates a smooth blend-surface between curve-1, lying on surface-1 and curve-2 on surface-2. The local start and end directions of this surface along curve-1 and curve-2 are specified by the user with parametric functions. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :surf) - - (define-object test-g-d-b-s (base-object) - - :computed-slots - ((f-tangent-1 #'(lambda(param) - (rotate-vector-d - (the (face-normal-vector :top)) - -10 - (the curve-1 (tangent param))))) - - - (f-tangent-2 #'(lambda(param) - (rotate-vector-d - (the (face-normal-vector :bottom)) - 10 - (the curve-2 (tangent param))))) - - (f-ratio-1 #'(lambda(param) - (declare (ignore param)) - 1/3)) - - (f-ratio-2 #'(lambda(param) - (declare (ignore param)) - 1/3))) - - :objects - ((g-d-b-s :type 'general-dual-blend-surface - :display-controls (list :color :green) - :pass-down (f-tangent-1 - f-tangent-2 f-ratio-1 f-ratio-2 - curve-1 surface-1 curve-2 surface-2)) - - (surf-1-top :type 'linear-curve - :hidden? t - :start (make-point -5 -5 0) - :end (make-point 5 -5 0)) - - (surf-1-bottom :type 'linear-curve - :hidden? t - :start (make-point -7 -10 -2) - :end (make-point 7 -10 -2)) - - (surface-1 :type 'ruled-surface - :curve-1 (the surf-1-top) - :curve-2 (the surf-1-bottom)) - - (curve-1 :type 'iso-curve - :display-controls (list :color :red :line-thickness 4) - :surface (the surface-1) - :parameter 0 - :u-or-v :v) - - (surf-2-bottom :type 'linear-curve - :hidden? t - :start (make-point -5 5 0) - :end (make-point 5 5 0)) - - (surf-2-top :type 'linear-curve - :hidden? t - :start (make-point -7 10 2) - :end (make-point 7 10 2)) - - (surface-2 :type 'ruled-surface - :curve-1 (the surf-2-bottom) - :curve-2 (the surf-2-top)) - - (curve-2 :type 'iso-curve - :display-controls (list :color :blue :line-thickness 4) - :surface (the surface-2) - :parameter 0 - :u-or-v :v))) - - (generate-sample-drawing :object-roots (list (make-object 'test-g-d-b-s)) - :projection-direction (getf *standard-views* :trimetric)) - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for surf::general-dual-blend-surface} - -\label{fig:example-code-surf::general-dual-blend-surface} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-general-dual-blend-surface.pdf} -\end{center} - -\caption{surf::general-dual-blend-surface example} - -\label{fig:surf::general-dual-blend-surface} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Curve-1] -\index{Curve-1 -[general-dual-blend-surface]}\emph{GDL curve} - - Curve lying on surface-1 that forms the starting-edge of the blend-surface - - - - -\item [Curve-2] -\index{Curve-2 -[general-dual-blend-surface]}\emph{GDL curve} - - Curve lying on surface-2 that forms the ending-edge of the blend-surface - - - - -\item [F-tangent-1] -\index{F-tangent-1 -[general-dual-blend-surface]}\emph{Input-function} - - Parametric function defined from 0 to 1 that outputs the blend-surface's local direction vector along curve-1. The input value of 0 corresponds to the start of curve-1, 1 to the end of curve-1. - - - - -\item [F-tangent-2] -\index{F-tangent-2 -[general-dual-blend-surface]}\emph{Input-function} - - Parametric function defined from 0 to 1 that outputs the blend-surface's local direction vector along curve-2. The input value of 0 corresponds to the start of curve-2, 1 to the end of curve-2. - - - - -\item [Surface-1] -\index{Surface-1 -[general-dual-blend-surface]}\emph{GDL surface} - - Surface that is to be connected to surface-2 by the blend-surface - - - - -\item [Surface-2] -\index{Surface-2 -[general-dual-blend-surface]}\emph{GDL surface} - - Surface that is to be connected to surface-1 by the blend-surface - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [F-ratio-1] -\index{F-ratio-1 -[general-dual-blend-surface]}\emph{Input-function} - - Parametric function defined from 0 to 1 that outputs the blend-surface's local blend-ratio along curve-1. The input value of 0 corresponds to the start of curve-1, 1 to the end of curve-1. The output local blend-ratio can be any number greater than 0, but the resulting blend surface can become erratic for values greater than 1. Defaults to a constant value of 1/3. - - - - -\item [F-ratio-2] -\index{F-ratio-2 -[general-dual-blend-surface]}\emph{Input-function} - - Parametric function defined from 0 to 1 that outputs the blend-surface's local blend-ratio along curve-2. The input value of 0 corresponds to the start of curve-2, 1 to the end of curve-2. The output local blend-ratio can be any number greater than 0, but the resulting blend surface can become erratic for values greater than 1. Defaults to a constant value of 1/3. - - - - -\item [N-segments] -\index{N-segments -[general-dual-blend-surface]}\emph{Number} - - Number of b-spline-segments of the resulting blend-surface in the parametric direction along curve-1 and curve-2. Defaults to 50. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Computed slots:}} - -\begin{description} - -\item [Control-points] -\index{Control-points -[general-dual-blend-surface]}\emph{List of lists of 3D Points} - - The control net. - - - - -\item [U-degree] -\index{U-degree -[general-dual-blend-surface]}\emph{Integer} - - Degree of surface in U direction. Defaults to 3. - - - - -\item [U-knot-vector] -\index{U-knot-vector -[general-dual-blend-surface]}\emph{List of Numbers} - - Knots in U direction. Default is NIL, which indicates a uniform knot vector in U direction. - - - - -\item [V-degree] -\index{V-degree -[general-dual-blend-surface]}\emph{Integer} - - Degree of surface in V direction. Defaults to 3. - - - - -\end{description} - - - - - - - -\item \index{geometry-kernel-object-mixin} -\label{prim:geometry-kernel-object-mixin} -\textbf{geometry-kernel-object-mixin} - - -\textbf{ -\underline{Mixins:}} vanilla-mixin - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -This mixin provides messages common to all NURBS-based objects whose underlying implementation -comes from a modular geometry kernel such as SMLib. - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Color-decimal] -\index{Color-decimal -[geometry-kernel-object-mixin]}\emph{Vector of three real numbers} - - The RGB color of this object as imported from an external format (e.g. IGES) or as specified in :display-controls. -Defaults to the foreground color specified in \texttt{*colors-default*}. This message should not normally be overridden in user application code. - - - - -\item [Iges-level] -\index{Iges-level -[geometry-kernel-object-mixin]}\emph{Integer} - - Synonym for the layer. - - - - -\item [Layer] -\index{Layer -[geometry-kernel-object-mixin]}\emph{Integer} - - The primary IGES-compatible level (layer) on which this object resides. Defaults to the first of the levels. This -slot can be overridden in user code to specify a new layer which will be written out when this object is exported with the IGES -output-format. - - - - -\item [Levels] -\index{Levels -[geometry-kernel-object-mixin]}\emph{List of integers} - - The IGES-compatible levels (layers) on which this object resides. GDL does not currently support writing -out multiple levels (layers) through the IGES writer ; only the first of these will be output if the object is exported with -the IGES output-format (please contact Genworks if you need all levels (layers) to be written out). - - - - -\end{description} - - - - - - - -\item \index{global-filleted-polyline-curve} -\label{prim:global-filleted-polyline-curve} -\textbf{global-filleted-polyline-curve} - - -\textbf{ -\underline{Mixins:}} global-filleted-polyline-curves, composed-curve - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Provides a singular composed curve made -from a global-filleted-polyline-curves object - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Computed slots:}} - -\begin{description} - -\item [Curves] -\index{Curves -[global-filleted-polyline-curve]}\emph{List of GDL curve objects} - - These are the curves to be composed into a single curve. - - - - -\end{description} - - - - - - - -\item \index{global-filleted-polyline-curves} -\label{prim:global-filleted-polyline-curves} -\textbf{global-filleted-polyline-curves} - - -\textbf{ -\underline{Mixins:}} global-filleted-polyline - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Produces a list of linear-curves and arc-curves which represent the straight sections -and fillets of a global-filleted-polyline. Note also global-filleted-polyline-curve, which composes the segments together -into a single curve. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :gdl-user) - - (define-object test-global-filleted-polyline-curves (global-filleted-polyline-curves) - - :computed-slots - ((default-radius 5) - (vertex-list (list (make-point 0 0 0) - (make-point 10 10 0) - (make-point 30 10 0) - (make-point 40 0 0) - (make-point 30 -10 0) - (make-point 10 -10 0) - (make-point 0 0 0)))) - - :hidden-objects - ((points :type 'point - :sequence (:size (length (rest (the vertex-list)))) - :center (nth (the-child index) (rest (the vertex-list)))) - - (view :type 'base-view - :page-width (* 5 72) :page-height (* 5 72) - :objects (cons self (list-elements (the points)))))) - - (generate-sample-drawing :objects (the-object (make-object 'test-global-filleted-polyline-curves)) - :projection-direction (getf *standard-views* :trimetric)) - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for global-filleted-polyline-curves} - -\label{fig:example-code-global-filleted-polyline-curves} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-global-filleted-polyline-curves.pdf} -\end{center} - -\caption{global-filleted-polyline-curves example} - -\label{fig:global-filleted-polyline-curves} - -\end{figure} - - - - - -\textbf{ -\underline{Computed slots:}} - -\begin{description} - -\item [Ordered-curves] -\index{Ordered-curves -[global-filleted-polyline-curves]}\emph{List of GDL NURBS curve objects} - - The curve segments in the right order for chaining together. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Hidden objects (sequence):}} - -\begin{description} - -\item [Fillet-curves] -\index{Fillet-curves -[global-filleted-polyline-curves]}\emph{GDL Sequence of GDL NURBS curve objects} - - The arc-curves representing the fillets. - - - - -\item [Straight-curves] -\index{Straight-curves -[global-filleted-polyline-curves]}\emph{GDL Sequence of GDL NURBS curve objects} - - The linear-curves representing the straights. - - - - -\end{description} - - - - - - - -\item \index{iges-reader} -\label{prim:iges-reader} -\textbf{iges-reader} - - -\textbf{ -\underline{Mixins:}} base-object - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -This object will reflect the contents of an iges file containing -points, curves, surfaces, and/or breps (including trimmed surfaces) as sequences of GDL objects. - -The HarmonyWare reader creates a log file in a temporary directory. The location of this log -file is printed on the console during the reading operation. Currently this log file is -not automatically deleted, and its name is determined by the system. - - - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [File-name] -\index{File-name -[iges-reader]}\emph{String or pathname} - - The location of the IGES file to be read. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Group-trimmed-surfaces-into-brep?] -\index{Group-trimmed-surfaces-into-brep? -[iges-reader]}\emph{Boolean} - - If true, group all trimmed surfaces in the file into one B-rep. -If some trimmed surfaces are blanked, they are grouped into a second, blanked B-rep. Default is nil. - - - - -\item [Make-all-surfaces-trimmed?] -\index{Make-all-surfaces-trimmed? -[iges-reader]}\emph{Boolean} - - If true, treat all untrimmed surfaces in the file as if they are trimmed surfaces with -the natural outer boundary of the surface as the trimming loop. If used, no standalone IwSurface surface objects -will ever be returned by the reader. Default is nil. - - - - -\item [Make-single-brep?] -\index{Make-single-brep? -[iges-reader]}\emph{Boolean} - - If true, group all trimmed surfaces and B-reps in the file into one B-rep. -If some trimmed surfaces or B-reps are blanked, they are grouped into a second, blanked B-rep. Default is nil. - - - - -\item [Sew-brep-faces?] -\index{Sew-brep-faces? -[iges-reader]}\emph{Boolean} - - Indicates whether each resulting brep should have its faces sewn together. Default is (the make-single-brep?). - - - - -\end{description} - - - - - - -\textbf{ -\underline{Objects (sequence):}} - -\begin{description} - -\item [Breps] -\index{Breps -[iges-reader]}\emph{Sequence of GDL brep objects} - - The breps and trimmed surfaces (represented as breps) found in the IGES file. - - - - -\item [Curves] -\index{Curves -[iges-reader]}\emph{Sequence of GDL curve objects} - - The curves found in the IGES file. - - - - -\item [Points] -\index{Points -[iges-reader]}\emph{Sequence of GDL point objects} - - The points found in the IGES file. - - - - -\item [Surfaces] -\index{Surfaces -[iges-reader]}\emph{Sequence of GDL surface objects} - - The untrimmed ``standalone'' surfaces found in the IGES file. - - - - -\end{description} - - - - - - - -\item \index{intersected-solid} -\label{prim:intersected-solid} -\textbf{intersected-solid} - - -\textbf{ -\underline{Mixins:}} boolean-merge, vanilla-mixin - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Given two brep solids, performs the intersect Boolean between the brep and the other-brep - - - -\end{description} - - - - - - - - - -\item \index{iso-curve} -\label{prim:iso-curve} -\textbf{iso-curve} - - -\textbf{ -\underline{Mixins:}} curve - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Represents an exact iso curve on the given surface in given direction at given parameter value. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - (in-package :gdl-user) - - (define-object iso-curve-example (base-object) - :computed-slots - ((parameter 0.5)) - - :objects - ((surface :type 'surf::test-b-spline-surface) - (iso-curve :type 'iso-curve - :strings-for-display "Iso at 0.5" - :display-controls (list :color :red :line-thickness 3) - :surface (the surface) - :parameter (the parameter)))) - - - (generate-sample-drawing :object-roots (list (make-object 'iso-curve-example)) - :projection-direction (getf *standard-views* :trimetric)) - - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for iso-curve} - -\label{fig:example-code-iso-curve} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-iso-curve.pdf} -\end{center} - -\caption{iso-curve example} - -\label{fig:iso-curve} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Parameter] -\index{Parameter -[iso-curve]}\emph{Number} - - The u or v will be fixed at this value. -This should be between the min and max values for the surface in the given direction. Note that -you can check the min and max for a surface with (the u-min), (the u-max), (the v-min), or (the v-max). - - - - -\item [Surface] -\index{Surface -[iso-curve]}\emph{GDL object of type surface} - - The surface on which you want an iso curve. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Fixed-parameter] -\index{Fixed-parameter -[iso-curve]}\emph{Keyword symbol, one of :u or :v} - - This is the parameter direction which will be fixed to the -parameter value given. -Default is :u. - - - - -\item [U-or-v] -\index{U-or-v -[iso-curve]}\emph{Keyword symbol, one of :u or :v} - - This is the direction of the iso-curve. The other parameter will -be fixed on the surface at the given parameter value. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Computed slots:}} - -\begin{description} - -\item [On-surfaces] -\index{On-surfaces -[iso-curve]}\emph{List of GDL surfaces} - - For iso curve, this will contain the single surface on which the iso curve lies. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Hidden objects:}} - -\begin{description} - -\item [Uv-curve] -\index{Uv-curve -[iso-curve]} - - - - - -\end{description} - - - - - - - -\item \index{joined-surfaces} -\label{prim:joined-surfaces} -\textbf{joined-surfaces} - - -\textbf{ -\underline{Mixins:}} surface - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -This routine joins two surfaces at a common boundary. The surfaces must already be compatible in the direction of the common boundary (same knots). If the surfaces are not compatible you can use first compatible-surfaces if applicable - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :gdl-user) - - (define-object join-surfaces-test (base-object) - - :computed-slots ((surface-list (list (the surf-A) (the surf-B)))) - - :objects - ((surf-A :type 'rectangular-surface - :display-controls (list :color :green-spring-medium) - :length 10 - :width 10 ) - - (surf-B :type 'rectangular-surface - :display-controls (list :color :red) - :center (make-point 10 0 0 ) - :length 10 - :width 10 ) - - (join-A-and-B :type 'joined-surfaces - :display-controls (list :line-thickness 2) - :surface (the surf-A) - :other-surface (the surf-B)))) - - - (generate-sample-drawing :object-roots - (list (the-object (make-object 'join-surfaces-test) - join-A-and-B))) - - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for joined-surfaces} - -\label{fig:example-code-joined-surfaces} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-joined-surfaces.pdf} -\end{center} - -\caption{joined-surfaces example} - -\label{fig:joined-surfaces} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Other-surface] -\index{Other-surface -[joined-surfaces]}\emph{Gdl surface object} - - The second surface to be joined . Its u-min or v-min lays at the common boundary. - - - - -\item [Surface] -\index{Surface -[joined-surfaces]}\emph{Gdl surface object} - - The first surface to be joined. Its u-max or v-max lays at the common boundary. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Direction] -\index{Direction -[joined-surfaces]}\emph{Keyword symbol, one of :u or :v} - - If :u the common -boundary is for first surface u-max and for the second -surface u-min. Surfaces must already be compatible in -the u-direction. If :v the common boundary is for -first surface v-max and for the second surface -v-min. Surfaces must already be compatible in the -v-direction. Default is :u. - - - - -\item [Tolerance] -\index{Tolerance -[joined-surfaces]}\emph{Number} - - This is a tolerance used for Knot removal. The knot corresponding to the merged boundary has multiplicity equal to the degree. Knot removal will be attempted using this tolerance. Default is *3d-tolerance-default* - - - - -\end{description} - - - - - - - -\item \index{linear-curve} -\label{prim:linear-curve} -\textbf{linear-curve} - - -\textbf{ -\underline{Mixins:}} \%linear-curve\%, vanilla-mixin - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -A GDL NURBS Curve representing a straight line segment. The inputs are the same as -for l-line, namely \texttt{start} and \texttt{end} (3d points). - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :surf) - - (define-object test-linear-curve (linear-curve) - :computed-slots ((start (make-point 0 0 0)) (end (make-point 10 10 0)))) - - (generate-sample-drawing :objects (make-object 'test-linear-curve)) - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for linear-curve} - -\label{fig:example-code-linear-curve} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-linear-curve.pdf} -\end{center} - -\caption{linear-curve example} - -\label{fig:linear-curve} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [End] -\index{End -[linear-curve]}\emph{3D Point} - - The end point of the line, in global coordinates. - - - - -\item [Start] -\index{Start -[linear-curve]}\emph{3D Point} - - The start point of the line, in global coordinates. - - - - -\end{description} - - - - - - - -\item \index{lofted-surface} -\label{prim:lofted-surface} -\textbf{lofted-surface} - - -\textbf{ -\underline{Mixins:}} surface - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Loft of a surface through a list of curves with -various controls. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :surf) - - (define-object test-lofted-surface (base-object) - - :input-slots - ((curves (list (the curve-1) (the curve-2) (the curve-3) (the curve-4) ))) - - :objects - ((lofted-surface :type 'lofted-surface - :curves (the curves)) - - (curve-1 :type 'b-spline-curve - :display-controls (list :color :red :line-thickness 3) - :control-points (list (make-point 0 0 0) - (make-point 1 1 0) - (make-point 0 1 0) - (make-point 0 0 0) )) - - (curve-2 :type 'b-spline-curve - :display-controls (list :color :red :line-thickness 3) - :control-points (list (make-point 0 0 1) - (make-point -1 1 1) - (make-point 0 1 1) - (make-point 0 0 1) )) - - (curve-3 :type 'b-spline-curve - :display-controls (list :color :red :line-thickness 3) - :control-points (list (make-point 0 0 2) - (make-point -1 -1 2) - (make-point 0 -1 2) - (make-point 0 0 2) )) - - (curve-4 :type 'b-spline-curve - :display-controls (list :color :red :line-thickness 3) - :control-points (list (make-point 0 0 3) - (make-point 1 -1 3) - (make-point 0 -1 3) - (make-point 0 0 3) )))) - - (generate-sample-drawing :object-roots (make-object 'test-lofted-surface) - :projection-direction :trimetric) - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for lofted-surface} - -\label{fig:example-code-lofted-surface} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-lofted-surface.pdf} -\end{center} - -\caption{lofted-surface example} - -\label{fig:lofted-surface} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Curves] -\index{Curves -[lofted-surface]}\emph{List of GDL Curve objects} - - The curves through which the surface will be lofted. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Rail-1] -\index{Rail-1 -[lofted-surface]}\emph{GDL Curve object} - - Guide rail corresponding to minimum U parameter of -resulting surface. Defaults to nil. - - - - -\item [Rail-1-is-spine?] -\index{Rail-1-is-spine? -[lofted-surface]}\emph{Boolean} - - If specified as non-nil, then the rail-1 will be used -as a spine curve similar to what is described on page 462 of the NURBS book. -Default is nil. - - - - -\item [Rail-1-params] -\index{Rail-1-params -[lofted-surface]}\emph{List of curve parameters} - - The parameter value on the rail-1 which -should correspond to each respective profile curve. Defaults to the evenly -spaced parameters between the u-min and u-max of the rail-1, one for each -profile curve. - - - - -\item [Rail-2] -\index{Rail-2 -[lofted-surface]}\emph{GDL Curve object} - - Guide rail corresponding to maximum U parameter -of resulting surface. Defaults to nil. If both rail-1 and rail2 are given, -then they must be synchronized. - - - - -\item [Spine] -\index{Spine -[lofted-surface]}\emph{GDL Curve object} - - Curve to use as spine for calling ascssk. - - - - -\item [Synchronized?] -\index{Synchronized? -[lofted-surface]}\emph{Boolean} - - Set this to t if the curves already have synchronized control points. -It makes the lofted-surface much lighter-weight in terms of its control mesh. -Default is NIL (which means the lofted-surface does not assume synchronized -control points on the profile curves). - - - - -\item [Tolerance] -\index{Tolerance -[lofted-surface]}\emph{Number} - - The fitting tolerance to fit to the loft curves. -0 means to interpolate exactly. Default is 0 - - - - -\item [Use-ascssk?] -\index{Use-ascssk? -[lofted-surface]}\emph{Boolean} - - If non-nil, we use the low-level nlib ascssk directly. If nil, we use -the SMLib make-skinned-surface routine. Default is nil - - - - -\item [V-degree] -\index{V-degree -[lofted-surface]}\emph{Integer} - - The degree of the surface in the lofting direction. Defaults to 3. - - - - -\end{description} - - - - - - - -\item \index{manifold-solid} -\label{prim:manifold-solid} -\textbf{manifold-solid} - - -\textbf{ -\underline{Mixins:}} brep - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Attempts to take in a non-manifold brep and yield a manifold version. - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Brep] -\index{Brep -[manifold-solid]}\emph{GDL brep object} - - The brep to be represented as a manifold brep in this instance. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Keep-internal-faces?] -\index{Keep-internal-faces? -[manifold-solid]}\emph{Boolean} - - Indicates whether faces between two non-void regions should be kept. -Defaults to nil. - - - - -\end{description} - - - - - - - -\item \index{merged-solid} -\label{prim:merged-solid} -\textbf{merged-solid} - - -\textbf{ -\underline{Mixins:}} boolean-merge, vanilla-mixin - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Given two brep solids or a brep solid and an open face represented as a brep, -performs a merge operation. Optionally (with make-manifold? t) makes the result manifold by trimming -and throwing away extra pieces of faces and edges. - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Make-manifold?] -\index{Make-manifold? -[merged-solid]}\emph{Boolean} - - Indicates whether the resulting brep should be made into a manifold brep, with one or more regions. - - - - -\item [Sew-and-orient?] -\index{Sew-and-orient? -[merged-solid]}\emph{Boolean} - - Indicates whether we should try to sew and orient the resulting brep. Usually a good idea -and this is defaulted to t, except for merged-solid where we default this to nil. - - - - -\end{description} - - - - - - - -\item \index{native-reader} -\label{prim:native-reader} -\textbf{native-reader} - - -\textbf{ -\underline{Mixins:}} base-object - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -This object will reflect the contents of an iwp file containing -curves, surfaces, breps, and brep trees as sequences of GDL objects. - - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [File-name] -\index{File-name -[native-reader]}\emph{String or pathname} - - The location of the IWP file to be read. - - - - -\item [Smlib-string] -\index{Smlib-string -[native-reader]}\emph{String} - - Contains output from a call to (with-format (native .) (write-the cad-output)) -for an SMLib object (e.g. curve, surface, brep). Defaults to nil. If you specify this as well as a -file-name, the file-name will take precedence. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Objects (sequence):}} - -\begin{description} - -\item [Breps] -\index{Breps -[native-reader]}\emph{Sequence of GDL brep objects} - - The breps found in the IGES file. - - - - -\item [Curves] -\index{Curves -[native-reader]}\emph{Sequence of GDL curve objects} - - The curves found in the IWP file. - - - - -\item [Surfaces] -\index{Surfaces -[native-reader]}\emph{Sequence of GDL surface objects} - - The untrimmed ``standalone'' surfaces found in the IWP file. - - - - -\end{description} - - - - - - - -\item \index{non-rational-curve} -\label{prim:non-rational-curve} -\textbf{non-rational-curve} - - -\textbf{ -\underline{Mixins:}} curve - - - - - -\begin{description} - -\item [ -\underline{Author}] - - -Dave Cooper, Genworks International - - - -\item [ -\underline{Description}] - - -This object accepts a rational curve and approximates it with a non-rational curve. - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Curve-in] -\index{Curve-in -[non-rational-curve]}\emph{GDL Curve object} - - Presumably this is a Rational curve (else this object will do nothing). - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Maintain-end-tangents?] -\index{Maintain-end-tangents? -[non-rational-curve]}\emph{Boolean} - - Determines whether to try to maintain tangents at the ends. Defaults to t. - - - - -\item [Non-rational-degree] -\index{Non-rational-degree -[non-rational-curve]}\emph{Integer} - - Determines the degree of the non-rational curve. Defaults to 3. - - - - -\item [Parameterization] -\index{Parameterization -[non-rational-curve]}\emph{Keyword symbol, one of :uniform, :chord-length, :centripetal, or :inherited} - - The default is :inherited. - - - - -\item [Tolerance] -\index{Tolerance -[non-rational-curve]}\emph{Number} - - The tolerance to use for non-rational approximation of a rational curve-in. -Defaults to the curve-in's total length divided by the tolerance-divisor. - - - - -\item [Tolerance-divisor] -\index{Tolerance-divisor -[non-rational-curve]}\emph{Number} - - The amount by which to divide the total-length of the curve-in to compute the default tolerance. Default is 1000. - - - - -\end{description} - - - - - - - -\item \index{normalized-curve} -\label{prim:normalized-curve} -\textbf{normalized-curve} - - -\textbf{ -\underline{Mixins:}} curve - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -This object creates a new curve from an exiting -curve by reasigning the lowest and highest parameter value of the underlying -mathematical definition of the curve. This is a precise method, it does not -change the curve geometry. - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Curve-in] -\index{Curve-in -[normalized-curve]}\emph{GDL NURBS Curve} - - The curve to be normalized. - - - - -\item [Tolerance] -\index{Tolerance -[normalized-curve]}\emph{Number} - - Approximation tolerance for display purposes. Defaults to the tolerance of the -built-from curve, if one exists, otherwise defaults to the *display-tolerance*. - - - - -\item [U-max] -\index{U-max -[normalized-curve]} - -The highest parameter value of the underlying mathematical definition -for this parametric curve - - - - -\item [U-min] -\index{U-min -[normalized-curve]} - -The lowest parameter value of the underlying mathematical definition -for this parametric curve - - - - -\end{description} - - - - - - - -\item \index{offset-solid} -\label{prim:offset-solid} -\textbf{offset-solid} - - -\textbf{ -\underline{Mixins:}} brep - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Offsets the faces of a brep by a certain distance. - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Brep] -\index{Brep -[offset-solid]}\emph{GDL Brep object} - - The brep to be offset. - - - - -\item [Distance] -\index{Distance -[offset-solid]}\emph{Number} - - The distance to offset. Can be negative. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Tolerance] -\index{Tolerance -[offset-solid]}\emph{Number} - - The tolerance to use for the shelling operation. -Defaults to (the adaptive-tolerance) of the input brep. - - - - -\end{description} - - - - - - - -\item \index{offset-surface} -\label{prim:offset-surface} -\textbf{offset-surface} - - -\textbf{ -\underline{Mixins:}} surface - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -This primitive generates a new surface - which is offset from input surface in all normal directions from input surface. - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Distance] -\index{Distance -[offset-surface]}\emph{Number} - - The distance to offset. Positive or negative, depending on which direction you want. - - - - -\item [Surface-in] -\index{Surface-in -[offset-surface]}\emph{GDL Surface object} - - The original surface from which to make the offset. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Approximation-tolerance] -\index{Approximation-tolerance -[offset-surface]}\emph{Number} - - The tolerance of approximation for the re-fitting of points after the offsetting. -Defaults to *3d-approximation-tolerance-default*. - - - - -\item [Parameterization] -\index{Parameterization -[offset-surface]}\emph{Keyword symbol, one of :uniform, :chord-length, :centripetal, or :inherited} - - The parameterization -method used to re-fit the points after offsetting. Defaults to :uniform. - - - - -\item [U-degree] -\index{U-degree -[offset-surface]}\emph{Integer} - - The desired u-degree of the resulting surface. Defaults to the u-degree of the input surface-in. - - - - -\item [V-degree] -\index{V-degree -[offset-surface]}\emph{Integer} - - The desired v-degree of the resulting surface. Defaults to the v-degree of the input surface-in. - - - - -\end{description} - - - - - - - -\item \index{planar-offset-curve} -\label{prim:planar-offset-curve} -\textbf{planar-offset-curve} - - -\textbf{ -\underline{Mixins:}} curve - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Creates a curve which is the result of offsetting a curve by its normals along a plane. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :surf) - - (define-object test-planar-offset-curve () - :computed-slots - ((curve-in (the b-spline-curves (curves 3))) - - (plane-normal (make-vector 0 0 -1)) - - (distance 1) ) - - :objects - ((b-spline-curves :type 'test-b-spline-curves - :hidden? t) - - (curve-to-be-offset :type 'curve - :built-from (the b-spline-curves (curves 3))) - - - (planar-offset-curve :type 'surf:planar-offset-curve - :curve-in (the curve-to-be-offset) - :plane-normal (make-vector 0 0 -1) - :distance 1))) - - (generate-sample-drawing :object-roots (list (make-object 'test-planar-offset-curve)) - :projection-direction (getf *standard-views* :top)) - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for planar-offset-curve} - -\label{fig:example-code-planar-offset-curve} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-planar-offset-curve.pdf} -\end{center} - -\caption{planar-offset-curve example} - -\label{fig:planar-offset-curve} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Curve-in] -\index{Curve-in -[planar-offset-curve]}\emph{GDL Curve} - - The curve to be offset - - - - -\item [Distance] -\index{Distance -[planar-offset-curve]}\emph{Number} - - The left-hand distance to offset with respect to curve direction. To get the opposite -direction, you can either negate this number or reverse the \texttt{plane-normal}. - - - - -\item [Plane-normal] -\index{Plane-normal -[planar-offset-curve]}\emph{3D Vector} - - The normal for the plane - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Tolerance] -\index{Tolerance -[planar-offset-curve]}\emph{Number} - - The tolerance for approximating the resulting offset curve. -Defaults to *3d-approximation-tolerance-default*. - - - - -\end{description} - - - - - - - -\item \index{planar-section-curve} -\label{prim:planar-section-curve} -\textbf{planar-section-curve} - - -\textbf{ -\underline{Mixins:}} curve - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Produces a single curve by sectioning a surface with a plane. If multiple results are expected, -use planar-section-curves instead. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :surf) - - (define-object test-planar-section-curve (base-object) - - :objects - ((planar-section-curve :type 'planar-section-curve - :surface (the test-surf) - :plane-normal (the (face-normal-vector :top)) - :plane-point (make-point 0 0 2) - :display-controls (list :color :red :line-thickness 4)) - - (test-surf :type 'test-fitted-surface ))) - - (generate-sample-drawing :object-roots (list (make-object 'test-planar-section-curve)) - :projection-direction (getf *standard-views* :trimetric)) - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for planar-section-curve} - -\label{fig:example-code-planar-section-curve} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-planar-section-curve.pdf} -\end{center} - -\caption{planar-section-curve example} - -\label{fig:planar-section-curve} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Surface] -\index{Surface -[planar-section-curve]}\emph{GDL Surface, face, or trimmed surface} - - The surface to be sectioned with a plane. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [3d-approximation-tolerance] -\index{3d-approximation-tolerance -[planar-section-curve]}\emph{Number} - - Tolerance used when approximating in e.g. Newton-Raphson iterations. -Default is *3d-approximation-tolerance-default*. - - - - -\item [Angle-tolerance-radians] -\index{Angle-tolerance-radians -[planar-section-curve]}\emph{Number} - - Angular tolerance (in radians) used when approximating in e.g. Newton-Raphson iterations. -Default is *angle-tolerance-radians-default*. - - - - -\item [Plane-normal] -\index{Plane-normal -[planar-section-curve]}\emph{Vector} - - The normal of the sectioning plane. Defaults to the top vector of the local reference box. - - - - -\item [Plane-point] -\index{Plane-point -[planar-section-curve]}\emph{3D Point} - - A point on the sectioning plane. Defaults to the center. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Computed slots:}} - -\begin{description} - -\item [On-surfaces] -\index{On-surfaces -[planar-section-curve]}\emph{List of GDL surfaces} - - The surfaces on which this curve lies. - - - - -\item [Success?] -\index{Success? -[planar-section-curve]}\emph{Boolean} - - This will be non-nil if the curve was generated successfully. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Gdl functions:}} - -\begin{description} - -\item [Uv-curve] -\index{Uv-curve -[planar-section-curve]}\emph{GDL Curve object} - - The UV curve for this curve in the context of the surface. - - - - -\end{description} - - - - - - - -\item \index{planar-section-curves} -\label{prim:planar-section-curves} -\textbf{planar-section-curves} - - -\textbf{ -\underline{Mixins:}} base-object - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Produces multiple curves by sectioning a surface or a brep with a plane. -If a single result is expected, use planar-section-curve instead. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :surf) - - (define-object test-planar-section-curves (base-object) - - :computed-slots - ((points-data '(((0 0 0)(0 1 0)(1 1 0)(1 0 0)) - ((0 0 1) (0 1 1) (1 1 1) (1 0 1) ) - ((0 0 2) (0 1 2) (1 1 2) (1 0 2) ) - ((0 0 3) (0 1 3) (1 1 3) (1 0 3) ))) - - (control-points (mapcar #'(lambda(list) (mapcar #'apply-make-point list)) - (the points-data)))) - - :objects - ((planar-section-curve :type 'planar-section-curves - :surface (the test-surf) - :plane-normal (the (face-normal-vector :front)) - :plane-point (make-point 0 0.5 0) - :display-controls (list :color :red :line-thickness 4)) - - (test-surf :type 'b-spline-surface - :control-points (the control-points)) )) - - (generate-sample-drawing :object-roots - (list (make-object 'test-planar-section-curves)) - :projection-direction - (getf *standard-views* :trimetric)) - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for planar-section-curves} - -\label{fig:example-code-planar-section-curves} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-planar-section-curves.pdf} -\end{center} - -\caption{planar-section-curves example} - -\label{fig:planar-section-curves} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [3d-approximation-tolerance] -\index{3d-approximation-tolerance -[planar-section-curves]}\emph{Number} - - Tolerance used when approximating in e.g. Newton-Raphson iterations. -Default is *3d-approximation-tolerance-default*. - - - - -\item [Angle-tolerance-radians] -\index{Angle-tolerance-radians -[planar-section-curves]}\emph{Number} - - Angular tolerance (in radians) used when approximating in e.g. Newton-Raphson iterations. -Default is *angle-tolerance-radians-default*. - - - - -\item [Brep] -\index{Brep -[planar-section-curves]}\emph{GDL Brep object} - - The brep to be sectioned with a plane. Specify this or surface, not both. - - - - -\item [Plane-normal] -\index{Plane-normal -[planar-section-curves]}\emph{Vector} - - The normal of the sectioning plane. Defaults to the top vector of the local reference box. - - - - -\item [Plane-point] -\index{Plane-point -[planar-section-curves]}\emph{3D Point} - - A point on the sectioning plane. Defaults to the center. - - - - -\item [Surface] -\index{Surface -[planar-section-curves]}\emph{GDL Surface object} - - The surface to be sectioned with a plane. Specify this or brep, not both. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Computed slots:}} - -\begin{description} - -\item [3d-approximation-tolerance-achieved] -\index{3d-approximation-tolerance-achieved -[planar-section-curves]}\emph{Number} - - The actual tolerance achieved by the operation. - - - - -\item [Angle-tolerance-radians-achieved] -\index{Angle-tolerance-radians-achieved -[planar-section-curves]}\emph{Number} - - The actual angle tolerance achieved by the operation. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Objects (sequence):}} - -\begin{description} - -\item [Curves] -\index{Curves -[planar-section-curves]}\emph{Sequence of GDL Curve Objects} - - The curves resulting from sectioning. - - - - -\item [Uv-curves] -\index{Uv-curves -[planar-section-curves]}\emph{Sequence of GDL uv curve objects} - - The UV curves for each returned curve. This is also passed into each -curve object and available from there. - - - - -\end{description} - - - - - - - -\item \index{planar-surface} -\label{prim:planar-surface} -\textbf{planar-surface} - - -\textbf{ -\underline{Mixins:}} surface - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Creates a flat quadrilateral surface specified by its four corner points. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :surf) - - (define-object test-planar-surface (planar-surface) - :computed-slots - ((display-controls (list :color :fuchsia :transparency 0.5)) - (p00 (make-point 0 0 0)) - (p01 (make-point 0 1 0)) - (p10 (make-point 1 0 0)) - (p11 (make-point 1.5 1.5 0)))) - - (generate-sample-drawing :objects (make-object 'test-planar-surface) - :projection-direction :trimetric) - - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for planar-surface} - -\label{fig:example-code-planar-surface} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-planar-surface.pdf} -\end{center} - -\caption{planar-surface example} - -\label{fig:planar-surface} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [P00] -\index{P00 -[planar-surface]}\emph{3D point} - - Front-left corner of the planar surface. - - - - -\item [P01] -\index{P01 -[planar-surface]}\emph{3D point} - - Front-right corner of the planar surface. - - - - -\item [P10] -\index{P10 -[planar-surface]}\emph{3D point} - - Rear-left corner of the planar surface. - - - - -\item [P11] -\index{P11 -[planar-surface]}\emph{3D point} - - Rear-right corner of the planar surface. - - - - -\end{description} - - - - - - - -\item \index{poly-brep} -\label{prim:poly-brep} -\textbf{poly-brep} - - -\textbf{ -\underline{Mixins:}} geometry-kernel-object-mixin, base-object - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -A polygonal representation for a boundary representation geometric entity. - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Computed slots:}} - -\begin{description} - -\item [Mesh-data] -\index{Mesh-data -[poly-brep]}\emph{Plist} - - Contains mesh data from the poly brep. - - - - -\end{description} - - - - - - - -\item \index{projected-curve} -\label{prim:projected-curve} -\textbf{projected-curve} - - -\textbf{ -\underline{Mixins:}} curve - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Creates a 3D curve which is the \texttt{curve-in} -projected onto the \texttt{surface.} according to the \texttt{projection-vector}. -The resulting curve contains a uv-curve which is typically useful for trimming. - -NOTE: Change from 1577p027 and forward -- the projected curve now is a 3D curve which -can be drawn. It contains its uv representation on the surface. Previously, the uv-curve -was the actual projected-curve. - - - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :surf) - - (define-object test-trimmed-from-projected-2 (trimmed-surface) - :computed-slots - ((uv-inputs t) - (island (the island-3d uv-curve)) - (holes (list (the hole uv-curve))) - (display-controls (list :color :blue :line-thickness 2))) - - :objects - ((basis-surface :type 'test-fitted-surface - :display-controls (list :color :pink) - :grid-length 10 :grid-width 10 :grid-height 5 - ) - - (raised-hole :type 'b-spline-curve - :display-controls (list :color :grey-light-very) - :control-points (list (make-point 3.5 4.5 7) - (make-point 4.5 6 7) - (make-point 5.5 7 7) - (make-point 6 4.5 7) - (make-point 5.5 2 7) - (make-point 4.5 2 7) - (make-point 3.5 4.5 7))) - - (raised-island :type 'b-spline-curve - :display-controls (list :color :grey-light-very) - :control-points (list (make-point 3 5 7) - (make-point 5 8 7) - (make-point 7 10 7) - (make-point 8 5 7) - (make-point 7 0 7) - (make-point 5 0 7) - (make-point 3 5 7)))) - :hidden-objects - ((island-3d :type 'projected-curve - :curve-in (the raised-island) - :surface (the basis-surface) - :projection-vector (make-vector 0 0 -1)) - - - (hole :type 'projected-curve - :curve-in (the raised-hole) - :surface (the basis-surface) - :projection-vector (make-vector 0 0 -1)))) - - - (generate-sample-drawing - :objects (let ((self (make-object 'test-trimmed-from-projected-2))) - (list (the basis-surface) self (the raised-island) - (the raised-hole))) - :projection-direction :trimetric) - - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for projected-curve} - -\label{fig:example-code-projected-curve} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-projected-curve.pdf} -\end{center} - -\caption{projected-curve example} - -\label{fig:projected-curve} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Curve-in] -\index{Curve-in -[projected-curve]}\emph{GDL NURBS Curve} - - The curve to be projected to the surface. - - - - -\item [Projection-vector] -\index{Projection-vector -[projected-curve]}\emph{3D Vector} - - The direction of projection. - - - - -\item [Surface] -\index{Surface -[projected-curve]}\emph{GDL NURBS Surface} - - The surface on which the \texttt{curve-in} is to be projected. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Angle-tolerance-radians] -\index{Angle-tolerance-radians -[projected-curve]}\emph{Number or nil} - - The angle tolerance used when projecting and creating new curves. -Defaults to nil, which uses the default of the geometry kernel. - - - - -\item [Approximation-tolerance] -\index{Approximation-tolerance -[projected-curve]}\emph{Number or nil} - - The tolerance used when projecting and creating new curves. -Defaults to nil, which uses the default of the geometry kernel. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Computed slots:}} - -\begin{description} - -\item [Built-from] -\index{Built-from -[projected-curve]}\emph{GDL Curve} - - Specify this if you want this curve to be a clone of -an existing curve. (note - this uses a shared underlying curve object, -it does not make a copy) - - - - -\end{description} - - - - - - -\textbf{ -\underline{Hidden objects:}} - -\begin{description} - -\item [Uv-curve] -\index{Uv-curve -[projected-curve]}\emph{GDL UV curve object} - - The resultant projected-curve in the UV space of the surface. - - - - -\end{description} - - - - - - - -\item \index{rectangular-surface} -\label{prim:rectangular-surface} -\textbf{rectangular-surface} - - -\textbf{ -\underline{Mixins:}} planar-surface - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Creates a flat rectangular surface specified by the same inputs as box or base-object. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :surf) - - (define-object test-rectangular-surface (rectangular-surface) - :computed-slots ((display-controls (list :color :green-spring-medium)) - (length 20) (width 30) (height 0))) - - (generate-sample-drawing :objects (make-object 'test-rectangular-surface) - :projection-direction :trimetric) - - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for rectangular-surface} - -\label{fig:example-code-rectangular-surface} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-rectangular-surface.pdf} -\end{center} - -\caption{rectangular-surface example} - -\label{fig:rectangular-surface} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Height] -\index{Height -[rectangular-surface]}\emph{Number} - - Z-axis dimension of the reference box. Defaults to zero. - - - - -\item [Length] -\index{Length -[rectangular-surface]}\emph{Number} - - Y-axis dimension of the reference box. Defaults to zero. - - - - -\item [Width] -\index{Width -[rectangular-surface]}\emph{Number} - - X-axis dimension of the reference box. Defaults to zero. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional, defaulting):}} - -\begin{description} - -\item [Center] -\index{Center -[rectangular-surface]}\emph{3D Point} - - Indicates in global coordinates where the center of the reference -box of this object should be located. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Computed slots:}} - -\begin{description} - -\item [P00] -\index{P00 -[rectangular-surface]}\emph{3D point} - - Front-left corner of the planar surface. - - - - -\item [P01] -\index{P01 -[rectangular-surface]}\emph{3D point} - - Front-right corner of the planar surface. - - - - -\item [P10] -\index{P10 -[rectangular-surface]}\emph{3D point} - - Rear-left corner of the planar surface. - - - - -\item [P11] -\index{P11 -[rectangular-surface]}\emph{3D point} - - Rear-right corner of the planar surface. - - - - -\end{description} - - - - - - - -\item \index{redirected-surface} -\label{prim:redirected-surface} -\textbf{redirected-surface} - - -\textbf{ -\underline{Mixins:}} b-spline-surface - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Generates a new surface with U and V parameters swapped and/or - reversed in their direction. - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Surface-in] -\index{Surface-in -[redirected-surface]} - -GDL surface object - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Reverse-u?] -\index{Reverse-u? -[redirected-surface]}\emph{Boolean} - - Specifies whether resulting U parameter space should be reversed. Defaults to nil. - - - - -\item [Reverse-v?] -\index{Reverse-v? -[redirected-surface]}\emph{Boolean} - - Specifies whether resulting V parameter space should be reversed. Defaults to nil. - - - - -\item [Swap-uv?] -\index{Swap-uv? -[redirected-surface]}\emph{Boolean} - - Specifies whether existing U and V should be swapped before possibly reversing. Defaults to nil. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Computed slots:}} - -\begin{description} - -\item [Control-points] -\index{Control-points -[redirected-surface]}\emph{List of lists of 3D Points} - - The control net. - - - - -\item [U-degree] -\index{U-degree -[redirected-surface]}\emph{Integer} - - Degree of surface in U direction. Defaults to 3. - - - - -\item [U-knot-vector] -\index{U-knot-vector -[redirected-surface]}\emph{List of Numbers} - - Knots in U direction. Default is NIL, which indicates a uniform knot vector in U direction. - - - - -\item [V-degree] -\index{V-degree -[redirected-surface]}\emph{Integer} - - Degree of surface in V direction. Defaults to 3. - - - - -\item [V-knot-vector] -\index{V-knot-vector -[redirected-surface]}\emph{List of Numbers} - - Knots in V direction. Default is NIL, which indicates a uniform knot vector in V direction. - - - - -\item [Weights] -\index{Weights -[redirected-surface]}\emph{List of lists of numbers} - - A weight to match each control point. Should be congruent with control-points -(i.e. same number of rows and columns). Default is a value of 1.0 for each weight, resulting in a nonrational surface. - - - - -\end{description} - - - - - - - -\item \index{regioned-solid} -\label{prim:regioned-solid} -\textbf{regioned-solid} - - -\textbf{ -\underline{Mixins:}} base-object - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Given a brep solid that contains multiple regions, splits the regions into separate breps - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Brep] -\index{Brep -[regioned-solid]}\emph{GDL Brep object or object containing a brep} - - The multi-region brep to be split. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Section-colors] -\index{Section-colors -[regioned-solid]}\emph{List of Color Keywords} - - These indicate the colors for any child breps if the regioning operation results in -multiple solids. Defaults to a repeating (circular) list with keys: - - -\begin{itemize} - -\item :green - -\item :red - -\item :blue - -\item :purple-dark - -\item :violet - -\item :cyan. - -\end{itemize} - - - - - -\end{description} - - - - - - - -\item \index{revolved-surface} -\label{prim:revolved-surface} -\textbf{revolved-surface} - - -\textbf{ -\underline{Mixins:}} brep, surface - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Creates a surface of revolution based on an arbitrary NURBS curve revolved by some angle about -a central axis and axis point. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :surf) - - (define-object test-revolved-surface (revolved-surface) - - :computed-slots ((display-controls (list :color :green-yellow2))) - - :hidden-objects - ((curve :type 'arc-curve - :center (translate (the center) :right 50) - :orientation (alignment :top (the (face-normal-vector :rear))) - :start-angle (half pi) - :end-angle (* 3/2 pi) - :radius 10))) - - (generate-sample-drawing :objects (make-object 'test-revolved-surface) - :projection-direction :trimetric) - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for revolved-surface} - -\label{fig:example-code-revolved-surface} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-revolved-surface.pdf} -\end{center} - -\caption{revolved-surface example} - -\label{fig:revolved-surface} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Curve] -\index{Curve -[revolved-surface]}\emph{GDL Curve object} - - The profile to be revolved. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Arc] -\index{Arc -[revolved-surface]}\emph{Angle in radians} - - The amount to revolve. Default is twice pi (a full circle of revolution). - - - - -\item [Axis-point] -\index{Axis-point -[revolved-surface]}\emph{3D Point} - - The center of revolution. Default value is the \texttt{center}. - - - - -\item [Axis-vector] -\index{Axis-vector -[revolved-surface]}\emph{3D Vector} - - The direction of axis of revolution. Default is the top of the reference box. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional, defaulting):}} - -\begin{description} - -\item [Center] -\index{Center -[revolved-surface]}\emph{3D Point} - - Indicates in global coordinates where the center of the reference -box of this object should be located. - - - - -\end{description} - - - - - - - -\item \index{revolved-surfaces} -\label{prim:revolved-surfaces} -\textbf{revolved-surfaces} - - -\textbf{ -\underline{Mixins:}} base-object - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Creates a set of surfaces of revolution based on a list of arbitrary NURBS curves revolved by some angle about -a central axis and axis point. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :gdl-user) - - (define-object test-revolved-surfaces (revolved-surfaces) - - :computed-slots ((curves (list (the curve-1) (the curve-2)))) - - :hidden-objects - ((curve-1 :type 'arc-curve - :center (translate (the center) :right 50) - :orientation (alignment :top (the (face-normal-vector :rear))) - :start-angle 0 - :end-angle (/ pi 4) - :radius 10) - - (curve-2 :type 'arc-curve - :center (translate (the center) :right 50) - :orientation (alignment :top (the (face-normal-vector :rear))) - :start-angle pi - :end-angle (* 5/4 pi) - :radius 10) - - (view :type 'base-view - :projection-vector (getf *standard-views* :trimetric) - :page-width (* 5 72) :page-length (* 5 72) - :object-roots (list self)))) - - (generate-sample-drawing - :objects (list-elements (the-object (make-object 'test-revolved-surfaces) - surfaces)) - :projection-direction :trimetric) - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for revolved-surfaces} - -\label{fig:example-code-revolved-surfaces} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-revolved-surfaces.pdf} -\end{center} - -\caption{revolved-surfaces example} - -\label{fig:revolved-surfaces} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Curves] -\index{Curves -[revolved-surfaces]}\emph{List of GDL Curve objects} - - The profiles to be revolved. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Arc] -\index{Arc -[revolved-surfaces]}\emph{Angle in radians} - - The amount to revolve. Default is twice pi (a full circle of revolution). - - - - -\item [Axis-point] -\index{Axis-point -[revolved-surfaces]}\emph{3D Point} - - The center of revolution. Default value is the \texttt{center}. - - - - -\item [Axis-vector] -\index{Axis-vector -[revolved-surfaces]}\emph{3D Vector} - - The direction of axis of revolution. Default is the top of the reference box. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Objects (sequence):}} - -\begin{description} - -\item [Surfaces] -\index{Surfaces -[revolved-surfaces]}\emph{Sequence of GDL Surfaces} - - The resultant revolved surfaces. - - - - -\end{description} - - - - - - - -\item \index{ruled-surface} -\label{prim:ruled-surface} -\textbf{ruled-surface} - - -\textbf{ -\underline{Mixins:}} surface - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Creates a surface between two NURBS curves.: - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :surf) - - (define-object test-ruled-surface (ruled-surface) - - :computed-slots ((display-controls (list :color :orchid-dark))) - - :hidden-objects - ((curve-1 :type 'linear-curve - :start (make-point -1 -1 0) - :end (make-point -1 1 0)) - - (curve-2 :type 'fitted-curve - :points (list (make-point 1 -1 0) (make-point 0 0 0) - (make-point .5 .5 0) (make-point 1 2 0))))) - - - (generate-sample-drawing :objects (make-object 'test-ruled-surface) - :projection-direction :trimetric) - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for ruled-surface} - -\label{fig:example-code-ruled-surface} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-ruled-surface.pdf} -\end{center} - -\caption{ruled-surface example} - -\label{fig:ruled-surface} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Curve-1] -\index{Curve-1 -[ruled-surface]}\emph{GDL Curve object} - - First boundary of the ruled surface. - - - - -\item [Curve-2] -\index{Curve-2 -[ruled-surface]}\emph{GDL Curve object} - - Second boundary of the ruled surface. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Direction] -\index{Direction -[ruled-surface]}\emph{Keyword symbol, either :u or :v} - - The direction of parameterization of the surface between the two curves. - - - - -\end{description} - - - - - - - -\item \index{separated-solid} -\label{prim:separated-solid} -\textbf{separated-solid} - - -\textbf{ -\underline{Mixins:}} boolean-merge, vanilla-mixin - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Given two brep solids or a brep solid and an open face represented as a brep, -performs a split operation - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Cap-results?] -\index{Cap-results? -[separated-solid]}\emph{Boolean} - - Indicates whether the resulting split pieces should be made into watertight solids (ends capped, etc). - - - - -\item [Section-colors] -\index{Section-colors -[separated-solid]}\emph{List of Color Keywords} - - These indicate the colors for any child breps if the boolean operation results in -a separated solid. If the number of breps exceeds the length of this list, the colors will be -repeated in order. Defaults to a list with keys: - - -\begin{itemize} - -\item :green - -\item :red - -\item :blue - -\item :purple-dark - -\item :violet - -\item :cyan. - -\end{itemize} - - - - - -\end{description} - - - - - - -\textbf{ -\underline{Objects (sequence):}} - -\begin{description} - -\item [Breps] -\index{Breps -[separated-solid]}\emph{Sequence of GDL brep objects} - - The resulting breps yielded from the separate operation. These are colored using section-colors. - - - - -\end{description} - - - - - - - -\item \index{shelled-solid} -\label{prim:shelled-solid} -\textbf{shelled-solid} - - -\textbf{ -\underline{Mixins:}} brep - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Offsets the faces of a brep by a certain thickness. - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Brep] -\index{Brep -[shelled-solid]}\emph{GDL Brep object} - - Should be an open shell. -The brep to be shelled into a solid. - - - - -\item [Distance] -\index{Distance -[shelled-solid]}\emph{Number} - - The distance to offset. Can be negative. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Tolerance] -\index{Tolerance -[shelled-solid]}\emph{Number} - - The tolerance to use for the shelling operation. -Defaults to (the adaptive-tolerance) of the input brep. - - - - -\end{description} - - - - - - - -\item \index{spherical-surface} -\label{prim:spherical-surface} -\textbf{spherical-surface} - - -\textbf{ -\underline{Mixins:}} surface, sphere - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -A surface representation of the sphere. Takes the same inputs as native GDL sphere. Partial spheres are not yet implmented. -Note that some VRML browsers, e.g. Cortona v. 4.2, show some spurious artifacts with NURBS -created as spherical surfaces. BS Contact does not appear to have this problem. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :surf) - - (define-object test-spherical-surface (spherical-surface) - :computed-slots ((display-controls (list :color :sky-summer)) - (radius 10))) - - (generate-sample-drawing :objects (make-object 'test-spherical-surface) - :projection-direction :trimetric) - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for spherical-surface} - -\label{fig:example-code-spherical-surface} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-spherical-surface.pdf} -\end{center} - -\caption{spherical-surface example} - -\label{fig:spherical-surface} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (optional, defaulting):}} - -\begin{description} - -\item [Center] -\index{Center -[spherical-surface]}\emph{3D Point} - - Indicates in global coordinates where the center of the reference -box of this object should be located. - - - - -\end{description} - - - - - - - -\item \index{spiral-curve} -\label{prim:spiral-curve} -\textbf{spiral-curve} - - -\textbf{ -\underline{Mixins:}} curve - - - - - -\begin{description} - -\item [ -\underline{Author}] - - -Dave Cooper, Genworks International - - - -\item [ -\underline{Description}] - - -This object approximates a spiral around the Z axis using a cubic NURBS (b-spline-curve). - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Height] -\index{Height -[spiral-curve]}\emph{Number} - - The height of the spiral. - - - - -\item [Number-of-turns] -\index{Number-of-turns -[spiral-curve]}\emph{Number} - - The number of turns (1 = 360 degrees) in the spiral. - - - - -\item [Radius-1] -\index{Radius-1 -[spiral-curve]}\emph{Number} - - Initial radius at Z=0. - - - - -\item [Radius-2] -\index{Radius-2 -[spiral-curve]}\emph{Number} - - Final radius at z=height. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Right-or-left] -\index{Right-or-left -[spiral-curve]}\emph{Keyword Symbol, :right or :left} - - Defaults to :right. - - - - -\item [Tolerance] -\index{Tolerance -[spiral-curve]}\emph{Number} - - The tolerance to use for non-rational approximation of a rational curve-in. -Defaults to the height divided by the tolerance-divisor. - - - - -\item [Tolerance-divisor] -\index{Tolerance-divisor -[spiral-curve]}\emph{Number} - - The amount by which to divide the height of the curve-in to compute the default tolerance. Default is 1000. - - - - -\end{description} - - - - - - - -\item \index{split-surface} -\label{prim:split-surface} -\textbf{split-surface} - - -\textbf{ -\underline{Mixins:}} surface - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Given a NURBS and a parameter in U or V direction, -split the surface at the parameter and return one section or the other as the -toplevel self of this instance. Note that both resulting sections are also -reflected in (the surfaces) sequence which is a hidden child in this object. - -As an alternative to a parameter, a projection-point and projection-vector -can also be given, and the U or V parameter at the resulting surface point -will be used as the parameter. - - - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :gdl-user) - - (define-object test-split-surface (base-object) - - :computed-slots ((projection-point (make-point 10 0 3)) - (projection-vector (make-vector 1 0 0)) - (u-or-v :u :settable) - (keep-side :left :settable)) - - :objects - ((test-surface :type 'test-b-spline-surface - :display-controls nil) - - - (split :type 'split-surface - :display-controls (list :color :red :line-thickness 3) - :surface-in (the test-surface) - :pass-down (keep-side u-or-v projection-point projection-vector)))) - - - (generate-sample-drawing :object-roots (make-object 'test-split-surface) - :projection-direction (getf *standard-views* :trimetric)) - - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for split-surface} - -\label{fig:example-code-split-surface} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-split-surface.pdf} -\end{center} - -\caption{split-surface example} - -\label{fig:split-surface} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Keep-side] -\index{Keep-side -[split-surface]}\emph{Keyword symbol, one of :left or :right} - - Determines which half of the split -surface to reflect in this instance. Both halves will be reflected in (the surfaces) -hidden-object sequence which is a child of this instance. - - - - -\item [Parameter] -\index{Parameter -[split-surface]}\emph{Number} - - The parameter in U or V direction at which to do the split. This must -lie in the domain between (the u-min) [or (the v-min)] and (the u-max) [or (the v-max)] -of the surface-in. If it is outside this domain, a warning will be thrown and the -value will be pinned to the nearest value within the domain. -If this input is not specified and you specify a projection-point and projection-vector, -then this projected point will be used to establish the parameter for splitting. - - - - -\item [Projection-point] -\index{Projection-point -[split-surface]}\emph{3D Point or nil} - - If given and parameter is not given, -this point will be projected onto the surface using (the projection-vector) -to establish the split parameter. Defaults to nil. - - - - -\item [Projection-vector] -\index{Projection-vector -[split-surface]}\emph{3D Vector or nil} - - If given and parameter is not given, -this will be used to project (the projection-point) -onto the surface to establish the split parameter. -Defaults to nil. - - - - -\item [Surface-in] -\index{Surface-in -[split-surface]}\emph{GDL Surface object} - - The surface to be split. - - - - -\item [U-or-v] -\index{U-or-v -[split-surface]}\emph{Keyword symbol, one of :u or :v} - - Determines the direction of the split. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Computed slots:}} - -\begin{description} - -\item [Projected-point] -\index{Projected-point -[split-surface]}\emph{Surface point} - - Returns the first result of the given point projected -along the given vector intersected with the surface. - - - - -\item [Projected-points] -\index{Projected-points -[split-surface]}\emph{List of Surface points} - - Returns the given point projected along -the given vector intersected with the surface. - - - - -\end{description} - - - - - - - -\item \index{step-reader} -\label{prim:step-reader} -\textbf{step-reader} - - -\textbf{ -\underline{Mixins:}} base-object - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -This object will reflect the contents of a STEP file containing -points, curves, surfaces, and/or trimmed surfaces as sequences of GDL objects. Currently all -surfaces are treated as trimmed, where actual untrimmed surfaces have their natural outer -boundaries as the result-island, i.e. no standalone surfaces will be produced by this part. - -This is a default option in the HarmonyWare STEP Translator which will be exposed in GDL -in a future release. - -The HarmonyWare reader creates a log file in a temporary directory. The location of this log -file is printed on the console during the reading operation. Currently this log file is -not automatically deleted, and its name is determined by the system. - - - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [File-name] -\index{File-name -[step-reader]}\emph{String or pathname} - - The location of the STEP file to be read. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Group-trimmed-surfaces-into-brep?] -\index{Group-trimmed-surfaces-into-brep? -[step-reader]}\emph{Boolean} - - If true, group all trimmed surfaces in the file into one B-rep. -If some trimmed surfaces are blanked, they are grouped into a second, blanked B-rep. Default is nil. - - - - -\item [Make-all-surfaces-trimmed?] -\index{Make-all-surfaces-trimmed? -[step-reader]}\emph{Boolean} - - If true, treat all untrimmed surfaces in the file as if they are trimmed surfaces with -the natural outer boundary of the surface as the trimming loop. If used, no standalone IwSurface surface objects -will ever be returned by the reader. Default is nil. - - - - -\item [Make-single-brep?] -\index{Make-single-brep? -[step-reader]}\emph{Boolean} - - If true, group all trimmed surfaces and B-reps in the file into one B-rep. -If some trimmed surfaces or B-reps are blanked, they are grouped into a second, blanked B-rep. Default is nil. - - - - -\item [Sew-brep-faces?] -\index{Sew-brep-faces? -[step-reader]}\emph{Boolean} - - Indicates whether each resulting brep should have its faces sewn together. Default is (the make-single-brep?). - - - - -\end{description} - - - - - - -\textbf{ -\underline{Objects (sequence):}} - -\begin{description} - -\item [Breps] -\index{Breps -[step-reader]}\emph{Sequence of GDL brep objects} - - The breps and trimmed surfaces (represented as breps) found in the STEP file. - - - - -\item [Curves] -\index{Curves -[step-reader]}\emph{Sequence of GDL curve objects} - - The curves found in the STEP file. - - - - -\item [Points] -\index{Points -[step-reader]}\emph{Sequence of GDL point objects} - - The points found in the STEP file. - - - - -\item [Surfaces] -\index{Surfaces -[step-reader]}\emph{Sequence of GDL surface objects} - - The untrimmed ``standalone'' surfaces found in the STEP file. - - - - -\end{description} - - - - - - - -\item \index{stitched-solid} -\label{prim:stitched-solid} -\textbf{stitched-solid} - - -\textbf{ -\underline{Mixins:}} brep - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Attempts to stitch together a list of - surfaces into an open shell or possibly a manifold solid. This - primitive is not widely tested and may be deprecated. Consider use - of merged-solid instead. Please let Genworks know if you are using - this so we can consider documenting/testing it better. - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Faces-in] -\index{Faces-in -[stitched-solid]}\emph{List of GDL Surface or Face objects} - - These will be stitched together into an open shell or possibly a Solid - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Tolerance] -\index{Tolerance -[stitched-solid]}\emph{Number} - - The tolerance to use for creating the brep and for sewing. Larger number is looser tolerance -and more likely to lead to success. Default is 0.0 which uses the SMLib defaults. - - - - -\end{description} - - - - - - - -\item \index{subtracted-solid} -\label{prim:subtracted-solid} -\textbf{subtracted-solid} - - -\textbf{ -\underline{Mixins:}} boolean-merge, vanilla-mixin - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Given two brep solids, performs the subtract Boolean of the other-brep from the brep - - - -\end{description} - - - - - - - - - -\item \index{surface} -\label{prim:surface} -\textbf{surface} - - -\textbf{ -\underline{Mixins:}} geometry-kernel-object-mixin, outline-specialization-mixin, base-object - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -A generalized NURBS surface. -Usually used as a mixin in more specific surfaces. - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Brep-tolerance] -\index{Brep-tolerance -[surface]}\emph{Number} - - Overall tolerance for the internal brep representation of this surface. -Defaults to nil. Note that a value of nil indicates for SMLib a value of 1.0e-05 of -the longest diagonal length of the brep. - - - - -\item [Built-from] -\index{Built-from -[surface]}\emph{GDL Surface} - - Specify this if you want this surface to be a -clone of an existing surface (note - this uses a shared underlying -surface object, it does not make a copy) - - - - -\item [End-caps-on-brep?] -\index{End-caps-on-brep? -[surface]}\emph{Boolean} - - Indicates whether to attempt automatic endcaps on conversion -of this surface to a brep. -Note that this might change in future to a keyword value -for :min, :max, or :both to provide more control. - - - - -\item [Rational?] -\index{Rational? -[surface]}\emph{Boolean} - - Returns non-nil iff this surface is rational, i.e. all weights are not 1. - - - - -\item [Sew-and-orient-brep?] -\index{Sew-and-orient-brep? -[surface]}\emph{Boolean} - - Indicates whether brep representation should undergo a -sew-and-orient operation. Defaults to nil. - - - - -\item [Tessellation-parameters] -\index{Tessellation-parameters -[surface]}\emph{Plist of keyword symbols and numbers} - - This controls tessellation for the brep of this surface. -The keys are as follows: - - -\begin{itemize} - -\item \texttt{:min-number-of-segments} - - -\item \texttt{:max-3d-edge-factor} - - -\item \texttt{:min-parametric-ratio} - - -\item \texttt{:max-chord-height} - - -\item \texttt{:max-angle-degrees} - - -\item \texttt{:min-3d-edge} - - -\item \texttt{:min-edge-ratio-uv} - - -\item \texttt{:max-aspect-ratio} - - -\end{itemize} - - -and the defaults come from the following parameters: - - -\begin{verbatim} - (list - :min-number-of-segments *tess-min-number-of-segments* - :max-3d-edge-factor *tess-max-3d-edge-factor* - :min-parametric-ratio *tess-min-parametric-ratio* - :max-chord-height *tess-max-chord-height* - :max-angle-degrees *tess-max-angle-degrees* - :min-3d-edge *tess-min-3d-edge* - :min-edge-ratio-uv *tess-min-edge-ratio-uv* - :max-aspect-ratio *tess-max-aspect-ratio*) - -\end{verbatim} - - - -\item [Tolerance] -\index{Tolerance -[surface]}\emph{Number} - - Approximation tolerance for display purposes. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional, defaulting):}} - -\begin{description} - -\item [Isos] -\index{Isos -[surface]}\emph{Plist with keys :n-u and :n-v} - - The number of isoparametric -curves to be displayed in each direction. This value comes from the -value of :isos on the display-controls if that exists, and defaults -to *isos-default* otherwise. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Computed slots:}} - -\begin{description} - -\item [Bounding-box] -\index{Bounding-box -[surface]}\emph{List of two 3D points} - - The left front bottom and right rear top corners, in global coordinates, -of the rectangular volume bounding the tree of geometric objects rooted at this object. - - - - -\item [Height] -\index{Height -[surface]}\emph{Number} - - Z-axis dimension of the reference box. Defaults to zero. - - - - -\item [Length] -\index{Length -[surface]}\emph{Number} - - Y-axis dimension of the reference box. Defaults to zero. - - - - -\item [Width] -\index{Width -[surface]}\emph{Number} - - X-axis dimension of the reference box. Defaults to zero. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Hidden objects:}} - -\begin{description} - -\item [Brep] -\index{Brep -[surface]}\emph{GDL Brep object} - - This is the brep representation of this surface. - - - - -\item [Swapped-uv-surface] -\index{Swapped-uv-surface -[surface]}\emph{GDL surface object} - - This surface object swaps the role of u and v- directional parameters, i.e. old-surface(u,v) = new-surface(v,u). - - - - -\end{description} - - - - - - -\textbf{ -\underline{Hidden objects (sequence):}} - -\begin{description} - -\item [U-iso-curves] -\index{U-iso-curves -[surface]}\emph{Sequence of curve objects} - - The isoparametric curves in the U direction. - - - - -\item [V-iso-curves] -\index{V-iso-curves -[surface]}\emph{Sequence of curve objects} - - The isoparametric curves in the V direction. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Gdl functions:}} - -\begin{description} - -\item [Area] -\index{Area -[surface]}\emph{Number} - - Returns the area of the surface. - - - - -\item [B-spline-data] -\index{B-spline-data -[surface]} - -List of lists 3D points, List of lists numbers, List of numbers, -List of numbers, Integer, and Integer. -Returns six values which are the control points, the weights, the u-knots, -the v-knots, the u-degree, and the v-degree of the surface. - - - - -\item [Curve-intersection-point] -\index{Curve-intersection-point -[surface]}\emph{Surface point} - - Returns the first point of intersection between -this surface and the curve given as an argument. - - - - -\item [Curve-intersection-points] -\index{Curve-intersection-points -[surface]}\emph{List of Surface points} - - Returns the point(s) of intersection between -this surface and the curve given as an argument. - - - - -\item [Domain] -\index{Domain -[surface]}\emph{Plist} - - Returns plist containing :min and :max indicating min and max UV points -for parameter space for this surface. - - - - -\item [Dropped-point] -\index{Dropped-point -[surface]}\emph{Surface point} - - Returns the given 3D point dropped normally to this -surface, as close as possible to the given 3D point. - - - - -\item [Dropped-points] -\index{Dropped-points -[surface]}\emph{List of Surface points} - - Returns the given 3D point dropped normally to this surface. - - - - -\item [Local-bounding-box] -\index{Local-bounding-box -[surface]} - -Returns a bbox object, answering xmin, ymin, zmin, xmax, ymax, and zmax, -for a box containing the convex hull (i.e. the control points) of this -surface and oriented according to the given \texttt{center} and \texttt{orientation}. - - - - -\item [Maximum-distance-to-curve] -\index{Maximum-distance-to-curve -[surface]}\emph{Plist} - - The returned plist contains information about the maximum -distance from this surface to the curve given as the argument. - - - - -\item [Maximum-distance-to-surface] -\index{Maximum-distance-to-surface -[surface]}\emph{Plist} - - The returned plist contains information about the maximum -distance from this surface to the surface given as the argument. - - - - -\item [Minimum-distance-to-curve] -\index{Minimum-distance-to-curve -[surface]}\emph{Plist} - - The returned plist contains information about the minimum -distance from this surface to the curve given as the argument. - - - - -\item [Minimum-distance-to-surface] -\index{Minimum-distance-to-surface -[surface]}\emph{Plist} - - The returned plist contains information about the minimum -distance from this surface to the surface given as the argument. - - - - -\item [Normal] -\index{Normal -[surface]}\emph{3D Vector} - - The surface normal vector at the given u and v values. -Three other values are also returned: -The 3D point, the U tangent, and the V tangent at the given parameter value. - - - - -\item [Offset-point] -\index{Offset-point -[surface]}\emph{3D Point} - - Returns the surface point at the given parameters offset -along the surface normal at that point by the given distance. - - - - -\item [On?] -\index{On? -[surface]}\emph{Boolean} - - Returns non-nil if the given UV (2D) point lies within the -parameter space of this surface. Currently -this function works only on the basis surface ; it does not observe -trimming island or holes. - - - - -\item [Point] -\index{Point -[surface]}\emph{3D Point} - - The point on the surface corresponding to the given u and v -parameter values. - - - - -\item [Projected-point] -\index{Projected-point -[surface]}\emph{Surface point} - - Returns the first result of the given point projected -along the given vector intersected with the surface. - - - - -\item [Projected-points] -\index{Projected-points -[surface]}\emph{List of Surface points} - - Returns the given point projected along -the given vector intersected with the surface. - - - - -\item [Radius-of-curvature] -\index{Radius-of-curvature -[surface]}\emph{Number} - - Returns the Gaussian curvature on the surface at the given -parameter values. Three additional values are returned, which are the Normal -Curvature at the point, the first Fundamental Principle Curvature, and the -second Fundamental Principle Curvature. - - - - -\item [U-max] -\index{U-max -[surface]}\emph{Number} - - Returns maximum U component of the surface parameter space. - - - - -\item [U-min] -\index{U-min -[surface]}\emph{Number} - - Returns minimum U component of the surface parameter space. - - - - -\item [V-max] -\index{V-max -[surface]}\emph{Number} - - Returns maximum V component of the surface parameter space. - - - - -\item [V-min] -\index{V-min -[surface]}\emph{Number} - - Returns minimum V component of the surface parameter space. - - - - -\end{description} - - - - - - - -\item \index{surface-knot-reduction} -\label{prim:surface-knot-reduction} -\textbf{surface-knot-reduction} - - -\textbf{ -\underline{Mixins:}} surface - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -This routine removes all removable knots from a GDL surface. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - - (in-package :gdl-user) - - (define-object surface-knot-reduction-test (base-object) - - :input-slots - ((control-points (list (make-point 0 0 0) - (make-point 2 3.0 0.0) - (make-point 4 2.0 0.0) - (make-point 5 0.0 0.0) - (make-point 4 -2.0 0.0) - (make-point 2 -3.0 0.0) - (make-point 0 0 0)))) - - :objects - ((curve-1 :type 'b-spline-curve - :display-controls (list :line-thickness 2 - :color :green-spring-medium) - :control-points (the control-points)) - - (curve-2 :type 'boxed-curve - :display-controls (list :line-thickness 2 :color :blue) - :curve-in (the curve-1) - :center (make-point 0 0 8)) - - (curve-3 :type 'transformed-curve - :display-controls (list :line-thickness 2 :color :green) - :curve-in (the curve-1) - :to-location (translate - (the center) - :up 3) - :center (the center) - :scale-x 1.3 - :scale-y 1.3) - - (curve-4 :type 'transformed-curve - :display-controls (list :line-thickness 2 :color :red) - :curve-in (the curve-1) - :to-location (translate - (the center) - :up 7) - :center (the center) - :scale-x 2.2 - :scale-y 2.2) - - (lofted-surface-test-simple :type 'lofted-surface - :display-controls (list :color :red-violet - :isos (list :n-v 19 - :n-u 19)) - :tolerance 0.01 - :curves (list (the curve-1) (the curve-3) - (the curve-4) (the curve-2))) - - (S-knot-reduction :type 'surface-knot-reduction - :surface (the lofted-surface-test-simple)))) - - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for surface-knot-reduction} - -\label{fig:example-code-surface-knot-reduction} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Direction] -\index{Direction -[surface-knot-reduction]}\emph{Keyword symbol, one of :u, :v or :uv} - - Default is :uv. - - - - -\item [Surface] -\index{Surface -[surface-knot-reduction]}\emph{Gdl surface object} - -. - - - - -\item [Tolerance] -\index{Tolerance -[surface-knot-reduction]}\emph{Number} - -. - - - - -\end{description} - - - - - - - -\item \index{swept-solid} -\label{prim:swept-solid} -\textbf{swept-solid} - - -\textbf{ -\underline{Mixins:}} brep - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -This primitive will take a brep as input, -and sweep all its faces in the given direction by the given distance, -to produce another brep. - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - (in-package :gdl-user) - - (define-object swept-solid-example (swept-solid) - - :computed-slots - ((facial-brep (the trimmed brep)) - (vector (make-vector 0 0 1)) - (distance 10) - (display-controls (list :isos (list :n-u 8 :n-v 8) :color :blue :transparency 0.3))) - - - :hidden-objects - ((rectangle :type 'rectangular-surface - :width 20 :length 20) - - (trim-curve :type 'global-filleted-polyline-curve - :vertex-list (list (translate (the center) :right 8 :rear 8) - (translate (the center) :left 8 :rear 8) - (translate (the center) :left 8 :front 8) - (translate (the center) :right 8 :front 8) - (translate (the center) :right 8 :rear 8)) - :default-radius 3) - - (trimmed :type 'trimmed-surface - :basis-surface (the rectangle) - :reverse-island? t - :island (the trim-curve)))) - - (generate-sample-drawing :objects (make-object 'swept-solid-example) - :projection-direction (getf *standard-views* :trimetric)) - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for swept-solid} - -\label{fig:example-code-swept-solid} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-swept-solid.pdf} -\end{center} - -\caption{swept-solid example} - -\label{fig:swept-solid} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Distance] -\index{Distance -[swept-solid]}\emph{Number} - - The distance over which the sweep is desired. - - - - -\item [Facial-brep] -\index{Facial-brep -[swept-solid]}\emph{GDL Brep object} - - The original brep, which can contain one or more faces, planar and/or non-planar. - - - - -\item [Vector] -\index{Vector -[swept-solid]}\emph{GDL Vector} - - The direction in which the sweep is desired. - - - - -\end{description} - - - - - - - -\item \index{transformed-solid} -\label{prim:transformed-solid} -\textbf{transformed-solid} - - -\textbf{ -\underline{Mixins:}} brep - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -This primitive Translates, Orients, and optionally Scales a brep solid into another brep solid. - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Brep] -\index{Brep -[transformed-solid]}\emph{GDL Brep Object} - - Source Brep to be copied and transformed. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [From-location] -\index{From-location -[transformed-solid]}\emph{3D Point} - - Reference location from which to translate. Defaults to the from-object center. - - - - -\item [From-object] -\index{From-object -[transformed-solid]}\emph{GDL Object} - - Reference Object for from-location and from-orientation. Defaults to the given brep. - - - - -\item [From-orientation] -\index{From-orientation -[transformed-solid]}\emph{3x3 Orientation Matrix or nil} - - Defaults to the from-object's orientation. - - - - -\item [Scale] -\index{Scale -[transformed-solid]}\emph{3D Vector or nil} - - Scale to be applied before transform in each axis, or nil if no scale to be applied. - - - - -\item [Sew-and-orient?] -\index{Sew-and-orient? -[transformed-solid]}\emph{Boolean} - - Controls whether to do the shrink cleanup step after the tranform. Defaults to nil. - - - - -\item [Shrink?] -\index{Shrink? -[transformed-solid]}\emph{Boolean} - - Controls whether to do the shrink cleanup step after the tranform. Defaults to nil. - - - - -\item [To-location] -\index{To-location -[transformed-solid]}\emph{3D Point} - - Reference location to which to translate. Defaults to the from-object center. - - - - -\item [To-orientation] -\index{To-orientation -[transformed-solid]}\emph{3x3 Orientation Matrix or nil} - - Target orientation relative to the from-orientation. Defaults to nil. - - - - -\end{description} - - - - - - - -\item \index{trimmed-curve} -\label{prim:trimmed-curve} -\textbf{trimmed-curve} - - -\textbf{ -\underline{Mixins:}} curve - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Creates a curve based on an existing curve but possibly with new start and end parameters (\texttt{u1} and \texttt{u2}). - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :surf) - - (define-object test-trimmed-curve () - - :objects - ((b-spline-curve :type 'b-spline-curve - :control-points (list (make-point 0 0 0) - (make-point 2 3.0 0.0) - (make-point 4 2.0 0.0) - (make-point 5 0.0 0.0) - (make-point 4 -2.0 0.0) - (make-point 2 -3.0 0.0) - (make-point 0 0 0))) - - (trimmed-curve :type 'trimmed-curve - :built-from (the b-spline-curve) - :u1 0.2 - :u2 0.8 - :display-controls (list :color :red :line-thickness 1.5)))) - - (generate-sample-drawing :object-roots (make-object 'test-trimmed-curve)) - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for trimmed-curve} - -\label{fig:example-code-trimmed-curve} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-trimmed-curve.pdf} -\end{center} - -\caption{trimmed-curve example} - -\label{fig:trimmed-curve} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (required):}} - -\begin{description} - -\item [Built-from] -\index{Built-from -[trimmed-curve]}\emph{GDL Curve Object} - - The underlying curve from which to build this curve. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [U1] -\index{U1 -[trimmed-curve]}\emph{Number} - - Specified start parameter. Defaults to the \texttt{u1} of the built-from. - - - - -\item [U2] -\index{U2 -[trimmed-curve]}\emph{Number} - - Specified end parameter. Defaults to the \texttt{u2} of the built-from. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Computed slots:}} - -\begin{description} - -\item [Basis] -\index{Basis -[trimmed-curve]}\emph{GDL Curve} - - The original untrimmed curve, same as the \texttt{built-from.} - - - - -\end{description} - - - - - - - -\item \index{trimmed-surface} -\label{prim:trimmed-surface} -\textbf{trimmed-surface} - - -\textbf{ -\underline{Mixins:}} face - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Creates a surface which is trimmed by outer trimming loop curves (the ``island''), and one or more -hole curves within the outer trimming loop. The curves can be input either as u-v curves or 3D curves. -If 3D curves are given, they must lie on the surface. If not, please use dropped-curve or projected-curve -to ensure that the curves lie on the surface. - - - - -Note that this object mixes in face, which mixes in surface. So this object should answer all the messages -of both face and surface. However, the local surface messages will operate on the basis, not on the trimmed -representation. The messages for face will operate on the trimmed representation. - - - - - - -NOTE: the interface for this object is still under development so please stay apprised of any changes. - - - - - -\end{description} - - - - -\begin{figure} -\begin{lrbox}{\boxedverb} -\begin{minipage}{\linewidth} -{\small - -\begin{verbatim} - - (in-package :surf) - - (define-object test-trimmed-surface-3 (trimmed-surface) - :computed-slots - ((reverse-holes? t) - (island (the island-container ordered-curves)) - (holes (list (the hole ordered-curves))) - (display-controls (list :color :periwinkle :line-thickness 2))) - - :hidden-objects - ((basis-surface :type 'test-planar-surface - :display-controls (list :color :grey-light-very)) - - (island-container :type 'global-filleted-polyline-curves - :default-radius .05 - :vertex-list (list (make-point 0 0 0) - (make-point 0.3 0.6 0) - (make-point 0 1 0) - (make-point 1 1 0) - (make-point 1 0 0) - (make-point 0 0 0))) - - (island-2 :type 'b-spline-curve - :control-points (list (make-point 0 0 0) - (make-point 0 1 0) - (make-point 1 1 0) - (make-point 1 0 0) - (make-point 0 0 0))) - - (hole :type 'global-filleted-polyline-curves - :default-radius .05 - :vertex-list (list (make-point 0.5 0.5 0) - (make-point 0.75 0.5 0) - (make-point 0.75 0.75 0) - (make-point 0.5 0.75 0) - (make-point 0.5 0.5 0))))) - - (generate-sample-drawing :objects (make-object 'test-trimmed-surface-3) - :projection-direction :trimetric) - - - -\end{verbatim}} -\end{minipage} -\end{lrbox} -\fbox{\usebox{\boxedverb}} - -\caption{Example Code for trimmed-surface} - -\label{fig:example-code-trimmed-surface} - -\end{figure} - -\begin{figure} -\begin{center} -\includegraphics[width=3in,height=3in]{../images/example-trimmed-surface.pdf} -\end{center} - -\caption{trimmed-surface example} - -\label{fig:trimmed-surface} - -\end{figure} - - - - - -\textbf{ -\underline{Input slots (optional):}} - -\begin{description} - -\item [Basis-surface] -\index{Basis-surface -[trimmed-surface]}\emph{GDL NURBS Surface} - - The underlying surface to be trimmed. - - - - -\item [Holes] -\index{Holes -[trimmed-surface]}\emph{List of GDL NURBS Curves or list of lists of GDL NURBS Curves} - - These curves make up zero or more holes within the outer trimming loop. -Normally should be in clockwise orientation; if not, please specify \texttt{reverse-holes?} as non-NIL. - - - - -\item [Island] -\index{Island -[trimmed-surface]}\emph{Single GDL NURBS Curve or list of same} - - These curves make up the outer trimming loop. Normally should -be in counter-clockwise orientation; if not, please specify \texttt{reverse-island?} as non-NIL. - - - - -\item [Reverse-holes?] -\index{Reverse-holes? -[trimmed-surface]}\emph{Boolean} - - Specify this as non-NIL if the holes are given in counter-clockwise orientation. Default is NIL. - - - - -\item [Reverse-island?] -\index{Reverse-island? -[trimmed-surface]}\emph{Boolean} - - Specify this as non-NIL if the island is given in clockwise orientation. Default is NIL. - - - - -\item [Uv-inputs] -\index{Uv-inputs -[trimmed-surface]}\emph{Boolean} - - NIL if feeding in 3D curves, non-NIL if feeding in UV curves. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Computed slots:}} - -\begin{description} - -\item [Result-holes] -\index{Result-holes -[trimmed-surface]}\emph{List of GDL 3D NURBS Curves or list of lists of GDL 3D NURBS Curves} - - These make up the inner holes of the resultant -trimmed surface. If you specified \texttt{holes} as an input-slot, normally these should be the same -or very similar. If the trimmed surface was read in from an outside system through a translator such as IGES, -the \texttt{result-holes} might return a non-NIL value while the \texttt{island} will always return NIL. - - - - -\item [Result-island] -\index{Result-island -[trimmed-surface]}\emph{Single GDL 3D NURBS Curve or list of GDL 3D NURBS Curves} - - These make up the outer trimming loop of the resultant -trimmed surface. If you specified \texttt{island} as an input-slot, normally these should be the same -or very similar. If the trimmed surface was read in from an outside system through a translator such as IGES, -the \texttt{result-island} should return a non-NIL value while the \texttt{island} will return NIL. - - - - -\end{description} - - - - - - -\textbf{ -\underline{Hidden objects:}} - -\begin{description} - -\item [Brep] -\index{Brep -[trimmed-surface]}\emph{GDL Brep Object} - - The Brep containing the face corresponding to this trimmed surface. - - - - -\end{description} - - - - - - - -\item \index{united-solid} -\label{prim:united-solid} -\textbf{united-solid} - - -\textbf{ -\underline{Mixins:}} boolean-merge, vanilla-mixin - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Given two brep solids, performs the union Boolean between the brep and the other-brep - - - -\end{description} - - - - - - - - - -\item \index{uv-iso-curve} -\label{prim:uv-iso-curve} -\textbf{uv-iso-curve} - - -\textbf{ -\underline{Mixins:}} vanilla-mixin - - - - - -\begin{description} - -\item [ -\underline{Description}] - - -Convenience object to return UV parameter values on surface. - - - -\end{description} - - - - - - - - -\textbf{ -\underline{Gdl functions:}} - -\begin{description} - -\item [Point] -\index{Point -[uv-iso-curve]}\emph{2D point} - - The UV surface representation at the given parameter value. - - - - -\end{description} - - - - - - - -\end{itemize} - - - -\subsection{Function and Macro Definitions} - -\label{subsec:functionandmacrodefinitions} - - - -\begin{itemize} - -\item \index{get-point-on-curve} -\label{prim:get-point-on-curve} -\textbf{get-point-on-curve} - -(type 3D point intro - Returns the point found from a minimum or maximum distance computation involving a curve. -) - - - -\item \index{get-point-on-other-curve} -\label{prim:get-point-on-other-curve} -\textbf{get-point-on-other-curve} - -(type 3D point intro - Returns the other point found from a minimum or maximum distance computation involving a curve. -) - - - -\item \index{get-point-on-surface} -\label{prim:get-point-on-surface} -\textbf{get-point-on-surface} - -(type 3D point intro - Returns the point found from a minimum or maximum distance computation involving a surface. -) - - - -\item \index{with-pinned-values} -\label{prim:with-pinned-values} -\textbf{with-pinned-values [Macro]} - -(type Macro intro - Takes a list of bindings and body similar to let, but each binding -contains a variable, which must already exist in this context, followed by a -min and a max value to which its inner binding will be pinned. If the -value of the outer binding falls outside the range, a warning will be -issued. -) - - - -\end{itemize} - - - -\subsection{Variables and Constants} - -\label{subsec:variablesandconstants} - - - -\begin{itemize} - -\item \index{*3d-approximation-tolerance-default*} -\label{prim:*3d-approximation-tolerance-default*} -\textbf{*3d-approximation-tolerance-default*} - - - - - -\item \index{*3d-tolerance-default*} -\label{prim:*3d-tolerance-default*} -\textbf{*3d-tolerance-default*} - - - - - -\item \index{*angle-tolerance-radians-default*} -\label{prim:*angle-tolerance-radians-default*} -\textbf{*angle-tolerance-radians-default*} - - - - - -\item \index{*approximation-tolerance-factor*} -\label{prim:*approximation-tolerance-factor*} -\textbf{*approximation-tolerance-factor*} - - - - - -\item \index{*boolean-allow-multiple-regions?*} -\label{prim:*boolean-allow-multiple-regions?*} -\textbf{*boolean-allow-multiple-regions?*} - - - - - -\item \index{*boolean-error-on-invalid-brep?*} -\label{prim:*boolean-error-on-invalid-brep?*} -\textbf{*boolean-error-on-invalid-brep?*} - - - - - -\item \index{*boolean-operation-tolerance-default*} -\label{prim:*boolean-operation-tolerance-default*} -\textbf{*boolean-operation-tolerance-default*} - - - - - -\item \index{*brep-isos-default*} -\label{prim:*brep-isos-default*} -\textbf{*brep-isos-default*} - - - - - -\item \index{*brep-tolerance-default*} -\label{prim:*brep-tolerance-default*} -\textbf{*brep-tolerance-default*} - - - - - -\item \index{*chain-beziers-for-display?*} -\label{prim:*chain-beziers-for-display?*} -\textbf{*chain-beziers-for-display?*} - - - - - -\item \index{*crease-angle-default*} -\label{prim:*crease-angle-default*} -\textbf{*crease-angle-default*} - - - - - -\item \index{*display-tolerance*} -\label{prim:*display-tolerance*} -\textbf{*display-tolerance*} - - - - - -\item \index{*finalize-lofted-surfaces?*} -\label{prim:*finalize-lofted-surfaces?*} -\textbf{*finalize-lofted-surfaces?*} - - - - - -\item \index{*include-vrml-normals?*} -\label{prim:*include-vrml-normals?*} -\textbf{*include-vrml-normals?*} - - - - - -\item \index{*isos-default*} -\label{prim:*isos-default*} -\textbf{*isos-default*} - - - - - -\item \index{*output-units-default*} -\label{prim:*output-units-default*} -\textbf{*output-units-default*} - - - - - -\item \index{*separate-brep-faces-for-vrml?*} -\label{prim:*separate-brep-faces-for-vrml?*} -\textbf{*separate-brep-faces-for-vrml?*} - - - - - -\item \index{*tess-max-3d-edge-factor*} -\label{prim:*tess-max-3d-edge-factor*} -\textbf{*tess-max-3d-edge-factor*} - - - - - -\item \index{*tess-max-angle-degrees*} -\label{prim:*tess-max-angle-degrees*} -\textbf{*tess-max-angle-degrees*} - - - - - -\item \index{*tess-max-aspect-ratio*} -\label{prim:*tess-max-aspect-ratio*} -\textbf{*tess-max-aspect-ratio*} - - - - - -\item \index{*tess-max-chord-height*} -\label{prim:*tess-max-chord-height*} -\textbf{*tess-max-chord-height*} - - - - - -\item \index{*tess-min-3d-edge*} -\label{prim:*tess-min-3d-edge*} -\textbf{*tess-min-3d-edge*} - - - - - -\item \index{*tess-min-edge-ratio-uv*} -\label{prim:*tess-min-edge-ratio-uv*} -\textbf{*tess-min-edge-ratio-uv*} - - - - - -\item \index{*tess-min-number-of-segments*} -\label{prim:*tess-min-number-of-segments*} -\textbf{*tess-min-number-of-segments*} - - - - - -\item \index{*tess-min-parametric-ratio*} -\label{prim:*tess-min-parametric-ratio*} -\textbf{*tess-min-parametric-ratio*} +\item \index{*SUPPRESS-\%\%-MESSAGES?*} +\label{prim:*suppress-\%\%-messages?*} +\textbf{*SUPPRESS-\%\%-MESSAGES?*} @@ -33717,17 +19429,7 @@ issued. -\section{tasty (Web-based Development Environment (tasty))} - -\label{sec:tasty(web-baseddevelopmentenvironment(tasty))} - - - - - - - -\section{tree (Tree component used by Tasty and potentially as a UI component on its own)} +\section{TREE (Tree component used by Tasty and potentially as a UI component on its own)} \label{sec:tree(treecomponentusedbytastyandpotentiallyasauicomponentonitsown)} @@ -33743,13 +19445,13 @@ issued. \begin{itemize} -\item \index{newertree} +\item \index{NEWERTREE} \label{prim:newertree} -\textbf{newertree} +\textbf{NEWERTREE} \textbf{ -\underline{Mixins:}} sheet-section +\underline{Mixins:}} SHEET-SECTION @@ -33840,13 +19542,13 @@ as flat lists. Any children which throw errors come back as a plist with error i -\item \index{tree} +\item \index{TREE} \label{prim:tree} -\textbf{tree} +\textbf{TREE} \textbf{ -\underline{Mixins:}} sheet-section, tree-node-mixin +\underline{Mixins:}} SHEET-SECTION, TREE-NODE-MIXIN @@ -33927,7 +19629,7 @@ String -\section{yadd (Yet Another Definition Documenter (yadd))} +\section{YADD (Yet Another Definition Documenter (yadd))} \label{sec:yadd(yetanotherdefinitiondocumenter(yadd))} @@ -33943,13 +19645,13 @@ String \begin{itemize} -\item \index{assembly} +\item \index{ASSEMBLY} \label{prim:assembly} -\textbf{assembly} +\textbf{ASSEMBLY} \textbf{ -\underline{Mixins:}} base-yadd-sheet +\underline{Mixins:}} BASE-YADD-SHEET @@ -34116,13 +19818,13 @@ in the applicable lens for html-format. -\item \index{base-yadd-sheet} +\item \index{BASE-YADD-SHEET} \label{prim:base-yadd-sheet} -\textbf{base-yadd-sheet} +\textbf{BASE-YADD-SHEET} \textbf{ -\underline{Mixins:}} base-ajax-sheet +\underline{Mixins:}} BASE-AJAX-SHEET @@ -34195,13 +19897,13 @@ link to a default CSS sheet. All these elements can be found in the -\item \index{master-index} +\item \index{MASTER-INDEX} \label{prim:master-index} -\textbf{master-index} +\textbf{MASTER-INDEX} \textbf{ -\underline{Mixins:}} base-yadd-sheet +\underline{Mixins:}} BASE-YADD-SHEET @@ -34301,13 +20003,13 @@ Default nil. -\item \index{package-dokumentation} +\item \index{PACKAGE-DOKUMENTATION} \label{prim:package-dokumentation} -\textbf{package-dokumentation} +\textbf{PACKAGE-DOKUMENTATION} \textbf{ -\underline{Mixins:}} base-yadd-sheet +\underline{Mixins:}} BASE-YADD-SHEET @@ -34506,13 +20208,13 @@ sequence. -\item \index{package-form} +\item \index{PACKAGE-FORM} \label{prim:package-form} -\textbf{package-form} +\textbf{PACKAGE-FORM} \textbf{ -\underline{Mixins:}} base-yadd-sheet +\underline{Mixins:}} BASE-YADD-SHEET diff --git a/documentation/tutorial/source/custom-user-interfaces.lisp b/documentation/tutorial/source/custom-user-interfaces.lisp index b67d91f6f4e97b599eecc48d703c407400c656cb..9d03cbe341edeaf1caa0593bd04616bf6e27a7bc 100644 --- a/documentation/tutorial/source/custom-user-interfaces.lisp +++ b/documentation/tutorial/source/custom-user-interfaces.lisp @@ -37,520 +37,309 @@ GDL does not provide specific support for them.") ". Using the same " (:texttt "define-object") " syntax which you have already encountered, you can define -web pages, sections of web pages, and " - (:emph "form control") - " elements such as type-in fields, checkboxes, and choice -lists [using this capability does require a basic working knowledge of -the HTML language]." - (:footnote "We will not cover HTML in this manual, but -plentiful resources are available online and in print.") - ".") - - (:p "Any web extensions such as custom JavaScript and JavaScript libraries -can also be used, as with any standard web application.") +web pages, sections of web pages, and form elements. +Your UI elements generate standard HTML, CSS, JavaScript, and can use +any external client-side libraries as with any standard web application. AJAX support is +built-in, making it easy for server and UI elements to communicate asynchronously." +) + + (:p "In order to create a web application in GDL, you should have a working +knowledge of the semantics of HTML, for which many explanations are available +online and in print. For syntax, you can use an HTML-generation library such as " + (:href "http://weitz.de/cl-who" "CL-WHO") (:footnote "http://weitz.de/cl-who") + " or " + (:href "http://www.franz.com/support/documentation/current/doc/aserve/htmlgen.html" "HTMLGen") + (:footnote "http://www.franz.com/support/documentation/current/doc/aserve/htmlgen.html") + ", both of which are built into GDL. In this tutorial we will use CL-WHO, so in what folows, +we will assume that you are already familiar with its features as documented in " + (:href "http://weitz.de/cl-who" "http://weitz.de/cl-who") ".") - (:p "With the primitive objects and functions in its " - (:texttt ":gwl") - " package, GDL supports both the traditional ``Web 1.0'' -interfaces (with fillout forms, page submittal, and complete page -refresh) as well as so-called ``Web 2.0'' interaction with AJAX.") + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ((:section :title "Package and Environment for Web Development") + (:p "The "(:texttt ":gwl")" package"(:footnote "The acronym \"GWL\" stands +for Generative Web Language")" contains a set of primitive objects and functions provided by +GDL for building web applications.") - ((:section :title "Package and Environment for Web Development") - (:p "Similarly to " (:texttt "gdl:define-package") ", you can use " - (:texttt "gwl:define-package") " in order to create a working -package which has access to the symbols you will need for building a + (:p "Similarly to "(:texttt "gdl:define-package")", you can use "(:texttt "gwl:define-package")" +to create a working package which has access to the symbols you will need for building a web application (in addition to the other GDL symbols).") - (:p "The " (:texttt ":gwl-user") " package is pre-defined and may be used for practice -work. For real projects, you should define your own package using " - (:texttt "gwl:define-package") ".") - - (:p "The acronym ``GWL'' stands for Generative Web Language, -which is not a separate language from GDL itself, but rather is a set -of primitive objects and functions available within GDL for building -web applications. The YADD reference documentation for package -``Generative Web Language'' provides detailed specifications for all -the primitive objects and functions.")) - - ((:section :title "Traditional Web Pages and Applications") - (:p "To make a GDL object presentable as a web page, the following two -steps are needed:" - - ((:list :style :enumerate) - (:item "Mix " (:texttt "base-html-sheet") " into the object definition.") - (:item "define a GDL function called " (:texttt "main-sheet") " within the object definition.")) - - "The " (:texttt "main-sheet") " function should return valid -HTML for the page. The easiest way to produce HTML is with the use of -an HTML generating library, such as " - (:href "http://weitz.de/cl-who" "CL-WHO") - (:footnote "http://weitz.de/cl-who") - " or " - (:href "http://www.franz.com/support/documentation/current/doc/aserve/htmlgen.html" "HTMLGen") - (:footnote "http://www.franz.com/support/documentation/current/doc/aserve/htmlgen.html") - ", both of which are built into GDL.") - - (:p "For our examples we will use cl-who, which is currently the -standard default HTML generating library used internally by GDL. Here -we will make note of the major features of cl-who while introducing -the examples. For complete documentation on cl-who, please visit the -page at Edi Weitz' website linked above and listed in the footnote -below.") - - - - ((:subsection :title "A Simple Static Page Example") - (:p "In Figure " - (:ref "fig:gwl-1") - ", GWL convenience macro " - (:texttt "with-cl-who") - " is used; this sets up a standard default environment for outputting HTML -within a GWL application." - - ((:boxed-figure :caption "Simple Static Page Example" :label "fig:gwl-1") - (:verbatim - (:include "~/gendl/documentation/tutorial/examples/gwl-1.gdl")))) - - - (:p "The code in Figure " - (:ref "fig:gwl-1") - " produces HTML output as shown in Figure " - (:ref "fig:gwl-1-html") - " which looks similar to Figure " - (:ref "fig:gwl-1-image") - " in a web browser." - - ((:boxed-figure :caption "Simple Static Page Example" :label "fig:gwl-1-html") - (:verbatim - (:include "~/gendl/documentation/tutorial/examples/gwl-1.html"))) - - ((:image-figure :image-file "gwl-1.png" :caption "Simple Static Page Example" - :width "4in" :height "3in" - :label "fig:gwl-1-image"))) - - - (:p "Several important concepts are lumped into this - example. Note the following:" - - ((:list :style :itemize) + (:p "The "(:texttt ":gwl-user")" package is pre-defined and may be used for practice +work. For real projects, you should define your own package using "(:texttt "gwl:define-package")".") - (:item "Our convenience macro " - (:texttt "with-cl-who") - " is used to wrap the native " - (:texttt "with-html-output") - " macro which comes with the cl-who library.") - - (:item "We use the keyword argument " - (:texttt ":indent t") - " in order to pretty-print the generated HTML. This does - not affect the browser display but can make the generated HTML - easier to read and debug. This option should be left as nil (the - default) for production deployments.") - - (:item "The " (:texttt "fmt") " symbol has special meaning - within the cl-who environment and works the same as a Common - Lisp " (:texttt "(format nil ...)") " in order to evaluate a format - string together with matching arguments, and produce a string at - runtime.") - - (:item "The " (:texttt "str") " symbol has special meaning - within the cl-who environment and works by evaluating an - expression at runtime to return a string or other printable - object, which is then included at that point in the HTML output.") - - (:item "Expressions within the " - (:texttt "body") " of an - HTML tag have to be evaluated, usually by use of the " - (:texttt "fmt") - " or " - (:texttt "str") - " in cl-who. There are three examples of this in the - above sample: one " - (:texttt "fmt") - " and two " - (:texttt "str") - ".") - - (:item "Expressions within a " - (:emph "tag attribute") - " are always evaluated automatically, and so do " - (:textbf "not") - " require a " - (:texttt "str") - " or other special symbol to force evaluation at - runtime. Tag attributes in HTML (or XML) are represented as a - plist spliced in after a tag name, wrapped in extra parentheses - around the tag name. In the sample above, the " - (:texttt ":border (the table-border)") - " is an example of a tag attribute on the " - (:texttt ":table") - " tag. Notice that the expression " - (:texttt "(the table-border)") - " does not need " - (:texttt "str") - " in order to be evaluated - it gets evaluated automatically.") - - (:item "In cl-who, if a tag attribute evaluates to " - (:texttt "nil") - ", then that tag attribute will be left out of the output - completely. For example if " - (:texttt "(the table-border)") - " evaluates to nil, then the " - (:texttt ":table") - " tag will be outputted without any attributes at - all. This is a convenient way to conditionalize tag - attributes.") - - (:item "The URL " - (:texttt "http://localhost:9000/make?object=gwl-user::president") - " is published automatically based on the package and - name of the object definition. When you visit this URL, the - response is redirected to a unique URL identified by - a " (:emph "session ID") ". This ensures that each user to your - application site will see their own specific instance of the - page object. The session ID is constructed from a combination of - the current date and time, along with a pseudo-random - number.")))) - - - - ((:subsection :title "A Simple Dynamic Page which Mixes HTML and Common Lisp/GDL") - - (:p "Within the cl-who environment it is possible to include any standard -Common Lisp structures such as " - (:texttt "let") - ", " - (:texttt "dolist") - " , " - (:texttt "dotimes") - ", etc, which accept a " - (:emph "body") - " of code. The requirement is that any internal code body - must be wrapped in a list beginning with the special symbol " - (:texttt "htm") - ", which has meaning to cl-who. ") - - ((:boxed-figure :caption "Mixing Static HTML and Dynamic Content" :label "fig:gwl-2") - (:small (:verbatim - (:include "~/gendl/documentation/tutorial/examples/gwl-2.gdl")))) + (:p "The YADD"(:footnote "YADD is accessible with "(:texttt +"http://localhost:9000/yadd")".")" reference documentation for package +GWL provides detailed specifications for all the primitive objects and functions.") +) - ((:image-figure :image-file "gwl-2.png" :caption "Mixing Static HTML and Dynamic Content" - :width "4in" :height "3in" - :label "fig:gwl-2-image")) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ((:section :title "Web Page Objects") - (:p "The example in Figure " - (:ref "fig:gwl-2") - " uses this technique to output an HTML table row for each ``row'' of data in a list of lists. -The output looks similar to Figure " - (:ref "fig:gwl-2-image") - " in a web browser.") + (:p "To make a GDL object presentable as a web page, the following two +steps are needed:" - (:p "Note the following from this example:" - ((:list :style :itemize) - (:item (:texttt "title") - " is a " - (:texttt "let") - " variable, so we use " - (:texttt "(str title)") - " to evaluate it as a string. We do not use " - (:texttt "(str (the title))") - " because " - (:texttt "title") - " is a local variable and not a message (i.e. slot) in the object.") - - (:item "Inside the " - (:texttt "dolist") - ", we ``drop back into'' HTML mode using the " - (:texttt "htm") " operator.") - ))) - - - ((:subsection :title "Linking to Multiple Pages") - (:p "The base-html-sheet mixin provides a " - (:texttt "self-link") - " message for the purpose of generating a hyperlink to that -page. Typically you will have a ``parent'' page object which links to -its ``child'' pages, but GDL pages can link to other pages anywhere -in the GDL tree" - (:footnote "In order for dependency-tracking to work -properly, the pages must all belong to the same tree, i.e. they must -share a common root object.") - "." - - ((:boxed-figure :caption "Linking to Multiple Pages" - :label "fig:gwl-3") - (:small (:verbatim (:include "~/gendl/documentation/tutorial/examples/gwl-3.gdl")))) - - ((:boxed-figure :caption "Linking to Multiple Pages" - :label "fig:gwl-3a") - (:small (:verbatim (:include "~/gendl/documentation/tutorial/examples/gwl-3a.gdl")))) - - " In Figures " - (:ref "fig:gwl-3") - " and " - (:ref "fig:gwl-3a") - ", we provide links from a parent page into a child page -with detailed information on each president. The output looks similar -to Figure " - (:ref "fig:gwl-3-image") - " in a web browser." - - ((:image-figure :image-file "gwl-3.png" :caption "Linking to Multiple Pages" - :width "4in" :height "3in" - :label "fig:gwl-3-image"))) - - (:p " Note the following from this example:" - ((:list :style :itemize) - (:item "The " - (:texttt "write-self-link") - " message is a function which can take a keyword argument - of " - (:texttt ":display-string") - ". This string is used for the actual hyperlink text.") - (:item "There is a " - (:texttt "write-back-link") - " message which similarly can take a keyword argument of " - (:texttt ":display-string") - ". This generates a link back to " - (:texttt "(the return-object)") - " which, by default in base-html-sheet, is " - (:texttt "(the parent)."))))) - - - ((:subsection :title "Form Controls and Fillout-Forms") - ((:subsubsection :title "Form Controls") + ((:list :style :enumerate) + (:item "Mix " (:texttt "base-ajax-sheet") " into the object definition.") + (:item "Within the object, define the GDL message "(:texttt "main-sheet-body")" returning an HTML string."))) + + (:p "As soon the object is defined, the object's page becomes accessible at the URL" + (:quote (:texttt "http://localhost:9000/make?object="(:emph "classname"))) +"where "(:texttt(:emph "classname"))" is the object name (including the package name). Connecting to this +URL starts a new web server session and creates an instance of the object unique to that session"(:footnote +"This is done by redirecting the response to a unique URL identified by a "(:emph "session ID")". +The session ID is constructed from a combination of the current date and time, along with a pseudo-random number.")". +This ensures that each user of your application site will see their own specific instance of the object.") + + (:p "The "(:texttt "main-sheet-body")" message can be either a computed slot or a GDL function. It should +produce a string of the HTML to be placed in the body of the page, i.e. between the "(:texttt "")" and +"(:texttt "")" tags. The "(:texttt "")" of the page is filled in automatically by GDL, and can be +customized in various ways.") + + (:p "The easiest way to produce a valid "(:texttt "main-sheet-body")" string is with the GWL convenience macro +"(:texttt "with-cl-who-string")". This is a wrapper for the CL-WHO macro "(:texttt "with-html-output")" which +additionally establishes the default environment for outputting an HTML string within a GWL application.") + + (:p "Figure "(:ref "fig:gwl-hello-world")" is an example of a simple static web page." + ((:boxed-figure :caption "Simple Static Page" :label "fig:gwl-hello-world") + (:small (:verbatim (:include "~/gendl/documentation/tutorial/examples/gwl-hello-world.gdl")))) + #+NOT-YET + ((:image-figure :image-file "gwl-hello-world.png" :caption "Simple Static Page" + :width "4in" :height "3in" + :label "fig:gwl-hello-world-image"))) + + (:p "This simple framework can also be used to create dynamic content, as illustrated in figure "(:ref "fig:gwl-president-table")". +Note that CL-WHO symbols such as "(:texttt "htm")", "(:texttt "str")", and "(:texttt "fmt")" are available in GWL without +package qualification. See "(:href "http://weitz.de/cl-who" "http://weitz.de/cl-who")" for an explanation of +dynamic HTML generation in CL-WHO." + + ((:boxed-figure :caption "Dynamic Content Using CL-WHO" :label "fig:gwl-president-table") + (:small (:verbatim (:include "~/gendl/documentation/tutorial/examples/gwl-president-table.gdl")))) + + #+NOT-YET + ((:image-figure :image-file "gwl-president-table.png" :caption "Dynamic Content Using CL-WHO" + :width "4in" :height "3in" + :label "fig:gwl-president-table-image")) + )) + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ((:section :title "Page URLs") + + (:p "Objects based on "(:texttt "base-ajax-sheet")" are automatically available from the server at the +URL of the form "(:texttt "http://localhost:9000/make?object="(:emph "classname"))". This is useful during +debugging, but for real projects, you should define a more direct URL. You do that using the +CL function "(:texttt "(gwl:publish-gwl-app "(:emph "path")" "(:emph "classname")")")". For example," + (:quote (:texttt "(gwl:publish-gwl-app \"/greeting\" \"gwl-user::hello-world\")")) +"will make the "(:texttt "gwl-user::hello-world")" object accessible at the URL "(:texttt "http://localhost:9000/greeting")".")) + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ((:section :title "Page Customizations") + + ;;; TODO: Could illustrate customizations by adding CSS to make Hello World red. (:p :class "red" "Hello World!") and maybe + ;;; javascript to change colors when click? + + (:p "In addition to specifying the body html via "(:texttt "main-sheet-body")", you can +customize the page by optionally adding certain messages to your object:" + ((:list :style :itemize) + (:item "Message "(:texttt "title")" can be used to specify the title of the web page") + (:item "Message "(:texttt "doctype-string")" is the string to place at the very start +of the document (it defaults to "(:texttt "\"\"")")") + (:item "Message "(:texttt "additional-header-content")" can contain any additional +HTML you want to go into the page's "(:texttt "")" section.") + (:item "Message "(:texttt "body-class")" can specify the CSS "(:texttt "class")" attribute for the "(:texttt "")" tag.") + (:item "Message "(:texttt "body-onload")" can be a string of Javascript to go +into the "(:texttt "onload")" event attribute of the "(:texttt "")" tag.") + (:item "Message "(:texttt "body-onpageshow")" can be a string of Javascript to go +into the "(:texttt "onpageshow")" event attribute of the "(:texttt "")" tag."))) + + (:p "We will be using some of these customizations in the examples below.")) + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ((:section :title "Debugging") + ;;;TODO: what else is there to say here? + (:p ""(:texttt "base-ajax-sheet")" provides the "(:texttt "development-links")" message with +links for functionality useful during development, currently consisting of a Refresh! link and a Break +link. It is typically used as follows:" + (:verbatim "(main-sheet-body + (with-cl-who-string () + (when *developing?* (str (the development-links))) + ;; Rest of page definition goes here + ...))"))) + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ((:section :title "Page Links") + + (:p "In order to allow HTML links between page objects, GDL implements a scheme that assigns +URL's to individual page instances. In order to do this efficiently, GDL maintains a table of +root-level instances, and identifies page instances relative to their root instance. For this reason, +and in order for dependency-tracking to work properly, all pages in a GDL application must belong to +the same tree, i.e. they must share a common root page object.") + + (:p "You can generate a hyperlink (an "(:texttt "")" tag) to a particular "(:texttt "base-ajax-sheet")" page +by invoking the "(:texttt "write-self-link")" GDL function on the page instance. "(:texttt "write-self-link")" accepts +a number of keyword arguments to customize the link:" + ((:list :style :itemize) + (:item "You specify the text to be displayed as the link with the "(:texttt ":display-string")" argument") + (:item "You can direct the link to a specific anchor within the page with the "(:texttt ":local-anchor")" argument") + (:item "You can specify various tag attributes of the "(:texttt "")" tag:" + ((:list :style :itemize) + (:item "Argument "(:texttt ":target")" for the "(:texttt "target")" attribute") + (:item "Argument "(:texttt ":on-mouse-over")" for the "(:texttt "onmouseover")" attribute") + (:item "Argument "(:texttt ":on-mouse-out")" for the "(:texttt "onmouseout")" attribute") + (:item "Argument "(:texttt ":on-click")" for the "(:texttt "onclick")" attribute") + (:item "Argument "(:texttt ":title")" for the "(:texttt "title")" attribute") + (:item "Argument "(:texttt ":class")" for the "(:texttt "class")" attribute") + (:item "Argument "(:texttt ":id")" for the "(:texttt "id")" attribute"))))) - (:p "GDL provides a set of primitives useful for generating the - standard HTML form-controls" - (:footnote "http://www.w3.org/TR/html401/interact/forms.html") - " such as text, checkbox, radio, submit, menu, etc. These - should be instantiated as child objects in the page, then - included in the HTML for the page - using " (:texttt "str") " within an - HTML " (:texttt "form") - " tag (see next section).") - - - (:p "The form-controls provided by GDL are documented in YADD accessible with " - (:verbatim "http://localhost:9000/yadd") - " and in Chapter " (:ref "chap:gdlreference") " of this Manual. Examples of -available form-controls are:" - ((:list :style :itemize) - (:item (:texttt "text-form-control")) - (:item (:texttt "checkbox-form-control")) - (:item (:texttt "menu-form-control")) - (:item (:texttt "radio-form-control")) - (:item (:texttt "text-form-control")) - (:item (:texttt "button-form-control")))) - - - (:p "These form-controls are customizable by mixing them into - your own specific form-controls (although this often is not - necessary). New form-controls such as for numbers, dates, + (:p "In order to help create hierarchical multi-page sites, "(:texttt "base-ajax-sheet")" also provides +a "(:texttt "write-back-link")" GDL function for the purpose of generating a link back to the parent page object. +It accepts all the same arguments as "(:texttt "write-self-link")".") + + (:p "Figure "(:ref "fig:gwl-president-links")" shows a modification of "(:ref "fig:gwl-president-table")" +where we put detailed information about each president on a separate page, and provide links to these individual +pages from a summary page. Each child page contains a link to return back to the summary." + + ((:boxed-figure :caption "Hyperlinking" :label "fig:gwl-president-links") + (:small (:verbatim (:include "~/gendl/documentation/tutorial/examples/gwl-president-links.gdl")))) + + #+NOT-YET + ((:image-figure :image-file "gwl-president-links.png" :caption "Hyperlinking" + :width "4in" :height "3in" + :label "fig:gwl-president-links-image"))) + ) + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ((:section :title "Input Using Forms") + (:p "GWL provides a macro "(:texttt "with-html-form")" to obtain input from the user +with an HTML form. In the body of the form, you specify input fields using standard HTML +form controls. When the user submits the form, GDL processes the form input values in two +ways:" + ((:list :style :itemize) + (:item "When the name of an form field matches the name of a "(:texttt +":settable")" computed-slot in the object, GDL will automatically infer its type, do +appropriate conversions, and set the slot the its new value"(:footnote "If the type of a slot +can vary, it is best to make its default be a string and parse the string yourself e.g. with +the "(:texttt "read-safe-string")" function.")".") + (:item "Any input values that do not match a suitable slot are available +from the "(:texttt "query-plist")" message, which returns a plist mapping +keywords representing form field names to the corresponding input value strings"))) + (:p "Figure "(:ref "fig:gwl-hello-world-form")" shows how we can extend the simple +Hello World application of "(:ref "fig:gwl-hello-world")" to allow the user to +customize both the name and the greeting." + + ((:boxed-figure :caption "Input Using Forms" :label "fig:gwl-hello-world-form") + (:small (:verbatim (:include "~/gendl/documentation/tutorial/examples/gwl-hello-world-form.gdl")))) + + #+NOT-YET + ((:image-figure :image-file "gwl-hello-world-form.png" :caption "Input Using Forms" + :width "4in" :height "3in" + :label "fig:gwl-hello-world-form-image"))) + + ((:subsection :title "Form Controls") + + (:p "GDL provides a set of primitives useful for generating the +standard HTML form controls in the body of "(:texttt "with-html-form")". +These should be instantiated as child objects in the page. They provide a +"(:texttt "html-string")" message which returns the HTML for the control.") + + (:p "The form controls provided by GDL are documented in YADD"(:footnote "YADD +is accessible with "(:texttt "http://localhost:9000/yadd")".")" and in the reference appendix +of this manual. Examples of available form controls are:" + ((:list :style :itemize) + (:item (:texttt "text-form-control")) + (:item (:texttt "checkbox-form-control")) + (:item (:texttt "menu-form-control")) + (:item (:texttt "radio-form-control")) + (:item (:texttt "text-form-control")) + (:item (:texttt "button-form-control")))) + + + (:p "These form controls are customizable by mixing them into + your own specific form controls (although this often is not + necessary). New form controls such as for numbers, dates, etc will soon be added to correspond to latest HTML - standards.")) - - ((:subsubsection :title "Fillout Forms") - - (:p "A traditional web application must enclose form controls inside a " - (:texttt "form") - " tag and specify an " (:texttt "action") " (a web URL) to receive and respond to the -form submission. The response will cause the entire page to refresh with -a new page. In GDL, such a form can be generated by wrapping the layout -of the form controls within the " (:texttt "with-html-form") " macro.") - - ((:boxed-figure :caption "Form Controls and Fillout Forms" - :label "fig:gwl-3b") - (:tiny (:verbatim (:include "~/gendl/documentation/tutorial/examples/gwl-3b.gdl")))) - - ((:image-figure :image-file "gwl-3b.png" :caption "Form Controls and Fillout Forms" - :width "4in" :height "3in" - :label "fig:gwl-3b-image")) - - (:p "Figure " - (:ref "fig:gwl-3b") - " is an example which allows the user to enter a year, and the -application will respond with the revenue amount for that year. Additional -form controls are also provided to adjust the table border and cell padding.") - - (:p "This example, when instantiated in a web browser, might look as shown in Figure " - (:ref "fig:gwl-3b-image") - ".")))) - - - ((:section :title "Partial Page Updates with gdlAjax") - (:p (:indexed "AJAX") - " stands for Asynchronous JavaScript and -XML " - (:footnote "http://en.wikipedia.org/wiki/Ajax_(programming)") - ", and allows for more interactive web applications which -respond to user events by updating only part of the web page. The -``Asynchronous'' in Ajax refers to a web page's ability to continue -interacting while one part of the page is being updated by a server -response. Requests need not be Asynchronous, they can also be -Synchronous (``SJAX''), which would cause the web browser to block -execution of any other tasks while the request is being carried -out. The ``XML'' refers to the format of the data that is typically -returned from an AJAX request.") - - (:p "GDL contains a simple framework referred to as " - (:emph "gdlAjax") - " which supports a uniquely convenient and generative -approach to AJAX (and SJAX). With gdlAjax, you use standard GDL -object definitions and child objects in order to model the web page -and the sections of the page, and the dependency tracking engine which -is built into GDL automatically keeps track of which sections of the + standards.") + +#+old (:p "Figure "(:ref "fig:gwl-3b")" is an example which allows the user to enter a year, + and the application will respond with the revenue amount for that year. Additional + form controls are also provided to adjust the table border and cell padding. + This example, when instantiated in a web browser, might look as shown in Figure "(:ref + "fig:gwl-3b-image")"." + + ((:boxed-figure :caption "Using Form Controls" + :label "fig:gwl-3b") + (:tiny (:verbatim (:include "~/gendl/documentation/tutorial/examples/gwl-3b.gdl")))) + + ((:image-figure :image-file "gwl-3b.png" :caption "Using Form Controls" + :width "4in" :height "3in" + :label "fig:gwl-3b-image"))) + + (:p "Figure "(:ref "fig:gwl-hello-world-controls")" reimplements the Hello World form from the last section +using form controls. The functionality is the same but the source is shorter and simpler to read and understand." + ((:boxed-figure :caption "Using Form Controls" :label "fig:gwl-hello-world-controls") + (:small (:verbatim (:include "~/gendl/documentation/tutorial/examples/gwl-hello-world-controls.gdl")))) + ))) + + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ((:section :title "Interactive Applications using AJAX") + + (:p "Input using traditional HTML forms requires the user to explicitly \"submit\" each update +request, and then the application responds by reloading the whole page. The "(:href +"http://en.wikipedia.org/wiki/Ajax_(programming)" "AJAX")(:footnote +"http://en.wikipedia.org/wiki/Ajax_(programming)")" methodology allows web +applications to autonomously contact the server, and to change page content dynamically in +response, leading to a more interactive user experience.") + + (:p "GDL has built-in support for AJAX, using its usual convenient generative approach. +You use child objects to model independently updatable sections of the web pgae, and the dependency +tracking engine which is built into GDL automatically manages of which sections of the page need to be updated after a request.") (:p "Moreover, the state of the internal GDL model which represents the page and the page sections is kept identical to the displayed state of the page. This means that if the user hits the ``Refresh'' button in the browser, the state of the page will remain -unchanged. This ability is not available in some other Ajax +unchanged. This ability is not available in some other AJAX frameworks.") - ((:subsection :title "Steps to Create a gdlAjax Application") - (:p "Initially, it is important to appreciate that the -fundamentals from the previous section on Standard Web Applications -still apply for gdlAjax applications --- that is, HTML generation, -page linking, etc. These techniques will all still work in a gdlAjax -application.") - - (:p "To produce a gdlAjax application entails three main differences from -a standard web application:" - - - ((:list :style :enumerate) - (:item "You mix in " (:texttt "base-ajax-sheet") " instead of " (:texttt "base-html-sheet") - ". " (:texttt "base-ajax-sheet") " mixes in " (:texttt "base-html-sheet") - ", so it will still provide all the functionality of that - mixin. In fact, you can use " - (:texttt "base-ajax-sheet") - " in standard web applications and you won't notice any difference if you do - everything else the same.") - (:item "Instead of a " - (:texttt "write-html-sheet") - " message, you specify a " (:texttt "main-sheet-body") - " message. The " (:texttt "main-sheet-body") " can be a computed-slot or GDL function, - and unlike the " (:texttt "write-html-sheet") " message, it should - simply return a string, not send output to a stream. Also, it only - fills in the body of the page --- everything between the - and tags. The head tag of the page is filled in - automatically and can be customized in various ways.") - (:item "Any sections of the page which you want to have the - capacity to change themselves in response to an Ajax call must - be made into separate page sections, or ``sheet sections,'' and - the HTML for their " (:texttt "main-div") " included in the main - page's " - (:texttt "main-sheet-body") " by use of cl-who's " (:texttt "str") " directive.")) - - - ((:boxed-figure :caption "Partial Page Updates with GdlAjax" - :label "fig:gwl-4") - (:tiny (:verbatim (:include "~/gendl/documentation/tutorial/examples/gwl-4.gdl"))))) - - (:p "Note the following from the example in Figure " - (:ref "fig:gwl-4") ":" - - ((:list :style :itemize) - (:item "We mix in " (:texttt "base-ajax-sheet") " and specify a " - (:texttt "main-sheet-body") " slot, which uses " - (:texttt "with-cl-who-string") " to compute a string - of HTML. This approach is also easier to debug, - since the " (:texttt "main-sheet-body") " string - can be evaluated in the tasty inspector or at the - command-line.") - - (:item "We use " (:texttt "str") " to include the string for the main page - section (called " (:texttt "main-section") " in this example) into the " - (:texttt "main-sheet-body") ".") - - (:item "In the " (:texttt "main-section") ", we also - use " (:texttt "str") " to include the html-string for each of - three form-controls. We have provided a form control for the - table border, the table padding, and the revenue year to look - up.") - - (:item "The only page section in this example is " - (:texttt "(the main-section)") - ". This is defined as a child object, and has its " - (:texttt "inner-html") - " computed in the parent and passed in as an input. The " - (:texttt "sheet-section") - " will automatically compute a " - (:texttt "main-div") - " message based on the " - (:texttt "inner-html") - " that we are passing in. The " (:texttt "main-div") - " is simply the " (:texttt "inner-html") ", wrapped with - an HTML DIV (i.e. ``division'') tag which contains a unique - identifier for this section, derived from the root-path - to the GDL object in the tree which represents the - sheet section.") - - (:item "We introduce the CL function " (:texttt "gwl:publish-gwl-app") - ", which makes available a simplified URL for visiting an instance of this - object in the web browser. In this case, we can access the - instance using " - (:texttt "http://localhost:9000/revenue-lookup")))) - - - - - (:p "Notice also the use of " - (:texttt ":ajax-submit-on-change? ...") - " in each of the form-controls. This directs the gdlAjax - system to ``scrape'' the values of these form controls - and ``bash'' them into the " - (:texttt "value") - " slot of the corresponding object on the server, whenever -they are changed in the browser. No ``Submit'' button press is -necessary.") - - (:p "It is also possible programmatically to send form-control - values, and/or call a GDL Function, on the server, by - using the " - (:texttt (:indexed "gdl-ajax-call")) - " GDL function. This function will emit the necessary - JavaScript code to use as an event handler, e.g. for an - ``onclick'' event. For example, you could have the following snippet somewhere in your page:" - (:verbatim "((:span :onclick (the (gdl-ajax-call :function-key :restore-defaults!))) \"Press Me\" )") - "This will produce a piece of text ``Press Me,'' which, - when pressed, will have the effect of calling a function named " - (:texttt "restore-defaults!") - " in the page's object on the server. If the function " - (:texttt "restore-defaults!") - " is not defined, an error will result. The " - (:texttt "gdl-ajax-call") - " GDL function can also send arbitrary form-control values - to the server by using the " - (:texttt ":form-controls") - " keyword argument, and listing the relevant form-control objects. The " - (:texttt "gdl-ajax-call") - " GDL function is fully documented in YADD and the reference appendix.") - + ((:subsection :title "AJAX Event Handling") - (:p "If for some reason you want to do more than one " - (:texttt "gdl-ajax-call") - " sequentially, then it is best to use " - (:texttt "gdl-sjax-call") - " instead. This variant will cause the browser to wait until - each call completes, before making the next call. To achieve - this, you would want to append the strings together, e.g:" - (:verbatim " - ((:span :onclick (string-append (the (gdl-sjax-call ...)) - (the (gdl-sjax-call ...)) - (the (gdl-sjax-call ...))) ... ))") - - "With that said, it is rarely necessary to do these calls - sequentially like this, because you can use :form-controls - and :function-key simultaneously. As long as your logic - works correctly when the form-controls are set before the - function is called, then you can group the functions - together into a ``wrapper-function,'' and do the entire - processing with a single Ajax (or Sjax) call. This would be - be the recommended approach whenever possible.")) + (:p "An AJAX application works by contacting the server +in response to "(:href "https://en.wikipedia.org/wiki/DOM_events" "HTML events") +(:footnote "https://en.wikipedia.org/wiki/DOM_events")" such as \"onclick\" +or \"onfocus\". GDL provides the function "(:texttt "gdl-ajax-call")" to generate +the JavaScript to handle such events by invoking GDL functionality on the server.") + (:p "For example, the following CL-WHO snippet" + (:verbatim "((:span :onclick (the (gdl-ajax-call :function-key :restore-defaults!))) + \"Press Me\")") + "will produce a piece of text ''Press Me'' which, when pressed, will call "(:texttt "restore-defaults!")" +in the page's object on the server. If "(:texttt "restore-defaults!")" is not defined, an error will result.") + (:p (:texttt "gdl-ajax-call")" can also update form control values on the server by using the "(:texttt +":form-controls")" keyword argument. For details, see the "(:texttt "gdl-ajax-call")" documentation in +YADD"(:footnote "YADD is accessible with "(:texttt "http://localhost:9000/yadd")".")" and the reference appendix.") + + (:p "For convenience, GDL form-control objects provide direct support for AJAX with the "(:texttt ":ajax-submit-on-change?")" +argument, which is equivalent to invoking "(:texttt "gdl-ajax-call")" for the control's \"onchange\" event.")) + + ((:subsection :title "AJAX Page Updating") + + (:p "In order to have the capacity to change itself in response to AJAX calls, a page must be structured +as one or more "(:texttt "sheet-section")" child objects. Sheet sections provide a "(:texttt "main-div")" message +which computes the HTML for the section and registers the section as subject to AJAX update handling. The +main page should include the "(:texttt "main-div")" of each child sheet section in its "(:texttt "main-sheet-body")".") + + (:p "The sheet section definition should specify the section's HTML in the "(:texttt "inner-html")" input slot. +This plays the same role as the "(:texttt "main-sheet-body")" does in the page.") + + (:p "Figure "(:ref "fig:gwl-hello-world-ajax")" reimplements the Hello World form from the last section +using AJAX. Note that we don't need the explicit UPDATE button any more, as the changes the user makes take effect +immediately due to the use of "(:texttt ":ajax-submit-on-change?")" argument in each of the form controls." + ((:boxed-figure :caption "Using AJAX" + :label "fig:gwl-hello-world-ajax") + (:small (:verbatim (:include "~/gendl/documentation/tutorial/examples/gwl-hello-world-ajax.gdl")))) + ) + + ) ((:subsection :title "Including Graphics")