From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2d picture : move the origin ( 0,0 point ) to the center and draw in milimeters

I need to draw the profile of a camshaft in 2d picture and i obtained my (x,y) positions of the points on the profile in absolute coordinates. I was wondering if is possible to move the 0,0 to the center of the picture so I don't have to switch to relative coordinates since my values are extremly small ( like (0.41602,4.72796) in milimeters ).

My second problem concerns drawing at scale 10:1 as follows :

I want to print the result of the 2d picture and what i need is that 1 cm on the printed picture is equal to 1 mm in the real drawing in 1:1 scale.

 

Sorry if it makes little sense, just ask if you don't understand and i will try to explain a bit more.

0 Kudos
Message 1 of 4
(3,225 Views)
First, no you can't move the origin point.

Second, all you have to do is multiply all your inputs that define the sizes of thing by 10 before you generate the objects to draw.

Also be careful to always start with a new empty drawing if you are going to be drawing in a loop. The actual datatype underlying the 2D picture control is a strange flattened string so every time you do something to an existing picture wire you are really adding data to the end of this string.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 4
(3,200 Views)

so i need to switch to relative coordinates in order to draw.

Also, correct me if i misunderstand, but if i draw a line from 0,0 to 0,10 the LENGHT of that line is 10 MILIMETERS not PIXELS, right ?

0 Kudos
Message 3 of 4
(3,193 Views)
No you are always drawing in pixels, but 1 pixel can represent whatever length you want it to be. If you want to say 1 pixel is 1mm (scaled), then 10 pixels would be 1cm.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 4
(3,180 Views)