I am new to OpenSCAD, but have been enjoying it the last few days. The issue I am having is that i was making a structure like a house, and was putting two peaks for a pitched roof on it. The peak that is oriented by the axis, is fine, but if I put the peak on the far edge of the house, it shows up as not being simple and therefore can't be exported. I think I am missing something fundamental, but can't figure how what.
Here is a code snippet:
bldg_X = 1500;
bldg_Y = 800;
bldg_height = 400;
bldg_thickness = 0.01;
roof_thickness = 0.01;
roof_pitch = 150;
//box building
linear_extrude(height = bldg_height, center = false, convexity = 10, twist = 0)
polygon(points=[[0,0],[bldg_X,0],[bldg_X,bldg_Y],[0,bldg_Y],
[0+bldg_thickness,0+bldg_thickness],[bldg_X-bldg_thickness,0+bldg_thickness],
[bldg_X-bldg_thickness,bldg_Y-bldg_thickness],[0+bldg_thickness,bldg_Y-bldg_thickness]],
paths=[[0,1,2,3],[4,5,6,7]]);
//good working peak
rotate([0,90,0])
mirror([1,0,0])
linear_extrude(height=bldg_thickness)
polygon(points=[[bldg_height,roof_thickness],[bldg_height+roof_pitch-roof_thickness,(bldg_Y-2)/2],[bldg_height,bldg_Y-roof_thickness]],paths=[ [0,1,2] ]);
//bad peak
translate ([bldg_X-bldg_thickness,0,0])
rotate([0,90,0])
mirror([1,0,0])
linear_extrude(height=bldg_thickness)
polygon(points=[[bldg_height-1,roof_thickness],[bldg_height+roof_pitch-roof_thickness,(bldg_Y-2)/2],[bldg_height-1,bldg_Y-roof_thickness]],paths=[ [0,1,2]]);
Thanks!