Using revolve function to create a torus

292 views
Skip to first unread message

CONNOR MORENO

unread,
Oct 28, 2022, 11:18:15 AM10/28/22
to CadQuery
Hi all,

I'm creating a very simple model, just a torus using the revolve function. The relevant code snippet is as follows:

# Define torus minor radius
R = 50.0

# Construct torus
const = cq.Workplane('XZ', origin = (1200, 0, 0)).circle(R).revolve(toroidal_extent(-1200, 0, 0), (-1200, 1, 0))

# Export torus
cq.exporters.export(torus, name + '.step')

It is all constructed quite well, except that a small feature gets made where the torus meets back with itself on the XZ plane (images included below).

Screen Shot 2022-10-28 at 10.10.55 AM.png
Screen Shot 2022-10-28 at 10.11.58 AM.png

Does anyone know why this might be and how to fix it? Any degree of revolution less than 360 does not have this issue, it is only when the solid meets back with itself to become continuous.

Thanks, and let me know if I can provide any more information!

Connor

CONNOR MORENO

unread,
Oct 28, 2022, 11:21:58 AM10/28/22
to CadQuery
I should note that toroidal_extent in this case is 360

CONNOR MORENO

unread,
Oct 28, 2022, 11:24:57 AM10/28/22
to CadQuery
Should also note that const gets turned into torus at some point. Sorry, mangled together what I have to make it more readable.

Jeremy Wright

unread,
Oct 28, 2022, 7:26:28 PM10/28/22
to CONNOR MORENO, CadQuery
What viewer are you using? We have seen models that are valid but just look wrong in certain viewers.


--
cadquery home: https://github.com/CadQuery/cadquery
post issues at https://github.com/CadQuery/cadquery/issues
run it at home at : https://github.com/CadQuery/CQ-editor
---
You received this message because you are subscribed to the Google Groups "CadQuery" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cadquery+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cadquery/81d9d209-13d2-4ead-bd14-770df443dac5n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages