3D-STEP Coloring App - Posted At GitHub (Released Prelim Version)

(FYI - I posted the App of previous discussion in this link )

It’s posted at GitHub - Here’s the link

You’ll read that it’s for Mac OS until I get around to packaging it for Window/Linux…

Feedback welcome, Thanks!

3 Likes

Given how many vendor-provided STEP files lack any color whatsoever, I’m very much looking forward to this. (Once you package for other platforms, of course.)

UPDATE:

Posted the Windows version (prelim)

I revised the code to use Tkinter Widgets instead of wxWidgets. Seems to be working with some minor ‘Graphic’ differences from the Mac. Otherwise, it’s baked well enough for user testing/use.

The previously posted Mac version is working and I’m working on Linux version.

Note: I’ve added a Slider for setting Alpha Transparency but, have Not yet implemented the code to use it.

I will finalize all versions but I’ll be looking for comments before posting them…

1 Like

UPDATE:

Posted the Linux version. Thus, Mac, Windows and Linux prelim versions should be usable (I hope… ) :slightly_smiling_face:

Comments and complaints welcome and after the dust settles, I’ll publish Released versions…

4 Likes

I’m reluctant to post this, I put the project and downloads on Hold.

After making changes so users can resize windows, responding to other user requests and, going through several App export configurations for Mac, Windows and Linux platforms, I realized a few things, as follows:

• No Problems for Mac system. Works perfect (both wxPython and Tkinter based GUI’s)

• Windows works but, I can see the wide variation of Hardware (graphic cards and monitors, DPI…etc) and ensuring a reasonable usefulness would keep me tethered to too much tweaking and/or responding to users.

• Linux, I discovered is like the Wild-West and the wide range of Linux versions would consume me beyond imagination.

The complexity grows when considering that (probably, too many) beginning PCB-making-users would cause me to regret I ever started this. Additionally, this Forum would Not be the place to respond to Non-Kicad specific posts.

Thus, I’m somewhere between completing the work and abandoning it. I haven’t fully decided but, having a good-working App on my Mac, along with good motorcycle-riding weather, pushes me to think ‘time to move on’… And, I’m 74 yrs old…

Yesterday, I started to pare it down to being only a Kicad Plugin but, the Sun came out and my Harley was calling me

