
Mon, 09/18/2023 - 16:19
Forums:
I need to make a solid torus whose minor radius is larger than the major radius (called a spindle torus on wikipedia). What is the best way to create such an object? I've tried a few different combinations of BRepPrimAPI_MakeRevolution with a circle trimmed to the axis and BRepPrimAPI_MakeRevol with a full face (like the letter D). By themselves, they all look OK, but when I try to cut them with other surfaces, I get a variety of failures, especially if the cutting surface goes through the axis of the torus.
pload MODELING
circle a 25 0 0 0 -1 0 1 0 0 50
trim c a 4.1887902047863905 2.0943951023931957
line d 0 0 0 0 0 1
trim e d 43.301270189221931 -43.301270189221931
mkedge f c
mkedge g e
wire h f g
plane j 0 0 0 0 -1 0
mkface k j h
revol l k 0 0 0 0 0 1 360
box m -min -80 -80 -55 -max 0.0001 80 55
wedge n -80 -80 -55 0 0 1 1 0 0 80+80*sin(pi/9) 160 110 80-80*sin(pi/9)
bclearobjects
bcleartools
baddobjects n m l
bfillds
bcbuild rx
yields
Warning: Some edges are too small and have no valid range
Warning: Unable to orient the shape correctly
Warning: Some of the faces passed to the Solid Builder algorithm have not been classified and not used for solids creation
Thanks, Allen
Attachments: