H
H
hokudjolsbsy2018-08-03 22:47:17
Python
hokudjolsbsy, 2018-08-03 22:47:17

Is it possible to calculate the volume of a complex figure from a 3d model using the graphics library API?

No experience with graphics.
Let's say it looks like this. On the side is a list of graphic primitives, the user selects and constructs a model from them in the main window. At the output, the parameters of the figure, volume, etc.
Can this be done with python+OpenGL or blender, freeCAD, pythonCAD, etc.?
Is this a fairly simple task, or is it a complete CAD system?
If there is a choice, then which library will eat less resources, run faster, have fewer dependencies, etc.?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan, 2018-08-11
@Iv_and_S

everything is mixed together, however.
Firstly, it is worth distinguishing between Solid and MESH models. The former give the exact volume of the "complex figure". The second, as it were, is not, because. are made up of polygons. (i.e., the model is, as it were, empty inside, unlike SOLID).
in engineering CAD, SOLID modeling is usually used, and "yes" using any engineering CAD you can get the volume of the figure. maybe this CAD has an API.
Offhand, you can advise OnShape - this is an online CAD with API (free only for open models visible to everyone).
secondly, the calculation of volumes depends very much on what a "complex figure" is. You can write a service on some Three.js where you can draw, for example, walls from rectangles, and calculate the volume in the same place.
In general, there are a lot of options, it is necessary to clarify the task. what needs to be built, what the user needs, in what environment it will work, the required accuracy, and so on.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question