Skip to content

Fix bug on trapezoid constructor using corner points

Guilherme Lima requested to merge lima/trap-fixPointOnSurface into master
  • Symptom: GetPointOnSurface() was incorrectly returning (0,0,0)
  • test/unit_tests/TestTrap.cpp is modified here to show the bug
  • bug traced to incomplete initialization of TrapezoidStruct::sideAreas[4:5]
  • fix was to reorder calls in UnplacedTrapezoid constructor, so that the trapezoid parameters are initialized before calling MakePlanes(corners), which also initializes sideAreas[]

Merge request reports