@tig said:
First, your code...
which I assume is just a sample...
door_width = 3
makes it 3" wide
door_width = 3.feet
makes it 3' wide !
etc...I.E. force the use of a 'length', rather than passing a default 'number' - which SketchUp always interprets as inches !
Also... you'd probably be better off adding a new group into
model.active_entities
and then adding your new geometry into thatgroup.entities
Currently your code draws a rectangle on the ground [Z=0 - and 0 is 0 in ALL length-units!] and then you extrudes it downwards by -1["]...
If you wanted -1' then use-1.feet
etc
AND... you haven't actually explained 'how' you want to 'offset a face' !?
Your code uses 0 for all of the Z values used in the rectangle's corner-points, but of course you could use any value for those Z's - but remember that they should be set to the same length if a valid 'flat' rectangle is to result...
now i know in Sketchup API , there is no method to offset a face.... but i thought to offset a face like this..... pl.offset 1, to get a border of 1" width