generic sweeps must start at origin?
Closed this issue · 1 comments
tve commented
Trying to do a sweep along a curve starting anywhere other than the origin produces weird results. Here's a screen shot showing the bezier I'm sweeping and the resulting sweep:
See code
const r = replicad
function main() {
const bz = r.makeBezierCurve([
[-20, 0, -20],
[-30, 0, -20],
[-30, 20, 10]
])
const dia = 6
const c = r.drawRoundedRectangle(2*dia, dia, dia/6).sketchOnPlane("YZ")
const swp = r.genericSweep(
c.wire,
r.assembleWire([bz]),
{ forceProfileSpineOthogonality: true },
false
)
return [
{ shape: bz, name: "curve" },
{ shape: swp, name: "sweep" }
]
}
sgenoud commented
I am not sure about this. I have found the same thing than you - not sure if there is a better way. This comes directly from open cascade.
I have tried to stick to sweeping from the origin to obtain the result that I want (or use the withContact
option). Is there a reason you want the spine to be defined outside of the shape you are sweeping?
There is a need to explore a bit more good ways to use sweeping (and with it an API where common things are easy to do and work out of the box).