Force all WRL to STP as default

I see you made an app for this! Here i was hopeful for a script or a plugin.

Ok, its for Mac, so it’s Unix or Rosetta, I doubt Carbon. No worries about exporting to other languages unless you want to. If it was already functional in Windows I might ask if you mind to share. :wink:

At least it makes sense how this was single mouse click for you. Though for the he rest of us not so much.

I screen shot the box as it shows for V7.0.9

I exported a recent project. In KiCAD 3D viewer, the parts are not shown. Paths are WRL only. I purged the WRL already to be able to see which parts I still needed to manually fix.

In export to STEP, as per the screen shot, I checked off to Substitute Similarly named models.

Loaded the resulting export into Fusion360. The only parts to be shown are those I have exported to my own files (duplicated) and manually linked, or created from scratch.

To make this clear: you have problems and they are real, for whatever reason. We’ll gladly help you to solve them. Just don’t blame the developers’ attitude or knowledge. The problems are partly due to imperfect KiCad workflow and UI and it’s even possible there are genuine bugs. But none of the developers have said or decided that WRL would be better or more important than STEP; on the contrary.

2 Likes

First: FYI - Basically, Kicad has two types of plugins; 1) Official and Unofficial (though, some Unofficial one’s still linger in the Scripting Folder), especially the BOM’s

Second: Using Unofficial plugins is done by simply placing them (your-code.py) in the Scripting>Plugin folder along with any needed resources, such as an Icon…etc) That wil cause an Icon to appear in Toolbar.

Example is this one. Unzip it and place in proper location. Quit and Restart Kicad. When Icon is clicked, a GUI panel will pop up. If you don’t get it to run, then you placed in the wrong location. (Note: I have no problem leaving the Refresh in the code but, others have been informed to no longer use Refresh, so, if problem, delete that part of code)
Archive.zip (7.6 KB)

Third: My plugin code is a combination of program-code and GUI-code and not easily seperated so, it’s not user-friendly for posting.
However, I may spend some time to re-code it to include embedded GUI then, package it for Window and Linux (maybe… :thinking: )

Fourth: As far as your problem with Step files not working with things as they currently are, that is ‘perhaps’ the common issue of Links and often, though all look correct, something internally gets broken and re-linking usually works. My App can re-link them (happened enough that it has pull-down menu to select correct relinking… but, I won’t bother with that if redoing code for posting)…

I just revised my code to count files it checked…

Deleting all the WRL files is likely what caused the problems.

Sorry, not “trying” to step on toes.

If I could know for sure that any one person or bug was show stopper, I would be more specific. For the moment it seems to be more internal conversation and policy, not a bug. I can only see the end results.

As for attitudes, I cannot speculate.

My opinion based on what I have seen a few years ago, and currently is that there are those with the capacity to implement the changes, who feel that STEP should be depreciated in favor of WRL, and don’t “seem” to give regard for where STEP is needed. -As you pointed out in an Earlier reply, I may have misunderstood what was posted. And I can confirm, yes I did. I had to read that one specific reply several times. The now very old conversation where this had come up before in V5 era, seems to have been removed.

I have for sure not started this topic to convince any one to make changes. Just to figure out how to get the results I need. If this creates something useful for others too, even better.

Not that it is direct parallel, but I faced off with rogue developers who thought they had rights to control where CURA was headed. One in particular very vocal that my concerns about issues of actual bugs in the serial/USB interface were some how irrelevant. That the function should be depreciated and removed. Everything should be SD card or network. Eventually he became to combative, I had no choice but to abandon the topic and and even interacting with the community since he would pop up everywhere, since his seemed to be the only opinion that mattered. -I don’t use CURA any more. But I do have a semi recent copy and they did fix the issues.

So you think that we must have the WRL files installed in order for the script to work?

I hope not, but it is worth a test. Later I will reinstall the default 3D files, and retest.

Thank you for that detailed reply. I am off lunch now and pinched to get some manual labor done. But will return to all this in a couple hours and have a better look at what you have given me. :smile:

