sketchucation logo sketchucation
    • Login
    โ„น๏ธ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Strange behaviour when replacing component

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    7 Posts 4 Posters 813 Views 4 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.
    • C Offline
      caddict
      last edited by

      Would be happy if anyone had a fix for this pickle:

      I import a model into SU as 3ds. Every object appears as a unique component (every component has its axes set at the origin)

      So I select a bunch of pillars, open the components window > in model, right click a different pillar from the component list and hit "replace selected".

      bad components 2.jpg

      All my first selected components are gone. On further investigation I discover them all sitting renamed and superimposed at the origin.

      bad components 3.jpg

      I could explode the components aone by one and remake component, but that could be tedious. Any ideas for an easy fix?

      1 Reply Last reply Reply Quote 0
      • Chris FullmerC Offline
        Chris Fullmer
        last edited by

        Any chance you could upload the .skp and maybe the .3ds version of the file to play around with?

        Chris

        Lately you've been tan, suspicious for the winter.
        All my Plugins I've written

        1 Reply Last reply Reply Quote 0
        • honoluludesktopH Offline
          honoluludesktop
          last edited by

          What is a object? is it a xref or block?

          1 Reply Last reply Reply Quote 0
          • C Offline
            caddict
            last edited by

            No problem, thanks Chris 3ds and skp attached.

            honoluludesktop, the original objects are not xrefs or blocks, but walls or 3d cuboids made in my cad app.

            steve


            newnham demo.skp


            newnham .zip

            1 Reply Last reply Reply Quote 0
            • Chris FullmerC Offline
              Chris Fullmer
              last edited by

              I see the problem, and I don't know how to fix it automatically.

              The problem is how the objects are being imported. While they look identical, they are in fact not. The problem is that each one's axis is set to the world 0,0 location. I don't know how to explain it in words very well, but I could diagram it out if needed. But essentially SU replaces a component by matching the new component's axis to the sit where the old components axis was located. But in this case, each of those component's axes is set to the world 0,0 location. You would actually want them to be set to their own local common point, like the bottom corner of the pillar. Then each would get replaced based on the bottom corner. But as it stands, they are all set with their axis at 0,0 and so they all get replaced incorrectly. Hope that helps. Anyone think of a work around?

              Chris

              Lately you've been tan, suspicious for the winter.
              All my Plugins I've written

              1 Reply Last reply Reply Quote 0
              • thomthomT Offline
                thomthom
                last edited by

                I've been struggling with this as well getting data in from Revit. I used to export to .fbx from Revit (because it maintains materials), import in 3dsMax, export to .3ds, import in SU. Problem was that all instances in 3DSMax would import incorrectly in SU. They had to be made unique. But due to the different axis they got I could not replace the components in SU to optimize the model.
                Lately I've tried via the .dwg format. When I do that I get no materials, but I do get component instances. But for some reason, many of the identical windows are not the same component due to the axis pointing different directions.

                So far I've made a script that will work out what the different components are and apply a material to it. But I've also been contemplating to see if I can make a script that compares the content of components and work out that they are identical, with the exception of the axis. I hope I can get something working. Not sure though.

                Thomas Thomassen โ€” SketchUp Monkey & Coding addict
                List of my plugins and link to the CookieWare fund

                1 Reply Last reply Reply Quote 0
                • C Offline
                  caddict
                  last edited by

                  Yes, that is the problem Chris. I wonder whether the component origin/axis is set up by the 3ds exporter or by the SU importer?

                  One workaround may be a simple script that explodes and remakes each component one at a time. C'mon Thom, there's a challenge for you ๐Ÿ˜„

                  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