Thank you for your interest in this - I may be back when Winter weather comes again (why? Because it’s become an excellent tool for my hobby needs so, I can easily envision others finding it useful… and, well, you know how we engineers/geeks are…

5 Likes

Too many differences in Systems/Software/Hardware/Setup’s…etc, results in some Quirks on Linux and Windows.

However, The Mac version is Perfect and I was able to dial-in with a reasonable minimum of Quirks for Linux and Windows. In all cases, the Resulting Output STEP files are consistently Good!

I decided to Post the App’s and a Video showing it in MAC, LINUX, Windows and pointing out their Quirks and Work-Arounds. Here’s the Full YouTube video

Additional Video, Files and Info Posted at GitHub

I don’t feel too badly about it not being perfect when I consider Kicad v7 has problems and some are carried over from v6… and, having dedicated coders…
Example: The Python Console in v5 worked well but, not in v6 on my Mac.

Thanks to the participating testers!

Video Snippet from full video:

1 Like

A cheap-trick for viewing 3D-Step files - primarily for convenience without fussing with CAD

Create a Dumb Footprint and set the 3D-properties for viewing a selected STEP file.

• No need for Pads/other in the footprint…
• Can assign multiple STEP files and Enable/Disable on-the-fly as desired for viewing
• Can do this with any of Kicad’s STEP (and WRL) files

If using the Colorizing App, remember the saved STEP is saved to the location of the Colorizer App (otherwise, move the STEP file to desired location…)
Applies to using the App as Stand-Alone and/or in Kicad Plugin

Quick Example video (shows using App in Stand-Alone mode):

I have tested your program on Linux Mint 21.1 and it works like in your video.
I uploaded my own file step of an smd inductor and tried to vary the colors but the interface remained on the resistance mode.
How do I change the colors of any step object?

Thanks for the work done.

PS: Suggest that there are examples of how to edit generic .step files but on github I have not found such examples.

Thanks for checking out the App.

Not sure what you mean by “resistance mode” but, to clarify the changing GUI presentation:
• When either a “Resistor” or, “Select A Part” is selected in the List, the three color bands are available.

• When a “Capacitor”, “Jumper” or “LED” is selected in the List, only a Single color band is available because they are single color parts (as I defined them in code and in the provided STEP files).

Changing any STEP file is Not really doable, as-is.
Near the end of the Second video (posted on Github) I show how to do it by First preparing any STEP file by Changing it’s RGB color value to “1” by using most any other progam/app.
(Note: you may also think you can Text-Edit the value to “1” but, the STEP and my code-hooks use the value After it’s converted to decimal by exporting as STEP (many Drawing Apps that have color selections feature ability to set the values in Decimal, HEX, ARGB… etc. You can do it in FreeCAD, others…BUT, the set values GET Converted to Decimal during STEP Export by Magic. My Mac has Color format selection (screenshot below)

Doing it, in that sense, is no different than doing it in, say FreeCAD/other. Once done, and exported/saved as a STEP file, my Colorizer app will work on it. because it gets converted to Decimal RGB.

Naturally, a User would wonder “why bother, using the Colorizer app if I need to change the STEP in, say FreeCAD”. And, that is a valid point. So, the reason to prepare that STEP file and use the Colorizer app (and use the “Select A Part” feature is Simply to enable user’s ability to change the Color on that STEP file if using it in Kicad. on-the-fly.

The last examples in Second video shows doing it on a ‘Stock’ Kickad supplied STEP file.

Thanks ,
I thought I saw the second video but I was wrong.

Perfect I understand.
I used freecad to set the color of the faces.

I tried to add a screenshot but I can’t believe it.

One last thing, I was unable to load the plugin into kicad7 even though I corrected the path in the py file.
Maybe I did something wrong.

import sys
import pcbnew
import os
import subprocess
import wx

pcbnew.GetBoard()
from pcbnew import *

class SimplePlugin(pcbnew.ActionPlugin):
    
    def defaults(self):
        self.name = "STEP_Colorizer"
        self.category = "PCB_Parts"
        self.description = "STEP_Color_Changer"
        self.show_toolbar_button = True # Optional, defaults to False
        self.icon_file_name = os.path.join(os.path.dirname(__file__), '/home/tistructor/.local/share/kicad/7.0/scripting/plugins/3D_STEP-Colorizer-App-main/Plugin_For_Kicad/k_STEPcolor.png') # Optional, defaults to ""

    def Run(self):
        pass  # a Null command until there's executable code here...
  # This next line works from Kicad!!!!!! plugin
        subprocess.call(['/usr/bin/open','/home/tistructor/.local/share/kicad/7.0/scripting/plugins/3D_STEP-Colorizer-App-main/STEP_Colorizer_v1r0_MACwxLIN'])

SimplePlugin().register() # Instantiate and register to Pcbnew

Now I have succeeded.
Occasionally the edit screen hangs in “vivaldi”.

1 Like

I’m not quite clear on ‘succeeded’ and ‘hangs’…

So, you are able to use the Plugin?

You are able to set RGB values to ‘1’ and then are able to change the colors using my App?
(I’m assuming you set those three Faces to ‘1’ in FreeCAD then change them in my App ?). If so, Good job of understanding my confusing info…

The application works but kicad7 does not load the plugin.
No icon is shown and also in the list of plugins it is not detected.

I’m not a Linux guy but, in your Path string you show " .local " I’m not sure you should be using the ‘dot’ and, not sure about ’ - ’ dashes in the path… Underscores work.

Best to put the graphic icon file in the same folder as the script (then, there won’t be a need to set the Icon’s path (just set the file’s name). With the icon file in same folder, it should be found (I hope).

Re the List not detected. You call/run the App from some folder. The STEP files Must also be located in the same folder as the App so the App sees them.

I copied the path from the menager file “nemo” is correct…
the '.'refers to hidden directories.
You talk about kicad6 in the videos if I’m not mistaken.
Maybe with kicad7 the plugin is incorrect?

Well, Kicad v7 appears to have many bug’s but, I can’t say if that affects running the plugin.

Hidden on a Mac also means ‘Read Only’ and you may have access issue on Linux. It works fine on my Linux Mint 21.1

I get it. the .py file must be in the “plugins” directory and not in other subdirectories.
Now it works.
“/home/testructor/.local/share/kicad/7.0/scripting/plugins”

Schermata del 2023-03-31 17-16-56

1 Like

Excellent! Good job and followup! :smiley:

Bad,
I thought it worked but from kicad the application does not start.
I do some tests to understand the problem.

What is your path on linux mint?