Closed snowbugxs closed 4 years ago
Honestly, looking at that sample it doesn't make much sense to me.
In most cases the find_mins_maxs(...)
function will still work because the dimensions of 1/3 of the points often still covers the same cases, but it can definitely go wrong at times.
Additionally, it's overly complex, I would suggest this instead:
minx = obj.x.min()
maxx = obj.x.max()
miny = obj.y.min()
maxy = obj.y.max()
minz = obj.z.min()
maxz = obj.z.max()
As for being the first point of a facet. You would need to define what is "first" in this case :) It's pretty arbitrary really, you could call any of the 3 points first or last. The order of the points doesn't really make much of a difference
Thanks.
Hi. In the tutorial of combining multiple stl files, the first step is to find the bounding box, i.e., the max and min coordinates in x, y and z directions. It uses the stl.Dimension.X to refer an x coordinate of the first point, as shown in the source code, stl.Dimension.X = 0 (Y=1, Z=2) and the last two points are neglected. However, i want to ask do all the points have a chance to be the first point of a facet? Because in that way only the first point's coordinates are iterated.