wkentaro
11/7/2015 - 5:45 PM

load and dump eus object

load and dump eus object

;; vim: set ft=lisp:
(setq a nil)
(with-open-file
  (f "dump-structure_file.l" :direction :input)
  (setq a (read f))
  )
#1=#s(body plist ((:volume . 6.0) (:centroid . #f(0.0 2.544261e-17 1.850372e-17))) rot #2f((1.0 0.0 0.0) (0.0 1.0 0.0) (0.0 0.0 1.0)) pos #f(0.0 0.0 0.0) parent nil descendants nil worldcoords #s(coordinates plist nil rot #2f((1.0 0.0 0.0) (0.0 1.0 0.0) (0.0 0.0 1.0)) pos #f(0.0 0.0 0.0)) manager #1# changed t box #s(bounding-box geometry::minpoint #f(-0.508 -1.016 -1.524) geometry::maxpoint #f(0.508 1.016 1.524)) faces (#7=#s(face plist nil normal #f(0.0 0.0 -1.0) distance -1.5 convexp t edges (#22=#s(edge plist nil pvert #2=#f(0.5 1.0 -1.5) nvert #3=#f(-0.5 1.0 -1.5) pface #5=#s(face plist nil normal #f(0.0 1.0 0.0) distance -1.0 convexp t edges (#20=#s(edge plist nil pvert #2# nvert #11=#f(0.5 1.0 1.5) pface #16=#s(face plist nil normal #f(1.0 0.0 0.0) distance -0.5 convexp t edges (#18=#s(edge plist nil pvert #17=#f(0.5 -1.0 -1.5) nvert #14=#f(0.5 -1.0 1.5) pface #15=#s(face plist nil normal #f(0.0 -1.0 0.0) distance -1.0 convexp t edges (#8=#s(edge plist nil pvert #6=#f(-0.5 -1.0 -1.5) nvert #10=#f(-0.5 -1.0 1.5) pface #4=#s(face plist nil normal #f(-1.0 0.0 0.0) distance -0.5 convexp t edges (#23=#s(edge plist nil pvert #9=#f(-0.5 1.0 1.5) nvert #3# pface #4# nface #5# angle 1.5708 flags 0) #27=#s(edge plist nil pvert #3# nvert #6# pface #4# nface #7# angle 1.5708 flags 0) #8# #13=#s(edge plist nil pvert #9# nvert #10# pface #12=#s(face plist nil normal #f(0.0 0.0 1.0) distance -1.5 convexp t edges (#24=#s(edge plist nil pvert #11# nvert #9# pface #12# nface #5# angle 1.5708 flags 0) #13# #19=#s(edge plist nil pvert #10# nvert #14# pface #12# nface #15# angle 1.5708 flags 0) #21=#s(edge plist nil pvert #14# nvert #11# pface #12# nface #16# angle 1.5708 flags 0)) vertices (#11# #9# #10# #14# #11#) model-normal #f(0.0 0.0 1.0) model-distance -1.5 holes nil mbody #1# primitive-face #12# id (:top)) nface #4# angle 1.5708 flags 0)) vertices (#9# #3# #6# #10# #9#) model-normal #f(-1.0 0.0 0.0) model-distance -0.5 holes nil mbody #1# primitive-face #4# id (:side 0 :-x)) nface #15# angle 1.5708 flags 0) #26=#s(edge plist nil pvert #6# nvert #17# pface #15# nface #7# angle 1.5708 flags 0) #18# #19#) vertices (#10# #6# #17# #14# #10#) model-normal #f(0.0 -1.0 0.0) model-distance -1.0 holes nil mbody #1# primitive-face #15# id (:side 1 :-y)) nface #16# angle 1.5708 flags 0) #25=#s(edge plist nil pvert #17# nvert #2# pface #16# nface #7# angle 1.5708 flags 0) #20# #21#) vertices (#14# #17# #2# #11# #14#) model-normal #f(1.0 0.0 0.0) model-distance -0.5 holes nil mbody #1# primitive-face #16# id (:side 2 :x)) nface #5# angle 1.5708 flags 0) #22# #23# #24#) vertices (#11# #2# #3# #9# #11#) model-normal #f(0.0 1.0 0.0) model-distance -1.0 holes nil mbody #1# primitive-face #5# id (:side 3 :y)) nface #7# angle 1.5708 flags 0) #25# #26# #27#) vertices (#3# #2# #17# #6# #3#) model-normal #f(0.0 0.0 -1.0) model-distance -1.5 holes nil mbody #1# primitive-face #7# id (:bottom)) #12# #5# #16# #15# #4#) edges (#22# #24# #25# #20# #21# #26# #18# #19# #23# #27# #8# #13#) vertices (#2# #11# #17# #14# #3# #6# #10# #9#) model-vertices (#f(0.5 1.0 -1.5) #f(0.5 1.0 1.5) #f(0.5 -1.0 -1.5) #f(0.5 -1.0 1.5) #f(-0.5 1.0 -1.5) #f(-0.5 -1.0 -1.5) #f(-0.5 -1.0 1.5) #f(-0.5 1.0 1.5)) convexp t geometry::evertedp nil csg ((:cube 1.0 2.0 3.0)))
;; vim: set ft=lisp:
(setq a (make-cube 1 2 3))
(dump-structure "dump-structure_file.l" a)
;; vim: set ft=lisp:
(with-open-file
  (f "dump-object_file.l" :direction :input)
  (setq a (read f))
  )
