Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Request for an App
-
@JonB I added floorplanarea-4 to the git repository with a file picker to select an image from the photo gallery and a slider for the scale setting. I tried to get the code to work in the RoomAreaView function but resorted to using a temporary file and calling the script with that file. In using the script, I also realize that a slider is fine except that the initial setting of the scale must be done with a known distance (e.g., a room width) but that measurement may not be part of the area calculation (e.g., it may be an interior room). So, a better way to set scale might be to do that explicitly (tap a button, select 2 pts with a known distance and enter that measurement in feet/inches) and then go on to mark the area to be computed.
I will say that this is already a useful script as I can now simply save a floor plan to the photo gallery and open it with the script and measure areas. Thank you for your expert assistance.
-
I have been playing around with getting gestures to work properly, to zoom/pan. It sort of works, but does not work inside a panel... yet. I will take a look at what you've got and incorporate into it.
A useful addition would probably be the ability to take a photo, then apply a perspective transform. for another project i was playing around with some of the built in ios rectangle detection algorithms.
-
@jonb I think that another useful feature would be the ability to measure distances (as opposed to areas). In other words, a linear measurement mode would permit line segments to be drawn anywhere (just as it does now for area measurement) but without connecting them to each other. Scale setting could then be invoked by a button that uses the last linear measure together with input of the known distance. Area measurement mode would work as it does now. This is essentially how Adobe Acrobat works. AA has 3 measurement modes: distance, perimeter, area. The current script could easily show perimeter by summing the distances measured. As I try to use the slider, I realize that entering the known distance would be better because it is hard to get the slider to the precise value that is based on the known distance. It would be easier to just type in that distance.
-
@JonB If you can find time, could you please take a look at floorplanarea-4? The script works fine but I have found that the slider is very hard to set (it changes the moment I take my finger off it) so I think a better UI would be to have a Scale Setting mode which would permit me to select 2 points for which there is a known distance and to enter the distance in feet and inches. This would also get around the problem I sometimes have where I have had to add a multiplier to the values provided by the slider because I wanted the displayed distance to be larger than the slider allowed.
The basic use case for this script is that I start with a picture of a floorplan which has some lengths shown and I want to determine the area of the space. I added a few lines at the end to permit me to select (using the image picker) an image in the photo gallery. I could not figure out how to feed the picked image to RoomAreaView directly so I used a temp file. I'm sure there must be a better way, but this works. It would also be nice if there were a way to snap the line segments to horizontal and vertical since most (though not all walls are that way). Being able to zoom for small plan images would be nice but I have managed without it.
Thanks very much for your help.
-
I might have forgotton to mention that I added two finger pan/zoom to the version in my repo a while back. Also, old points can be edited by grabbing the handles. This does let you be very precise... I sort of stopped working on this because I realized it probably needs a revamp from the ground up, the way I connected the touch handling with the other ui elements is pretty flawed -- it works, but is not clean, everything depends on everything else.
I will take a look at what you've got.
-
@JonB Wow, I somehow missed that you had done that. I will try it out. With Pan/Zoom done, the most needed feature would be the ability to set scale independent of the area measurement by selecting a known length and entering it as feet/inches.
-
@JonB I tried running RoomAreaFinder.py (using Pythonista 3 with the interpreter set to 2.7) with no success. It opens the console and another tab but nothing else appears.
-
I've installed it and I run it in Pythonista 3 without setting Python 2, but I've had to install swizzle.py, and no problem, all is ok.
Of course you need to install the jpg and Gestures.py -
I will try that although I realize that now that I have switched to Pythonista 3 (v2 crashes on opening) I lost my copy of Stash (which I will use to get swizzle.py). Can you tell me the one liner for getting Stash (I tried import requests as r; exec(r.get('http://j.mp/gsp35').text) but that led to more errors. Is there a different install for Python 2.7 vs 3.5?
-
So, I tried to simply get Swizzle.py by putting it on my Dropbox account and using Dropbox file Picker.py (which worked earlier today) but now I find that when I run the picker, I get a tiny file picker window ??
-
Found I had a Dropbox File Picker.py and a Dropbox picker.py, with the latter working correctly. So now I have the 4 files, RoomAreaFinder.py, swizzle.py, Gestures.py, and the jpg and I still get no output except when I do a zoom gesture and then I get console debug output.
-
@jonb I would really appreciate if you could have a look at the problem I am having running your version with zoom/pan. The console is showing the debug but there is no jpg display. I would love to get this working especially with a scale setting ability as per my earlier comments. This script is really very useful.
-
@ihf I did make a slight update to my repo to make sure I included the right swizzle.py. Try that one.
are you running on ipad or iphone?.
-
I'm using an iPad 3. After deleting old versions of files that may have been causing the problem, your current git is working again. For some reason it seems easier to move points when it is not zoomed but that is a minor issue. Now I just need a way to enter a known distance that may not be part of the area calculation ( e.g. an internal room dimension). What I do now, which is somewhat clumsy, is pick 2 points with a known distance and change the scaling factor from the default of .08 until the distance shown matches the known. Then I have to restart the program (since the points used to determine the scale may not be part of the area), set the scale to the previously determined value and measure the area.
-
@JonB I added the (primitive) file picker snippet to your script to enable selecting an image from the photo gallery. The modified version is in my git as floorplanarea-2.py. I wish I could say I understood your code well enough to make more than trivial changes (e.g. scale setting mode with feet/inches, a way to save the image with the area calculation, etc.) but I sincerely appreciate the work you have already done.
-
Been busy, but I may try to pick this up again soon.
-
@JonB That would be great. In the meantime, I shall try to gain a better understanding of the script.
-
@JonB After not using the script for awhile I recently tried it and it is failing. When I run floorplanarea-6.py https://github.com/ifuchs/RoomAreaFinder/blob/master/floorplanarea-6.py, the file picker comes up, I select an image, the script just ends. If I try to run it again, I get a Value Error, "View is already being presented or animation is in progress".
Also is there a better way to use the selected image than the kluge I added which picks the image and saves to a temp file before calling the main routine (Room AreaView)? -
Strange behavior. I went back to try the app again and it worked ONCE. It has reverted to the behavior described a couple of days ago. It returns immediately after selecting a photo and then if I run it again, it gives a Value error (as if the animation is running already)
-
@JonB Any chance you could take a look at this? Thanks.