CadQuery / cadquery

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

rotate #288

Open KeithSloan opened 4 years ago

KeithSloan commented 4 years ago

https://pythonhosted.org/cadquery/classreference.html#cadquery.Workplane

Gives the parameters of rotate as rotate(start, end, degrees)

But only mentions start (3 tuple of floats) and degrees (float)

Also not sure how the 3 floats specify an axis of rotation

Could you please supply an example.

I tried res = shape.rotate((.0,.0,.0), .30) but got error rotate missing 1 required one positional parameter degrees

Thanks

jmwright commented 4 years ago

The pythonhosted link doesn't work for me. Are you looking for something like this?

https://github.com/CadQuery/cadquery/blob/master/examples/Ex015_Rotated_Workplanes.py

KeithSloan commented 4 years ago

Not sure what went wrong with me trying to post link. Try this one https://cadquery.readthedocs.io/en/latest/classreference.html#cadquery.CQ.rotate

rotate

Okay fixed documentation is missing AxisEndPoint

adam-urbanczyk commented 4 years ago

Thanks for reporting, the docs need fixing. NB: to specify an axis you need two points (Arg1 and Arg2)