Quantcast
Channel: All Revit API Forum posts
Viewing all articles
Browse latest Browse all 66826

Re: Generate 3d view that uses Pickbox as a sectionbox

$
0
0

Hi,

Basically, like you said it won't allow drawing boundingbox from any other clicks except from bottom left to top right, but this is because the bottom left coordinates is less than the top right coordinates.

hence,

You need to ensure that the bounding box initialized correctly
and we do not know if the user started clipping from top left to bottom right
or from top right to bottom left
or from bottom left to top right
or from bottom right to top left
all in all bounding box XYZ maximum point must be bigger than minimum point otherwise you would get an empty bounding box.

 

so try to switch the x and Y values to ensure the minimum is the minimum point and the max is the maximum point

something like this:

if (pickedbox.Max.X < pickedbox.Min.X)
				{
					maxx = pbox.Min.X;
					minx = pbox.Max.X;
				}

hope that helps

 

 


Viewing all articles
Browse latest Browse all 66826

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>