I_CANVAS // I_POLY : problem scale

Schlagworte:

Hello
I am having some difficulty with the command I_CANVAS and I_POLY.

What is the scale used with this type of command?

If I made a rectangle CANVAS of 1 metre by 1 metre, it is drawing very small and centimetre sides are all visible.

In the example in the figure below, I have the correct ratings by a multiple of 10 ratings of origin who are in meters.

Is what are dimensions in pixels?

I meet another challenge with the I_POLY command,
The drawn figure are indeed designed mirrors on the negative x axis.
What is the solution to this problem?

Thank you

id = 1
I_CANVAS 0 , 0 , 200 , 200

I_POLY 6 , id ,
0 , 0 ,
0 , 60 ,
30 , 60 ,
30 , 30 ,
20 , 30 ,
20 , 0

I_CANVAS_END

French to talk about Allplan Forum:
http://allplan.leforum.eu

olivier1

Anhänge (1)

img
canvas.PNG
Typ: image/png
464-mal heruntergeladen
Größe: 23,67 KiB
1 - 3 (3)
  • 1

Hi Olivier,

There is nothing scaling inside!
The command

I_CANVAS 0 , 0 , 200 , 200

creates a canvas of 200 x 200 pixels (on the dialog)
Then for example a command:
id=1000
I_POLY 5 , id ,
0 , 0 ,
100 , 0 ,
100 , 100 ,
0 , 100 ,
0 , 0

->creates a box on this canvas. (Dimensions are also in pixels!)
Result -> see test.png

The only thing you have to keep in mind:
On the dialog, the Y-Direction is downwards ! That means the origin (0,0) of the dialog
(and also of the canvas) is the upper left corner!

You can zoom into the drawing on the canvas with the mouse wheel, and reset
to entire with double click of middle mouse button inside the canvas.

If you click to an item, the you get the id as GLOB_BUTTON_ID, and can
react to this inside the parameter script with:

if GLOB_UI_BUTTON_ID=1000 THEN
... !do something
ENDIF

Regards Jörg

Anhänge (1)

img
test.png
Typ: image/png
417-mal heruntergeladen
Größe: 22,73 KiB

Hi Nemo,

I understand better now, and I have now managed a properly set up a complex window with REF_POLY it has more upside down.

strange way of placing the axes so as allplan everything is bottom left ?

Thanks

French to talk about Allplan Forum:
http://allplan.leforum.eu

olivier1

1 - 3 (3)
  • 1

https://campus.allplan.com/ verwendet Cookies  -  Mehr Informationen

Akzeptieren