VRML is not displaying geometry properly
Created by: tobievandenberg
Loading the primi-plane example given below in Tasty, gives the geometry as shown in the figures below (X3D and SVG):
In VRML mode provides a different picture:
Could this be a right vs left-handed coordinate system issue again?
The primi-plane code:
;; ;; Copyright 2012 Genworks International and the Delft University of ;; Technology ;; ;; 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 :gdl-user)
(define-object primi-plane (base-object) :input-slots ((data-folder data-folder) (data-file-name "aircraft-3.dat") (points-file-name "NACA_0012.dat"))
:computed-slots ((data-file-path (merge-pathnames (the data-file-name) (the data-folder)))
(points-file-path (merge-pathnames (the points-file-name)
(the data-folder)))
(dihedral (the data wing-dihedral) :settable))
:hidden-objects ((data :type 'aircraft-data :parameters (with-open-file (in (the data-file-path)) (read in)) :points-data (with-open-file (in (the points-file-path)) (read in)))
(canonical-profile :type 'profile-curve :points-data (the data points-data)))
:objects ((wing-assy :type 'box-wings :c-root (the data wing-c-root) :c-tip (the data wing-c-tip) :span (the data wing-span) :root-center (translate (the center) :down (- (the fuselage radius) (half (the-child thickness))) :front (* 1/6 (the fuselage length))) :thickness (the data wing-thickness) :dihedral (the dihedral) :display-controls (list :color :green) :canonical-profile (the canonical-profile))
(tail-assy :type 'box-tail :c-root (the data tail-c-root) :c-tip (the data tail-c-tip) :span (the data tail-span) :root-center (translate (the center) :down (- (the fuselage radius) (half (the-child thickness))) :rear (- (half (the fuselage length)) (the-child c-root)))
:fin-root-center (translate (the-child root-center)
:up (* 4/3 (the fuselage radius)))
:thickness (the data tail-thickness)
:dihedral (the data tail-dihedral)
:fin-span (the data fin-span)
:fin-c-root (the data fin-c-root)
:fin-c-tip (the data fin-c-tip)
:fin-thickness (the data fin-thickness)
:display-controls (list :color :blue)
:canonical-profile (the canonical-profile))
(fuselage :type 'cylinder-fuselage :d (the data fuselage-diameter) :l (the data fuselage-length) :cross-section-percents (the data fuselage-cross-section-percents) :display-controls (list :color :red))))
(define-object profile-curve (fitted-curve)
:input-slots (points-data )
:computed-slots ((point-coordinates (rest (rest (the points-data))))
(x-coords (plist-keys (the point-coordinates)))
(y-coords (plist-values (the point-coordinates)))
(x-max (most 'get-x (the points)))
(x-min (least 'get-x (the points)))
(span (- (get-x (the x-max))
(get-x (the x-min))))
(y-max (most 'get-y (the points)))
(y-min (least 'get-y (the points)))
(max-thickness (- (get-y (the y-max))
(get-y (the y-min))))
(points (mapcar #'(lambda (x y) (make-point x y 0))
(the x-coords)
(the y-coords)))))
(define-object aircraft-data () :input-slots (wing-span wing-c-root wing-c-tip wing-thickness wing-dihedral Tmax rho C-of-F fuselage-diameter fuselage-length fuselage-cross-section-percents tail-span tail-c-root tail-c-tip tail-thickness tail-dihedral fin-span fin-c-root fin-c-tip fin-thickness
points-data
))
(define-object cylinder-fuselage (cylinder) :input-slots (d l cross-section-percents)
:computed-slots ((radius (half (the d))) (length (the l))
(section-offset-percentages (plist-keys (the cross-section-percents)))
(section-centers (let ((nose-point (the (face-center :front))))
(mapcar #'(lambda(percentage)
(translate nose-point :rear
(* percentage 1/100
(the length))))
(the section-offset-percentages))))
(section-diameter-percentages (plist-values (the cross-section-percents)))
(section-radii (mapcar #'(lambda(percentage)
(* 1/100 percentage (the radius)))
(the section-diameter-percentages))))
:hidden-objects ((section-curves :type 'arc-curve :sequence (:size (length (the section-centers))) :center (nth (the-child index) (the section-centers)) :radius (nth (the-child index) (the section-radii)) :orientation (alignment :top (the (face-normal-vector :rear)))))
:objects ((floor-plane :type 'rectangular-surface :display-controls (list :color :black) :width (* (the radius) 4) :length (* (the length) 3/2))
(merged :type 'merged-solid :brep (the floor-plane) :other-brep (the loft) :make-manifold? t)
(regioned :type 'regioned-solid :display-controls nil :brep (the merged))
(loft :type 'lofted-surface :end-caps-on-brep? t :curves (list-elements (the section-curves)))))
(define-object box-wings (base-object) :input-slots (root-center span c-root c-tip thickness dihedral canonical-profile)
:objects ((wings :type 'box-wing :sequence (:size 2) :root-point (the root-center) :side (ecase (the-child index) (0 :right) (1 :left)) :span (the span) :c-root (the c-root) :c-tip (the c-tip) :thickness (the thickness) :canonical-profile (the canonical-profile) ;; ;; Left wing will get a left-handed coordinate system and be a mirror of the right. ;; :orientation (let* ((hinge (the (face-normal-vector (ecase (the-child side) (:right :front) (:left :rear))))) (right (rotate-vector-d (the (face-normal-vector (the-child side))) (the dihedral) hinge))) (alignment :right right :top (cross-vectors hinge right) :front (the (face-normal-vector :front)))))))
(define-object box-tail (box-wings) :input-slots (fin-span fin-c-root fin-c-tip fin-thickness fin-root-center)
:objects ((fin :type 'box-wing :root-point (the fin-root-center) :span (the fin-span) :c-root (the fin-c-root) :c-tip (the fin-c-tip) :thickness (the fin-thickness) :orientation (alignment :right (the (face-normal-vector :top)) :top (the (face-normal-vector :left))))))
(define-object box-wing (box)
:input-slots (root-point side span c-root c-tip thickness canonical-profile)
:computed-slots ((width (the span)) (length (the c-root)) (height (the thickness))
(center (translate-along-vector (the root-point)
(the (face-normal-vector :right))
(half (the width))
)))
:hidden-objects ((box :type 'box :display-controls (list :color :orange :transparency 0.7))
(root-profile
:type 'boxed-curve
:curve-in (the canonical-profile)
:scale-y (/ (the thickness) (the canonical-profile max-thickness))
:scale-x (/ (the c-root) (the canonical-profile span))
:center (the (edge-center :left :front))
:orientation (alignment :top (the (face-normal-vector :right))
:right (the (face-normal-vector :rear))
:rear (the (face-normal-vector :top))))
(tip-profile
:type 'boxed-curve
:curve-in (the canonical-profile)
:scale-y (/ (the thickness) (the canonical-profile max-thickness))
:scale-x (/ (the c-tip) (the canonical-profile span))
:center (translate (the (edge-center :right :front))
:rear
(- (the c-root) (the c-tip)))
:orientation (the root-profile orientation)))
:objects ((loft :type 'lofted-surface :end-caps-on-brep? t :curves (list (the root-profile) (the tip-profile)))))
;; ;; For convenience, look for data folder two levels up, one level up, ;; and in same directory as source file. ;; (defparameter data-folder (let* ((source-pathname #+allegro excl:source-pathname #+lispworks dspec:source-pathname ;; in future: (glisp:source-pathname) ) (base-path (make-pathname :name nil :type nil :defaults source-pathname ;; in future: (glisp:source-pathname) ))) (or (probe-file (merge-pathnames "../../data/" base-path)) (probe-file (merge-pathnames "../data/" base-path)) (probe-file (merge-pathnames "data/" base-path))
(error "Your data folder is not there. Please make a data folder with
aircraft and points data, two or one or zero directory levels up from the directory of this source file.~%"))))
Imported comments:
By genworks on 2013-05-17 12:23:25 UTC
It probably is a left-handed coordinate system issue. In SVG we display everything in absolute coordinates, so the LH- and RH- coord systems never becomes an issue. In X3D we do special tricks to "undo" the LH coordinate systems for display, because we are using a proper X3D scene graph, and as far as we understand, X3D does not support LH coordinate systems natively.
Our hope has been to deprecate and obsolete the VRML output-format, and delete it from the tasty menu soon. Are there particular viewers or downstream applications which still require VRML and cannot work equally well with X3D?
On Fri, May 17, 2013 at 4:25 AM, tobievandenberg notifications@github.comwrote:
Loading the primi-plane example given below in Tasty, gives the geometry as shown in the figures below (X3D and SVG):
[image: x3d]https://f.cloud.github.com/assets/1998873/516919/a87ebf10-beca-11e2-9df5-2bf976f5940f.png [image: svg]https://f.cloud.github.com/assets/1998873/516920/aa7b9388-beca-11e2-9117-5f4033d245bb.png
In VRML mode provides a different picture:
[image: vrml]https://f.cloud.github.com/assets/1998873/516933/d6687ec0-beca-11e2-8981-536252d23bf7.png
Could this be a right vs left-handed coordinate system issue again?
The primi-plane code:
;; ;; Copyright 2012 Genworks International and the Delft University of ;; Technology ;; ;; 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 :gdl-user)
(define-object primi-plane (base-object) :input-slots ((data-folder data-folder) (data-file-name "aircraft-3.dat") (points-file-name "NACA_0012.dat"))
:computed-slots ((data-file-path (merge-pathnames (the data-file-name) (the data-folder)))
(points-file-path (merge-pathnames (the points-file-name) (the data-folder))) (dihedral (the data wing-dihedral) :settable))
:hidden-objects ((data :type 'aircraft-data :parameters (with-open-file (in (the data-file-path)) (read in)) :points-data (with-open-file (in (the points-file-path)) (read in)))
(canonical-profile :type 'profile-curve :points-data (the data points-data)))
:objects ((wing-assy :type 'box-wings :c-root (the data wing-c-root) :c-tip (the data wing-c-tip) :span (the data wing-span) :root-center (translate (the center) :down (- (the fuselage radius) (half (the-child thickness))) :front (* 1/6 (the fuselage length))) :thickness (the data wing-thickness) :dihedral (the dihedral) :display-controls (list :color :green) :canonical-profile (the canonical-profile))
(tail-assy :type 'box-tail :c-root (the data tail-c-root) :c-tip (the data tail-c-tip) :span (the data tail-span) :root-center (translate (the center) :down (- (the fuselage radius) (half (the-child thickness))) :rear (- (half (the fuselage length)) (the-child c-root)))
:fin-root-center (translate (the-child root-center) :up (* 4/3 (the fuselage radius))) :thickness (the data tail-thickness) :dihedral (the data tail-dihedral) :fin-span (the data fin-span) :fin-c-root (the data fin-c-root) :fin-c-tip (the data fin-c-tip) :fin-thickness (the data fin-thickness) :display-controls (list :color :blue) :canonical-profile (the canonical-profile))
(fuselage :type 'cylinder-fuselage :d (the data fuselage-diameter) :l (the data fuselage-length) :cross-section-percents (the data fuselage-cross-section-percents) :display-controls (list :color :red))))
(define-object profile-curve (fitted-curve)
:input-slots (points-data )
:computed-slots ((point-coordinates (rest (rest (the points-data))))
(x-coords (plist-keys (the point-coordinates))) (y-coords (plist-values (the point-coordinates))) (x-max (most 'get-x (the points))) (x-min (least 'get-x (the points))) (span (- (get-x (the x-max)) (get-x (the x-min)))) (y-max (most 'get-y (the points))) (y-min (least 'get-y (the points))) (max-thickness (- (get-y (the y-max)) (get-y (the y-min)))) (points (mapcar #'(lambda (x y) (make-point x y 0)) (the x-coords) (the y-coords)))))
(define-object aircraft-data () :input-slots (wing-span wing-c-root wing-c-tip wing-thickness wing-dihedral Tmax rho C-of-F fuselage-diameter fuselage-length fuselage-cross-section-percents tail-span tail-c-root tail-c-tip tail-thickness tail-dihedral fin-span fin-c-root fin-c-tip fin-thickness
points-data ))
(define-object cylinder-fuselage (cylinder) :input-slots (d l cross-section-percents)
:computed-slots ((radius (half (the d))) (length (the l))
(section-offset-percentages (plist-keys (the cross-section-percents))) (section-centers (let ((nose-point (the (face-center :front)))) (mapcar #'(lambda(percentage) (translate nose-point :rear (* percentage 1/100 (the length)))) (the section-offset-percentages)))) (section-diameter-percentages (plist-values (the cross-section-percents))) (section-radii (mapcar #'(lambda(percentage) (* 1/100 percentage (the radius))) (the section-diameter-percentages))))
:hidden-objects ((section-curves :type 'arc-curve :sequence (:size (length (the section-centers))) :center (nth (the-child index) (the section-centers)) :radius (nth (the-child index) (the section-radii)) :orientation (alignment :top (the (face-normal-vector :rear)))))
:objects ((floor-plane :type 'rectangular-surface :display-controls (list :color :black) :width (* (the radius) 4) :length (* (the length) 3/2))
(merged :type 'merged-solid :brep (the floor-plane) :other-brep (the loft) :make-manifold? t)
(regioned :type 'regioned-solid :display-controls nil :brep (the merged))
(loft :type 'lofted-surface :end-caps-on-brep? t :curves (list-elements (the section-curves)))))
(define-object box-wings (base-object) :input-slots (root-center span c-root c-tip thickness dihedral canonical-profile)
:objects ((wings :type 'box-wing :sequence (:size 2) :root-point (the root-center) :side (ecase (the-child index) (0 :right) (1 :left)) :span (the span) :c-root (the c-root) :c-tip (the c-tip) :thickness (the thickness) :canonical-profile (the canonical-profile) ;; ;; Left wing will get a left-handed coordinate system and be a mirror of the right. ;; :orientation (let* ((hinge (the (face-normal-vector (ecase (the-child side) (:right :front) (:left :rear))))) (right (rotate-vector-d (the (face-normal-vector (the-child side))) (the dihedral) hinge))) (alignment :right right :top (cross-vectors hinge right) :front (the (face-normal-vector :front)))))))
(define-object box-tail (box-wings) :input-slots (fin-span fin-c-root fin-c-tip fin-thickness fin-root-center)
:objects ((fin :type 'box-wing :root-point (the fin-root-center) :span (the fin-span) :c-root (the fin-c-root) :c-tip (the fin-c-tip) :thickness (the fin-thickness) :orientation (alignment :right (the (face-normal-vector :top)) :top (the (face-normal-vector :left))))))
(define-object box-wing (box)
:input-slots (root-point side span c-root c-tip thickness canonical-profile)
:computed-slots ((width (the span)) (length (the c-root)) (height (the thickness))
(center (translate-along-vector (the root-point) (the (face-normal-vector :right)) (half (the width)) )))
:hidden-objects ((box :type 'box :display-controls (list :color :orange :transparency 0.7))
(root-profile :type 'boxed-curve :curve-in (the canonical-profile) :scale-y (/ (the thickness) (the canonical-profile max-thickness)) :scale-x (/ (the c-root) (the canonical-profile span)) :center (the (edge-center :left :front)) :orientation (alignment :top (the (face-normal-vector :right)) :right (the (face-normal-vector :rear)) :rear (the (face-normal-vector :top)))) (tip-profile :type 'boxed-curve :curve-in (the canonical-profile) :scale-y (/ (the thickness) (the canonical-profile max-thickness)) :scale-x (/ (the c-tip) (the canonical-profile span)) :center (translate (the (edge-center :right :front)) :rear (- (the c-root) (the c-tip))) :orientation (the root-profile orientation)))
:objects ((loft :type 'lofted-surface :end-caps-on-brep? t :curves (list (the root-profile) (the tip-profile)))))
;; ;; For convenience, look for data folder two levels up, one level up, ;; and in same directory as source file. ;; (defparameter data-folder (let* ((source-pathname #+allegro excl:source-pathname #+lispworks dspec:source-pathname ;; in future: (glisp:source-pathname) ) (base-path (make-pathname :name nil :type nil :defaults source-pathname ;; in future: (glisp:source-pathname) ))) (or (probe-file (merge-pathnames "../../data/" base-path)) (probe-file (merge-pathnames "../data/" base-path)) (probe-file (merge-pathnames "data/" base-path))
(error "Your data folder is not there. Please make a data folder with
aircraft and points data, two or one or zero directory levels up from the directory of this source file.~%"))))
Reply to this email directly or view it on GitHubhttps://github.com/genworks/gendl/issues/113 .
-- My Best,
Dave Cooper, Genworks Support david.cooper@genworks.com, dave.genworks.com(skype) USA: 248-327-3253(o), 1-248-330-2979(mobile) UK: 0191 645 1699
By tobievandenberg on 2013-05-17 14:11:26 UTC
Hi Dave,
For my applications, I don’t need VRML, I use X3D. Most people at the faculty are probably using X3D now.
KBE course students were playing around and pointed the VRML issue out to me. They thought they were doing something wrong. We can tell them not to use VRML of course, but your suggestion to remove the VRML option from the Tasty menu seems fine to me.
Best, Tobie
From: Dave Cooper [mailto:notifications@github.com] Sent: vrijdag 17 mei 2013 14:23 To: genworks/gendl Cc: Tobie van den Berg - LR Subject: Re: [gendl] VRML is not displaying geometry properly (#113 (closed))
It probably is a left-handed coordinate system issue. In SVG we display everything in absolute coordinates, so the LH- and RH- coord systems never becomes an issue. In X3D we do special tricks to "undo" the LH coordinate systems for display, because we are using a proper X3D scene graph, and as far as we understand, X3D does not support LH coordinate systems natively.
Our hope has been to deprecate and obsolete the VRML output-format, and delete it from the tasty menu soon. Are there particular viewers or downstream applications which still require VRML and cannot work equally well with X3D?
On Fri, May 17, 2013 at 4:25 AM, tobievandenberg notifications@github.comwrote:
Loading the primi-plane example given below in Tasty, gives the geometry as shown in the figures below (X3D and SVG):
[image: x3d]https://f.cloud.github.com/assets/1998873/516919/a87ebf10-beca-11e2-9df5-2bf976f5940f.png [image: svg]https://f.cloud.github.com/assets/1998873/516920/aa7b9388-beca-11e2-9117-5f4033d245bb.png
In VRML mode provides a different picture:
[image: vrml]https://f.cloud.github.com/assets/1998873/516933/d6687ec0-beca-11e2-8981-536252d23bf7.png
Could this be a right vs left-handed coordinate system issue again?
The primi-plane code:
;; ;; Copyright 2012 Genworks International and the Delft University of ;; Technology ;; ;; 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 :gdl-user)
(define-object primi-plane (base-object) :input-slots ((data-folder data-folder) (data-file-name "aircraft-3.dat") (points-file-name "NACA_0012.dat"))
:computed-slots ((data-file-path (merge-pathnames (the data-file-name) (the data-folder)))
(points-file-path (merge-pathnames (the points-file-name) (the data-folder)))
(dihedral (the data wing-dihedral) :settable))
:hidden-objects ((data :type 'aircraft-data :parameters (with-open-file (in (the data-file-path)) (read in)) :points-data (with-open-file (in (the points-file-path)) (read in)))
(canonical-profile :type 'profile-curve :points-data (the data points-data)))
:objects ((wing-assy :type 'box-wings :c-root (the data wing-c-root) :c-tip (the data wing-c-tip) :span (the data wing-span) :root-center (translate (the center) :down (- (the fuselage radius) (half (the-child thickness))) :front (* 1/6 (the fuselage length))) :thickness (the data wing-thickness) :dihedral (the dihedral) :display-controls (list :color :green) :canonical-profile (the canonical-profile))
(tail-assy :type 'box-tail :c-root (the data tail-c-root) :c-tip (the data tail-c-tip) :span (the data tail-span) :root-center (translate (the center) :down (- (the fuselage radius) (half (the-child thickness))) :rear (- (half (the fuselage length)) (the-child c-root)))
:fin-root-center (translate (the-child root-center) :up (* 4/3 (the fuselage radius)))
:thickness (the data tail-thickness) :dihedral (the data tail-dihedral)
:fin-span (the data fin-span) :fin-c-root (the data fin-c-root) :fin-c-tip (the data fin-c-tip) :fin-thickness (the data fin-thickness)
:display-controls (list :color :blue) :canonical-profile (the canonical-profile))
(fuselage :type 'cylinder-fuselage :d (the data fuselage-diameter) :l (the data fuselage-length) :cross-section-percents (the data fuselage-cross-section-percents) :display-controls (list :color :red))))
(define-object profile-curve (fitted-curve)
:input-slots (points-data )
:computed-slots ((point-coordinates (rest (rest (the points-data))))
(x-coords (plist-keys (the point-coordinates))) (y-coords (plist-values (the point-coordinates)))
(x-max (most 'get-x (the points))) (x-min (least 'get-x (the points)))
(span (- (get-x (the x-max)) (get-x (the x-min))))
(y-max (most 'get-y (the points))) (y-min (least 'get-y (the points)))
(max-thickness (- (get-y (the y-max)) (get-y (the y-min))))
(points (mapcar #'(lambda (x y) (make-point x y 0)) (the x-coords) (the y-coords)))))
(define-object aircraft-data () :input-slots (wing-span wing-c-root wing-c-tip wing-thickness wing-dihedral Tmax rho C-of-F fuselage-diameter fuselage-length fuselage-cross-section-percents tail-span tail-c-root tail-c-tip tail-thickness tail-dihedral fin-span fin-c-root fin-c-tip fin-thickness
points-data ))
(define-object cylinder-fuselage (cylinder) :input-slots (d l cross-section-percents)
:computed-slots ((radius (half (the d))) (length (the l))
(section-offset-percentages (plist-keys (the cross-section-percents)))
(section-centers (let ((nose-point (the (face-center :front)))) (mapcar #'(lambda(percentage) (translate nose-point :rear (* percentage 1/100 (the length)))) (the section-offset-percentages))))
(section-diameter-percentages (plist-values (the cross-section-percents)))
(section-radii (mapcar #'(lambda(percentage) (* 1/100 percentage (the radius))) (the section-diameter-percentages))))
:hidden-objects ((section-curves :type 'arc-curve :sequence (:size (length (the section-centers))) :center (nth (the-child index) (the section-centers)) :radius (nth (the-child index) (the section-radii)) :orientation (alignment :top (the (face-normal-vector :rear)))))
:objects ((floor-plane :type 'rectangular-surface :display-controls (list :color :black) :width (* (the radius) 4) :length (* (the length) 3/2))
(merged :type 'merged-solid :brep (the floor-plane) :other-brep (the loft) :make-manifold? t)
(regioned :type 'regioned-solid :display-controls nil :brep (the merged))
(loft :type 'lofted-surface :end-caps-on-brep? t :curves (list-elements (the section-curves)))))
(define-object box-wings (base-object) :input-slots (root-center span c-root c-tip thickness dihedral canonical-profile)
:objects ((wings :type 'box-wing :sequence (:size 2) :root-point (the root-center) :side (ecase (the-child index) (0 :right) (1 :left)) :span (the span) :c-root (the c-root) :c-tip (the c-tip) :thickness (the thickness) :canonical-profile (the canonical-profile) ;; ;; Left wing will get a left-handed coordinate system and be a mirror of the right. ;; :orientation (let* ((hinge (the (face-normal-vector (ecase (the-child side) (:right :front) (:left :rear))))) (right (rotate-vector-d (the (face-normal-vector (the-child side))) (the dihedral) hinge))) (alignment :right right :top (cross-vectors hinge right) :front (the (face-normal-vector :front)))))))
(define-object box-tail (box-wings) :input-slots (fin-span fin-c-root fin-c-tip fin-thickness fin-root-center)
:objects ((fin :type 'box-wing :root-point (the fin-root-center) :span (the fin-span) :c-root (the fin-c-root) :c-tip (the fin-c-tip) :thickness (the fin-thickness) :orientation (alignment :right (the (face-normal-vector :top)) :top (the (face-normal-vector :left))))))
(define-object box-wing (box)
:input-slots (root-point side span c-root c-tip thickness canonical-profile)
:computed-slots ((width (the span)) (length (the c-root)) (height (the thickness))
(center (translate-along-vector (the root-point) (the (face-normal-vector :right)) (half (the width)) )))
:hidden-objects ((box :type 'box :display-controls (list :color :orange :transparency 0.7))
(root-profile :type 'boxed-curve :curve-in (the canonical-profile) :scale-y (/ (the thickness) (the canonical-profile max-thickness)) :scale-x (/ (the c-root) (the canonical-profile span)) :center (the (edge-center :left :front)) :orientation (alignment :top (the (face-normal-vector :right)) :right (the (face-normal-vector :rear)) :rear (the (face-normal-vector :top))))
(tip-profile :type 'boxed-curve :curve-in (the canonical-profile) :scale-y (/ (the thickness) (the canonical-profile max-thickness)) :scale-x (/ (the c-tip) (the canonical-profile span)) :center (translate (the (edge-center :right :front)) :rear (- (the c-root) (the c-tip))) :orientation (the root-profile orientation)))
:objects ((loft :type 'lofted-surface :end-caps-on-brep? t :curves (list (the root-profile) (the tip-profile)))))
;; ;; For convenience, look for data folder two levels up, one level up, ;; and in same directory as source file. ;; (defparameter data-folder (let* ((source-pathname #+allegro excl:source-pathname #+lispworks dspec:source-pathname ;; in future: (glisp:source-pathname) ) (base-path (make-pathname :name nil :type nil :defaults source-pathname ;; in future: (glisp:source-pathname) ))) (or (probe-file (merge-pathnames "../../data/" base-path)) (probe-file (merge-pathnames "../data/" base-path)) (probe-file (merge-pathnames "data/" base-path))
(error "Your data folder is not there. Please make a data folder with
aircraft and points data, two or one or zero directory levels up from the directory of this source file.~%"))))
— Reply to this email directly or view it on GitHubhttps://github.com/genworks/gendl/issues/113 .
-- My Best,
Dave Cooper, Genworks Support david.cooper@genworks.com, dave.genworks.com(skype) USA: 248-327-3253(o), 1-248-330-2979(mobile) UK: 0191 645 1699
— Reply to this email directly or view it on GitHubhttps://github.com/genworks/gendl/issues/113#issuecomment-18058362.
By genworks on 2014-02-11 18:47:16 UTC
Closing this issue and VRML option will be removed from tasty default View menu for next release.