← Back to team overview

kicad-developers team mailing list archive

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

 

My opinion is that what KiCad currently does is fine and the library
contributors
already ensure that VRML files are scaled to meet KiCad's expectations.
The fact that various tools will use different units in a VRML file and
that few
tools (including MCADs, our primary source of high quality models)
 will actually use a unit of meters is an indication of a poorly worded
spec in
addition to the lack of a qualification program for implementations of the
standard.  For me there is no need to change KiCad's interpretation of
VRML units; it is good enough that the documentation already clearly states
what is expected of the VRML files.  However, I think we do gain something
by
eventually deprecating the scaling; the question is how much pain do we
cause
current users and what can we do to help them. I think the suggestion of a
tool
to create extrusions is a good one, though some thought would need to go
into
exactly what that tool will be and how it will work. At any rate, I think
it's safe
to say that for now we can require that all scaling factors be greater than
some
amount - I'm tempted to say 0.01.  I don't think a zero scaling factor is
acceptable.
I'd bet it would also be an extremely rare case that anyone might want a
scaling
factor smaller than 0.01, and anyone who uses such a model should consider
making some changes.

Cirilo




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

> The document I linked is the HTML version of the ISO/IEC standard as
> published by the Web3D consortium (previously known as the VRML
> consortium).  There is no textual difference between the PDF of the ISO
> document and the webpage.
>
> If Wings3D doesn't use this, then it makes sense that we may have
> originally chosen the unit used in Wings.  But that doesn't mean that we
> need to continue this practice.
>
> -Seth
>
> On Tue, Sep 29, 2020 at 4:08 PM Cirilo Bernardo <cirilo.bernardo@xxxxxxxxx>
> wrote:
>
>> Hi Seth,
>>   What you have on the w3 site is essentially an interpretation by the
>> author of that page;
>> the spec referred to reads differently. At any rate, that doesn't change
>> the fact that existing
>> software for creating VRML (including Wings3D that many KiCad users used
>> long ago)
>> don't use a unit of 1m - and it all really comes back to the spec being
>> poorly worded and
>> various implementers interpreting it differently. If it sounds like I'm
>> being pedantic it's
>> because I've implemented too many standards specs over the years and
>> suffered
>> poor implementations even on points where I thought the language was
>> clear.
>>
>>
>> On Wed, Sep 30, 2020 at 8:58 AM Seth Hillbrand <seth@xxxxxxxxxxxxx>
>> wrote:
>>
>>> I don't follow your statement.  The standard says "ISO/IEC 14772 defines
>>> the unit of measure of the world coordinate system to be metres."  There is
>>> no ambiguity here, so I would feel comfortable with saying that KiCad also
>>> defines the VRML standard unit to be meters (metres).
>>>
>>> As to the file savings, this is easily addressed by defining a single,
>>> new coordinate system in inches or microns that scales the global system.
>>> All units in the file are then in scaled coordinates.
>>>
>>> -Seth
>>>
>>> On Tue, Sep 29, 2020 at 3:50 PM Cirilo Bernardo <
>>> cirilo.bernardo@xxxxxxxxx> wrote:
>>>
>>>> That's the same reference - the problem is with the wording 'is', not
>>>> 'shall' or 'must be'.
>>>> The reality is that for every tool you pick that generates VRML models,
>>>> the unit used is
>>>> anyone's guess.  On top of that, for KiCad's purposes using meters
>>>> would actually
>>>> be a nuisance and would unnecessarily bloat the VRML file. Many parts
>>>> often have
>>>> features on the order of 10 microns; using mm or even 0.1 inches shaves
>>>> off a lot of
>>>> zeroes (or repetitive exponents).
>>>>
>>>> Cirilo
>>>>
>>>>
>>>> On Wed, Sep 30, 2020 at 7:40 AM Seth Hillbrand <seth@xxxxxxxxxxxxx>
>>>> wrote:
>>>>
>>>>>
>>>>>
>>>>> On Tue, Sep 29, 2020 at 2:33 PM Cirilo Bernardo <
>>>>> cirilo.bernardo@xxxxxxxxx> wrote:
>>>>>
>>>>>> Oh, I wish VRML specified meters - that would have made life much
>>>>>> easier.
>>>>>>
>>>>>
>>>>> See
>>>>> https://www.web3d.org/documents/specifications/14772/V2.0/part1/concepts.html#4.4.5
>>>>> This reads pretty clear to me.  Was there a different reference you are
>>>>> referring to?
>>>>>
>>>>> -Seth
>>>>>
>>>>> --
>>>>> [image: KiCad Services Corporation Logo]
>>>>> Seth Hillbrand
>>>>> *Lead Developer*
>>>>> +1-530-302-5483‬ <+12126039372>
>>>>> Davis, CA
>>>>> www.kipro-pcb.com    info@xxxxxxxxxxxxx
>>>>>
>>>>
>>>
>>> --
>>> [image: KiCad Services Corporation Logo]
>>> Seth Hillbrand
>>> *Lead Developer*
>>> +1-530-302-5483‬ <+12126039372>
>>> Davis, CA
>>> www.kipro-pcb.com    info@xxxxxxxxxxxxx
>>>
>>
>
> --
> [image: KiCad Services Corporation Logo]
> Seth Hillbrand
> *Lead Developer*
> +1-530-302-5483‬ <+12126039372>
> Davis, CA
> www.kipro-pcb.com    info@xxxxxxxxxxxxx
>

References