Skip to content
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

Potential bug with clone and cut #173

Open
alzatin opened this issue Dec 2, 2024 · 8 comments
Open

Potential bug with clone and cut #173

alzatin opened this issue Dec 2, 2024 · 8 comments

Comments

@alzatin
Copy link

alzatin commented Dec 2, 2024

Hello,
I'm experiencing some issues trying to return a shape that I've cloned and cut. There seems to be a misplaced wire on one of the shape faces.
I've reproduced the issue on the workbench.

Screenshot 2024-12-02 at 1 46 22 PM

Any ideas on what might be going on and if there's a way to fix it or if it's a bug?

Thanks!

@BarbourSmith
Copy link

Any thoughts on this? I'm running into it fairly often :/

@sgenoud
Copy link
Owner

sgenoud commented Dec 20, 2024

Sorry, I missed it when you asked first!

Unfortunately, there isn't much I can do about it - this is an issue within the kernel that I use, as far as I can see.

One thing you could do is, instead of cloning the shape, would be to create it twice (by creating a function).

Another way to handle that would be to do the boolean operations in 2D and then extrude in 3D.

Generally, 3D boolean operations are not the strong suit of the kernel. I tend to try to use 2D drawing + sweeps and lofts more than booleans. It tends to be faster and more robust.

@BarbourSmith
Copy link

Gotcha! That makes senses, but its a bummer.

Do you know what exactly is going on? Like when does it happen? Is the issue caused by cloning?

We have sort of limited control over how it comes up because we're mostly running into it in situations like this (although in this case I couldn't make it happen):

image

So we are somewhat constrained in terms of how we can tackle it

@sgenoud
Copy link
Owner

sgenoud commented Jan 10, 2025

One thing I could see (not the most efficient approach) would be to handle cloning differently (run twice your pipeline).

@BarbourSmith
Copy link

That's a very interesting idea.

How much of the pipeline would need to be re-run? Would we need to go back the whole distance or just a few steps?

What is it about clone here which is creating the issue? Is there some identifier which is causing the bug, or is it the geometry itself being identical which is the problem?

@sgenoud
Copy link
Owner

sgenoud commented Jan 11, 2025

This is all part of the kernel's black arts that I don't know enough about.

The bug looks like there is an issue with identity (i.e. things that are kept the same but they should not), so that's why I would go with regenerating thing (as long as it is not too expensive).

You'll need to experiment with it I think unfortunately!

@BarbourSmith
Copy link

I'm glad that you think of the kernel as magic too, because that's where I'm at 😂

I was thinking the same thing about something getting duplicated in clone. It seems unlikely that the issue is truly a geometry thing because if it's generated separately the issue doesn't show up, so I bet that you are right that there is a work around other than using clone which will fix it.

We will have to play around with it an explore :)

@BarbourSmith
Copy link

I'm actually seeing this issue crop up in situations which don't involve clone too so it might be false that clone is the source of the artifact

Image

I'll keep testing and see if I can learn more

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

No branches or pull requests

3 participants