← Back to team overview

kicad-developers team mailing list archive

Re: 3D-Viewer: limit scale to positive values?

 

Oh, I wish VRML specified meters - that would have made life much easier.
No, VRML *recommends* that the units be meters - the reality is that there
are models in inches,
0.1 inches, mm, cm and who knows what else, and unlike CAD model
specifications there is no
mechanism for specifying the units. I had to keep the scaling option when
we moved
to the new 3D tools 6 years ago due to lack of models and the fact that if
I removed it I would
break things for everyone who used the 3D viewer.  I haven't been following
the library developments
for a long time, but I think Maui's FreeCAD tools are the largest source of
models for KiCad and
from the start his scripts have scaled the generated VRML model so that a
scale of (1,1,1) is all
KiCad ever needed.  Personally I would be happy to remove scaling options
and force people to
do things as engineers are trained to do.  In reality there would be many
upset users whose 3D
renderings are totally messed up. This scaling thing comes back to bite us
every now and then;
it wasn't too long ago that someone even scaled the solid models (STEP,
IGES) and I doubt
we've seen the last of such misguided efforts. I think the CAD model
scaling happened because
someone wanted to use simple shapes (cylinders, rectangular boxes) to
represent everything
and would rather apply a scale for every component than use a better model.
Maybe we should
just say "sorry for breaking your stuff" and drop the scaling.  If there
are any VRML models in the
library which need to be rescaled then we can do that; I wrote a simple
tool to do that years ago
and although I can't find the code now it really wasn't anything difficult
to do; the biggest job would
be identifying which models need to be scaled.  If we drop the scaling
there's nothing we can do
to help the users who rely on it to transform their boxes and cylinder into
all imaginable parts.

Cirilo


On Wed, Sep 30, 2020 at 3:11 AM Seth Hillbrand <seth@xxxxxxxxxxxxx> wrote:

> Well, we've backed ourselves into a bit of a corner.  VRML is specified in
> meters, so if we're assuming inches, we're a bit off in left field.  But do
> we need three separate scale parameters?  We could reduce to 1, correct?
>
> In the official footprint library, we have 7 footprints that specify
> non-unity scaling. (Banana_Jack_[1-3], NS-Tech_Grove_1x04, Fuse_Blade_ATO,
> Fuse_Blad_Mini, Oscillator_SMD_TXC0_G158).
>
> -Seth
>
>
>
>
> On Tue, Sep 29, 2020 at 9:30 AM Ian McInerney <Ian.S.McInerney@xxxxxxxx>
> wrote:
>
>> We can't remove the scaling option until we make the VRML importer handle
>> proper unit selection. I have routinely run into the case where I go
>> OpenSCAD -> Wings3D -> KiCad and design a model using mm in OpenSCAD
>> because it makes for easier computations (all the datasheet values are
>> nicely given in mm) and then have to apply a scaling factor of 0.3937 to
>> all the axes in KiCad to make it the proper size because we seem to have a
>> hardcoded assumption about what unit system the VRML file is in.
>>
>> In fact, the KLC says: WRL files do not specify absolute dimensions.
>> KiCad normalizes model parameters to units of inches and the internal units
>> (dimensionless) of the WRL model must be scaled accordingly.
>>
>> -Ian
>>
>> On Tue, Sep 29, 2020 at 4:50 PM Seth Hillbrand <seth@xxxxxxxxxxxxx>
>> wrote:
>>
>>> There has been some discussion to removing the scale option here
>>> altogether.  The logic being that if you need the model scaled, you should
>>> be doing this in your solid CAD not in your electronic CAD.  I have come
>>> around to this idea and it might be worth implementing rather than doing
>>> the scale limiting.
>>>
>>> -Seth
>>>
>>> On Tue, Sep 29, 2020 at 4:52 AM Mário Luzeiro <mrluzeiro@xxxxx> wrote:
>>>
>>>> Hi all,
>>>>
>>>> I'm wondering if it is safe to limit the scale of shapes to be positive
>>>> values?
>>>>
>>>> Applying negative scales will cause inverted shapes and render issues
>>>> on the models.
>>>>
>>>> Could be that anyone in the world is using negative scale values?
>>>> or should be safe to limit it?
>>>>
>>>> This is related with this issues:
>>>> https://gitlab.com/kicad/code/kicad/-/issues/5817
>>>>
>>>> Mario
>>>> _______________________________________________
>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>> More help   : https://help.launchpad.net/ListHelp
>>>>
>>>
>>>
>>> --
>>> [image: KiCad Services Corporation Logo]
>>> Seth Hillbrand
>>> *Lead Developer*
>>> +1-530-302-5483‬ <+12126039372>
>>> Davis, CA
>>> www.kipro-pcb.com    info@xxxxxxxxxxxxx
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>
>
> --
> [image: KiCad Services Corporation Logo]
> Seth Hillbrand
> *Lead Developer*
> +1-530-302-5483‬ <+12126039372>
> Davis, CA
> www.kipro-pcb.com    info@xxxxxxxxxxxxx
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>

Follow ups

References