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

"Select Touching" misses some brushes #1893

Closed
ericwa opened this issue Nov 26, 2017 · 3 comments
Closed

"Select Touching" misses some brushes #1893

ericwa opened this issue Nov 26, 2017 · 3 comments
Assignees
Labels
Prio:2 Medium priority: Non crash bugs that impede the user, features that add new functionality. Type:Bug Errors and problems

Comments

@ericwa
Copy link
Collaborator

ericwa commented Nov 26, 2017

System Information

TrenchBroom V2.0.0-RC4 on macOS
also reproduced on a build of release/v2.0.0 + open PR's.

Expected Behavior

"Select touching" should select all touching brushes. In this case the pipes should have been selected, but they weren't for some reason:

screen shot 2017-11-25 at 11 38 26 pm

Steps to Reproduce

  1. Get pritchard1-valve.map from Hard lines in shadows/dirtmap ericwa/ericw-tools#134

  2. Copy and "paste at original position" the following brush:

// entity 0
{
"classname" "worldspawn"
// brush 0
{
( 784 -624 656 ) ( 5536 -624 672 ) ( 5536 -624 656 ) __TB_empty [ 1 0 0 -0 ] [ 0 0 -1 -0 ] -0 1 1
( 784 -208 656 ) ( 784 4672 672 ) ( 784 -208 672 ) __TB_empty [ 0 -1 0 -0 ] [ 0 0 -1 -0 ] -0 1 1
( 784 -208 -1792 ) ( 5536 4672 -1792 ) ( 784 4672 -1792 ) __TB_empty [ -1 0 0 -0 ] [ 0 -1 0 -0 ] -0 1 1
( 784 -208 1200 ) ( 5536 4672 1200 ) ( 5536 -208 1200 ) __TB_empty [ 1 0 0 -0 ] [ 0 -1 0 -0 ] -0 1 1
( 784 4672 656 ) ( 5536 4672 672 ) ( 784 4672 672 ) __TB_empty [ -1 0 0 -0 ] [ 0 0 -1 -0 ] -0 1 1
( 5536 -208 656 ) ( 5536 4672 672 ) ( 5536 4672 656 ) __TB_empty [ 0 1 0 -0 ] [ 0 0 -1 -0 ] -0 1 1
}
}
  1. Use the "select touching command". Press delete to delete a large chunk of the map. There will be some pipes left over that should have been deleted:

screen shot 2017-11-25 at 11 43 26 pm

@kduske kduske added this to the TrenchBroom 2.0.0 milestone Nov 26, 2017
@kduske kduske added Platform:All Prio:2 Medium priority: Non crash bugs that impede the user, features that add new functionality. Type:Bug Errors and problems labels Nov 26, 2017
@ericwa
Copy link
Collaborator Author

ericwa commented Nov 26, 2017

Reduced test case with one worldspawn brush:
touching.map.txt

Use the same cube as above for the "select touching" operation.

@ericwa
Copy link
Collaborator Author

ericwa commented Nov 26, 2017

I extracted it into a test case which I'll push in a second. Seems like Polyhedron<T,FP,VP>::polyhedronIntersectsPolyhedron is returning a wrong answer (false) when it should return true.
const V direction = crossed(lhsEdgeVec, rhsEdgeVec);
is almost a null vector:

(lldb) print direction
(V) $5 = {
  v = ([0] = 0, [1] = -0.00000001728767529129982, [2] = -0.00000000864383764564991)
}
(lldb) print lhsEdgeVec
(V) $6 = {
  v = ([0] = 4752, [1] = 0, [2] = 0)
}
(lldb) print rhsEdgeVec
(V) $7 = {
  v = ([0] = -320, [1] = -0.0000000000018189894035458565, [2] = 0.000000000003637978807091713)
}

@ericwa
Copy link
Collaborator Author

ericwa commented Nov 27, 2017

Fixed in 71804d4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Prio:2 Medium priority: Non crash bugs that impede the user, features that add new functionality. Type:Bug Errors and problems
Projects
None yet
Development

No branches or pull requests

2 participants