Support Forum

[Frage] Code 3d for rotation


Hi, someone can tell me the 3D code for rotate the diagonal face? Solid created with command "prism". Thank you.

Anhänge (1)

Typ: image/jpeg
35-mal heruntergeladen
Größe: 645,35 KiB

Hilfreichste Antwort anzeigen Hilfreichste Antwort verbergen

Have a look at the smartpart "Test.smt"

Master-Script:
eps=0.00001
x = TAN ( c ) * a / 2

Parameter-Script:
VALUES c RANGE [-atan(b/(a/2)),atan(b/(a/2))]

3D-Script:
HANDLE b , 0 , 0 , id , "c" , 4
HANDLE b + x , 0 , 0 , id , "c" , 5
HANDLE b , a / 2 , 0 , id , "c" , 6 + 1024
HANDLE 0 , 0 , 1 , id , "c" , 7

PUT 0 , 0
PUT b + x , 0
PUT b - x , a
PUT 0 , a
PUT 0 , 0

PRISM NUM_SP / 2 , s ,
GET ( NUM_SP )

Anhänge (1)

Typ: text/xml
983-mal heruntergeladen
Größe: 8,94 KiB

Hello,

You have (just) to calculate the position of the moved points...
This is a geometry issue, not a code issue.


Zitiert von: Bertrand_C
Ciao,
Devi (solo) calcolare la posizione dei punti spostati ...

Questo è un problema di geometria, non un problema di codice.

Thank you for your specification but maybe I didn't explain myself well ...I meant the code for "handle" of rotation.

Have a look at the smartpart "Test.smt"

Master-Script:
eps=0.00001
x = TAN ( c ) * a / 2

Parameter-Script:
VALUES c RANGE [-atan(b/(a/2)),atan(b/(a/2))]

3D-Script:
HANDLE b , 0 , 0 , id , "c" , 4
HANDLE b + x , 0 , 0 , id , "c" , 5
HANDLE b , a / 2 , 0 , id , "c" , 6 + 1024
HANDLE 0 , 0 , 1 , id , "c" , 7

PUT 0 , 0
PUT b + x , 0
PUT b - x , a
PUT 0 , a
PUT 0 , 0

PRISM NUM_SP / 2 , s ,
GET ( NUM_SP )

Anhänge (1)

Typ: text/xml
983-mal heruntergeladen
Größe: 8,94 KiB

Zitiert von: Nemo
Have a look at the smartpart "Test.smt"
Master-Script:

eps=0.00001

x = TAN ( c ) * a / 2
Parameter-Script:

VALUES c RANGE [-atan(b/(a/2)),atan(b/(a/2))]
3D-Script:

HANDLE b , 0 , 0 , id , "c" , 4
HANDLE b + x , 0 , 0 , id , "c" , 5
HANDLE b , a / 2 , 0 , id , "c" , 6 + 1024

HANDLE 0 , 0 , 1 , id , "c" , 7
PUT 0 , 0
PUT b + x , 0

PUT b - x , a

PUT 0 , a
PUT 0 , 0
PRISM NUM_SP / 2 , s ,
GET ( NUM_SP )


Hi Nemo, this is the code I was looking for. Thank you for help! Goodbye.