13 Replies Latest reply on Feb 9, 2018 11:07 AM by Scott Ellery

    Auto Paint

    Rob Rodríguez

      Auto Paint is a feature in Visualize that doesn't seem to receive much attention but could be very useful for some users.  It's something Ron and I are touching on during our SWW presentation.  I've made a video for attendees of the session to watch at their leisure because we just don't have time to fully cover in it in our 60 minute time slot and it's not the direct focus of the session.

       

      I thought I'd post it here so you guys could watch it and hopefully get some use out of it.  If you like what you see and are going to be at SWW we will have lots of great information in our session like this.

       

      SW Visualize Auto Paint on Vimeo

       

      Rob

        • Re: Auto Paint
          Kevin Pymm

          Rob,

           

          First of all thanks for the info, this should be a great feature & I was unaware of it.

          Unfortunately I am having issues with Visualize importing SolidWorks appearances, even before this feature. The first image below is from SolidWorks & all materials are applied at part level, but as you can see, all materials with the same name are appended with a number. Unfortunately this number is imported into Visualize & so all materials that are actually the same appear as a different material & cannot be grouped as identical materials. So the only part that is auto painted is the large mounting plate in the second image from Visualize as it is the only part with the "correct" name for auto paint to match.

          Is there a setting I'm missing to prevent this appended number transfering to Visualize or can a future software update prevent this number from being copied across?

           

           

           

           

            • Re: Auto Paint
              Andrew Foord

              Thanks you Kevin Pymm for your explanation. 

              • Re: Auto Paint
                Ron Bates

                Hi Kevin,

                 

                Yes.  This is indeed a bit of a limitation of the current auto-paint mechanism in concert with SW import.  In fact in the Video @ ~08:20 Rob mentions that the orange paint is not applied to the steering wheel...  This "instance" naming is exactly the reason.  The auto-paint xml file is a precise mapping of part-name to appearance.

                 

                We need to fix it...

                 

                In the meantime, a sloppy workaround can be achieved by some minor editing of the AutoPaint.xml file.  After setting up the original mapping, edit the AutoPaint.xml file and copy/paste the line corresponding to the initial mapping of partname/appearance a dozen or so times, and append the "-1", "-2", "-3", etc to the copied instances.  Again this is admittedly rather sloppy and may not work for every case.  You never quite know how many instanced versions of the appearance you'll end up with in your SW design.  Also as you do this for more and more appearance mapping entries, it could result in an AutoPaint.xml file growing a bit out of control.  But if you work with a known/limited set of appearances, it can serve as a bit of a workaround for now.

                 

                e.g. consider this entry in AutoPaint.xml (shortened to trim the right side which won't be changed after copy/pastes..)  Copy/Pasted/Edited as shown.

                 

                <Entry MaterialGroupName="green high gloss plastic" ... etc.

                <Entry MaterialGroupName="green high gloss plastic-1" ... etc.

                <Entry MaterialGroupName="green high gloss plastic-2" ... etc.

                <Entry MaterialGroupName="green high gloss plastic-3" ... etc.

                <Entry MaterialGroupName="green high gloss plastic-4" ... etc.

                ETC.

                ETC.

                  • Re: Auto Paint
                    Kevin Pymm

                    Hi Ron,

                    Thanks for the info & workaround for the AutoPaint feature. This is not just a problem for AutoPaint but for Visualize in general, as I'd rather not have 20, 30, 40 versions of the same material & for every material, which can't be linked together as one.  It's a ridiculous situation where I could have an assembly with 40 black anodised parts & 20 stainless steel screws & instead of having 2 materials import I could have up to 60 but at least 41.

                      • Re: Auto Paint
                        Rob Rodríguez

                        Hi Kevin,

                        When you import your model what import settings are you using?

                          • Re: Auto Paint
                            Kevin Pymm

                            Rob Rodríguez wrote:

                             

                            Hi Kevin,

                            When you import your model what import settings are you using?

                             

                            Hi Rob,

                             

                            It doesn't matter which setting I use, the number of imported materials is always the same.....Except for Flatten & Layer options which import in a single colour.

                             

                            This is a simple assembly which I have gone through each part, made sure each part has the same material as another that is supposed to be the same & saved. There are only 3 materials in total, Black Anodised Aluminium, Brushed Steel & Glossy Rubber. As you can see from the SolidWorks screenshot there are 6 materials showing but basically 3. There are 8 pins & screws which all had their material applied at assembly level, all the other parts had their material applied at part level.

                             

                             

                            Once imported into Visualize (using Appearance mode) I get 6 materials, not 3 as I'd expect/hope. The two gears that had the exact same material applied are seperate, the three black anodised parts are seperate (the two parts that are the same are grouped), the two o-rings (not visible) are grouped as the same part & all the screws & pins that had their material applied at assembly level are grouped together as shown below.

                             

                              • Re: Auto Paint
                                Ron Bates

                                Hi Kevin,

                                 

                                I'm not able to reproduce this scenario with my own simplified assembly model...  If I attach the same appearance in SW, to different parts, and insert them into an assembly (essentially duplicating the SW <1>, <2> naming in the SW assembly) and then import using Appearance part grouping, I get the consolidated set of appearances in Visualize, as expected.

                                 

                                Can you share the assembly (with the parts as well)?  PM a link if you want to keep it within SW walls only.  Otherwise, can you confirm the appearances are absolutely identical between the parts?  1 value being just a tiny bit different in one of the parts, will constitute a "different" appearance as far as Visualize is concerned.

                                 

                                R

                                  • Re: Auto Paint
                                    Kevin Pymm

                                    1-986-110 wrote:

                                     

                                    Hi Kevin,

                                     

                                    I'm not able to reproduce this scenario with my own simplified assembly model... If I attach the same appearance in SW, to different parts, and insert them into an assembly (essentially duplicating the SW <1>, <2> naming in the SW assembly) and then import using Appearance part grouping, I get the consolidated set of appearances in Visualize, as expected.

                                     

                                    Can you share the assembly (with the parts as well)? PM a link if you want to keep it within SW walls only. Otherwise, can you confirm the appearances are absolutely identical between the parts? 1 value being just a tiny bit different in one of the parts, will constitute a "different" appearance as far as Visualize is concerned.

                                     

                                    R

                                    Hi Ron,

                                     

                                    Please find attached my assembly as requested. I can confirm that the appearances are identical (or should be). The parts were opened, the same appearance added to each part & then saved, then the assembly was rebuilt & saved. The same appearance that was used on the two gears at part level (which show up as seperate items) was also added to the screws & pins at assembly level, which are grouped....but not to the gears.

                                     

                                    EDIT: I have just noticed that although the same appearance was added in SolidWorks, when I look at the texture tab of the imported material the U & V values for Tile & Shift are different for Colour, Specular & Bump depending on which are used. Not sure if this affects what Visualize sees when it imports but there's not much I can do in SolidWorks (as far as I know) to sort that.

                                      • Re: Auto Paint
                                        Ron Bates

                                        BINGO.  You got it.  I wasn't using textured appearances in my test.  By default, SW automatically scales any textures when they are applied to an entity in SW (face, feature, body, component).  And different scaling of the texture will constitute a different appearance upon import to Visualize.  Often times, it's completely unnecessary and impractical to automatically scale textures.  Sure it makes a 1mm part "look good" but in real life, you obviously won't find any grout lines on a 1mm part made of brick!

                                         

                                        So there is an option to change this behavior in SW so that it uses an absolute (ie world) scale for textures whenever applied.  This way, assuming you don't touch the mapping settings in SW and simply apply the appearance and leave the defaults, then they will all be identical and grouped according in Visualize.

                                         

                                        It's a bit of a PITA b/c the setting in SW is a "DOCUMENT" property.  Which means if you always want this behavior, you have to change it for every document (I recommend updating your default templates to use this setting).  Also, it doesn't change the scale of appearances already applied in an exiting document...  But hopefully this helps moving forward

                                          • Re: Auto Paint
                                            Ron Bates

                                            Forgot my picture...

                                             

                                            2018-02-01_10-57-45.png

                                              • Re: Auto Paint
                                                Kevin Pymm

                                                Hi Ron,

                                                 

                                                That sorted it finally, thanks for all your help. Once I unchecked that option, re-applied the appearances in SolidWorks & imported into Visualize, I got the number of appearances I was expecting

                                                Easy enough to change my default templates but going to be a pain to change every part file & re-apply the appearances....Oh well!!! one part at a time .

                                                Would it be possible to have a checkbox in Visualize in a future update to tell it to ignore scale data & set all appearances to be the same as the first one found?

                                                Thanks again.

                              • Re: Auto Paint
                                Chris Cunningham

                                Great tip! Thank you!

                                • Re: Auto Paint
                                  Scott Ellery

                                  Great Video! definitely something I don't utilize enough