← Back to team overview

kicad-developers team mailing list archive

Re: 3D models: custom VRML export vs FreeCAD (OCE/Coin3D) VRML export

 

KSU-FreeCAD conversion:
  627250 Mar  9 11:10 nasty_cheese-fc-ksu.wrl
 6047323 Mar  9 11:10 weldment_asm_solid-fc-ksu.wrl

FreeCAD conversion:
 4009156 Mar  9 11:11 assieme_leg-fc.wrl [compressed]
31483854 Mar  9 11:23 assieme_leg-fc.wrl [uncompressed]
 2083867 Mar  9 11:10 nasty_cheese-fc.wrl
 9597465 Mar  9 11:10 weldment_asm_solid-fc.wrl

(kicad) OCE conversion:
 5854655 Mar  9 11:23 leg.wrl
 1200550 Mar  9 11:26 cheese.wrl
 8655904 Mar  9 11:27 weldment.wrl

Notes:
1. The IGES file (assieme_leg) was converted and compressed
by FreeCAD to ~4MB but the uncompressed version is ~31MB as
opposed to the uncompressed ~6MB of the custom conversion.

2. In general the models all look good with FreeCAD's
converter consistently producing the largest files.
Factors with a significant affect on the file size are the
OCE 'deflection factor' and 'deflection angle' parameters,
which affect the number of triangles, and the float precision
in the output. All of these can be optimized to produce a
good visual model with minimal file size. The 'nasty_cheese'
example demonstrates a case where the fc-ksu conversion
is 50% smaller than the custom conversion and the file size
difference is due primarily to output formatting of floats.

3. Although the models tested are moderately complex
mechanical part and assembly models, kicad should be
able to handle any conformant model since we cannot know in
advance what a user may wish to do. For example a user may
attach a STEP model of a third party electronic assembly which
in turn has thousands of part models. While the mechanical
benefit in using such detail is questionable it makes no
sense to impose an artificial limit on the user.

4. Compatibility of exported files:  The custom OCE export
is VRML2 compliant and, to keep file size small, will employ
DEF/USE wherever possible. In general the output cannot be
correctly parsed by the legacy KiCad parsers. Compatibility
with Blender's limited VRML converter is not a consideration.

5. It is becoming more common for some manufacturers to
provide defective STEP models perhaps in the mistaken
belief that defective models may discourage reverse
engineering. The most common form of defect is the removal
of features to create "open shell" structures which are not
valid solids. Unfortunately such defects can cause a segfault
in the Shape Healing functions of OCE. This is a current
limitation within OCE but is an example of how third party
software might cause kicad to crash. (Even commercial
MCAD software often struggles with these defective models.)

- Cirilo


On Wed, Mar 9, 2016 at 9:17 AM, easyw <easyw@xxxxxxxxxxxx> wrote:

