Select Walls Facing the viewer 3d perspective

Is there a way of selecting the Walls wich the exterior side is facing the viewer?
Somethig like:

using dynamo?
I need this for a much larger script.



Try this.

Hi thanks for your help,
I am trying to select the exterior face of the walls, but walls witch the exterior is facing the viewer.
Meaning, if that view is rotated I will likely select different walls.

With a bit of Python we can get the view point of a 3d view:
Then the Idea would be to project that point.
One way would be to use RayBouncing (there’s a node called Raybounce ByOriginDirection)
Another way would be to get the geometry of the walls and their centerpoints and check if the lines that connect these points and the viewpoint intersect. That could be a bit tricky when the walls have openings though, cause the line might accidentally pass through an opening and thus give a faulty result.

I thought about what you said, but the problem is that when there are walls that are intertwined, "Ray Bounce " will only give the surfaces in contact with them and "outer walls " will not be chosen. Even if it works, it’s not working correctly in every scenario.

So I manage to do it like:

I am getting the normal of the location curve of each wall and comparing it to the reverse vector of each direction.

I tested the vectors by drawing model lines:

frontVec = Vector.ByCoordinates(0,1,0);
rigthVec = Vector.ByCoordinates(-1,0,0);
backVec = Vector.ByCoordinates(0,-1,0);
leftVec = Vector.ByCoordinates(1,0,0);

It worked!
I could not relate that to the eye position, but, I have created the axonometric 3d views and naming them according to the orientation, from the view name I can get the reverse normals I need to use.

What if the building is rotated?

If the building is rotated you can use the direction vector of the wall and translate the coordinate system to match the rotation.

That’s assuming all the walls are linear and at right angles to each other I suppose?

If you grab the location curve of the wall, you can have a normal at a specific point and use some trigonometry to figure out the direction change.

In that case you would probably check if your vector normal in a range using the angle about the vectors.

So the normal will be perpendicular to the wall curve and the direction of the normal will change relative to the direction of the wall, 2 identical curves with opposite directions will have opposing normal vectors. In that regard your 4 cardinal directions vectors will have to rotate 90 degrees in the direction of the normal and you would compare your results to the transformed vectors.

You would have to use a combination of choosing the acceptableness of your angles and the position and direction of the walls to figure out the ones that meet the criteria your are looking for.

In my case, rotating my projector to meet the four known directions is easier and helps me save a lot of time when tagging panels in perspective drawings as we are talking about hundreds in each perspective. And the 2 projects I tested worked flawlessly.

Of course more complex projects will require some time to figure out the math behind it, but once you know the direction to go should be just a matter of Googling the geometrical/trigonometrical transformations you need.

Hope I have helped, as your guys helped me! Thank you for your thoughts in this matter.
It helped me come up with this solution.