Commit 4d91b9d3 authored by Dave Cooper's avatar Dave Cooper

finished circular-curve and circular-surface

parent 570be356
(in-package :gdl-user)
(define-object time-report ()
:computed-slots
((update-flag nil :settable)
(current-time-uncached (iso-8601-date (get-universal-time) :include-time? t) :uncached)
(current-time (progn (the update-flag)
(iso-8601-date (get-universal-time) :include-time? t)))))
#|
GDL-USER> (make-self 'time-report)
#<TIME-REPORT 4020123363>
GDL-USER> (the current-time)
"2015-06-12T16:34:20"
GDL-USER> (the current-time)
"2015-06-12T16:34:20"
GDL-USER> (the current-time)
"2015-06-12T16:34:20"
GDL-USER> (the (set-slot! :update-flag (not (the update-flag))))
NIL
GDL-USER> (the current-time)
"2015-06-12T16:34:41"
GDL-USER> (the current-time)
"2015-06-12T16:34:41"
GDL-USER> (the (set-slot! :update-flag (not (the update-flag))))
NIL
GDL-USER> (the current-time)
"2015-06-12T16:34:49"
GDL-USER> (the current-time)
"2015-06-12T16:34:49"
GDL-USER> (the current-time-uncached)
"2015-06-12T16:35:53"
GDL-USER> (the current-time-uncached)
"2015-06-12T16:35:53"
GDL-USER> (the current-time-uncached)
"2015-06-12T16:35:54"
GDL-USER> (the current-time-uncached)
"2015-06-12T16:35:55"
GDL-USER> (the current-time-uncached)
"2015-06-12T16:35:56"
GDL-USER> (the current-time-uncached)
"2015-06-12T16:35:57"
GDL-USER>
|#
;;
;; Copyright 2002-2011 Genworks International
;;
;; This source file is part of the General-purpose Declarative
;; Language project (GDL).
;;
;; This source file contains free software: you can redistribute it
;; and/or modify it under the terms of the GNU Affero General Public
;; License as published by the Free Software Foundation, either
;; version 3 of the License, or (at your option) any later version.
;;
;; This source file is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; Affero General Public License for more details.
;;
;; You should have received a copy of the GNU Affero General Public
;; License along with this source file. If not, see
;; <http://www.gnu.org/licenses/>.
;;
(in-package :surf)
(define-object circular-curve (arc-curve)
:documentation
(:description
"An full circule represented exactly as a quadratic NURBS
curve. Inputs and messages are the same as for arc-curve."
:examples "<pre>
(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))
</pre>"))
;;
;; FLAG move to main package.lisp.
;;
(eval-when (:compile-toplevel :load-toplevel :execute)
(export 'circular-curve :surf))
;;
;; FLAG -- add Lift regression test in gendl/regression/source/
;;
;;
;; Copyright 2015 Genworks International
;;
;; This source file is part of the General-purpose Declarative
;; Language project (GDL).
;;
;; This source file contains free software: you can redistribute it
;; and/or modify it under the terms of the GNU Affero General Public
;; License as published by the Free Software Foundation, either
;; version 3 of the License, or (at your option) any later version.
;;
;; This source file is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; Affero General Public License for more details.
;;
;; You should have received a copy of the GNU Affero General Public
;; License along with this source file. If not, see
;; <http://www.gnu.org/licenses/>.
;;
(in-package :surf)
(define-object circular-surface (trimmed-surface)
:documentation
(:description
"Represents a planar, full-circular surface controlled
by a radius, and the normal center and orientation
for base-object."
:examples "<pre>
(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))
</pre>")
:input-slots
("Number. The radius of the resulting trimmed-surface."
radius)
:hidden-objects
((basis-surface :type 'rectangular-surface
:length (twice (the radius))
:width (twice (the radius)))
(island :type 'arc-curve :pass-down (radius))))
;;
;; FLAG move to main package.lisp.
;;
(eval-when (:compile-toplevel :load-toplevel :execute)
(export 'circular-surface :surf))
;;
;; FLAG -- add Lift regression test in gendl/regression/source/
;;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment