Imported SVG scale is wrong可打印版本 +- RoboDK Forum (//www.sinclairbody.com/forum) +-- Forum: RoboDK (EN) (//www.sinclairbody.com/forum/Forum-RoboDK-EN) + - - -论坛:RoboDK错误(//www.sinclairbody.com/forum/Forum-RoboDK-bugs) +--- Thread: Imported SVG scale is wrong (/Thread-Imported-SVG-scale-is-wrong) |
Imported SVG scale is wrong-j_cso-05-12-2022 The attached SVG file is 100x100mm, and the attached STL is 100x100x3mm, but when I import them both and stack them on top of each other, the SVG looks smaller. (I'm also using the SVG to test the Cam2D function in the API, and likewise getting indications that it's smaller than it should be and not centering as expected). I'm on x86 Ubuntu 22.0, RoboDK v5.4.1 (64 bit). Trying again to attach the files. RE: Imported SVG scale is wrong-j_cso-05-12-2022 If I convert the SVG to a PNG using linux "convert" (ImageMagick 6), RoboDK renders the PNG more accurately, although the ArUco tag still reveals about 1-2mm of error. This isn't a bad approach for testing the accuracy of your renderer, so if you have OpenCV or another way to get pose from April / ArUco tags, you might consider adding it to your test suite. RE: Imported SVG scale is wrong-Albert-05-31-2022 RoboDK may be unable to properly retrieve the size of your image in some circumstances, such as when you load the SVG image you shared. One workaround is to use a PNG file instead (as you mentioned). If you want better resolution you can load a larger image, then, scale it down using the Scale option. Another option would be to scale the image object to obtain your desired size after you loaded the image. For example, once you loaded the image in RoboDK as an object, you can retrieve the size and scale accordingly:
Code:
my_desired_width = 100 # Set the desired image width in mm
|