Hello Kicad Community,
(Using 5.0.0 Stable on Win 10)
I have been trying to get the workflow down of Exporting VRML and import into SolidWorks.
I am having Scaling Issue. I’ve searched and read alot in the topics here but all I’m only finding it StepUp, Freecad solutions, etc…
Surely there is a more direct way of doing this.
First Question:
Does the Units setting directly under “Grid Reference Point” in VRML Export Options have anything to do with Scaling? (Only has mm and inch)
If so, how does that interact with the Output Units: Setting?
I also have the option of Import Scale option in Solidworks(SW). I have mm, cm, meters, inches, feet options.
I can’t find a combination of those 3 settings that produces a properly scaled VRML model in SW.
I use STEP for alot of Mechanical things in SW and I know you can export/import that.
It Scales Properly. Unfortunately Kicad seems to Fill in interior EdgeCuts and all my Pad holes… And it doesnt look nice with Silkscreens, etc like VRML.
Back to VRML.
Here is a list that I started of the three options and results.
**I tried a bunch more combinations before I started taking notes.
My Board should be 2.992" Wide
“Grid Reference Point” Units : Output Units : SW Import Units : Result : Scale
mm : mm : mm : 1.178" (Off by 2.54)
inch : mm : cm : 11.78" (Off by 0.254)
inch : 0.1" : cm : 11.78" (Off by 0.254)
inch : 0.1" : inch : 29.92" (Off by 0.1)
inch : inch : inch : 29.92" (Off by 0.1)
Any suggestions.
I would like to document the process once I get it figured out.
wrl (vrml) is dimensionless. Meaning every application can define its own scaling factor. 1 wrl unit means 1 inch for kicad. solid works might use a different interpretation.
vrml is not really the right format to communicate with cad packages anyway.
This is why version 5 now supports step and step export. The models that come with version 5 are in both step and wrl and are already correctly scaled if you use step.
The reason for this is that step is the defacto standard for exchanging data between different cad programms. wrl is meant for programms that create nice renders. wrl approximates your geometry using a lot of triangles. This means that a round hole is no longer a round hole. (Resulting in problems for cad tools. There is no not really a well defined center of a drill any more. Not really useable for constrainds or anchor for dimensions.)
Rene,
I agree with you 100%. I was just hoping I was missing something to solve the VRML scaling.
I can just Scale in SolidWorks and it is fine.
Just some info for anyone finding this later.
When set to Inch, KiCad exports the VRML file with this in file:
“scale 0.1 0.1 0.1”
When set to 0.1 Inch, it export wit with:
“scale 1 1 1”
All other Coordinates in the file are exactly the same.
SolidWorks actually gives an error when importing complaining that the “Model exceeds Dimensional Limits”.
So it may be falling back and importing at the same scale even when the VRML file has different scale values. This is why both files (0.1 inch and inch) are Off by 0.1 (or 10 times too large) when imported.
for using VRML, I will just rescale once in solidworks and everything works great.
So moving on: I would like to get the STEP Export working now.
I get 12 errors like this when Exporting: (obviously Jenkins worked on this code )
Warning: 12:22:51: C:/Jenkins/workspace/windows-kicad-msys2-stable/src/kicad/utils/kicad2step/pcb/oce_utils.cpp: addEdge: 1482
Warning: * added an auxiliary segment from 185.3,-74.1 to 185.3,-74.1
And my step has cylinders where Pad Holes should be and the Center Cutout is filled in.
Picture from SolidWorks:
@maui
Yes, That Looks great.
Are you using KiCad 5.0.0 or a newer nightly?
I removed all the Fillets in the EdgeCut, Exported the Step and it comes into SolidWorks Fine.
I saved a .PNG, and applied that to my model in SW.
Here is result.
With you able to open STEP just fine in FreeCAD, I just wonder if your KiCad version is exporting the STEP properly or if FreeCAD/StepUP handles the file better than SW?
@gremlin
I didn’t exported the pcbnew kicad file from KiCAD, I just opened directly the pcbnew board file in FreeCAD… from there it is possible to export the model as STEP.
StepUp is a plugin that enables FreeCAD to load directly a kicad pcb board in FreeCAD. Then you can export the model as STEP and then use it in any CAD you may choose.
that is an easy trick to have a lightweight model with tracks and Silks
@maui
Sweet…, I had read forum posts about the FreeCAD/StepUP but didn’t realize that it would open up a pcbnew file directly.
I may just give that a try a little later.
I have to move on for now and get a couple more boards completed.
The PNG decal trick would be even easier if the KiCad 3D Viewer “Export PNG” Option had a way it would just Export the PNG to the size of the board instead of the whole viewport. It would also be awesome if any holes through the board used the PNG Alpha channel for transparency instead of viewport background color.
We could slap it right on the model in MCAD app without having to scale it or post process in photoshop type application.
Maybe that is an improvement that could be worked on in someone’s Spare time…
Is the 3D Viewer a completely separate source code that could be looked at?