I want to create a very simple 2D (later 3D depending on funding) interactive CAD applications with very few features like:
- Ability to create lines, points, simple convex polygons and simple shapes such as ellipses
- Ability to subdivide the polygons.
For this reason, I am going for a Client-Server model, where the Client consists of GUI and Rendering components. For this, I am thinking of using Kivy framework as, it has GUI and OpenGL both in a single framework. Another alternative, is to use QT framework. This is notational convenience, everything will be running on a single machine.
For the server part, which contains code for manipulating geometry, I am thinking of using OpenCASCADE directly, or gmsh. Basic idea here is that: once the geometry is modeled, it is meshed in the server and this is sent back to the client for rendering.
My question regarding this is that, does this approach work in an interactive application? My understanding is that mesh generation takes a long time, so creating a mesh for every small change in the geometry might not be ideal for an interactive application. But, then OpenGL can only render very few geometry primitives (like point, line, triangle and quads) and using OpenGL only makes sense when we are meshing the geometry (As far as I know, OpenCASCADE uses Boundary Representation to represent models).
Please understand I am fairly new to geometric modeling and computer graphics in general, so any help is appreciated.
EDIT: Add more clarifications.
CodePudding user response:
"does this approach work in an interactive application?". Not really, unless your customers are very patient. Rendering will be jerky, even if you have nearly instant transmission. This is why hardware acceleration was invented. And this means it has to be local on the machine.
If you are not very experienced I recommend leaving the client-server architecture for later. Get working a standalone app first.
I think meshing is not needed, if you need only 2D. Start with rendering curves only first. If you need filled shapes, a color filling algorithms might be much simpler approach.
Open Cascade takes years to learn
Our alternative for $20 a month (while you are developing): https://dynoinsight.com/ProDown.htm
Best
