Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generic sweeps must start at origin? #94

Closed
tve opened this issue Aug 3, 2023 · 1 comment
Closed

generic sweeps must start at origin? #94

tve opened this issue Aug 3, 2023 · 1 comment

Comments

@tve
Copy link

tve commented Aug 3, 2023

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:

image

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
Copy link
Owner

sgenoud commented Aug 14, 2023

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 withContactoption). 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).

Repository owner locked and limited conversation to collaborators Aug 14, 2023
@sgenoud sgenoud converted this issue into discussion #97 Aug 14, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants