CadQuery / cadquery

A python parametric CAD scripting framework based on OCCT
https://cadquery.readthedocs.io
Other
2.93k stars 276 forks source link

Documentation: Assembly tutorial constraint solver result regression #1585

Closed Roger-random closed 1 month ago

Roger-random commented 1 month ago

As a CadQuery beginner I've been hanging out in documentations. I noticed a regression in the Assemblies documentation page introduced sometime in the past week(-ish) timeframe. Every constraint solver result shown in the 3D viewer seems to have gone awry. GitHub says the documentation page source (https://github.com/CadQuery/cadquery/blob/master/doc/assy.rst) has not been touched in four months. I don't know where to look next.

URL: https://cadquery.readthedocs.io/en/latest/assy.html

Expected: layout to match the static screenshot (repeated here for easy reference)

door_assy_freecad

Actual: layout now looks like this.

cadquery assemblies documentation solver error

Environment

Verified on following browsers:

OS: Windows 11

adam-urbanczyk commented 1 month ago

Thanks, looks like the free function PR did break something. AFAICT rendering assemblies locally works fine. I guess some kind of weird interaction between the cq directive and the new cq.Location constructors. I will look into it.

lorenzncode commented 1 month ago

I confirm local render with cq-editor or cadquery.vis works fine here. I can reproduce the issue with a local sphinx doc build.

lorenzncode commented 1 month ago

toTuple was changed to return degrees. https://github.com/CadQuery/cadquery/blob/995d1393bd3cba2061da7e7d2bea8e4fdbdd19c9/cadquery/occ_impl/geom.py#L1059

toTuple is called here in toJSON used in the cq directive: https://github.com/CadQuery/cadquery/blob/995d1393bd3cba2061da7e7d2bea8e4fdbdd19c9/cadquery/occ_impl/assembly.py#L338

adam-urbanczyk commented 1 month ago

Yup, just opened a PR