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

tagged for build 2012080200

parent c5be47f0
(in-package :common-lisp-user)
(when (and (probe-file (merge-pathnames "smlib/" (make-pathname :name nil :type nil :defaults *load-truename*)))
(probe-file (merge-pathnames "smlib/load.lisp" *load-truename*))
(probe-file (merge-pathnames "smlib/smlib.fasl" *load-truename*))
(probe-file (merge-pathnames #+mswindows "smlib/smlib.dll"
#+linux "smlib/smlib.so" *load-truename*)))
(load (merge-pathnames "smlib/load.lisp" *load-truename*)))
(when (probe-file (merge-pathnames "patches/" *load-truename*))
(let ((patch-files
(sort (remove-if-not
#'(lambda(path) (and (string-equal (pathname-type path) "lisp")
(search "patch-" (pathname-name path))))
(directory (make-pathname :defaults (merge-pathnames "patches/" *load-truename*) :name nil :type nil)))
#'string-lessp :key #'file-namestring)))
(dolist (file patch-files)
(without-redefinition-warnings
(without-package-locks (load (compile-file file)))))))
\ No newline at end of file
(in-package :gdl-user)
(ql:quickload :gdl-surf)
(ql:quickload :uffi)
(load (merge-pathnames "smlib.fasl" *load-truename*))
(make-geometry-kernel :smlib :lib-path (merge-pathnames #+linux "smlib.so" #+mswindows "smlib.dll" *load-truename*))
......@@ -19,6 +19,9 @@
(in-package :gdl-user)
(setq surf:*tess-max-3d-edge-factor* 0.2)
(setq surf:*tess-max-angle-degrees* 12)
(defparameter *data-folder*
(make-pathname :name nil
:type nil
......@@ -322,5 +325,3 @@
:end-caps-on-brep? t
:curves (list (the root-profile) (the tip-profile)))))
(setq *tess-max-3d-edge-factor* 0.2)
(setq *tess-max-angle-degrees* 12)
\ No newline at end of file
This diff is collapsed.
(asdf:defsystem #:gdl-surf
:description
"Auto-generated asdf defsys from Genworks GDL cl-lite."
:author
"Genworks and Dave Cooper unless otherwise indicated"
:license
"AGPL unless otherwise indicated"
:serial
t
:version
"2012030600"
:depends-on
(:gdl-gwl-graphics)
:components
((:file "source/package") (:file "source/parameters")
(:file "source/classes") (:file "source/methods")
(:file "source/curve") (:file "source/surface")
(:file "source/approximated-curve")
(:file "source/approximated-subsurface")
(:file "source/arc-curve") (:file "source/b-spline-curve")
(:file "source/b-spline-surface") (:file "source/basic-surface")
(:file "source/blended-solid") (:file "source/boolean")
(:file "source/box-intersection ") (:file "source/box-solid")
(:file "source/brep-reader") (:file "source/brep")
(:file "source/breps-display") (:file "source/cad-assembly")
(:file "source/compatible-curves") (:file "source/composed-curve")
(:file "source/cone-solid") (:file "source/coons-surface")
(:file "source/csets") (:file "source/decomposed-curves")
(:file "source/dropped-curve") (:file "source/dual-blend-surface")
(:file "source/edge-blend-surface") (:file "source/edge")
(:file "source/elliptical-curve") (:file "source/extended-curve")
(:file "source/extended-surface") (:file "source/extruded-solid")
(:file "source/face") (:file "source/facial-brep")
(:file "source/filleted-curve") (:file "source/fitted-conic")
(:file "source/fitted-curve") (:file "source/fitted-surface")
(:file "source/formats")
(:file "source/general-dual-blend-surface")
(:file "source/general-sweep")
(:file "source/geometry-kernel-object-mixin")
(:file "source/global-filleted-polyline-curves")
(:file "source/gordon-surface") (:file "source/grouped-items")
(:file "source/iges-reader") (:file "source/iso-curve")
(:file "source/joined-and-compatible-surfaces")
(:file "source/linear-curve") (:file "source/lofted-surface")
(:file "source/merged-brep") (:file "source/native-reader")
(:file "source/normalized-curve") (:file "source/offset-solid")
(:file "source/offset-surface") (:file "source/ordered-curves")
(:file "source/planar-contour-surface")
(:file "source/planar-offset-curve")
(:file "source/planar-section-curve")
(:file "source/planar-surface") (:file "source/poly-brep")
(:file "source/projected-curve")
(:file "source/rectangular-surface") (:file "source/region")
(:file "source/reparameterized-curve")
(:file "source/revolved-surface") (:file "source/ruled-surface")
(:file "source/sequenced-curves") (:file "source/sewn-solid")
(:file "source/shell") (:file "source/silhouette-curves")
(:file "source/spherical-surface") (:file "source/split-surface")
(:file "source/step-reader") (:file "source/stitched-solid")
(:file "source/subdivided-curve")
(:file "source/surface-grid-points")
(:file "source/surface-knot-reduction")
(:file "source/swept-solid") (:file "source/transformed-curve")
(:file "source/transformed-solid")
(:file "source/transformed-surface")
(:file "source/trimmed-curve") (:file "source/trimmed-surface")
(:file "source/utilities") (:file "source/validated-solid")
(:file "source/vertex") (:file "source/views")
(:file "lenses/source/vrml") (:file "lenses/source/x3d")))
\ No newline at end of file
(asdf:defsystem #:gdl-surf :description
"Auto-generated asdf defsys from Genworks GDL cl-lite."
:author
"Genworks and Dave Cooper unless otherwise indicated"
:license "AGPL unless otherwise indicated" :serial t
:version "2012080200" :depends-on (:gdl-gwl-graphics)
:components
((:lisp "source/package") (:lisp "source/parameters")
(:lisp "source/classes") (:lisp "source/methods")
(:lisp "source/curve") (:lisp "source/surface")
(:lisp "source/approximated-curve")
(:lisp "source/approximated-subsurface")
(:lisp "source/arc-curve")
(:lisp "source/b-spline-curve")
(:lisp "source/b-spline-surface")
(:lisp "source/basic-surface")
(:lisp "source/blended-solid")
(:lisp "source/boolean")
(:lisp "source/box-intersection ")
(:lisp "source/box-solid")
(:lisp "source/brep-reader") (:lisp "source/brep")
(:lisp "source/breps-display")
(:lisp "source/cad-assembly")
(:lisp "source/compatible-curves")
(:lisp "source/composed-curve")
(:lisp "source/cone-solid")
(:lisp "source/coons-surface")
(:lisp "source/csets")
(:lisp "source/decomposed-curves")
(:lisp "source/dropped-curve")
(:lisp "source/dual-blend-surface")
(:lisp "source/edge-blend-surface")
(:lisp "source/edge")
(:lisp "source/elliptical-curve")
(:lisp "source/extended-curve")
(:lisp "source/extended-surface")
(:lisp "source/extruded-solid")
(:lisp "source/face") (:lisp "source/facial-brep")
(:lisp "source/filleted-curve")
(:lisp "source/fitted-conic")
(:lisp "source/fitted-curve")
(:lisp "source/fitted-surface")
(:lisp "source/formats")
(:lisp "source/general-dual-blend-surface")
(:lisp "source/general-sweep")
(:lisp "source/geometry-kernel-object-mixin")
(:lisp "source/global-filleted-polyline-curves")
(:lisp "source/gordon-surface")
(:lisp "source/grouped-items")
(:lisp "source/iges-reader")
(:lisp "source/iso-curve")
(:lisp "source/joined-and-compatible-surfaces")
(:lisp "source/linear-curve")
(:lisp "source/lofted-surface")
(:lisp "source/merged-brep")
(:lisp "source/native-reader")
(:lisp "source/nonrational-curve")
(:lisp "source/normalized-curve")
(:lisp "source/offset-solid")
(:lisp "source/offset-surface")
(:lisp "source/ordered-curves")
(:lisp "source/planar-contour-surface")
(:lisp "source/planar-offset-curve")
(:lisp "source/planar-section-curve")
(:lisp "source/planar-surface")
(:lisp "source/poly-brep")
(:lisp "source/projected-curve")
(:lisp "source/rectangular-surface")
(:lisp "source/region")
(:lisp "source/reparameterized-curve")
(:lisp "source/revolved-surface")
(:lisp "source/ruled-surface")
(:lisp "source/sequenced-curves")
(:lisp "source/sewn-solid") (:lisp "source/shell")
(:lisp "source/silhouette-curves")
(:lisp "source/spherical-surface")
(:lisp "source/spiral-curve")
(:lisp "source/split-surface")
(:lisp "source/step-reader")
(:lisp "source/stitched-solid")
(:lisp "source/subdivided-curve")
(:lisp "source/surface-grid-points")
(:lisp "source/surface-knot-reduction")
(:lisp "source/swept-solid")
(:lisp "source/transformed-curve")
(:lisp "source/transformed-solid")
(:lisp "source/transformed-surface")
(:lisp "source/trimmed-curve")
(:lisp "source/trimmed-surface")
(:lisp "source/utilities")
(:lisp "source/validated-solid")
(:lisp "source/vertex") (:lisp "source/views")
(:lisp "lenses/source/vrml")
(:lisp "lenses/source/x3d")))
\ No newline at end of file
......@@ -48,16 +48,8 @@
(3d-point-list (coerce (getf face :3d-points) 'list))
(formatted-vertices (format nil "~{~a -1 ~}"
(surf::make-triplet-strings vertex-list)))
(3d-points (mapcar #'(lambda (coord)
(the (global-to-local*
(make-point (if (the left-handed?)
(- (get-x coord)) (get-x coord))
(get-y coord) (get-z coord))))
;;(the (global-to-local* coord))
;;(the (global-to-local coord))
)
(3d-points (mapcar #'(lambda (coord)
(the (global-to-local* coord)))
3d-point-list)))
(cl-who:with-html-output (*stream* nil :indent nil)
......@@ -80,7 +72,6 @@
))
3d-points)))))))))))
(define-lens (x3d curve)()
:output-functions
((shape
......
;;
;; Copyright 2002-2011 Genworks International and Genworks BV
;; Copyright 2002-2011, 2012 Genworks International
;;
;; This source file is part of the General-purpose Declarative
;; Language project (GDL).
......@@ -761,4 +761,16 @@
(define-smlib-wrapper tx-assembly-add-point (assembly-instance-pointer
point
&key name red green blue))
\ No newline at end of file
&key name red green blue))
(define-smlib-wrapper rational-to-nonrational (curve &key tolerance
maintain-end-tangents?
nonrational-degree
parameterization))
(define-smlib-wrapper make-spiral (height
radius-1
radius-2
pitch
right-or-left
tolerance))
;;
;; Copyright 2002-2011, 2012 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 non-rational-curve (curve)
:documentation (:description
"This object accepts a rational curve and approximates it with a non-rational curve."
:author "Dave Cooper, Genworks International")
:input-slots
("GDL Curve object. Presumably this is a Rational curve (else this object will do nothing)." curve-in
("Number. The amount by which to divide the total-length of the curve-in to compute the default tolerance. Default is 1000."
tolerance-divisor 1000)
("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."
tolerance (div (the curve-in total-length) (the tolerance-divisor)))
("Boolean. Determines whether to try to maintain tangents at the ends. Defaults to t." maintain-end-tangents? t)
("Integer. Determines the degree of the non-rational curve. Defaults to 3." non-rational-degree 3)
("Keyword symbol, one of :uniform, :chord-length, :centripetal, or :inherited. The default is :inherited."
parameterization :inherited))
:computed-slots
((native-curve (if (the curve-in rational?) (rational-to-nonrational *geometry-kernel* (the curve-in)
:tolerance (the tolerance)
:maintain-end-tangents? (the maintain-end-tangents?)
:nonrational-degree (the non-rational-degree)
:parameterization (the parameterization))))))
\ No newline at end of file
......@@ -172,6 +172,9 @@
#:closed-boolean-operation
#:closed-boolean-separate-operation
#:global-brep-brep-solve
#:non-rational-curve
#:spiral-curve
#:get-faces-from-edge
......
;;
;; Copyright 2002-2011, 2012 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 spiral-curve (curve)
:documentation (:description
"This object approximates a spiral around the Z axis using a cubic NURBS (b-spline-curve)."
:author "Dave Cooper, Genworks International")
:input-slots
("Number. The height of the spiral."
height
"Number. Initial radius at Z=0." radius-1
"Number. Final radius at z=height." radius-2
("Keyword Symbol, :right or :left. Defaults to :right." right-or-left :right)
"Number. The number of turns (1 = 360 degrees) in the spiral." number-of-turns
("Number. The amount by which to divide the height of the curve-in to compute the default tolerance. Default is 1000."
tolerance-divisor 1000)
("Number. The tolerance to use for non-rational approximation of a rational curve-in.
Defaults to the height divided by the tolerance-divisor."
tolerance (div (the height) (the tolerance-divisor))))
:computed-slots
((native-curve (make-spiral *geometry-kernel*
(to-double-float (the height))
(to-double-float (the radius-1))
(to-double-float (the radius-2))
(to-double-float (the number-of-turns))
(ecase (the right-or-left) (:right 0) (:left 1))
(to-double-float (the tolerance))))))
;;
;; FLAG -- add to Lift tests.
;;
(define-object spiral-curve-test (base-object)
:computed-slots ()
:objects
((spiral-curve :type 'surf::spiral-curve
:height 10.0
:radius-1 2.0
:radius-2 2.0
:number-of-turns 2.0
:right-or-left :right
:tolerance 0.001)))
\ No newline at end of file
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