> What nonsense. The file I got was correctly exported from FreeCAD no matter
>> what you believe;
>>
> *which version of FC?*
> have you read my mail? I told you to export after select shaded view...
> but if you don't want to learn how to use FreeCAD or just listen, nobody
> can force you...
>
> FYI here the file exported from FC with the method I told you to use are
> all fine and without any problems (as displayed in view3dscene)
> name-fc.wrl -> means freecad wrl standard exported
> name-fc-ksu.wrl -> means freecad StepUp VRML macro exported
>
> https://github.com/easyw/kicad-3d-models-in-freecad/raw/master/test-vrml/nasty_cheese-fc.wrl
>
> https://github.com/easyw/kicad-3d-models-in-freecad/raw/master/test-vrml/nasty_cheese-fc-ksu.wrl
>
> https://github.com/easyw/kicad-3d-models-in-freecad/raw/master/test-vrml/weldment_asm_solid-fc.wrl
>
> https://github.com/easyw/kicad-3d-models-in-freecad/raw/master/test-vrml/weldment_asm_solid-fc-ksu.wrl
>
> In addition here is an IGES file with color to convert:
>>
>> https://drive.google.com/file/d/0By_XTJN-s8aXWU4tcGVrdXQ0VWs/view?usp=sharing
>>
> IGES is a worse source for 3D MCAD compared to STEP, but anyway here the
> file exported
>
> https://github.com/easyw/kicad-3d-models-in-freecad/raw/master/test-vrml/assieme_leg-fc.wrl
>
> those, you have chosen, are much more complex 3D models than what normally
> kicad should manage
>
>> The only purpose of comparing output is to ensure that we get
>> similar results.
>>
> IMHO I don't think so
>
>> FreeCAD: file size ~28MB, >800 warnings about defects in the model,
>>  bad lighting model for VRML:
>>
>
> Anyway, this discussion is getting a wrong direction...
>
> Cheers
> Maurice
>
>
> On 08/03/2016 22.00, Cirilo Bernardo wrote:
>
>>
>>
>> On Tue, Mar 8, 2016 at 8:29 PM, easyw <easyw@xxxxxxxxxxxx
>> <mailto:easyw@xxxxxxxxxxxx>> wrote:
>>
>>     the problem with your comparison is a wrong way to export from
>>     FreeCAD...
>>
>>
>> What nonsense. The file I got was correctly exported from FreeCAD no
>> matter
>> what you believe; maybe the later versions or nightly builds are better,
>> but that
>> has nothing whatsoever to do with the purpose of this exercise.
>>
>>   If you want to compare results, you can convert some models from here:
>>
>> http://www.steptools.com/support/stdev_docs/stpfiles/ap203/
>>
>> The weldment and nasty_cheese files should be enough. Also remember this
>> is not a competition; OCE is being used to provide built-in support for
>> viewing STEP and IGES models but if people want to install FreeCAD that
>> is their business. In the future installing FreeCAD will never be a
>> requirement
>> of kicad to view files and even the installation of OCE will only ever be
>> optional. The only purpose of comparing output is to ensure that we get
>> similar results.
>>
>> In addition here is an IGES file with color to convert:
>>
>>
>> https://drive.google.com/file/d/0By_XTJN-s8aXWU4tcGVrdXQ0VWs/view?usp=sharing
>>
>> You may also want to convert tork.stp to see if you get the expected
>> model;
>> my conversion is missing some surfaces.
>>
>> - Cirilo
>>
>>     if you use kicad in wrong way you could also say kicad is useless
>>     for creating pcbs ...
>>     if you share a STEP model you have made, or just with public license
>>     I will make a comparison with that...
>>     I have many STEP models for a real comparison, I did MCAD libraries
>>     for MCAD collaboration with STEP and VRML models for kicad and they
>>     will not give any warnings, or bad lighting model for VRML .... but
>>     that would be on my point of view :)
>>     I would show you what can be done with FreeCAD and kicad StepUP on
>>     your side :)
>>     Maurice
>>
>>     On 08/03/2016 10.14, Cirilo Bernardo wrote:
>>
>>         Unfortunately I can't share the STEP file since it is someone
>> else's
>>         proprietary data. But if you have a STEP assembly which we can
>>         all use
>>         for a comparison of the different translators then we can do a
>> test.
>>
>>         - Cirilo
>>
>>         On Tue, Mar 8, 2016 at 7:17 PM, easyw <easyw@xxxxxxxxxxxx
>>         <mailto:easyw@xxxxxxxxxxxx>
>>         <mailto:easyw@xxxxxxxxxxxx <mailto:easyw@xxxxxxxxxxxx>>> wrote:
>>
>>              would you mind to share the step file for a real comparison?
>>
>>
>>              On 08/03/2016 09.04, Cirilo Bernardo wrote:
>>
>>                  Hi folks,
>>
>>                     I'd just like to share a comparison of the OCE VRML
>>         export
>>                  from my
>>                  visualization experiments vs the FreeCAD VRML exporter.
>>
>>                  FreeCAD: file size ~28MB, >800 warnings about defects
>>         in the model,
>>                     bad lighting model for VRML:
>>
>>         https://drive.google.com/open?id=0By_XTJN-s8aXNF8xZnZvRGU0amM
>>
>>
>>                  Custom OCE export (via the scenegraph library from
>>         kicad 3D work):
>>                  ~14MB, no warnings, default lighting as per VRML2
>>         specification.
>>
>>         https://drive.google.com/open?id=0By_XTJN-s8aXVmRiSVFwYnNqZ1k
>>
>>                  Original STEP file size: ~15MB
>>
>>                  - Cirilo
>>
>>
>>
>>                  _______________________________________________
>>                  Mailing list: https://launchpad.net/~kicad-developers
>>                  Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>>         <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>>                  <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>>         <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
>>                  Unsubscribe : https://launchpad.net/~kicad-developers
>>                  More help   : https://help.launchpad.net/ListHelp
>>
>>
>>
>>

References