Please feel free to post some receipts here because I will guarantee you that is is an incorrect assumption on your part.

@Raymond_Lulling
I generated the App for Windows (did in Windows10).

It’s never perfect ‘as-is’ and I needed to delete the option to select one file or multiple files. I’m sure I can re-do the code (it’s the Radio-Button’s) that Windows doesn’t like.

So, I hard-coded the Multiple files so, it will walk through the current selected Directory and change all files in it (that have the Search/Replace text).

So, it’s best to be careful and test. If wanting to change the word “Ball” in a file, it will also change all words containing “Ball” such as “Baseball”. Thus, include leading and following spaces.
Example: " Ball "

It’s not Case sensitive.

Unfortunately, the compressed App is 14meg, too large to post here…

Think about how/where I can post it without my needing to sign up for something like Cloud (yes, I do have a Cloud acct (complements of Apple) but, I will never use it).

Not at all an issue. ( I mean if you choose not to or are unable to share).

I want to offer, that when I want to share files there are two surefire repositories. 1) Having developed anything. You might consider GitHub as a share point.
2) However if you just want to share random files and if you have a google account, just save to google drive and share a link to the file or folder of your choice. Google will ask if you want to enforce security where the viewer must be a google user, or make the link public so that any one with the link can access. No one will be able to see anything on a higher level than the link shared. So it makes useful for sharing project files, photos and screen shots where needed.
Similar, if you have One Drive. Though the two services are not as identical as they seem, one drive integrating with MS products but being overall more limited in services and options.

Just now actively merging a fresh copy of the footprints as saved to GitLab.
5.46GB decompressed from 951MB.

Confirmed. WRL must be in place in order for the export function to detect the STEP files… Export without WRL fails to detect and export STEP, even if present.

After reinstalling the WRL behavior of export is as described by @marekr .

I have GitHub acct but don’t want to bother…

Attached will do what you want:

Attached is bare-bones code for Changing ALL the files, including files inside Sub-Folders.

Consider placing the Code file, along with a text-file in the Footprints folder - example screenshot for Mac.

Run the code and wait about one minute (depending on weather). Then, in the IDE’s python Shell, enter:

Caller()

That will finish the job and say ‘done’

Video Demo… Shows the Files containing the word “harley”, then changed to “woof”

BE CAREFULL!!! there is No Undo

Naturally, you’ll want to Edit the python code to search for .wrl and replace with .step and the Path to the python file

The zipped Python File:
Search_Replace.zip (1.9 KB)

1 Like

Thank you for this.

I will look into how to make use of this script.

@Raymond_Lulling

Clarifying some info:

• The .WRL files are only Graphic representations and are Not 3D- (Solid)Models

• Footprints can use either/both .WRL and/or .STEP (and .STP)

• The Footprint files are .MOD extensions and are located in the ‘footprints’ folder

• If using a ‘Python walking’ Search/Replace code, be sure to NOT change the extension of the actual .WRL file. You want to change the link the .MOD files (in the ‘footprints’ folder, NOT in the ‘3dmodels’ folder.

Thus, if using my posted Code, place the .py into the ‘footprints’ folder so it walks through that folder (and it’s embedded folers and leaves the ‘3dmodels’ folder untouched). That will preserve the actual .WRL files.

Once done, the Footprints that linked to .WRL will now be linked to the .STEP files and you will no longer need .WRL files EXCEPT for the Footprints that related to the .WRL where Kicad did Not provide both .WRL and .STEP. There are only about a dozen, or so.

If you look at the 3dmodel folder’s sub-folders of Parts, you’ll see most have both .WRL and .STEP baring the same textual reference with different extensions. Thus, you’ll know what .WRL files you can safely delete, if desired…

The ‘Failed’ Export of a STEP will thus be due to it’s Footprint still calling out .WRL where .WRL no longer lives. That’s why it fails. So, if wanting to use .WRL and you changed the link to .STEP and there is No actual .STEP file, it will also fail. There are a few Parts that don’t have .STEP so, you can Manually change back their related .MOD file links to call .WRL if you haven’t deleted them.