Ján Slivka
Ján Slivka

Reputation: 1

Autodesk Forge Viewer: pdf calibration

why do I measure different values if I calibrate the pdf on and off the drawing lines

calibration on lines

measure after

calibration outside lines

measure after

pdf file

Thanks for more information

I expected same measure value

Upvotes: -1

Views: 81

Answers (2)

Desmond Robers
Desmond Robers

Reputation: 39

I think I understand the problem, and it seems to be a bug when you make a calibration using snapping and not snapping. You can easily reproduce this bug. For convenience, I used this project on GitHub: Offline PDF Markup.

Step 1: Make a calibration using snapping (I use meters because I don't understand the imperial system 😁). enter image description here

Step 2: Make two equal distance measurements using snapping at both ends of the distance measurement. enter image description here

Step 3: Make a new calibration of the same length as Step 1, but this time without snapping. It needs to be a free measurement calibration. enter image description here

Step 4: Make two equal distance measurements without using snapping. These need to be free measurements. I made them on the left where I drew the free calibration. enter image description here

We also encounter the same problem in our production application. A temporary solution is to disable free measurement calibration by using snapper.setSnapToPixel(false);. I hope you can provide us with more information about this problem.

Upvotes: 0

Petr Broz
Petr Broz

Reputation: 9942

We would need some more details to be able to help:

  • the original PDF (the link you provided says the resource has been deleted)
  • how exactly are you loading the PDF, i.e., are you loading it directly to the viewer using the Autodesk.PDF extension, or are you translating it using the Model Derivative service?
  • what version of the viewer are you using, and how exactly are you loading the model into it?

If this were a 2D drawing, one possible explanation would be viewports. Basically, the viewer supports drawings with viewports that can have varying scales, so calibrating inside and outside of these viewports could yield different scales, and therefore different measurements.

Upvotes: 0

Related Questions