CadQuery / CQ-editor

CadQuery GUI editor based on PyQT
Apache License 2.0
723 stars 111 forks source link

fit and render on file opening #432

Closed aavogt closed 3 months ago

aavogt commented 3 months ago

cq-editor file.py should run file.py without having to press F5. This change would make it more like freecad.

cq-editor loads the file with this code. I changed it to also do what F5 does:

     if filename:
            self.components['editor'].load_from_file(filename)
            self.components['editor'].triggerRerender.emit(True)

With the above change, cq-editor file.py renders file.py without user intervention, but the object is too small. I suspect the fit (Shift-F1) runs too early. Here's a screenshot:

image

adam-urbanczyk commented 3 months ago

Regarding the first point: no thanks. Regarding the second point: afbeelding

aavogt commented 3 months ago

I have that checked. If I touch file.py 10 seconds after starting cq-editor I get the right result.