joostn / OpenJsCad

3D solid CAD using only Javascript
315 stars 128 forks source link

Add followwith functionality and fix polygon transform #55

Closed bebbi closed 9 years ago

bebbi commented 9 years ago

check commit messages for details

bebbi commented 9 years ago

@joostn, maybe check if you're ok with the naming ("ConnectorList") and members .followWith etc or have a better idea. Also, here's a test case for the rounding errors - this would give a wrongly flipped "end plate" without commit 85d18fb - appearing as missing altogether in the rendering.

var curvedpath = CSG.Path2D.arc({ center: [0,0,0], radius: 10, startangle: 60, endangle: 120, resolution: 50 }); var cs2 = CSG.ConnectorList.fromPath2D(curvedpath, [-0.8, 0.5, 0], [-0.8, -0.5, 0]); var csg = cs2.followWith(CAG.rectangle()); return csg;

joostn commented 9 years ago

Very nice! I like it.

Connector might not have been the most appropriate name in the first place. Does anyone know if a generic CAD term exists for the combination of a point, a normal and a right hand vector?

Anyway, given the name Connector (let's not change this now), ConnectorList is fine.