Commit d506336b authored by Dave Cooper's avatar Dave Cooper
Browse files

started x3d lenses for route-pipe (i.e. torus and global-filleted-polyline)

parent b3f1bada
......@@ -54,7 +54,20 @@
:center (translate (the center)
:up (half (the-child height))
:left 17 :front 5))
(waterslide :type 'route-pipe
:vertex-list (list (make-point 20 20 20)
(make-point 20 19 15)
(make-point 18 19 10)
(make-point 18 16 5))
:default-radius 5
:outer-pipe-radius 1
:inner-pipe-radius 0.8
:display-controls (list :color :blue-steel
:transparency 0.3
:shininess 0.7
:spectral-color :white))
(silo :type 'silo
:radius 1
......@@ -10,5 +10,6 @@
:depends-on (:gdl-base)
((:file "source/load")))
......@@ -69,9 +69,7 @@ Shape
(the width) (the length) (the height)
(write-the material-properties-string)))
(write-the material-properties-string)))))
(define-lens (vrml global-filleted-polyline)()
......@@ -409,6 +409,27 @@
(define-lens (x3d torus)()
(let ((cross-section (mapcar #'(lambda(point)
(the (global-to-local point))) (the start-circle interpolated-points)))
(spine (mapcar #'(lambda(point)
(the (global-to-local point))) (the centerline-arc interpolated-points))))
(cl-who:with-html-output (*stream* nil :indent nil)
:beginCap (if (the end-caps?) "TRUE" "FALSE")
:endCap (if (the end-caps?) "TRUE" "FALSE")
:solid "FALSE"
:creaseAngle "1.571"
:crossSection (format nil "~{~3,7f ~3,7f~^, ~}" (mapcan #'(lambda(point) (list (get-x point) (get-y point))) cross-section))
:spine (format nil "~{~3,7f ~3,7f ~3,7f~^, ~}" (mapcan #'(lambda(point) (list (get-x point) (get-y point) (get-z point))) spine)))
(:Appearance (write-the material-properties))))))))
(define-lens (x3d box)()
......@@ -421,9 +442,26 @@
(:Box :size (format nil "~a ~a ~a"
(to-double-float (the width))
(to-double-float (the length))
(to-double-float (the height)))))))
(to-double-float (the height)))))))))
(define-lens (x3d global-filleted-polyline)()
(let ((points (the interpolated-points)))
(cl-who:with-html-output (*stream* nil :indent nil)
(:Appearance (write-the material-properties))
:coordIndex (format nil "~{~a~^ ~}" (list-of-numbers 0 (1- (length points))))
:point (format nil "~{~a~^ ~}"
(mapcar #'(lambda(point)
(let ((point (the (global-to-local point))))
(format nil "~a ~a ~a" (get-x point) (get-y point) (get-z point)))) points))))))))))
(define-lens (x3d global-polyline)()
......@@ -443,10 +481,7 @@
(coerce (get-y point) 'single-float)
(coerce (get-z point) 'single-float)
(the vertex-list)))))))))
(the vertex-list)))))))))))
(define-lens (x3d ifs-output-mixin)()
......@@ -95,3 +95,5 @@ Defaults to the assembly-import produced from the file-name. " imported-assembly
:computed-slots ((file-name #+mswindows (or (probe-file "e:/tmp/CURSUS0104.stp")
(probe-file "z:/tmp/CURSUS0104.stp"))
#-mswindows (probe-file "~/share/tmp/CURSUS0104.stp"))))
Supports Markdown
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