Point definitions in macro randomly turns coordinates positive or negative

Hi,

so I wrote a simple macro for setting up and rendering basic visualizations for company products. This is meant to be used by people who don´t really know Rhino. Anyway the workflow was meant to be - open product (created in Rhino 5) in rhino 7 - paste macro - select enviroments - process rendered pictures in other software. It´s cumbersome but it´s something they understand from historic evolution of the workflow.

BUT the macro randomly assinges positive or negative values to points that create camera and target paths when pasted as a whole. In the attached images you can see the point values swhitched up. Funny thing - sometimes the values “make” a 90° turn and sometimes full 180°. Even funnier is that pasting only the curve creation part of the macro works just fine in all cases.


Macro goes:

macro.txt (2.9 KB)

Any help would be appreciated,
Thanks!

(Understandably I can´t include the company files, although I´d love to)

I should probably learn how to script …

Yep… that macro looks… complicated.

One thing maybe - as there are views/viewports involved, it is possible that your coordinates are being interpreted as CPlane coordinates in a view which has a CPlane other than world Top. I might put a ‘w’ in front of all the coordinates in your macro to force world coordinate interpretation just in case. Don’t know if that will help, but maybe worth a shot.

i.e. instead of

_-InterpCrv
-70764.3,67413.2,21899.1
-90019.6,21392.8,-690.096
-77769.2,-33574.9,-21131.1
_enterend

use

_-InterpCrv
w-70764.3,67413.2,21899.1
w-90019.6,21392.8,-690.096
w-77769.2,-33574.9,-21131.1
_enterend
1 Like

And it was as simple as that. Probably something set up in the older Rh5 model. Lucky there´s a “w” option and I don´t need to dig that up. You tought me something useful, thank you.

I´ll learn how to script as fast as I can because this is getting ridiculous.