I wrote a Java App 10yrs ago and recently needed to update it for Java 1.8. While doing it, I tweaked it a bit so it’s more useful for my Fritzing work and am posting it here.
I did not polish it - thought I’d wait to see feedback. It works as-is but, could use work. Think ‘beta’ version… If it becomes a useful app, I’ll add Help and Bells & Whistles down-the-road (maybe…).
What does it do? First, the Fritzing font used to display the cursor position is soooo tiny, it’s useless for my 70yr old eyes.
This App determines the Coord’s and Distance’s (between Two points on the screen - not on a PCB or Part).
It’s useful for those of us making 3D parts and needing to know locations of, say a ‘Button’ so as to make a lid on an enclosure…
But, with a little understanding, you can get the actual dimensions…
Basically, you determine/setup a scale and use it to calculate dimensions based on Pixels of the Screen.
I appear to have a Mouse problem (perhaps it’s my machine or Java). The Mouse pointer I’m using is a Graphic_Overlay so, I suspect it…
Hence, the Video shows multiple clicks because cursor isn’t placed just where the receiving element wants it…
The Video is crude but gets the point across…
It’s a .jar file so, delete the .fzz extension.
Place the woof.jar in a convenient location as it Writes a file with the Data (saved via ‘Save’ button).
Double-Click the woof.jar to open/run it. Yes, you need JRE 1.8.
“Set Origin” sets current Top-Left corner (Red Arrow Tip) as New Origin.
“Data” button collects the current Data-Point.
“Save” writes the data to a file in location where the App lives.
“Drag Me” is a Drag-Handle to position it.
Determining PPI (Points Per Inch)
Since the App measures Distances on the Screen, anything not displayed at the Actual Size, will need to be scaled.
A scaling factor based on a Known (actual) size of displayed Item (such as PCB) is required.
Scaling is determined by displaying the “Actual Size” (in Fritzing’ View’) and measuring it on the screen with a Ruler for confirmation.
Example: Actual (known Width of PCB) = 90mm (= 9cm = 3.54 inch).
- Measure the Dist between PCB left and right edges. Let’s say, Dist = “386px” for the 3.54 inch PCB.
Therefore, “Scale Ratio = 3.54in/386px”
- Distances between points A and B when Fritzing display is not set to Actual Size… One additional Ref dimension is needed, as follows:
Zoom-in on the PCB (full view) and measure the PCB’s width using the App. Say it’s “957px”
Therefore, 957/386 = 2.48 (sale factor for the Zoomed View).
- Now, Use the App and measure the distance between points A and B, Say the Dist = “141px” (the width of the Encoder on the example in video)
There is linearity by Ratio’s, therefore, the Faux(screen) Dist is obtained from:
Dist(actual result) 3.54 inch -------———————----—— = ————-----—, Therefore, Dist(faux) = 1.29 inch 141 px 386 px
The Actual (Physical) size is (Ratio’d down/up as needed, based on the Zoomed View the 141px came from):
Therefore: 1.29/2.48 = 0.52 inch, = 13.2 mm, which matches the part’s Spec. Bingo!
Woof.jar.fzz (16.2 KB)