Skip to content
New issue

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

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

Already on GitHub? # to your account

Intersecting text taking a while #159

Open
r-bt opened this issue Jun 29, 2024 · 2 comments
Open

Intersecting text taking a while #159

r-bt opened this issue Jun 29, 2024 · 2 comments

Comments

@r-bt
Copy link

r-bt commented Jun 29, 2024

Hi,

Firstly, thanks for the awesome library.

I am trying to extrude and intersect two pieces of text:

const { drawText } = replicad;

const main = () => {
  
  const john = drawText("JOHN", {
    startX: 0,
    startY: 0,
  })
    .sketchOnPlane("XZ")
    .extrude(50);

  const mary = drawText("MARY", {
    startX: 50,
    startY: 0,
  })
    .sketchOnPlane("YZ")
    .extrude(50);

  const combined = john.intersect(mary);

  return [
    combined
  ]

};

In the workbench, however, it takes a while to complete, around ~2-5 minutes which is longer than I expected such an operation to take.

@sgenoud
Copy link
Owner

sgenoud commented Jul 5, 2024

Unfortunately, boolean operations with the base library I use (open cascade) are relatively slow.
That said, your code run on my machine (4 years old intel macbook pro) in about 10 seconds. Do you use a particular browser / machine?

@r-bt
Copy link
Author

r-bt commented Jul 6, 2024

Interesting, that's unfortunate as the library is great otherwise. I tried doing the same thing in JSCad but it doesn't have as nice support for extruding text or directly rendering in the browser.

I'm using a Macbook Pro with the Apple M1 Pro, I tried on both Firefox and Chrome and they were both equally slow (ranging from 1 to 5 minutes)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants