PDA

View Full Version : Sheet metal customization does not work


sstaabs
10-12-2005, 01:06 PM
Hello,

We cannot get the sheet metal to be created using the following macro.
Does the Sheet metal macros work differently than the Modeling macros?

See attached for concept.

(in-package :turbo)
(use-package :oli)

(sd-defdialog 'cr_load_rh
:dialog-title "Create Load RH"
:variables
'(
(pname2 :value-type :string
:title "Base Name"
:initial-value "LOAD-RH"
)
(Load_length :value-type :positive-number)
(Next :push-action (doit))
)
:local-functions
'(
(doit ()
(let (fullname2)
(setq fullname2 (format nil "/~A-~A" pname2 Load_length))
; (display (format nil "fullname2: ~A " fullname2 ))
(sd-call-cmds
(CREATE_WORKPLANE :new
:pt_dir :origin
(gpnt3d 0 0 0)
; (make-gpnt3d :x 0 :y 0 :z 0)
:normal :x
:u_dir :neg_z
:done))

(sd-call-cmds
(POLYGON
; (.25,0 -.235,0 -.235,.47 -.875,.47 -.875,2.74 -.235,2.74 -.235,3.21 .25,3.21)
(gpnt2d .25 0)
(gpnt2d -.235 0)
(gpnt2d -.235 .47)
(gpnt2d -.875 .47)
(gpnt2d -.875 2.74)
(gpnt2d -.235 2.74)
(gpnt2d -.235 2.74)
(gpnt2d -.235 3.21)
(gpnt2d .25 3.21)
; (make-gpnt2d :x .25 :y 0)
; (make-gpnt2d :x -.235 :y 0)
; (make-gpnt2d :x -.235 :y .47)
; (make-gpnt2d :x -.875 :y .47)
; (make-gpnt2d :x -.875 :y 2.74)
; (make-gpnt2d :x -.235 :y 2.74)
; (make-gpnt2d :x -.235 :y 2.74)
; (make-gpnt2d :x -.235 :y 3.21)
; (make-gpnt2d :x .25 :y 3.21)
))
(sd-call-cmds
(SHA_NEW_BY_POLYLINE
:sheet_part fullname2
:side (gpnt2d 0 3.11)
:distance Load_length
:material :MATERIAL_PLIST '(:MATERIAL " 19933mm1A 2.0 MM " :THICK 2.0)
)
))
; :ok-action '(doit)
)
)
)

The load length value is 30.00 The units of the session are in inches. The material shown is custom from our shop file. This will work by replaying the recorder file.

Ultimately we want to be able to pick an edge programatically and the software will create a lip on the edge selected.

Nothing happens. No errors, no workplanes, no geometry.

Thanks in advance.

Steve