sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Hidden lines to lines

    Scheduled Pinned Locked Moved Plugins
    4 Posts 2 Posters 1.2k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L Offline
      lapx
      last edited by

      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,

      1 Reply Last reply Reply Quote 0
      • TIGT Online
        TIG Moderator
        last edited by

        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...

        TIG

        1 Reply Last reply Reply Quote 0
        • L Offline
          lapx
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • TIGT Online
            TIG Moderator
            last edited by

            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 code

            Sketchup.active_model.start_operation("MakeLinesVisible");
            

            and this to the end

            ;Sketchup.active_model.commit_operation
            

            ❓

            TIG

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            Buy SketchPlus
            Buy SUbD
            Buy WrapR
            Buy eBook
            Buy Modelur
            Buy Vertex Tools
            Buy SketchCuisine
            Buy FormFonts

            Advertisement