Cadquery fails to export correctly for multiple formats for my(admittedly weird) model, but appears ok in jupyter and when exported as stl
- Dominant language
- Python
- Stars
- 5.8k
- Forks
- 541
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 5
Description
Hello, please let me know if you wish me to provide better formatting or more info. Before I forget, should we add .vs and .eggs to the gitignore?
For my model( a weird test to demonstrate my confusion as to why the midpoint selector is needed in the roadmap, as edges() seems to function ok in returning the midpoint, but I don't have time to write that up now), I think export behaves incorrectly.
The model displays ok in jupyter.
Stl exports ok I think.
3mf and amf failed to open in prusaslicer 2.5 on windows and on cura 5.1.1
step seems to cut the sphere at random rather than combining them(also open in mayo and freecad, same result)
not sure about the svg, being correct


Here is the code which generates the files:
```
from collections import namedtuple
from cadquery import exporters
from cadquery import Compound
Info = namedtuple("Info", "trans center text")
infos=[
Info((2,0,0),[False, False, False],"False, False, False"),
Info((2,0,2.5),[True, True, True],"True, True, True"),
Info((2,0,5),[True, False, False],"True, False, False"),
Info((2,0,7.5),[False, True, False],"False, True, False"),
Info((2,0,10),[False, False, True],"False, False, True"),
]
results=[]
for x in infos:
result= (
cq.Workplane()
.transformed((0,90,90),x.trans)
.box(1,1,5)
.edges("X")
.tag("textBase")
.edges(">X")
.box(.4,.4,.4, centered=x.center)
)
result2 = result.workplaneFromTagged("textBase").center(.5,0).text(x.text,1,.3, cut=False, halign="left")
results.append(result)
results.append(result2)
resultShapes=map(lambda x: x.val(),results)
comp = Compound.makeCompound(resultShapes)
exporters.export(comp, 'cadqueryTest.step')
exporters.export(comp, 'cadqueryTest.stl')
exporters.export(comp, 'cadqueryTest.amf')
exporters.export(comp, 'cadqueryTest.3mf')
exporters.export(
result,
'cadqueryTest.svg',
opt={
"width": 300,
"height": 300,
"marginLeft": 10,
"marginTop": 10,
"showAxes": False,
"projectionDir": (0.5, 0.5, 0.5),
"strokeWidth": 0.25,
"strokeColor": (255, 0, 0),
"hiddenColor": (0, 0, 255),
"showHidden": True,
},
)
r= show(comp) # , show_result=False)
```
I installed cadquery via conda, but since I plan on helping with development I installed via
python version is 3.9.13
conda install --only-deps -c cadquery cadquery=master
then
pip install --no-build-isolation --no-deps -e [my git repo local path]
I differ from 9c525bcfd7bf7f1b8b9aa4370f69cad73806f37a but it shouldn't make much difference as I only had changed the following so far
cadquery/doc/_static/cadquery_cheatsheet.html
cadquery/tests/test_selectors.py
-----
A bit off topic but if anyone has a better way of installing for development than what I did, please let me know. I am not very comfortable with conda development
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.