From 8b754bc7f52ac2895dce1cecc83707642e7a40ac Mon Sep 17 00:00:00 2001 From: Dave Cooper Date: Thu, 31 Jan 2013 23:33:03 -0500 Subject: [PATCH] Issues 61, 63. --- regression/issues/source/issue-65.lisp | 9 +++++++-- surf/source/brep.lisp | 14 +++++++++++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/regression/issues/source/issue-65.lisp b/regression/issues/source/issue-65.lisp index 57f1b772..62ac8b08 100644 --- a/regression/issues/source/issue-65.lisp +++ b/regression/issues/source/issue-65.lisp @@ -1,8 +1,13 @@ (in-package :gdl-user) (define-object manifold-sample (base-object) + :objects ((box :type 'box-solid - :width 2 :length 2 :height 2) + :width 2 :length 2 :height 2) (merged :type 'merged-solid :other-brep (the box :face-breps :list-elements)) - (merged2 :type 'merged-solid :other-brep (the box :face-breps :list-elements) :make-manifold? t))) \ No newline at end of file + + ("merge trial" + merged2 :type 'merged-solid + :other-brep (the box :face-breps :list-elements) + :make-manifold? t))) diff --git a/surf/source/brep.lisp b/surf/source/brep.lisp index 0d2fdebe..398ca2e7 100755 --- a/surf/source/brep.lisp +++ b/surf/source/brep.lisp @@ -541,6 +541,18 @@ and moments for the brep. The moments are labeled as: :area-static-moments, :are (&key (tolerance (the adaptive-tolerance))) (brep-compute-precise-properties *geometry-kernel* self tolerance)) + ("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, +: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. + +:&key ((tolerance (the adaptive-tolerance)) \"Controls how precisely the properties are computed\")" + precise-properties-plist + (&key (tolerance (the adaptive-tolerance))) + (multiple-value-bind (area volume mass moments) + (brep-compute-precise-properties *geometry-kernel* self tolerance) + (list :area area :volume volume :mass mass :moments moments))) + ("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 @@ -550,7 +562,7 @@ be faster to compute and exhibit more stability. properties (&key (edge-tess-tolerance (the adaptive-tolerance)) (face-tess-tolerance (the adaptive-tolerance))) - (brep-compute-properties *geometry-kernel* self :edge-tess-toleance edge-tess-tolerance + (brep-compute-properties *geometry-kernel* self :edge-tess-tolerance edge-tess-tolerance :face-tess-tolerance face-tess-tolerance)) ("Number. Area covered by the faces of the brep. -- 2.22.0