CadQuery / CadQuery/cadquery

unexected behaviour in gltf export

Open
#935 1 comment 0 reactions 0 assignees View on GitHub
assembly bug
Dominant language
Python
Stars
5.8k
Forks
541
Avg merge
3d 2h
Merged PRs (30d)
5

Description

Dear experts,
I found an unexpected behaviour in the gltf export. For illustration the following script to be executed once with exportType='step' and once with exportType='gltf' will create the files test.step and test.gltf respectively.

```
import cadquery as cq
exportType='step' #'gltf'
pts=[[19.5,0,0],[9.5,0,0]]
assy = cq.Assembly()
w = cq.Workplane('YZ')
tube = w.rect(1,1).rect(0.95,0.95).extrude(-9)
for p in pts:
assy.add(tube, loc=cq.Location(cq.Vector(p)))

assy.save("./test.%s" % exportType.lower(), exportType=exportType.upper())
```

If I open now the file test.step in FreeCAD I find two tubes one after the other - my expected behaviour:
![grafik](https://user-images.githubusercontent.com/26323518/147283657-8f8c1fb9-b2af-4594-9ec3-3c0c099bddf8.png)

If I open the file test.gltf in Blender, I can find only one tube and an error message - opening the file in three.js is not possible at all:
![grafik](https://user-images.githubusercontent.com/26323518/147283903-53bfd8ef-59f9-4973-b8d5-05c567abe015.png)

To me this looks unexpected and I suspect a bug as other formats like STL are working like test.step.

Many Thanks for any insights!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.