Code: Select all
import Web
Web.startServer()
('0.0.35.130', 44409)
To connect from the outside I made this class RemoteFreeCAD https://gitlab.com/dcapeletti/RemoteFre ... FreeCAD.py
In a python console we write:
Code: Select all
from RemoteFreeCAD import *
client = RemoteFreeCAD('localhost', 44409)
If we want to send a message to the server to modify the model, we use the send function of the RemoteFreeCAD class. In this class there are several experimental functions to create and modify objects from a client. Some of them are:
crearDocumentoNuevo: Creates a new document from a connected client. Example
Code: Select all
client.crearDocumentoNuevo()
Well, after having shown what I have done, now I wonder how it can be possible to query model information using the FreeCAD web server. There must be some get function or something like that in the web server that can query information from the model and return it to my client, but I still can't find the way to do it. For example, if I want to query dimensions, list of objects, among other things.
Any help?
See video in Spanish https://www.youtube.com/watch?v=h-przvn0neI