Jump to content
Developer Wiki and Function Reference Links ×

VW10 Bug (not volkswagon)


Recommended Posts

The following bit of code basically creates 4 squares, one for each quadrant about the x and y axis, then rotates them 45 degrees about the origin 0,0.

This works fine prior to VW10, but now the square in quadrant 1 (top, left) becomes a triangle when rotated. I suspect it has to do with the conversion process to a polygon, because if I create a polygon in the same location it rotates and remains true to form.

The criteria seem to be rectangle of some size with the lower right corner located at 0,0 and subsequently rotated about the origin.

If (PLEFT_TEXT = ' ')&(PTAGTYPE = '2') Then FillPat(0) Else FillPat(2);

Rect(-5.0*rCorrectionFactor,5.0*rCorrectionFactor,0.0*rCorrectionFactor,0.0*rCorrectionFactor);

If (PRIGHT_TEXT = ' ')&(PTAGTYPE = '2') Then FillPat(0) Else FillPat(2);

Rect(0.0*rCorrectionFactor,0.0*rCorrectionFactor,5.0*rCorrectionFactor,-5.0*rCorrectionFactor);

If (PTOP_TEXT = ' ')&(PTAGTYPE = '2') Then FillPat(0) Else FillPat(2);

Rect(0.0*rCorrectionFactor,5.0*rCorrectionFactor,5.0*rCorrectionFactor,0.0*rCorrectionFactor);

If (PBOTTOM_TEXT = ' ')&(PTAGTYPE = '2') Then FillPat(0) Else FillPat(2);

Rect(-5.0*rCorrectionFactor,0.0*rCorrectionFactor,0.0*rCorrectionFactor,-5.0*rCorrectionFactor);

If (PTAGTYPE = '2') Then RotatePoint(0,0,#45.0);

Link to comment

It only seems to happen with Rect's that have their bottom right corner at the origin. I tried it with a square and a rectangle, same result. The culprit seems to be the conversion to Poly. This step is performed implicitly just before the RotatePoint() is executed.

Try using the menu "Convert To Polygons", and you will see the same problem. It only seems to happen to Rects that have their bottom right corner at the origin. When converted to a Poly, the 4th point is the one that is omitted.

It is definitely a bug, not necessarily with VS, but with VW. My best suggestion at this time is "Don't do that". If you must, move it before you rotate it, then move it back. As long as Point2 (the lower right point) is not at the Origin, you should be OK.

Raymond

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...