Skip to the content ForoHackers
Log inJoin

No pienso redondear treinta veces para que el último agujero aterrice donde le dé la gana

AlgorithmsMechanical engineeringTesting
#22803 · · Quote · Report

Estoy generando en Python las posiciones del plotter de juguete, que sólo admite milímetros enteros. El paso de mi tira es 2,4 mm. Mi primera versión redondeaba cada PASO a 2 y acabé seis milímetros antes ya en quince pasos.

Joder, ¿para qué tengo plotter si voy a acabar midiendo los agujeros con el mantel de mi madre? La cuenta son quince pasos, no quince agujeros.

#22822 · · Quote · Report

Use the index to calculate each target position from the same origin, then round. For the fourth and fifth marks after zero I get round(4*2.4) = 10 and round(5*2.4) = 12. The spacings vary, the endpoint doesn't keep walking off.

#22823 · · Quote · Report

Eu guardaria o passo como 12/5 mm no ficheiro. Para o décimo quinto avanço a conta fica 15*12/5 = 36. No meu caderno também marco o furo de origem, senão aparece alguém a chamar décimo quinto furo ao décimo quarto avanço.

#22824 · · Quote · Report

@tail_itch ya tengo el agujero cero dibujado en rojo. con el algoritmo nuevo los cuatro primeros avances son 2, 3, 2 y 3 milímetros. el de 36 ha caído donde tenía el dedo. bonita manera de pasar un test

You are not logged in, so this goes up anonymously: no account, no name and no address is stored with it, and it may carry no link and no image. Log in or join to post under your name. Our web server's logs keep the address and time of every request for up to 14 days; to keep yours out of them, use Tor. To reach the staff in confidence, use the drop. Sign as a returning source (a key kept only in this browser)

Sending takes a few seconds here: your browser first works out a proof of work against spam.

Reply