[SOLVED] Application capable of measuring angles and distances.

aeric

Expert
Licensed User
Longtime User
My suggestion is, start with a simple function. Don't be so ambitious.
Just solve the main problems first.
The app showed above has undergone a lot of enhancements.
Just tell the boss, this app will take months of continuous improvement, not built in 1 night. Are you ready to invest?
 

William Lancee

Well-Known Member
Licensed User
Longtime User
Since this is the Chit Chat forum, let me add another consideration...
There are applications that have serious ramifications in the real world, for example health, finance, safety, and even statistics.
Over time these applications mature and the users come to rely on them.
A new app that works like existing apps is unlikely to be accepted as a standard.

The risk is that the use of new untested code could cause serious damage.
Even if that use is for one's own purpose (or by a specific company).

You can create an app for learning and fun (and to some like me, trigonometry is fun), but be aware!
 

amorosik

Expert
Licensed User
I don't agree with what you wrote
It is clear that reproducing the features of a program is perfectly useless (except to learn and understand how to do it)
But there are many reasons to start developing a software procedure similar to the one currently in reference:
- new features requested by some customers
- customization on particular features (especially this one)
- better assistance than that provided on the 'reference' program
- better performance of some existing features
- availability of the procedure on different devices (tablet, PC, etc.)

As for the 'risk' of using a new procedure, it is true, it is certainly riskier, but you have to think about two things:
- even a consolidated procedure is NEVER without of risks
- it is obvious that a new procedure, in order to enter the market, must lower the barriers that prevent its adoption, and therefore will have a lower price or greater associated services or both

And therefore, from my point of view, starting the development of a certain software procedure that already exists and is used, in addition to being facilitated by the fact that you can follow the lines of the already existing procedure, can also allow an adequate economic return if different features or services are offered compared to the reference procedure
 

William Lancee

Well-Known Member
Licensed User
Longtime User
@amorosik
there are many reasons to start developing a software procedure similar to the one currently in reference
True most of the time, but...
There are applications that have serious ramifications in the real world, for example health, finance, safety, and even statistics.
I will give a personal example. In my career as a researcher and an academic.

I have written a number of statistical apps.
First, because there were few useful ones available.
Later, because I didn't like them or they were too expensive.

However, if I wanted to publish my research results in a professional journal, I would have to redo all my data analysis in SPSS, SAS, R, or another accepted standard.
I have shared some of my statistical apps on this forum, but I always caution the users to not use it in situations where standards of practice matter.

I am sure there are other examples in Health, Finance, or as in this thread's original topic that could affect construction and public safety.
I, and my software users, would not want my code to result in a dangerous and/or costly error by a crane operator.

On the other hand, existing standards often provide ways for incorporating new or improved code as plug-ins or add-ons.
The organization managing the standard has the responsibility to test and endorse these new methods.

In any case, you are right - just like me - most of the time.

P.S. While no creative person likes standards - they are a necessary evil.
 

William Lancee

Well-Known Member
Licensed User
Longtime User
This year I grew tomatoes from a selection of internationally sourced seeds in a custom build protective cage (we have squirrels and raccoons).
I had growing lights and a heating pad. The seedlings came up, I planted them. I watched them grow.

At the end of the summer, I reaped 8 tomatoes in total, 2 tasted awful. A complete crop failure.
Maybe I'll try garlic and radishes. I'll have to plant them in the next two weeks.

So now I am back to coding anything I want.
(with all due respect for growers)
 

jroriz

Active Member
Licensed User
Longtime User
Thank you all for your engagement and attention.
As I said, I need to develop my own application that measures angles and distances.
I need guidance on which libraries to use, and whether b4J (which I already feel comfortable with) is really the best option or if it would be better to look for another tool.
Here is link to a video showing what I need more or less: crane arm
 

amorosik

Expert
Licensed User
I think it's a project from which we/you can learn a lot
Starting from scratch, I would recommend dividing the various functions For example:
- the coordinate environment
- the reference grid, inside the coordinate environment
- the zoom that allows you to show a larger or smaller portion of the environment
- the pan, here we are on the easy side because you just need to translate everything to the right/left, up/down
- the object or objects that can be drawn and moved with drag-drop
- the set of indicators below, the information textboxes
- and finally the various components of the crane, hinged together, which seems to me to be the most complex thing

Going forward by solving point by point, the project should be able to see its birth
 

ilan

Expert
Licensed User
Longtime User
it can be done in b4x. no need for a game engine for this.
i would do it using b4xcanvas and math
btw. i have no idea why this app has 50 millions+ downloads.
i can understand why some companies may need such and app but 50m+ ????

ok my mistake mil = k. google play was in portuguese and mil means k. now it makes more sense
 
Last edited:

klaus

Expert
Licensed User
Longtime User
I played a bit with your project.
Attached you find a kind of demonstrator project which shows what could be done with B4X.
On the graphic there is a crane, a building and three loads.
Cranes, buildings and loads are classes, and have physical dimensions in meter.



There are three management modes:
Crane: In this mode you can move the crane, or change the dimensions of a building.
Scale: You can move the graphic with the mouse or a finger.
Measure: Allows to measure a distance.

Crane:
The crane is simply shown with the boom, more graphics could be added.
The crane has three dots.
If you click on the pivot point of the boom, you can move the crane horizontally.
If you click on the top of the boom, you can move the top in both directions with limits for the length and the angle.
If you click on the hook, you can move it vertically.



If the hook is near a connection point of a load, a magenta point is displayed.
Click on this point:



It is displayed in green meaning that the hook is connected to the load.
And you can move it either on the top of the boom.



Or with the hook:



After moving the load, for example on the top of the building you can click on the green connection point to disconnect the hook:



The point is displayed in magenta showing the connection.
Now, if you move the boom, the load remains in its position.



Scale:
You can change the scale with the slider, or with the mouse wheel in B4J, this works independently of the mode selection.
You can move the graphic in both direction.



Measure:
When you click on the screen a cross is displayed.
And when you move the mouse a second cross is displayed and the coordinates, the length and the angle are displayed in the top left corner.



There are also three sliders which allow do dynamically move the crane.
The slider determines the speed, when you release it, the slider moves back to 0.



Not everything has been tested there might remain some bugs.

What is missing:
- graphic for the crane.
- zoom with the fingers in B4A and move the graphic with the right mouse button in B4J.
- the measuring method should be improved.
- not tested with B4i.
- other objects e.t.c.
 

Attachments

  • Crane.zip
    37.7 KB · Views: 56
Last edited:

jroriz

Active Member
Licensed User
Longtime User
Thank you very much!
This is a great step that will help me a lot!
As soon as I have the application more functional, I will post it here.
Once again, thank you all.
 

javiers

Active Member
Licensed User
Longtime User
As always, your work is impressive.
You never cease to amaze me!
 

Mark Read

Well-Known Member
Licensed User
Longtime User
Not everything has been tested there might remain some bugs.
This is really great work Klaus. If I run in debug mode and set the window to maximum, there is no crane , building or objects. They come back if I reduce the window again. Zooming does not help.
 

klaus

Expert
Licensed User
Longtime User
If I run in debug mode and set the window to maximum, there is no crane , building or objects. They come back if I reduce the window again. Zooming does not help.
I have not tested the form resizing.
It is now on the to do list.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…