Hidden lines to lines
-
I'm looking for a plugin to turn sketchups hidden lines in to real lines to export to autocad.
Is there such a plugin?
Thanks,
-
Do you want it to convert just hidden lines or smooth/soft ones too ?
It's easy done by iterating through the selection / model.entities / model.definition .entities (.to_a) (say it's called |e|) and checking if e.class==Sketchup::Edge and e.hidden=false if e.hidden? etc...this example does model.entities
this one line could be adjusted to other 'sets'
active_entities, selection, group or definition.entities etc
or smoothed lines etc...
model.entities.to_a.each{|e|e.hidden=false if e.class==Sketchup;;Edge and e.hidden?}
Copy/Paste the line of code into the Ruby Console + <Enter> and all hidden lines become visible - there are lots of similar threads like this - use the Search options... -
I was just looking for it to convert hidden lines as in when you turn on sketchups hidden line command. Like the tesellation on a sphere or round object. Now that i recall windowizer must do something like this becuase you can turn these hidden lines into mullions.
thank TIG.
-
The edges 'you can't see' on a sphere are NOT "hidden" lines - they are smooth / soft lines - a 'hidden' object is just not visible - just substitute these types into the code like this...
Sketchup.active_model.entities.to_a.each{|e|if e.class==Sketchup;;Edge;e.hidden=false if e.hidden?;e.soft=false if e.soft?;e.smooth=false if e.smooth?;end}This makes all of the model's hidden/soft/smooth lines into normal ones.
If you want to change the entities inside groups/components use then this...Sketchup.active_model.definitions.each{|d|d.entities.to_a.each{|e|if e.class==Sketchup;;Edge;e.hidden=false if e.hidden?;e.soft=false if e.soft?;e.smooth=false if e.smooth?;end}}Copy/Paste these lines into the Ruby Console + <enter> to effect the changes...
I have also removed all 'code' hat was expecting something to be defined earlier - like 'model'...
If you want to make it with a one-step undo then add this snippet to the start of the line of codeSketchup.active_model.start_operation("MakeLinesVisible");and this to the end
;Sketchup.active_model.commit_operation
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