sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Hidden lines problem

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    22 Posts 6 Posters 12.9k Views 6 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.
    • K Offline
      kevin_walker
      last edited by

      Yes I have already softened the edges in Skp. The problem seems to be that hidden edges or lines, while they appear hidden in Sketchup, are not hidden once opened in Turbocad. In an ideal world the best solution would be to have the ability to place the hidden lines on a separate layer and turn them off. Once the model is opened in another program, it takes a lot of time to remove the hidden lines manually, which are not necessary for construction documents. I wonder what the autocad users are doing with this problem.

      Thanks Kevin

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

        @kevin_walker said:

        Yes I have already softened the edges in Skp. The problem seems to be that hidden edges or lines, while they appear hidden in Sketchup, are not hidden once opened in Turbocad. In an ideal world the best solution would be to have the ability to place the hidden lines on a separate layer and turn them off. Once the model is opened in another program, it takes a lot of time to remove the hidden lines manually, which are not necessary for construction documents. I wonder what the autocad users are doing with this problem.

        ### A Ruby script can easily do this...
        model=Sketchup.active_model;hidn=model.layers.add("HIDN");model.entities.each{|e|e.layer=hidn if e.hidden?}
        ### Copy the whole of the line from 'model=...' to '...?}' and paste it into the ruby console to see what it does.
        ### Feel free to add a menu entry etc and make it run that way if desired...
        ### To do 'soft' edges rather than 'hidden' ones then the 'e.hidden?' becomes 'e.soft?'...
        
        

        TIG

        1 Reply Last reply Reply Quote 0
        • K Offline
          kevin_walker
          last edited by

          TIG that's a little over my head as I haven't used the Ruby scripts. Wish I understood them better.

          Thanks anyway
          Kevin

          1 Reply Last reply Reply Quote 0
          • K Offline
            kevin_walker
            last edited by

            TIG thanks, I will give it a try and report back with my results. I may have to ask more questions if I have a problem. This would be great if I can make it happen. It's late for me now, but I will do it in the morning.

            Kevin

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

              Don't be scared...

              You don't need to understand how a car works to drive it ! Just paste the line and it does what you want...

              Let's say you have your model ready to export to DWG.
              Let's make a copy of it to be on the safe side...
              Open the Ruby console and copy/paste in that line I just gave you.
              It then runs and does exactly what it says...
              It makes a new layer called HIDN.
              It goes through all of the entities in the model.
              IF they are hidden it puts them onto that layer.

              Done.

              You now have all of your hidden things on their own layer.
              Export it to DWG.
              In the DWG in AutoCAD 'freeze' the layer called HIDN and you don't see those hidden lines any more...

              Try it - it's easier to do than it is to explain...

              TIG

              1 Reply Last reply Reply Quote 0
              • K Offline
                kevin_walker
                last edited by

                TIG you were right, I didn't have a lot of trouble loading the script, but it doesn't seem to control turning off the hidden lines. I did a test anyway and exported to Turbcad using dwg and the hidden lines were still there, even though there is a separate layer for them. Hmmm! Have I done something wrong?

                Thanks Kevin


                ruby script test.jpg

                1 Reply Last reply Reply Quote 0
                • GaieusG Offline
                  Gaieus
                  last edited by

                  No, Kevin, I guess that's what TIG's script should do. Put the hidden lines onto a separate layer. But now at least you can turn the visibility of that layer off so the hidden lines won't show.

                  Gai...

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

                    Thanks Gai.

                    The ruby code makes a layer and puts the hidden things onto it. In CAD you can switch that layer off [or 'freeze' it] so they aren't seen...

                    To hide hidden things in SUp toggle view geometry on/off.

                    TIG

                    1 Reply Last reply Reply Quote 0
                    • K Offline
                      kevin_walker
                      last edited by

                      Gai I see what I missed. All of the "hidden geometry" that needs to be made invisible must still be selected and placed on the new HIDN layer manually. Of course that makes sense now. I mistakenly thought the ruby script was picking up the info (geometry) from Sketchup. The script TIG made for me works perfectly. This helps alot.

                      Thanks TIG and Gai
                      Kevin


                      scene 1.jpg

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

                        You should NOT need to manually pick hidden geometry ! The whole object of the script was to move everything over onto that layer automatically...
                        It does - BUT only 'loose geometry' is processed as it does 'entities'. If you want to do Groups and Component definitions the codes a bit different... 'active_entities' - so it processes their entities within an 'Edit' session, when it's run.

                        model=Sketchup.active_model;hidn=model.layers.add("HIDN");model.active_entities.each{|e|e.layer=hidn if e.hidden?}
                        

                        I've posted a short script version in the Ruby forum - here it is: http://www.sketchucation.com/forums/scf/viewtopic.php?p=47500#p47500

                        Then all you have to do is put it into your Plugins folder and pick the menu item under Plugins called 'Hidden to Layer'...

                        TIG

                        1 Reply Last reply Reply Quote 0
                        • K Offline
                          kevin_walker
                          last edited by

                          TIG somehow it still isn't working for me. Pictures below show simple extruded molding profile with the HIDN unchecked, but the hidden lines are still there. The second picture is a dwg file opened in Turbocad with the same result. What might I have done wrong? The molding is not a group.

                          Thanks Kevin


                          Skp.captured.jpg


                          Turbocad-layer-off.jpg

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

                            Can you post a bit of the file. Just that moulding'll do so I can look at it... Works for me with geomentry, groups and definitions...

                            TIG

                            1 Reply Last reply Reply Quote 0
                            • K Offline
                              kevin_walker
                              last edited by

                              TIG here is a skp. file with a piece or the molding along with a dwg created from skp. The script created a layer named HIDN ok, but I had to select the hidden lines manually to place on that layer.

                              Thanks Kevin


                              skp.molding test.zip


                              dwg.molding test.zip

                              1 Reply Last reply Reply Quote 0
                              • AnssiA Offline
                                Anssi
                                last edited by

                                The 3D export function to DWG exports the SU faces as 3D polyface entities, with every face as a separate entity. If you check "Edges" in the Export Options every edge in the model is added as an extra line in the export. It does apparently not support smoothing.

                                I don't know about TurboCad, but in AutoCad wireframe and hidden-line views the edges of polyface entities are always visible and unseparable from the faces themselves. For smoothing to work, the export would have to consist of a triangulated 3D face mesh

                                If you are exporting views for annotation and plotting, you can export 2D DWGs - no hidden lines pop up with them.

                                Anssi

                                securi adversus homines, securi adversus deos rem difficillimam adsecuti sunt, ut illis ne voto quidem opus esset

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

                                  Your edges weren't just hidden but softened and smoothed. I've re-done the script to do that too, BUT the problem is that when you Export to DWG all hidden/softened/smoothed edges also export as Layer0 edges - I assume to keep the faces they have they need to be on a layer... It seems you can hide such edges in various view styles in CAD, BUT only the hidden things seem to move en mass...

                                  I'll do some more investigating and post an updated script shortly...

                                  TIG

                                  1 Reply Last reply Reply Quote 0
                                  • K Offline
                                    kevin_walker
                                    last edited by

                                    Annsi, your observations are what I had noticed concerning the 3ds export and triangulated faces are fairly useless for views for annotations and plotting. I was trying to avoid so many exports/imports using the 2d dwg's. Ideally, if the hidden lines could be controlled (turned on and off) for export using a dwg/dxf, using outside Cad programs for the layout and plotting would be nice. I have not found this part of the process to be that great using Skp.

                                    1 Reply Last reply Reply Quote 0
                                    • K Offline
                                      kevin_walker
                                      last edited by

                                      @tig said:

                                      Your edges weren't just hidden but softened and smoothed. I've re-done the script to do that too, BUT the problem is that when you Export to DWG all hidden/softened/smoothed edges also export as Layer0 edges - I assume to keep the faces they have they need to be on a layer... It seems you can hide such edges in various view styles in CAD, BUT only the hidden things seem to move en mass...

                                      I'll do some more investigating and post an updated script shortly...

                                      Thanks TIG

                                      Kevin

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

                                        http://www.sketchucation.com/forums/scf/viewtopic.php?p=47503#p47503 is the v1.1 file...
                                        This also moves hidden + soft + smoothed edges onto layer HIDN and switches the layer off.

                                        However, it's proved a little useless since the exporter to DWG/DXF makes any edges to faces on the same layer = Layer0 if that's what the face or other edges are on... SO whilst you get the 'hidden' edges etc on their own layer you also get duplicates on Layer0 !!!

                                        TIG

                                        1 Reply Last reply Reply Quote 0
                                        • M Offline
                                          mischka
                                          last edited by

                                          So - just to recap - there is no way of successfully exporting a dwg that has removed the hidden lines - unless you do it manually in SU before ?

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

                                            If the hidden lines are Coplanar and are not therefore required for face retention you can remove them using a tool like tt's CleanUp.
                                            Then they don't export as they don't exist.
                                            BUT if a hidden line is needed by the faces then moving them onto their own layer [ON/OFF] in the SKP lets you see them in the CAD version on a separate ON/OFF layer... BUT if they are needed by faces they'll be replicated in the faces' layer too ?

                                            So if your SKP contains unneeded hidden lines you can remove them in the SKP and export to CAD.
                                            BUT if your SKP's faces need those hidden lines, then even moving them onto their own OFF layer in the SKP will not prevent them from getting duplicated on the face's layer in the CAD version !
                                            Just because a line is hidden it doesn't mean it is not needed !

                                            If you give a clear outline of your workflow, intentions, hopes and aspirations we might advise further...

                                            TIG

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

                                            Advertisement