KiCad StepUp: a new update for FreeCAD 0.17


#1

Recently FreeCAD 0.17 has became the new stable release.
Very near the latest pre-stable, FreeCAD switched also to OCC7.2
This new version of the mechanical kernel of FreeCAD is offering some improvements, but unfortunately introduced a bug in exporting STEP hierarchical models with FreeCAD that didn’t get caught before the stable get released.

With this update of KSU (kicad StepUp version 7.2.1.2) I’ve introduced some temporary fixes, to be able to export a simplified version of hierarchical STEP models.
NB this version is available only through the FC Tools Addon Installer Menu ATM.
From the KSU main toolbar:

there are two buttons that can already simplify the Hierarchy to a single object (union) or to a single group of objects (compound).

ksu-union-compound
Those buttons can help in exporting the KSU imported board manually, using the standard FC menu.

Moreover I improved the option to export to STEP a hierarchy through the export button and the checkbox option, aligning the exporting behavior similar to the one available in FC 0.16.
ksu-export

A STEP model can then be loaded through the Import button
ksu-import
or through the standard Import or Open FC Menu.

If a single level hierarchy object is loaded in FC through the menu, it is useful that the simplified mode of loading is unchecked to load the model with its hierarchy and colors(it is available in FC STEP Import/Export preferences).
KSU has also added a new small Toolbar with some utilities … among those there is the option to toggle this property value.
ksu-import-mode-sel

Feel free to test it and give me feedback.

Maurice


#2

Maurice:

I just installed the “stable” FreeCAD and used the Add-On Manager to get the latest KSU.

I observe the following behavior, which happened with the slightly older versions I loaded a week ago:
If I select a part and then select the KSU WB, I get a corrupt heap exception (see below).
If I select the KSU WB and then select a part, all works file - the exported files look fine.

This behavior is not new, but I don’t know how old it is.

Exception: Unhandled exception at 0x0000000076EDF6B2 (ntdll.dll) in FreeCAD.exe: 0xC0000374: A heap has been corrupted (parameters: 0x0000000076F47C70). occurred

The stack trace is very long (deep). I’ll send it directly to you if it’s interesting, but some levels are shown below. EDIT: Partial Stack Removed. Complete stack trace sent to Maui with PM.

I can also send the model in FreeCAD file format.

Environment: Windows 7 Ultimate.

MM


#3

Hi @Michael_Mulligan
this seems something related to graphic drivers… you may try to update them and see if this will happen again

Yes please, you can PM me here at the forum and, if the file is big, you can post me a link to i.e. dropbox or similar
Please attach also a full FC version details

Maurice


#4

Maurice:

I sent to PMs. The first with all the information except the stack trace. The second with the stack trace. The two messages were due to the need to reboot to get the exception to reproduce.

I think the fact I had to reboot might be some kind of hint. But what state would remain from independent runs of FreeCAD is something I don’t understand. If I had to guess, it might be related to libraries that somehow remain loaded. ???

MM


#5

Hi @Michael_Mulligan
I’m sorry but I cannot reproduce your issue at all…
I’m on win10 64b and I tried your model (which has nothing particularly complex to be pointed)
It seems to me something related to your graphic card drivers or windows installation dlls…
Never saw anything similar… have you tried to switch to an other WB when the part is selected to see if it also happens on that?
I haven’t see any similar issue or report also on FreeCAD forum…

Sorry but I have no clue on this…


#6

Maurice:

It fails when switching to PartsWB as well. So I think KSU is off the hook. Congratulations (really).

FreeCAD is the only program that has complained. I believe it may be related to something in the graphics “stack”, but have no idea how to isolate it. I’m only using FreeCAD to create 3d models for KiCAD and don’t expect to make many. [I use OpenSCAD normally.] So I’ll just work around the issue. Unless others have this problem, it’s not worth anyone’s time to try to find the cause.

Just to note: I have not loaded any custom drivers (as far as I know) and my Windoz 7 is up-to-date WRT “Windows Update”. The video card is a NVIDIA GeForce 7600 GS. It’s almost as old as I am. :slight_smile:

EDIT: I have a 16:10 display: 1920 x 1200. That’s slightly unusual.

Thanks for KSU,
MM


#7

Thx for testing :smiley:
I 'm going to report this issue to the FC dev which is involved in win packaging… may be he can solve this issue :wink:


#8

Maurice,

Could you explain what those extra utilities do? What are “first and second placement?” And what is the difference between simplified and full STEP import modes?


#9

Hi,
sorry but I know I have a lacking of documentation :wink:
code comes always first …
I will update my cheat sheet later on (lack of time now)

Anyway, simplified/full step importing is related to an internal FC configuration to load STEP models in simplified way

and

What are “first and second placement?”

The button simply copies the Placement of the First selected object to the Second selected object, moving it to the same Placement (position)


#10

Everything is back to normality!
Please update:

  • FreeCAD stable to a release >= to FreeCAD-0.17.13515

and

  • FreeCAD daily to a release >= FreeCAD_0.18.13548

and

  • kicad StepUp to a release >= 7.2.1.4

#11

Unfortunately the FreeCAD-0.17.13515 install seems somehow to be corrupted for me. Only the start workbench is available, with other workbenches there is a message that it cannot find the DLL. The program window is very rudimentary when it starts up. I know this is not a KiCad issue, but I am interested if someone who used the temporary 0.17 stable version supplied with with OCC7.1 also have similar issues when installed with the new 13515 stable. I have not tried the 0.18 development release as I will try to stay with 0.17 for a while from now on.


#12

Just FYI: I had a problem with the initial “stable” 0.17, but 13515 seems to work well. All appropriate WBs are available and the three I’ve tried worked as expected.

MM


#13

Thanks for the response. Perhaps I should try another download and a clean install. However it is strange then that that 13509 worked well without clean install.


#14

Well, it’s software. :open_mouth:


#15

I finally had success getting getting it working after completely uninstalling FreeCAD and cleaning out the whole FreeCAD folder under Appdata\Roaming and restarted the computer before a new reinstall of freshly downloaded installer just to make sure. Under install I also ticked on “add to python path” option that I had not done before as it was not default, and installed the VC redist option although the latter should have been installed previously. I proceeded carefully with adding some workbenches, and it does not seem to be any issues with KiCad Stepup or other workbenches.


#16

Hi

I don’t think that this option is necessary, I use the zipped version without issue.
Probably the FC profile was in some way damaged and/or the VC redist would did the trick.

Thanks for the feedback. :smiley:


#17

OK, so does the selection “Enable STEP Compound merge” from the STEP import preferences interact with StepUP’s selection of simplified vs. full STEP import mode? And does the button “Disable full STEP import mode” activate the simple STEP import mode?


#18

For the past week or so, the Draft WB of FreeCAD18 seems to behave strangely with diametric or radial dimensions. I realize this is a KiCAD forum, but FC and KiCAD are practically married thanks to maui’s work.


#19

Yes, the buttons act to change the preference check option. It is just a way to toggle it faster and with a visual feedback.