Cannot make scaling work (CloneConvert.FCMacro) for KiCad StepUp

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
sjb
Posts: 60
Joined: Thu Apr 27, 2017 10:40 am

Cannot make scaling work (CloneConvert.FCMacro) for KiCad StepUp

Post by sjb »

Hi All,

I can't get scaling to work (required for "Kicad StepUp WB"). The "Draft Clone" tool only allows 2dp of accuracy, so I tried to install "CloneConvert" with the addons Manger --> "Unable to fetch the code for this macro".

Then I tried using "Create Macro", and pasted the code from here
https://www.freecadweb.org/wiki/index.p ... oneConvert
Finally add the macro via "Tools -> Customize".

I cannot make the macro "run". I opened an STL file, selected all the components, selected "CloneConvert.FCMacro" then used "Execute Macro".
Nothing happens, no dialog box.
---
OS: Windows 7
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.17.13522 (Git)
Build type: Release
Branch: releases/FreeCAD-0-17
Hash: 3bb5ff4e70c0c526f2d9dd69b1004155b2f527f2
Python version: 2.7.14
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedKingdom (en_GB)

---
Stephen
chrisb
Veteran
Posts: 54150
Joined: Tue Mar 17, 2015 9:14 am

Re: Cannot make scaling work (CloneConvert.FCMacro) for KiCad StepUp

Post by chrisb »

sjb wrote: Tue May 15, 2018 8:58 am The "Draft Clone" tool only allows 2dp of accuracy
The clone doesn't scale to some dp, it is a factor. You can increase the precision if you increase the number of decimals in Preferences->General->Units->Number of decimals.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: Cannot make scaling work (CloneConvert.FCMacro) for KiCad StepUp

Post by easyw-fc »

sjb wrote: Tue May 15, 2018 8:58 am Hi All,

I can't get scaling to work (required for "Kicad StepUp WB").


Stephen
Hi Stephen, what are you trying to achieve with scaling? Why are you saying StepUp needs a scaling? (PS I'm the StepUp author)

Maurice
Last edited by easyw-fc on Tue May 15, 2018 7:14 pm, edited 1 time in total.
mario52
Veteran
Posts: 4690
Joined: Wed May 16, 2012 2:13 pm

Re: Cannot make scaling work (CloneConvert.FCMacro) for KiCad StepUp

Post by mario52 »

hi

for use CloneConvert you must Part_ConvertToSolid (Part > ConvertToSolid) and Part_RefineShape (Part > RefineShape)

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
sjb
Posts: 60
Joined: Thu Apr 27, 2017 10:40 am

Re: Cannot make scaling work (CloneConvert.FCMacro) for KiCad StepUp

Post by sjb »

(1) Many thanks for that information Chris ;)

(2) Mario - When I tried to load the board, I got the message
"error: reset values of scale to (x y z 1 1 1)"
sjb
Posts: 60
Joined: Thu Apr 27, 2017 10:40 am

Re: Cannot make scaling work (CloneConvert.FCMacro) for KiCad StepUp

Post by sjb »

Now a new problem...

I select all model components ready for export, then Draft Clone delselects everything.

So, I re-select all (but the draft clone scaling dialog then disappears).

I tried select all, then changed scaling, then re-select all --> File Export. Nothing is scaled though.
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: Cannot make scaling work (CloneConvert.FCMacro) for KiCad StepUp

Post by easyw-fc »

Please have a look at kicad StepUp cheat sheet for some basic how-to with StepUp workflow...
https://forum.kicad.info/t/kicad-stepup-cheatsheet/7688

You really don't need to scale anything using clone or similar... The tools can do it for you automatically... Just design everything in 1:1 scale
sjb
Posts: 60
Joined: Thu Apr 27, 2017 10:40 am

Re: Cannot make scaling work (CloneConvert.FCMacro) for KiCad StepUp

Post by sjb »

I am using the 3D files supplied by the manufacturer (eg Amphenol/FCI, Wurth, Molex...etc)

These are typically the wrong scaling for KiCad

Eg Wurth RJ-11 615006138421,
http://katalog.we-online.de/em/download ... ev1%29.stp
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: Cannot make scaling work (CloneConvert.FCMacro) for KiCad StepUp

Post by easyw-fc »

sjb wrote: Fri May 18, 2018 1:34 pm I am using the 3D files supplied by the manufacturer (eg Amphenol/FCI, Wurth, Molex...etc)

These are typically the wrong scaling for KiCad

Eg Wurth RJ-11 615006138421,
http://katalog.we-online.de/em/download ... ev1%29.stp
All manufacturer 3D STEP models are scaled 1:1
If you use StepUp to align the model to your footprint and to export the 3D model, StepUp will scale directly the WRL as required by KiCAD without having to do it manually...
phpBB [video]
Post Reply