PDA

View Full Version : Can someone give me a hint?


Harry
04-13-2004, 12:16 AM
I want to make a routine to generate a blind hole.
I manage to make downprinted code but get stuck.
I get three error messages:

1) Given point is not on selected face
(even if i place a workplane on the face before calling the routine.)

2) You have specified an unexpected input value. (2 times)
Does this mean that a variable is of a wrong type?

3) Not all necessary inputs are specified. (n times)
I can not find in the documentation which inputs are mandatory, does anyone know?


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

;-----------------------------------------------------------------------------

;load machining module
(load "CadCamAdapter")


(sd-defdialog 'place_blind_hole
:dialog-title "Place blind hole"
:variables '(
(UI_FACE
:value-type :face
:title "machining face"
:initial-value nil
)

(UI_STARTPOINT
:value-type :point-3d
:title "pick a point"
:initial-value nil
)

(UI_AXIS
:value-type :measure-direction
:title "set axis"
:initial-value nil
)

);variables

:ok-action
'(let*
(;local vars

)
(cad-cam-link-ui::MACH_ADV_LIBRARY_BLINDHOLE
:action :create
:SEL_FACE UI_FACE
:CEN_PNT UI_STARTPOINT
:AXIS UI_AXIS
:DRILL_DIA 5
:DRILL_DEPTH 15
:CONE_ANGLE 118
:NAME "TEST_HOLE"
:FLAG_DP off
:DIA_DP off
:DEPTH_DP off
);MACH_ADV_LIBRARY_BLINDHOLE
);let

)

dorothea
04-13-2004, 05:50 AM
Hi Harry,

I found several things in your code. The most important from my point of view is how you try to create the hole. You call the dialog MACH_ADV_LIBRARY_BLINDHOLE but do not wrap it with a sd-call-cmds. Every dialog you call programmatically from within your lisp code needs this macro. Please read more in the Developers Kit documentation
Common/documentation/integration_kit/reference/sd-call-cmds.html#sd-call-cmds

Now are some code specific comments:

* The variable SEL_FACE does not only specify a face but requires the input of a point on face too. Therefore you have to pass the point and the face to the variable.

:SEL_FACE UI_FACE UI_STARTPOINT

* For direction specification the direction itself is enough. Please read in the documentation about the parameters:
Common/documentation/integration_kit/reference/dg_manual.html#points

:AXIS (first UI_AXIS)

* Every value you specify must be given in INTERNAL units. Often the problems become visible with angle values like CONE_ANGLE in your case. You have to convert the 118 degree into radian.
Read more about this in the documentation
Common/documentation/integration_kit/reference/dg_manual.html#numbers

:CONE_ANGLE (sd-deg-to-rad 118)

Last for the moment: I commented out the 3 parameter
:FLAG_DP off
:DIA_DP off
:DEPTH_DP off

What does the value 'off' mean? This is no value, no keyword, no variable. I just don't know.


Hope you come a step further with my comments.

Dorothea

Harry
04-14-2004, 05:03 AM
Thanks Dorothea for your comments.

I studied the docs you pointed at and it makes everything more clear now.
One of the biggest problems with working lisp in osdm is to find the right docs! I have a large list of url's to jump to the right chapter. With your advise, I am some steps further on the long road... :)