CurveShape Error???

Does (should) the ORDER in which you specify parameters matter???
for example… .THIS gives me what I would expect

        crv=New CurveShape
        crv.order=1
        crv.fill=0
        crv.border=100
        crv.BorderColor=&c007700
        crv.x=0
        crv.y=120
        crv.x2=120
        crv.y2=0
        crv.controlx(0)=0
        crv.controly(0)=10
        debug "#1="+str(crv.controly(0))  ////  This writes 10 into the log... makes sense right?

BUT… this does NOT

        crv=New CurveShape 
        crv.order=1
       crv.controlx(0)=0
        crv.controly(0)=10
        crv.fill=0
        crv.border=100
        crv.BorderColor=&c007700
        crv.x=0
        crv.y=150
        crv.x2=120
        crv.y2=0
      
        debug "#1="+str(crv.controly(0))  ////  This writes 160 into the log... which  is adding crv.Y to it????? what?

The ONLY difference is the location of

 crv.controlx(0)=0
        crv.controly(0)=10

in the assignment of parameters

FYI… same thing happens with ControlX(0)

The X and Y properties of Object2D move it. So when you set X/Y first then set controlX/Y and X2/Y2 those coordinates stay where you set them. But set controlX/Y then X/Y and controlX/Y is moved by the displacement of X/Y.

That makes no sense. A curve needs 2 or 3 points… where X,Y and X2,Y2 are the ends of the curve and CX,CY and CX1,CY1 are the control points… those points need to be relative to one another… the coordinate give in the DRAWOBJECT command is what should move it.

I agree, it’s not my intuition and one of the reasons I don’t use Object2D. But actually there is a methodology to it. I call it an ‘absolute’ coordinate system and it’s where the values you set are modified by the transform. That is, coordinates really represent the projected value.

My preference is a ‘relative’ coordinate system where I set the values and they don’t change unless I change them and the projected values are something else.

There’s some inconveniences in a purely absolute system. Like if you add a Rect to a Group2D, lined up on the groups X axis then move and rotate the group, then you want to move the Rect out to a different X… well you have to undo the transform, apply the new X and retransform, or calculate the projected X/Y and set that.

There’s some inconveniences in a purely relative system too. Ideal is being able to set and get both relative and absolute.

Also, because an absolute system represents the projection it can only represent 1 projection. Try appending a star figure to 3 different Group2Ds (does work) then move and rotate those groups. The single star slips and slides around by each group. Using a relative system you could have 3 stars moving with each group at different scales, rotations, positions.

Anyways, if you’re going to use it it’s been this way from the beginning and best to just learn how it works. Actually I’m surprised you didn’t know about this because I’ve seen the flow chart app you made so you must know all the coordinate machinations.