Skip to content

Commit

Permalink
Fixed the delete process for extrusions, sweeps, and lofts.
Browse files Browse the repository at this point in the history
  • Loading branch information
aptmcl committed Dec 26, 2017
1 parent fdfa1e6 commit dce1556
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions autocad-server/backend.rkt
Expand Up @@ -410,14 +410,15 @@
(def-shape (extrusion [profile : (Extrudable-Shape RefOp)] [dir : VecOrZ 1])
(begin0
(%Extrude (shape-ref profile) (if (number? dir) (vz dir) dir))
(delete-shape profile)))
(mark-deleted! profile)))

(def-shape (sweep [path : (Curve-Shape RefOp)] [profile : (Extrudable-Shape RefOp)] [rotation : Real 0] [scale : Real 1])
(begin0
(map-ref ([profile profile])
(map-ref ([path path])
(%Sweep path profile rotation scale)))
(delete-shapes (list profile path))))
(mark-deleted! profile)
(mark-deleted! path)))


(define (loft-curve-point [curve : Shape] [point : (Point-Shape Ref)])
Expand Down Expand Up @@ -475,7 +476,7 @@
(begin0
(map-ref ([surf surf])
(%Thicken surf h))
(delete-shape surf)))
(mark-deleted! surf)))

(def-shape (slice [shape : Shape] [p : Loc (u0)] [n : Vec (vz 1 p)])
(do-ref ([r shape])
Expand Down

0 comments on commit dce1556

Please sign in to comment.