I need a script
-
I need a ruby script that works just like the "rectangle.rb", but does NOT make a face. I looked at the script, and found the line that tells it to make the face. I tried deleting that line, but then it stopped working completely. I don't know much about ruby, so I was hoping someone could reply with the script I need.
-
You could try changing line 110 from
Sketchup.active_model.active_entities.add_face @ptstotrue. -
Try changing the line 110 from:
Sketchup.active_model.active_entities.add_face @ptsto:
f = Sketchup.active_model.active_entities.add_face @pts Sketchup.active_model.entities.erase_entities fThat is then pointing the variable f to point to the face that was made. The next line then deletes the face. But that will leave the edges behind. It could be a bit problematic if this rectangle is drawn over existing geometry though. I suppose the better way would be to just draw the lines individually, which is also pretty easy.
Maybe I'll write that up later. or maybe someone else will.
Chris
Ope, remus already posted. Oh well try them both.
-
Without reworking it to draw just four edges rather than make a face_with_its_four_edges, you can recast it to make the face and then erase it immediately - its four edges should get left behind...
lines 107 et al...
def create_rectangle # check for zero height if( @pts[0] != @pts[3] ) face=Sketchup.active_model.active_entities.add_face @pts face.erase! if face.valid? ### edges will remain... end self.reset endEDIT: CF beat me to it !

Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement