question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

difference operation returns random results

See original GitHub issue

So I have 2 objects. Object A and B which represents holes I want to cut out of A.

When I run difference like below it gives me random results. Sometimes the result is A-B like expected, but sometimes it returns B-A as the result. Is this expected behaviour? Engine in this case is blender

self.stl.difference(holes_elements[0], engine=self.ENGINE)

So this is what I expect always to get back: image

But like I said sometimes it returns this: image

It cuts A from B and returns B-A as result: image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mikedhcommented, Apr 5, 2021

It’s in the latest release, if you do a pip install --upgrade trimesh it should get it.

0reactions
dlednikcommented, Apr 5, 2021

@mikedh what version will this fix be included in? I want to test it out with my code 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

JavaScript - Difference between random function results
Math.random() produces floating point values in the interval [0, 1) (from zero inclusive to one exclusive). This means that there is a ...
Read more >
15.00 - RANDOM - Teradata Database
RANDOM Purpose Returns a random integer number for each row of the results table. Syntax where: Syntax element …
Read more >
Monte Carlo Simulation: History, How it Works, and 4 Key Steps
A Monte Carlo simulation takes the variable that has uncertainty and assigns it a random value. The model is then run and a...
Read more >
sql server - What is the best way to get a random ordering?
ORDER BY NEWID () will sort the records randomly. An example here. SELECT * FROM Northwind..Orders ORDER BY NEWID().
Read more >
What Are Random Numbers and How Are They Used?
A random number occurs in a specified distribution only when two conditions are met: The values are uniformly distributed over a defined interval...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found