7
$\begingroup$
pts={{-212.5293731689453`,30.075761795043945`,132.3474884033203`},{-198.16456604003906`,30.075759887695312`,136.6664276123047`},{-199.60421752929688`,30.075759887695312`,141.45468139648438`},{-198.28517150878906`,46.827518463134766`,136.63018798828125`},{-212.053955078125`,32.07554626464844`,137.71153259277344`},{-213.96902465820312`,30.075759887695312`,137.1357421875`},{-201.51953125`,32.07575988769531`,140.8788299560547`},{-199.95616149902344`,48.01850509643555`,141.34889221191406`},{-200.0798797607422`,32.07575988769531`,136.090576171875`},{-210.61431884765625`,32.07554626464844`,132.9232635498047`},{-210.51858520507812`,46.44626998901367`,132.95205688476562`},{-211.76150512695312`,47.40089416503906`,137.7994842529297`},{-213.84841918945312`,46.82754898071289`,137.17201232910156`},{-212.34165954589844`,47.13450241088867`,132.40394592285156`},{-212.71707153320312`,49.53857421875`,137.51217651367188`},{-210.71690368652344`,50.3234977722168`,132.8924560546875`},{-210.6386260986328`,51.623714447021484`,138.1370849609375`},{-209.48919677734375`,49.93276596069336`,138.48268127441406`},{-209.2018280029297`,49.03960037231445`,133.3479766845703`},{-206.81231689453125`,50.421024322509766`,134.06640625`},{-206.02227783203125`,50.63017272949219`,139.52505493164062`},{-206.78662109375`,52.61262130737305`,139.2952423095703`},{-204.37022399902344`,52.513790130615234`,134.80064392089844`},{-202.93466186523438`,51.623748779296875`,140.453369140625`},{-207.51675415039062`,52.32311248779297`,133.8546142578125`},{-199.41650390625`,49.53857421875`,136.2900390625`},{-201.51145935058594`,51.57661819458008`,135.66017150878906`},{-202.9318084716797`,49.0469970703125`,140.45423889160156`},{-203.8778533935547`,50.4571647644043`,134.9486846923828`},{-201.30931091308594`,48.843685150146484`,135.720947265625`},{-201.615234375`,46.458553314208984`,140.8500518798828`},{-200.2099609375`,46.49541091918945`,136.0514678955078`}};

bounding=BoundingRegion[#,"MinOrientedCuboid"]&@pts
Parallelepiped[{-199.604,30.0758,141.455},{{0.,-3.21323*10^-6,9.09495*10^-13},{-14.3648,-1.30589*10^-6,-4.31895},{1.43966,-1.30589*10^-6,-4.78829}}]
Graphics3D[bounding]

You can see the mesh's bounding nearly becomes a 2d rectangle

What's the problem of first two points?

Mma 12.0 on Mac

enter image description here

enter image description here

enter image description here

enter image description here

$\endgroup$
1
  • 2
    $\begingroup$ Graphics3D[{{Opacity[0.5], bounding}, Red, AbsolutePointSize[4], Point[pts]}] highlights the failure. BoundingRegion[pts, "MinCuboid"] works as expected. Recommend that you contact support $\endgroup$
    – Bob Hanlon
    Jan 8, 2020 at 14:24

1 Answer 1

2
$\begingroup$

As a workaround, you can perform a rigid transform on your points, then perform the inverse on the bounding region.

rot = RotationTransform[π, {0, 0, 1}];

cuboid = InverseFunction[rot] @ BoundingRegion[rot @ pts, "MinOrientedCuboid"];

Graphics3D[{
  {Red, PointSize[Large], Point[pts]},
  {Opacity[.3], cuboid}
}]

$\endgroup$
1
  • $\begingroup$ I found I can use nearly 2 Degree, ie rot = RotationTransform[2 Degree, {0, 0, 1}]; But failed in rot = RotationTransform[1 Degree, {0, 0, 1}]; $\endgroup$ Jan 8, 2020 at 15:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.