Description
Using CQ-editor-0.2 on Debian GNU/Linux 9 (stretch) Linux 4.9.0-6-amd64.
I installed this pre-built cq-editor from file CQ-editor-Linux-x86_64.zip on 15 FEB 2021.
I am developing a cq model of an Elevated Bicycle Expressway (bikeway). I attach a brief PDF document with a graphic image of the bikeway's basic steel structure component.
Some geometric coordinates computed for the bikeway's steel structure cq model, have no analytic algebra formula solutions, so the python code uses repetitive numerical method iteration loops, to converge on values for these geometric coordinates. It takes forty (40) seconds in cq-editor to run the python code and render the image of the steel structure component.
My next task is to add the three (3) remaining major component to the bikeway model:
-- concrete track on which the bicycle tires roll;
-- curved corrugated steel roof over the track;
-- transparent side panels on each side of the track;
As I develop each of these three (3) new major component, many times running the python code and rendering the image, I don't want to be re-executing all the python code for the already finished component(s). But I need to ensure that the major model component currently under construction, fits correctly with the already-finished component(s).
So the rendered image must include both the already-finished major component(s), and the model component currently under construction
Even as I work on the model of the concrete track component, re-running the finished python code for the bikeway's basic steel structure component, will add forty (40) seconds to each run / render of the track model component. If I need to run / render the track model 200 times until it is finished, this will waste 133 minutes of time ((40 [secs/run) X 200 [runs]) / 60 [secs/min]).
As I proceed to work on the remaining two (2) major component (roof, side panels) the time consumed by re-running and re-rendering already finished python code for completed major model component, will grow rapidly.
I am looking for some cadquery solution, that will let me generate a separate file for each finished major component's cq model, a file containing some kind of efficient intermediate representation of that finished major component. And then I will use a separate python program that imports all existing intermediate component representations, quickly combines them into a single cq model, and renders that combined single cq model.
In the cadquery documentation, there is a class method cadquery.Assembly.save() that can export an XML representation of an Assembly object:
https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.Assembly.save
I couldn't find in the documentation, any mention of a way to import an XML model representation into a cq model, either in the CadQuery Class Reference or in the API Reference.
My questions are:
Q#1: What is an .xml file representation of an Assembly object used for ??
Q#2: Can an .xml file representation of an Assembly object, be imported to populate an empty assembly ??
Q#3: Alternatively, could I use a combination of export and import with a STEP file, for an efficient intermediate representation of bikeway model major components ??