CommonWealthRobotics / BowlerStudio

A Full-Stack Robotics Development Environment
GNU Lesser General Public License v3.0
131 stars 29 forks source link

Cylinder creation disalignment #374

Open JansenSmith opened 1 year ago

JansenSmith commented 1 year ago

using code // make a gently rounded cylinder CSG top = new RoundedCylinder(radius,height) .cornerRadius(10)// sets the radius of the corner .toCSG()// converts it to a CSG tor display

// make a subtly rounded cylinder CSG bottom = new RoundedCylinder(radius,height/2) .cornerRadius(2)// sets the radius of the corner .toCSG()// converts it to a CSG tor display

// union the two CSG body = top.union(bottom)

Expected Outcome: Two aligned and analogous rounded cylinders with no seam.

Actual Outcome: Two cylinders that don't mesh well and have a seam: image

see: https://github.com/Halloween2020TheChild/Zoltar/commit/8fe8117ac535315aaa5e749f83c8dc7891b7e52c#diff-e30852a13801f01807cb22b62a8344799a3d9137a43768a1acc639499032ba26

madhephaestus commented 1 year ago

I suspect the stair-step method for creating the cylendars is not correctly calculating the largest cylendars radius. This would be in JCSG, i think @JansenSmith should be able to fix it.