Why is my stitched-solid not working?
Created by: reiniervandijk
Includes a very strange behavior. Replicate with:
(define-object stitching-sample (base-object)
:objects
((box :type 'box-solid
:width 2 :length 2 :height 2)
(clean-surfaces :type 'surface
:sequence (:size 6)
:built-from (the box (faces (the-child index)) :basis-surface))
(stitched :type 'stitched-solid :faces-in (list-elements (the clean-surfaces)))
(stitched-alternative :type 'stitched-solid :faces-in (list-elements (the box :faces) (the-element :basis-surface)))
(stitched-manifold :type 'manifold-solid :brep (the stitched))
)
)
Then try:
move> (make-self 'stitching-sample)
#<stitching-sample @ #x2805a98a>
move> (the stitched regions :number-of-elements)
1
move> (the stitched-manifold regions :number-of-elements)
Warning: Bummer! the make-manifold operation failed with code 1001
1
Conclusion: one can not make a simple manifold solid with the ideal surfaces of a box!?!?
Then something more striking:
to follow soon, have to go
Imported comments:
By genworks on 2013-02-01 02:21:46 UTC
This is fixed in development and fix will be in next release. To preview the fix, please try:
(in-package :smlib)
(defmethod make-stitched-solid-brep ((geometry-kernel geometry-kernel) &key surfaces proper-faces)
(declare (ignore proper-faces)) ;; flag -- use copy-faces to get the faces into the new brep.
(let ((brep (make-brep geometry-kernel)))
(dolist (surface surfaces) (create-face-from-surface brep surface))
(iwbrep-sew-and-orient brep)
(iwbrep-shrink-geometry brep)
brep))
Note: this example is internal lower-level stuff; nothing from above is supported for use in user code!