#1
|
|||
|
|||
Rotate selected part with a list prog
Morning,
That's first time, I'm trying to prog into OSD. I can't select the part and the axis with a dialog box. I've used the get_selection but still error message. To resume, a part is on my screen and I want to rotate it around an axis I'll select. Someone to help me ? |
#2
|
|||
|
|||
Re: Rotate selected part with a list prog
The main difficulty is the vlue_type for an axis I guess
|
#3
|
|||
|
|||
Re: Rotate selected part with a list prog
It'll be wonderfull if the axis will be selected when I select a cylinder.
|
#4
|
|||
|
|||
Re: Rotate selected part with a list prog
hey hey perhaps ":measure-axis"
|
#5
|
|||
|
|||
Re: Rotate selected part with a list prog
please help me, I'll be crazy, 4 hours on this
I can't select an axis to rotate a part |
#6
|
||||
|
||||
Re: Rotate selected part with a list prog
Can you show us in a little more detail what you're trying to do? Do you have a code sample for us?
Thanks, Claus
__________________
CoCreate Modeling FAQ: http://www.clausbrod.de/CoCreateModeling/ |
#7
|
|||
|
|||
Re: Rotate selected part with a list prog
Ok, I want to rotate 2 parts and substract one each time.
So I need choose 2 parts and 2 axis of rotation. My code is : (in-package :sdtbtools ) (sd-defdialog 'Yo :dialog-title "Yo" :toolbox-button t :variables '( ("-") (Part1 :initial-enable t :initial-optional nil :initial-value nil :title "Part1" :value-type :part :multiple-items nil) (ax1 :value-type :sd_presel_edge.pum :title "Ax rotation Part1") (Part2 :initial-enable t :initial-optional nil :initial-value nil :title "Part2" :value-type :part :multiple-items nil) (ax2 :value-type :edge_3d :title "Ax rotation Part2")) :ok-action '(sd-call-cmds (progn (taill Part1 Part2 ax1 ax2))) ;lance le prog :help-action '(sd-display-url "http://intranet:1080/aidecao/macros_speciales/implant_help.pdf") :toolbox-button nil ) ; (defun taill(Part1 Part2 ax1 ax2) ;partie prog ;(subtract_3d :blanks (sd-inq-obj-pathname Part1) :tools (sd-inq-obj-pathname Part2) :keep_tool :yes) (dotimes (c 10 'done) (position_pa :part_assembly Part1 :rotate :axis :ax1 :rotation_angle 5 :done) (position_pa :part_assembly Part2 :rotate :axis :ax2 :rotation_angle 5 :done) (subtract_3d :blanks (sd-inq-obj-pathname Part1) :tools (sd-inq-obj-pathname Part2) :keep_tool :yes) ) ) hope this help you |
#8
|
|||
|
|||
Re: Rotate selected part with a list prog
here is a code set that subtracts or unites 1 tool to a body while rotating the tool around a single axis. might give you the necessary info to complete your version.
enjoy, Michael |
#9
|
|||
|
|||
Re: Rotate selected part with a list prog
Many thanks for your help. So I copied and pasted it in Notepad++, save it with lisp format and try to load it on OSD and I get this message :
|
#10
|
|||
|
|||
Re: Rotate selected part with a list prog
Ok I've modified my code set :
(in-package :sdtbtools ) (sd-defdialog 'Yo :dialog-title "Yo" :toolbox-button t :variables '( ("-") (Part1 :initial-enable t :initial-optional nil :initial-value nil :title "Part1" :value-type art :multiple-items nil) (ax1 :value-type :measure-axis :title "Ax rotation Part1") (Part2 :initial-enable t :initial-optional nil :initial-value nil :title "Part2" :value-type art :multiple-items nil) (ax2 :value-type :measure-axis :title "Ax rotation Part2")) k-action '(sd-call-cmds (progn (taill Part1 Part2 ax1 ax2))) ;lance le prog :help-action '(sd-display-url "http://intranet:1080/aidecao/macros_speciales/implant_help.pdf") :toolbox-button nil ) ; (defun taill(Part1 Part2 ax1 ax2) ;partie prog ;(subtract_3d :blanks (sd-inq-obj-pathname Part1) :tools (sd-inq-obj-pathname Part2) :keep_tool :yes) (dotimes (c 36 'done) (sd-call-cmds (position_pa Part1 :rotate :axis (first ax1) (second ax1) :rotation_angle 10 :done)) (sd-call-cmds (position_pa Part2 :rotate :axis (first ax2) (second ax2) :rotation_angle 10 :done)) ;(position_pa art_assembly Part2 :rotate :axis :ax2 :rotation_angle 5 :done) (subtract_3d :blanks (sd-inq-obj-pathname Part1) :tools (sd-inq-obj-pathname Part2) :keep_tool :yes) ) ) It works but results are not results wished, well, just a question why do you used ":axis (first ax1) (second ax1)" ?, why first and second ? |
#11
|
|||
|
|||
Re: Rotate selected part with a list prog
results are correct know, it was my fault, mistake between deg and rad lol
many thanks, issue solved |
#12
|
|||
|
|||
Re: Rotate selected part with a list prog
someone knows how to show steps each 10 times for example ?
|
#13
|
||||
|
||||
Re: Rotate selected part with a list prog
when posting code its quite useful to use the code code
Code:
(sd-defdialog 'Yo :dialog-title "Yo" :toolbox-button t :variables Just hints for better communication. Fine that we know that your problem is solved.
__________________
|
#14
|
|||
|
|||
Re: Rotate selected part with a list prog
I appreciate...thanks for the tip...
|
#15
|
|||
|
|||
Re: Rotate selected part with a list prog
Quote:
glad you got yours working. Michael |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | Rate This Thread |
|
|