Would LuxCoreRender be a Suitable Engine for CAD/CAM?

General project and community related discussions and offtopic threads.
Post Reply
nordmann4656
Posts: 3
Joined: Fri Apr 23, 2021 1:53 am

Would LuxCoreRender be a Suitable Engine for CAD/CAM?

Post by nordmann4656 »

Hello. I'm in the beginning/thinking/planning stage of developing a framework for an interactive CAD/CAM system for automated manufacture of wood and panelized products which I would ideally like to open-source once I have an outline worth presenting. Although I have decades of experience developing general business-oriented applications, I'm just now getting into the world of graphics and rendering. I know so little about that field that I'm not even sure what open-source tools might help me with this project (which I expect will be basically the rest of my life's work as a software engineer).

The architecture I have in mind is thick-client/server MVC, where rendering and GUI control is done on the thick client, and the 3D objects are modeled on the server. The server will manage the 3D model data primarily through rules-based automation implemented in scripting, probably using an embedded Python or LISP interpreter. I'm inspired by EMACS (and to a lesser extent, AutoCAD) where a low-level kernel provides basic I/O functionality and an interpreter, but most of its business logic is implemented in a high-level scripting environment that is inherently extensible by the user, which removes the traditional wall between product developer and end-user. Straight out of the box, my system will have little functionality that would be directly useful to any particular real-world application. Engineers would be required to tailor the system to implement most high-level business requirements that are specific to any given buildout.

This framework will be in support of engineering design and manufacturing, more so than artistic, photorealistic 3D perspective rendering. Ergo, users will be working more with wire frames in orthographic views than in shaded perspective views. In fact, one of my "big ideas" is to use axonometric views by default to support interactive 3D modeling and engineering work on a 2D monitor (which is supported by no existing product I've seen--a fact which I find utterly mystifying.)

So, I was just wondering, if you wanted to develop a CAD/CAM system as described above, would you adopt LuxCoreRender (or part of LuxCoreRender) as the basis for the thick client? Would it be easier to decouple LuxCoreRender's model from its view and controller than to just start from scratch?

Any guidance would be appreciated. Thanks in advance.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Would LuxCoreRender be a Suitable Engine for CAD/CAM?

Post by Dade »

nordmann4656 wrote: Sun Apr 25, 2021 1:47 pm So, I was just wondering, if you wanted to develop a CAD/CAM system as described above, would you adopt LuxCoreRender (or part of LuxCoreRender) as the basis for the thick client? Would it be easier to decouple LuxCoreRender's model from its view and controller than to just start from scratch?
You can use LuxCoreRender as a tool for obtaining high quality pre-view of the wood and panelized product. It can be done client or server side (it is up to you) and it can be written in Python (i.e. you can just use LuxCore Python API and be ready to go).

However Luxcore is probably not going to be the "core" of your "display system", it has to be something using WebGL, OpenGL, Vulkan, DirectX or whatever, to display your wire frame preview, integrated with your client GUI (but it depends how much interactive you application has to be; see below).

So LuxCore can be a side tool, you press a button or change a display mode in your client UI (switching from a fast and abstract wireframe, flat shade or whatever pre-view mode) and the user will see a rendered pre-view of the product.

It depends on what kind of user interaction you have: is it like modelling in AutoCAD ? Or just inputting few numbers a that is it ? How interactive is the modelling process ?
Support LuxCoreRender project with salts and bounties
nordmann4656
Posts: 3
Joined: Fri Apr 23, 2021 1:53 am

Re: Would LuxCoreRender be a Suitable Engine for CAD/CAM?

Post by nordmann4656 »

Hi Dade,

Thank you for your reply. The main working pane will both display the model's wireframe representation and listen for user-initiated events such as mouse clicks that will initiate calls to state-change methods on the model on the server in a fully-interactive mode. My goal is that this interactive mode will display the wireframe in axonometric orthographic view, such that the z-axis is viewed and controlled at a 45-degree angle to the X and Y axes, and at equal scale to them, as well. Although I would also like to offer rendered perspective views of the objects being modelled, this is not the core functionality of the application--as I think you have inferred. What I have in mind is more engineering-oriented, so I'm thinking about collision detection and strong support for geometric analysis. It sounds as if LuxCoreRender is more artistically-oriented.

Even so, I was wondering if LuxCoreRender's rendering engine was layered on a mesh-modeling layer that I could reuse, such that I insert my own interactive editing pane in place of LuxCoreRender's rendering pane, perhaps even adopting the overall editor's look and feel to create a different version of LuxCoreRender oriented towards engineering and machining/fabrication. If so, this would provide a head-start over writing the thick client from the ground up on raw OpenGL, and hacking the Python interpreter into the server-side model container with pybind11, which is my fallback plan. I don't object to climbing the several learning curves involved, and banging out the code myself if there are no viable alternatives. In fact, I'm sure that would be a very rewarding exercise. However, I'll be happy to take any shortcuts I can find (or even just examples of effective architectures and best practices) as well.

I thank you again for any input you may care to offer.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Would LuxCoreRender be a Suitable Engine for CAD/CAM?

Post by Dade »

nordmann4656 wrote: Mon Apr 26, 2021 9:06 pm It sounds as if LuxCoreRender is more artistically-oriented.
It is a pure visualization tool. It doesn't offer any model building/manipulation tool (i.e. it is not its work).
nordmann4656 wrote: Mon Apr 26, 2021 9:06 pm Even so, I was wondering if LuxCoreRender's rendering engine was layered on a mesh-modeling layer that I could reuse, such that I insert my own interactive editing pane in place of LuxCoreRender's rendering pane
LuxCore is just a black box with no UI or end user application: you throw in a scene description (geometry, materials, textures, light sources, etc.) and it produces an images.

It is used, by the vast majority of the users, integrated in Blender. It sounds like you need more something like Blender (https://www.blender.org) or, even better, FreeCAD (https://www.freecadweb.org) than LuxCore.
Support LuxCoreRender project with salts and bounties
nordmann4656
Posts: 3
Joined: Fri Apr 23, 2021 1:53 am

Re: Would LuxCoreRender be a Suitable Engine for CAD/CAM?

Post by nordmann4656 »

Ah, I see. Thank you so much for your guidance! I'll check out FreeCAD.
Post Reply