#1=#J(body ((:volume . 6.0) (:centroid . #f(0.0 2.544261e-17 1.850372e-17))) #J(array nil #f(1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0) 2 nil 0 3 3 nil nil nil nil nil) #f(0.0 0.0 0.0) nil nil #J(coordinates nil #J(array nil #f(1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 1.0) 2 nil 0 3 3 nil nil nil nil nil) #f(0.0 0.0 0.0)) #1# t #J(bounding-box #f(-0.508 -1.016 -1.524) #f(0.508 1.016 1.524)) (#7=#J(face nil #f(0.0 0.0 -1.0) -1.5 t (#22=#J(edge nil #2=#f(0.5 1.0 -1.5) #3=#f(-0.5 1.0 -1.5) #5=#J(face nil #f(0.0 1.0 0.0) -1.0 t (#20=#J(edge nil #2# #11=#f(0.5 1.0 1.5) #16=#J(face nil #f(1.0 0.0 0.0) -0.5 t (#18=#J(edge nil #17=#f(0.5 -1.0 -1.5) #14=#f(0.5 -1.0 1.5) #15=#J(face nil #f(0.0 -1.0 0.0) -1.0 t (#8=#J(edge nil #6=#f(-0.5 -1.0 -1.5) #10=#f(-0.5 -1.0 1.5) #4=#J(face nil #f(-1.0 0.0 0.0) -0.5 t (#23=#J(edge nil #9=#f(-0.5 1.0 1.5) #3# #4# #5# 1.5708 0) #27=#J(edge nil #3# #6# #4# #7# 1.5708 0) #8# #13=#J(edge nil #9# #10# #12=#J(face nil #f(0.0 0.0 1.0) -1.5 t (#24=#J(edge nil #11# #9# #12# #5# 1.5708 0) #13# #19=#J(edge nil #10# #14# #12# #15# 1.5708 0) #21=#J(edge nil #14# #11# #12# #16# 1.5708 0)) (#11# #9# #10# #14# #11#) #f(0.0 0.0 1.0) -1.5 nil #1# #12# (:top)) #4# 1.5708 0)) (#9# #3# #6# #10# #9#) #f(-1.0 0.0 0.0) -0.5 nil #1# #4# (:side 0 :-x)) #15# 1.5708 0) #26=#J(edge nil #6# #17# #15# #7# 1.5708 0) #18# #19#) (#10# #6# #17# #14# #10#) #f(0.0 -1.0 0.0) -1.0 nil #1# #15# (:side 1 :-y)) #16# 1.5708 0) #25=#J(edge nil #17# #2# #16# #7# 1.5708 0) #20# #21#) (#14# #17# #2# #11# #14#) #f(1.0 0.0 0.0) -0.5 nil #1# #16# (:side 2 :x)) #5# 1.5708 0) #22# #23# #24#) (#11# #2# #3# #9# #11#) #f(0.0 1.0 0.0) -1.0 nil #1# #5# (:side 3 :y)) #7# 1.5708 0) #25# #26# #27#) (#3# #2# #17# #6# #3#) #f(0.0 0.0 -1.0) -1.5 nil #1# #7# (:bottom)) #12# #5# #16# #15# #4#) (#22# #24# #25# #20# #21# #26# #18# #19# #23# #27# #8# #13#) (#2# #11# #17# #14# #3# #6# #10# #9#) (#f(0.5 1.0 -1.5) #f(0.5 1.0 1.5) #f(0.5 -1.0 -1.5) #f(0.5 -1.0 1.5) #f(-0.5 1.0 -1.5) #f(-0.5 -1.0 -1.5) #f(-0.5 -1.0 1.5) #f(-0.5 1.0 1.5)) t nil ((:cube 1.0 2.0 3.0)))
;; vim: set ft=lisp:
(setq a (make-cube 1 2 3))
(dump-object "dump-object_file.l" a)
;; vim: set ft=lisp:
(load "dump-loadable-structure_file.l")
(setq a '#1=#s(body plist ((:volume . 6.0) (:centroid . #f(0.0 2.544261e-17 1.850372e-17))) rot #2f((1.0 0.0 0.0) (0.0 1.0 0.0) (0.0 0.0 1.0)) pos #f(0.0 0.0 0.0) parent nil descendants nil worldcoords #s(coordinates plist nil rot #2f((1.0 0.0 0.0) (0.0 1.0 0.0) (0.0 0.0 1.0)) pos #f(0.0 0.0 0.0)) manager #1# changed t box #s(bounding-box geometry::minpoint #f(-0.508 -1.016 -1.524) geometry::maxpoint #f(0.508 1.016 1.524)) faces (#7=#s(face plist nil normal #f(0.0 0.0 -1.0) distance -1.5 convexp t edges (#22=#s(edge plist nil pvert #2=#f(0.5 1.0 -1.5) nvert #3=#f(-0.5 1.0 -1.5) pface #5=#s(face plist nil normal #f(0.0 1.0 0.0) distance -1.0 convexp t edges (#20=#s(edge plist nil pvert #2# nvert #11=#f(0.5 1.0 1.5) pface #16=#s(face plist nil normal #f(1.0 0.0 0.0) distance -0.5 convexp t edges (#18=#s(edge plist nil pvert #17=#f(0.5 -1.0 -1.5) nvert #14=#f(0.5 -1.0 1.5) pface #15=#s(face plist nil normal #f(0.0 -1.0 0.0) distance -1.0 convexp t edges (#8=#s(edge plist nil pvert #6=#f(-0.5 -1.0 -1.5) nvert #10=#f(-0.5 -1.0 1.5) pface #4=#s(face plist nil normal #f(-1.0 0.0 0.0) distance -0.5 convexp t edges (#23=#s(edge plist nil pvert #9=#f(-0.5 1.0 1.5) nvert #3# pface #4# nface #5# angle 1.5708 flags 0) #27=#s(edge plist nil pvert #3# nvert #6# pface #4# nface #7# angle 1.5708 flags 0) #8# #13=#s(edge plist nil pvert #9# nvert #10# pface #12=#s(face plist nil normal #f(0.0 0.0 1.0) distance -1.5 convexp t edges (#24=#s(edge plist nil pvert #11# nvert #9# pface #12# nface #5# angle 1.5708 flags 0) #13# #19=#s(edge plist nil pvert #10# nvert #14# pface #12# nface #15# angle 1.5708 flags 0) #21=#s(edge plist nil pvert #14# nvert #11# pface #12# nface #16# angle 1.5708 flags 0)) vertices (#11# #9# #10# #14# #11#) model-normal #f(0.0 0.0 1.0) model-distance -1.5 holes nil mbody #1# primitive-face #12# id (:top)) nface #4# angle 1.5708 flags 0)) vertices (#9# #3# #6# #10# #9#) model-normal #f(-1.0 0.0 0.0) model-distance -0.5 holes nil mbody #1# primitive-face #4# id (:side 0 :-x)) nface #15# angle 1.5708 flags 0) #26=#s(edge plist nil pvert #6# nvert #17# pface #15# nface #7# angle 1.5708 flags 0) #18# #19#) vertices (#10# #6# #17# #14# #10#) model-normal #f(0.0 -1.0 0.0) model-distance -1.0 holes nil mbody #1# primitive-face #15# id (:side 1 :-y)) nface #16# angle 1.5708 flags 0) #25=#s(edge plist nil pvert #17# nvert #2# pface #16# nface #7# angle 1.5708 flags 0) #20# #21#) vertices (#14# #17# #2# #11# #14#) model-normal #f(1.0 0.0 0.0) model-distance -0.5 holes nil mbody #1# primitive-face #16# id (:side 2 :x)) nface #5# angle 1.5708 flags 0) #22# #23# #24#) vertices (#11# #2# #3# #9# #11#) model-normal #f(0.0 1.0 0.0) model-distance -1.0 holes nil mbody #1# primitive-face #5# id (:side 3 :y)) nface #7# angle 1.5708 flags 0) #25# #26# #27#) vertices (#3# #2# #17# #6# #3#) model-normal #f(0.0 0.0 -1.0) model-distance -1.5 holes nil mbody #1# primitive-face #7# id (:bottom)) #12# #5# #16# #15# #4#) edges (#22# #24# #25# #20# #21# #26# #18# #19# #23# #27# #8# #13#) vertices (#2# #11# #17# #14# #3# #6# #10# #9#) model-vertices (#f(0.5 1.0 -1.5) #f(0.5 1.0 1.5) #f(0.5 -1.0 -1.5) #f(0.5 -1.0 1.5) #f(-0.5 1.0 -1.5) #f(-0.5 -1.0 -1.5) #f(-0.5 -1.0 1.5) #f(-0.5 1.0 1.5)) convexp t geometry::evertedp nil csg ((:cube 1.0 2.0 3.0))))
;; vim: set ft=lisp:
(setq a (make-cube 1 2 3))
(dump-loadable-structure "dump-loadable-structure_file.l" a)