-
Notifications
You must be signed in to change notification settings - Fork 301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export Assembly as TSJ #736
Comments
I have also try the solution from issue #629, but I get the following error:
|
Please provide a minimum (non)working example including the code that creates some assembly so that we can reproduce the problem. |
When did you installed cadquery ? The toCompound method has been merged yesterday, you might want to update your installation first to see if it solves the problem. |
I installed it a couple weeks ago. I tried to update it this morning. Maybe I should try again, is it done by doing:?
|
I was able to solve this. I was creating an empty assembly and then adding parts. The assembly was being created properly but when I tried to run the generate_solid_from_assembly function didnt work
|
I'm glad that you have managed to solve this problem yourself.
Previously you posted and then deleted some huge piece of code depending on a DXF that you did not provide. Now after you have deleted that post your comment does not really explain what happened. Nobody except your knows what was inside |
Yes, I realized that the whole code was too much for the simple question I was asking. The code inside generate_solid_from_assembly is the same as in #629
I was giving the function an assembly that was initially created empty and then adding the parts:
This was an issue as the method val() was not recognized. On the other hand if I do:
works correctly. To close this issue, what is the command line that I should write in the conda prompt to update cadquery to include the method toCompound(). This would replace the whole function. Thx! |
As @Jojain said Maybe this is not the correct way but I usually just delete conda environment where my copy of CadQuery is installed and reinstall everything as described in CadQuery README or with mamba (see #691). This avoids all possible version conflicts and ensures latest possible versions of all dependencies are installed. There is also |
@davidvpspace You can try the following method, but what @fedorkotov has suggested about removing and re-creating the environment is the safest method. We have had multiple users end up with weird version conflicts when upgrading packages within environments.
|
Please wait till azure on master is green (should happen soon). |
@jmwright I have done what you proposed of removing cadquery and reinstalling it, but now I get the following error. I have tried several time to delete all the files and installing it again, but the same happens:
|
CadQuery CI is green again, so you should be safe to try this now. Did you use the following steps to remove and recreate the environment? conda deactivate # if you are in the cadquery environment
conda env remove -n cadquery # Should say "Removing all packages" and not give an error
conda create -n cadquery python=3.8 # I personally like to pin the version of Python
conda activate cadquery
conda install -c conda-forge -c cadquery cadquery=master Then try |
Now it works! (with the steps above) Thanks for your help! |
Hi there!
I have an assembly created by multiple parts in cadquery. I would like to export it as json mesh format to later apply some textures to the different parts. With cadquery, the assembly cannot be exported directly as .tjs since only .step and .xml is available.
I have tried a workaround to convert the assembly to a single piece by and then export it to .tjs
assy = assy.toCompound() cq.exporters.export(assy, 'design1.json', tolerance=0.01, angularTolerance=0.1, exportType=exporters.ExportTypes.TJS)
However, I get the following error:
I have installed cadquery using the master branch so I should be able to use the attribute toCompound(). Do you have an idea of what could be the source of this?
Also, is it in mind to add to cadquery a feature to specify material type to different parts of an assembly?
Thank you !
The text was updated successfully, but these errors were encountered: