Export board STEP file does not scale/shift parts

Bug #1784257 reported by Leandro Heck
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
KiCad
Expired
Medium

Bug Description

STEP file does not represent my board.
Components scale/shift not being applied.

Revision history for this message
Nick Østergaard (nickoe) wrote :

Please add version information and a demo project.

Changed in kicad:
status: New → Incomplete
tags: added: export step
Revision history for this message
AWa. (awa-wp) wrote :

Application: kicad
Version: (5.0.0), release build
Libraries:
    wxWidgets 3.0.3
    libcurl/7.54.1 OpenSSL/1.0.2l zlib/1.2.11 libssh2/1.8.0 nghttp2/1.23.1 librtmp/2.3
Platform: Windows 7 (build 7601, Service Pack 1), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
    wxWidgets: 3.0.3 (wchar_t,wx containers,compatible with 2.8)
    Boost: 1.60.0
    OpenCASCADE Community Edition: 6.8.0
    Curl: 7.54.1
    Compiler: GCC 7.1.0 with C++ ABI 1011
Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_ACTION_MENU=OFF
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Pcbnew -> File -> Export -> STEP...

The component in the exported step file have scale factor set to 1.00 no to current scale factor from component properties (Footprint Properties -> 3D Settings -> Scale).

VRML export - component size ok.
STEP export - incorrect component size.

Best regards,
AWa.

Revision history for this message
Nick Østergaard (nickoe) wrote :

Scaling is not supported for step or iges models

Revision history for this message
AWa. (awa-wp) wrote :

So maybe at least warning about not supporting scaling for step export should be shown.
This can result as a really big consequences when you will make some housing with step model which isn't real model of your PCB.
In this project we had to redesign housing because PCB was bigger then step model.

AWa.

Revision history for this message
Seth Hillbrand (sethh) wrote :

We should be applying the scale transformation when STEP models are not scaled to 1.0

ShapeCustom::ScaleShape
    TopoDS_Shape ShapeCustom::ScaleShape(const TopoDS_Shape& S, const Standard_Real scale);

Changed in kicad:
status: Incomplete → Confirmed
importance: Undecided → Medium
milestone: none → 5.1.0
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

@Seth, it looks like the electrolytic capacitor model shown in supplied image was just scaled in the vertical axis. I'm guessing your solution would scale the model in all three axis which would not be correct in this case. Is there a function:

TopoDS_Shape ShapeCustom::ScaleShape(const TopoDS_Shape& S,
    const Standard_Real scale_x, const Standard_Real scale_y, const Standard_Real scale_z);

that we could use to scale each axis individually? Each axis can be scaled independently in Pcbnew.

Revision history for this message
Leandro Heck (leoheck) wrote :

Hi guys, I totally forgot about this issue.

Just tested it again using nightly version and it is an issue there too.

Application: kicad
Version: 6.0.0-rc1-unknown-d9d0051~84~ubuntu18.04.1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.58.0 OpenSSL/1.1.0g zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
Platform: Linux 4.15.0-33-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.65.1
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.58.0
    Compiler: GCC 7.3.0 with C++ ABI 1011

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_WXPYTHON=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Revision history for this message
Seth Hillbrand (sethh) wrote :

That's a good call, Wayne.

There's a more general transformation class:

gp_GTrsf transform;
gp_Mat scale_mat( x_scale, 0, 0, 0, y_scale, 0, 0, 0, z_scale );
transform.SetVectorialPart( scale_mat );
BRepBuilderAPI_GTransform geom_transformation( shape, transform, true );
TopoDS_Shape new_shape = geom_transformation.Shape();

Not as pretty, but it'll get the job done. Just recording here for my notes when I get around to digging into this (unless someone else gets there first :)

Revision history for this message
Andy Peters (devel-latke) wrote :

Just to add -- I noticed this, too. I exported a board to STEP, and some of the transformations were botched, and one part model was not included in the export at all.

Application: kicad
Version: (5.0.0-3-g5ebb6b6), release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.54.0 LibreSSL/2.0.20 zlib/1.2.11 nghttp2/1.24.0
Platform: Mac OS X (Darwin 17.7.0 x86_64), 64 bit, Little endian, wxMac
Build Info:
    wxWidgets: 3.0.4 (UTF-8,STL containers,compatible with 2.8)
    Boost: 1.67.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.51.0
    Compiler: Clang 8.0.0 with C++ ABI 1002

Build settings:
    USE_WX_GRAPHICS_CONTEXT=ON
    USE_WX_OVERLAY=ON
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_ACTION_MENU=OFF
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Revision history for this message
Nick Østergaard (nickoe) wrote :

I think this is not important for 5.1.0, I think we could postprone the milestone to v6

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

I'm fine with pushing this off to v6. I think we have enough issues to resolve for 5.1.

Changed in kicad:
milestone: 5.1.0 → 6.0.0-rc1
Seth Hillbrand (sethh)
tags: added: pcbnew starter
removed: step
Revision history for this message
Nick Østergaard (nickoe) wrote :

@Seth, I think it ia still useful to keep the related fileformat, in this case 'step', as a tag on this bug. I makes it easier to search for "step export" related issues.

Revision history for this message
Seth Hillbrand (sethh) wrote :

I removed it bc it is not one of the official tags. Maybe we add it or similar to the list?

Revision history for this message
Nick Østergaard (nickoe) wrote :

@Seth, it is now.

tags: added: step
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision a0ed40876d8944e9d344b1aab8d1c265dd6cf550
https://git.launchpad.net/kicad/patch/?id=a0ed40876d8944e9d344b1aab8d1c265dd6cf550

Changed in kicad:
status: Confirmed → Fix Committed
assignee: nobody → Simon Schubert (corecode)
Revision history for this message
Cirilo Bernardo (cirilo-bernardo) wrote : Re: [Bug 1784257] Re: Export board STEP file does not scale/shift parts

This is broken behavior; STEP must never scale parts or else there is
no guarantee that the output will be treated correctly by MCAD. We
should not risk the usability of the STEP file just because some
people are too lazy to create a suitable model. STEP is for MCAD
integration, not eye candy. People who do not have the discipline to
create the necessary models should not use the MCAD features.

On Fri, Aug 16, 2019 at 7:40 AM KiCad Janitor
<email address hidden> wrote:
>
> Fixed in revision a0ed40876d8944e9d344b1aab8d1c265dd6cf550
> https://git.launchpad.net/kicad/patch/?id=a0ed40876d8944e9d344b1aab8d1c265dd6cf550
>
> ** Changed in: kicad
> Status: Confirmed => Fix Committed
>
> ** Changed in: kicad
> Assignee: (unassigned) => Simon Schubert (corecode)
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1645150).
> https://bugs.launchpad.net/bugs/1784257
>
> Title:
> Export board STEP file does not scale/shift parts
>
> Status in KiCad:
> Fix Committed
>
> Bug description:
> STEP file does not represent my board.
> Components scale/shift not being applied.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/kicad/+bug/1784257/+subscriptions

Revision history for this message
Leandro Heck (leoheck) wrote :

Sure, Cirilo, you should not scale your models. This is your policy.

Some people might be lazy, but some might not know how to create 3d models (yet) and others might also don't have enough time for all the tasks like creating parts/schematics/footprints/layouts. Some can spend 6 months doing a simple PCB while others have to put something available in days including the enclosure in Freecad like I use to do. This issue guarantees flexibility instead of enforcing correctness.

> People who do not have the discipline to create the necessary models should not use the MCAD features.

This is not right, since people that do not know electronics can use Kicad to build PCBs as well.

Revision history for this message
Cirilo Bernardo (cirilo-bernardo) wrote :

The problem is that people who genuinely need the MCAD features now
have a problem with uncontrolled model dimensions. This would make the
software unacceptable for professional use; why should engineers who
put a lot of time into verifying their mechanical models are suitable
for use now be burdened with an extra step of making sure the models
are not being scaled ad hoc? At the very least we need a configuration
option for kicad to force all scaling parameters to unity, and on the
export side if the scale factors are within a certain tolerance then
the code which executes scaling should not even be invoked. Mechanical
correctness is absolutely crucial for people who do this for a living.
I didn't add the MCAD export features just because I thought it would
be fun.

Cirilo

On Sat, Aug 17, 2019 at 11:40 AM Leandro Heck
<email address hidden> wrote:
>
> Sure, Cirilo, you should not scale your models. This is your policy.
>
> Some people might be lazy, but some might not know how to create 3d
> models (yet) and others might also don't have enough time for all the
> tasks like creating parts/schematics/footprints/layouts. Some can spend
> 6 months doing a simple PCB while others have to put something available
> in days including the enclosure in Freecad like I use to do. This issue
> guarantees flexibility instead of enforcing correctness.
>
> > People who do not have the discipline to create the necessary models
> should not use the MCAD features.
>
> This is not right, since people that do not know electronics can use
> Kicad to build PCBs as well.
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1645150).
> https://bugs.launchpad.net/bugs/1784257
>
> Title:
> Export board STEP file does not scale/shift parts
>
> Status in KiCad:
> Fix Committed
>
> Bug description:
> STEP file does not represent my board.
> Components scale/shift not being applied.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/kicad/+bug/1784257/+subscriptions

Revision history for this message
Seth Hillbrand (sethh) wrote :

@Cirlio- Can you explain a bit more your concern here? Models default to 1.0 scale. I have not observed any issues with defaults in my testing. Did you see something that didn't work correctly?

Revision history for this message
Cirilo Bernardo (cirilo-bernardo) wrote :

The point from a mechanical engineering point of view is that there is
a possibility at all of accidentally changing the scaling. We need an
option to completely disable scaling, including not making the
OpenCascade calls to perform any scaling at all. It is not good enough
to tell people "you need to check and make sure you set it to 1.0" or
even for OpenCascade to perform a 1:1:1 scaling; if this happens then
it becomes far more (and unnecessarily) difficult to verify designs.
This is why when this issue was raised in the past I marked it "will
not fix" and provided an explanation. If electronics designers are
given a STEP model to work with and the mechanical people have
verified that it is a good model, it is essential that the model's
dimensions will not be distorted in any way by the ECAD software;
otherwise the mechanical designers can't trust what the electronic
designers give them without going through another unnecessary and
expensive process. This is why the IDFv3 exporter will not scale
things either. I added STEP output because IDF was too crude for my
needs. I'll be happy with this option to disable all scaling; at
least I'll know that my models are not in danger of being distorted. I
think this case of scaling STEP is an example of what non-experts
might think is a good idea, but works completely against what
professionals do. In the MCAD world if you want to make changes like
that, it needs to be controlled by a parameter table so that the
source of the variants is well known and can be checked again if
necessary. Even then, a parametrically generated model output will be
verified and no changes to dimensions allowed without going through a
vetting process. Neither Altium nor Cadence will *ever* scale a STEP
model for these same reasons.

On Sat, Aug 17, 2019 at 12:45 PM Seth Hillbrand
<email address hidden> wrote:
>
> @Cirlio- Can you explain a bit more your concern here? Models default
> to 1.0 scale. I have not observed any issues with defaults in my
> testing. Did you see something that didn't work correctly?
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1645150).
> https://bugs.launchpad.net/bugs/1784257
>
> Title:
> Export board STEP file does not scale/shift parts
>
> Status in KiCad:
> Fix Committed
>
> Bug description:
> STEP file does not represent my board.
> Components scale/shift not being applied.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/kicad/+bug/1784257/+subscriptions

Revision history for this message
Seth Hillbrand (sethh) wrote :

How about scaling disabled by default with a checkbox to enable a non-unity scale? When disabled, the routine to scale through OpenCascade is bypassed.

Revision history for this message
Cirilo Bernardo (cirilo-bernardo) wrote :

I'll be very happy with that, thank you. That should allow people who
require no scaling to use the software and people who want to scale
can do as they please.

Cirilo

On Sat, Aug 17, 2019 at 2:45 PM Seth Hillbrand
<email address hidden> wrote:
>
> How about scaling disabled by default with a checkbox to enable a non-
> unity scale? When disabled, the routine to scale through OpenCascade is
> bypassed.
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1645150).
> https://bugs.launchpad.net/bugs/1784257
>
> Title:
> Export board STEP file does not scale/shift parts
>
> Status in KiCad:
> Fix Committed
>
> Bug description:
> STEP file does not represent my board.
> Components scale/shift not being applied.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/kicad/+bug/1784257/+subscriptions

Revision history for this message
Arkadiusz Raj (arek-1) wrote :

Is KiCad targeting only professional users, so correctness shall be so essential? If yes, then Step scaling shall be removed along with scale/offset/rotate options of 3D model view. To ensure the 3D view will look exactly as any 3D export.

If kiCad want to support amateurs, who need to just export PCB in simple way to use it for enclosure design when essential is placement of mounting holes and overall size of components. Then scaling is OK. Some kind of shortcut in design flow that do not destroy anything.

I mean flexibility shall be in first place. If someone needs correctness I bed he or she will design their own 3D models. But for all of us it is essential to not be surprised by application behaviour. I will write again: solution shall ensure the 3D view will look exactly as 3D export.

Revision history for this message
Simon Schubert (corecode) wrote :

Then all scaling options for STEP files should be removed, not just in
the kicad2step output, but also in the footprint 3d viewer.

On 17/08/2019 00:41, Cirilo Bernardo wrote:
> This is broken behavior; STEP must never scale parts or else there is
> no guarantee that the output will be treated correctly by MCAD. We
> should not risk the usability of the STEP file just because some
> people are too lazy to create a suitable model. STEP is for MCAD
> integration, not eye candy. People who do not have the discipline to
> create the necessary models should not use the MCAD features.
>
> On Fri, Aug 16, 2019 at 7:40 AM KiCad Janitor
> <email address hidden> wrote:
>> Fixed in revision a0ed40876d8944e9d344b1aab8d1c265dd6cf550
>> https://git.launchpad.net/kicad/patch/?id=a0ed40876d8944e9d344b1aab8d1c265dd6cf550
>>
>> ** Changed in: kicad
>> Status: Confirmed => Fix Committed
>>
>> ** Changed in: kicad
>> Assignee: (unassigned) => Simon Schubert (corecode)
>>
>> --
>> You received this bug notification because you are subscribed to a
>> duplicate bug report (1645150).
>> https://bugs.launchpad.net/bugs/1784257
>>
>> Title:
>> Export board STEP file does not scale/shift parts
>>
>> Status in KiCad:
>> Fix Committed
>>
>> Bug description:
>> STEP file does not represent my board.
>> Components scale/shift not being applied.
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/kicad/+bug/1784257/+subscriptions

Revision history for this message
Arkadiusz Raj (arek-1) wrote :

I vote for solution Seth mentioned. I.e. flexibility.
Rationale: sometimes I need to quickly adopt existing footprint, but have no skills in FreeCAD etc so I prefer scaling of existing & similar models. Like making cylindrical capacitor a bit higher (I bet there will never a situation that library will have all possible 3d models).

And no, STEP is not for MCAD only. Now it is 3d printing era, STEP is used very widely.
Personally I am using Fusion 360 to create my models which later I am about to slice and print. And STEP export s great help in that.

Revision history for this message
jean-pierre charras (jp-charras) wrote :

What scale are be talking about?

Currently, the STEP export uses .step models to create the step file, as expected.
But if the 3D model is a vrml model, it is replaced (if exists) by its equivalent step file.
(I mean: a xxx.vrml is replaced by the corresponding xxx.step file).

If the scaling factor is set for the .step file, using it in step export is OK for me.
But if the scaling factor is set for the .vrml file, using it in the step export is a very serious bug.

Unfortunately, I am afraid this is currently the case.

Moreover, as Simon said, our 3D viewer should respect the step exporter option.
Especially, It needs an option to replace all vrml models by step models (using or not the step scale factor (not the vrml scale), like the step export) to show what is actually exported.

Revision history for this message
Cirilo Bernardo (cirilo-bernardo) wrote :
Download full text (6.8 KiB)

I guess there are a number of issues:

1. what the user sees in 3D view is what they expect from any export
2. when using VRML models for prettier images, if the VRML model is
scaled then the STEP is now also scaled
3. some people genuinely want to scale STEP models; this is something
that professionals *never* do and never want to happen but this is
also a feature which other users keep asking for every few months

#1 is incompatible with #3 unless we introduce what I believe is
unnecessary complexity -- a per-component option to scale or nor scale
the STEP model - this requires a file format change, but we must also
consider that the STEP model may have a different offset etc to the
VRML model.

I'm not fundamentally opposed to users having some feature which
professionals do not want, but the introduction of the feature must
not in any circumstance affect professional work.

In this particular case I also have concerns that we are also
encouraging people to have bad workflows. If people don't want to
spend time understanding what the MCAD features are for and what
constraints are applied in industry and why, why should we cater to
them and risk doing damage to people who are using kicad for work?
When the 3D viewer supported only VRML, the scaling allowed people to
resize parts for visual effect and this was understandable because it
was always difficult to produce a VRML model; in this case it also
didn't matter because no one uses VRML for mechanical design and
verification. When Mario and I created the new rendering system and I
added STEP support I deliberately did not scale STEP models because
this is absolutely forbidden in professional work. At the time I
thought people who just like to see VRML can use just VRML, and now
they also have the option to use STEP even though the model will be a
single ugly color, but people like me who need to work with STEP can
use only the STEP models and we don't care how ugly it might look on
screen. Now I guess some people want the VRML for nice looks but also
want STEP for mechanical purposes, but they have not taken the time to
learn to create STEP models (and probably not VRML models either) and
want to scale both VRML and STEP models. Do we support these whims and
allow people to do things to STEP models which are contrary to what
industry does or do we tell people "if you want to use this feature,
take your time to learn to use the tools"? What other code will we add
in the future to support users who don't care to learn to do things
properly?

For people who want both VRML and STEP, Maurice spent a lot of time
creating his StepUp tools which he has made freely available. The
tools can be used to create a VRML model which looks good and a
corresponding STEP model; both models can be generated so that a
single offset point places each model in the correct position and the
scaling of the kicad viewer is (1, 1, 1). With those tools it is now
very easy to create a model which requires no scaling (even if the
user actually creates that model by scaling an existing model in the
MCAD system). So we come back to the question: why do we want to
scale STEP models, which is something forbidden in prof...

Read more...

Revision history for this message
Cirilo Bernardo (cirilo-bernardo) wrote :

I understand you may want STEP for 3D printing or even to check that
your design of a case will be OK for the board you will be making, but
scaling STEP is really something not done in industry and for very
good reason. Take time to have a look at Maurice's StepUp tools and
learn to use them. Then if you want to scale a cylinder or a box you
can do it easily and you can be happy knowing that you have the
correct sizes and will not accidentally change them.

On Sat, Aug 17, 2019 at 8:15 PM Arkadiusz Raj <email address hidden> wrote:
>
> I vote for solution Seth mentioned. I.e. flexibility.
> Rationale: sometimes I need to quickly adopt existing footprint, but have no skills in FreeCAD etc so I prefer scaling of existing & similar models. Like making cylindrical capacitor a bit higher (I bet there will never a situation that library will have all possible 3d models).
>
> And no, STEP is not for MCAD only. Now it is 3d printing era, STEP is used very widely.
> Personally I am using Fusion 360 to create my models which later I am about to slice and print. And STEP export s great help in that.
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1645150).
> https://bugs.launchpad.net/bugs/1784257
>
> Title:
> Export board STEP file does not scale/shift parts
>
> Status in KiCad:
> Fix Committed
>
> Bug description:
> STEP file does not represent my board.
> Components scale/shift not being applied.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/kicad/+bug/1784257/+subscriptions

Revision history for this message
Simon Schubert (corecode) wrote :
Download full text (7.4 KiB)

The reason why I implemented this in the first place was a STEP model
with bad scale, so I guess they do exist.

I understand your reasoning and support removing any type of scaler.
Instead, maybe we should have a way to easily (from the footprint
editor?) generate a correctly dimensioned STEP model from a base
description + size parameters.

On 18/08/2019 01:19, Cirilo Bernardo wrote:
> I guess there are a number of issues:
>
> 1. what the user sees in 3D view is what they expect from any export
> 2. when using VRML models for prettier images, if the VRML model is
> scaled then the STEP is now also scaled
> 3. some people genuinely want to scale STEP models; this is something
> that professionals *never* do and never want to happen but this is
> also a feature which other users keep asking for every few months
>
> #1 is incompatible with #3 unless we introduce what I believe is
> unnecessary complexity -- a per-component option to scale or nor scale
> the STEP model - this requires a file format change, but we must also
> consider that the STEP model may have a different offset etc to the
> VRML model.
>
> I'm not fundamentally opposed to users having some feature which
> professionals do not want, but the introduction of the feature must
> not in any circumstance affect professional work.
>
> In this particular case I also have concerns that we are also
> encouraging people to have bad workflows. If people don't want to
> spend time understanding what the MCAD features are for and what
> constraints are applied in industry and why, why should we cater to
> them and risk doing damage to people who are using kicad for work?
> When the 3D viewer supported only VRML, the scaling allowed people to
> resize parts for visual effect and this was understandable because it
> was always difficult to produce a VRML model; in this case it also
> didn't matter because no one uses VRML for mechanical design and
> verification. When Mario and I created the new rendering system and I
> added STEP support I deliberately did not scale STEP models because
> this is absolutely forbidden in professional work. At the time I
> thought people who just like to see VRML can use just VRML, and now
> they also have the option to use STEP even though the model will be a
> single ugly color, but people like me who need to work with STEP can
> use only the STEP models and we don't care how ugly it might look on
> screen. Now I guess some people want the VRML for nice looks but also
> want STEP for mechanical purposes, but they have not taken the time to
> learn to create STEP models (and probably not VRML models either) and
> want to scale both VRML and STEP models. Do we support these whims and
> allow people to do things to STEP models which are contrary to what
> industry does or do we tell people "if you want to use this feature,
> take your time to learn to use the tools"? What other code will we add
> in the future to support users who don't care to learn to do things
> properly?
>
> For people who want both VRML and STEP, Maurice spent a lot of time
> creating his StepUp tools which he has made freely available. The
> tools can be used to create a VRML model whi...

Read more...

Revision history for this message
Nick Østergaard (nickoe) wrote :

@corecode, can't you just use freecad or any other MCAD for this?

Revision history for this message
jean-pierre charras (jp-charras) wrote :

If the STEP model has a bad scale, it is the wrong model.
This is for me similar to use a wrong footprint, and to expect to have a scale factor to modify its size (Yes, yes, we have a request for that...).

Scale is needed only by vrml models, because vrml has no defined unit.

Revision history for this message
Cirilo Bernardo (cirilo-bernardo) wrote :
Download full text (8.8 KiB)

I think it would be acceptable if we had an external tool which can
resize/reorient/reposition a STEP model. This would not conflict with
the requirements that the ECAD does not modify the STEP files since
someone has to run this tool independently and it will not affect any
other users. It will also be of general use to people who want to use
a STEP model found on the internet who need to reorient or reposition
the model. I suspect the StepUp tools already have that capacity, in
which case I would think we should direct more people to that tool and
maybe build up more tutorials on how to solve specific problems.

Cirilo

On Sun, Aug 18, 2019 at 6:45 PM Simon Schubert <2@0x2c.org> wrote:
>
> The reason why I implemented this in the first place was a STEP model
> with bad scale, so I guess they do exist.
>
> I understand your reasoning and support removing any type of scaler.
> Instead, maybe we should have a way to easily (from the footprint
> editor?) generate a correctly dimensioned STEP model from a base
> description + size parameters.
>
>
> On 18/08/2019 01:19, Cirilo Bernardo wrote:
> > I guess there are a number of issues:
> >
> > 1. what the user sees in 3D view is what they expect from any export
> > 2. when using VRML models for prettier images, if the VRML model is
> > scaled then the STEP is now also scaled
> > 3. some people genuinely want to scale STEP models; this is something
> > that professionals *never* do and never want to happen but this is
> > also a feature which other users keep asking for every few months
> >
> > #1 is incompatible with #3 unless we introduce what I believe is
> > unnecessary complexity -- a per-component option to scale or nor scale
> > the STEP model - this requires a file format change, but we must also
> > consider that the STEP model may have a different offset etc to the
> > VRML model.
> >
> > I'm not fundamentally opposed to users having some feature which
> > professionals do not want, but the introduction of the feature must
> > not in any circumstance affect professional work.
> >
> > In this particular case I also have concerns that we are also
> > encouraging people to have bad workflows. If people don't want to
> > spend time understanding what the MCAD features are for and what
> > constraints are applied in industry and why, why should we cater to
> > them and risk doing damage to people who are using kicad for work?
> > When the 3D viewer supported only VRML, the scaling allowed people to
> > resize parts for visual effect and this was understandable because it
> > was always difficult to produce a VRML model; in this case it also
> > didn't matter because no one uses VRML for mechanical design and
> > verification. When Mario and I created the new rendering system and I
> > added STEP support I deliberately did not scale STEP models because
> > this is absolutely forbidden in professional work. At the time I
> > thought people who just like to see VRML can use just VRML, and now
> > they also have the option to use STEP even though the model will be a
> > single ugly color, but people like me who need to work with STEP can
> > use only the STEP models and we don't care how ugly it...

Read more...

Revision history for this message
Michael Kavanagh (michaelkavanagh) wrote :

Looks like this was cherrypicked onto 5.1

Changed in kicad:
milestone: 6.0.0-rc1 → 5.1.5
Revision history for this message
Michael Kavanagh (michaelkavanagh) wrote :

I'm setting this back to 'In Progress' as I cannot find a commit that addresses the comments in the discussion above. Please set back to 'Fix Committed' if this was indeed resolved.

For what it's worth, I agree with Cirilo and JP, "If the STEP model has a bad scale, it is the wrong model." [#31]. I don't think KiCad should allow (i.e. encourage) people to "fix" bad models by applying scaling. This should be done in MCAD outside of KiCad, and the STEP model associated to a footprint (and therefore exported by KiCad) should represent absolute reality, not a butchered version of it. Should we also allow arbitrary scaling of footprints, Gerber exports, drill holes etc.?

And yes, it has long been stated that KiCad is aimed squarely at the professional userbase.

Changed in kicad:
status: Fix Committed → In Progress
Revision history for this message
Simon Schubert (corecode) wrote :

Better open a new issue, or rename this one, because now STEP export
does scale parts.

On 31/08/2019 16:24, Michael Kavanagh wrote:
> I'm setting this back to 'In Progress' as I cannot find a commit that
> addresses the comments in the discussion above. Please set back to 'Fix
> Committed' if this was indeed resolved.
>
> For what it's worth, I agree with Cirilo and JP, "If the STEP model has
> a bad scale, it is the wrong model." [#31]. I don't think KiCad should
> allow (i.e. encourage) people to "fix" bad models by applying scaling.
> This should be done in MCAD outside of KiCad, and the STEP model
> associated to a footprint (and therefore exported by KiCad) should
> represent absolute reality, not a butchered version of it. Should we
> also allow arbitrary scaling of footprints, Gerber exports, drill holes
> etc.?
>
> And yes, it has long been stated that KiCad is aimed squarely at the
> professional userbase.
>
> ** Changed in: kicad
> Status: Fix Committed => In Progress
>

Revision history for this message
Ian McInerney (imcinerney) wrote :

What was the decision on keeping this implementation of the scaling of the STEP models? Will JP's comment about the scaling factor source in #26 be addressed (My quick test of the 5.1 branch shows that it still uses the VRML scaling as the source of the scaling)?

It seems that this should be pulled out of 5.1.5 and live in Master until more work is done on it to address the comments so that we don't introduce regressions in the STEP export for 5.1.5 (such as scaling an already correct STEP model due to a scaling on the VRML model).

Revision history for this message
Seth Hillbrand (sethh) wrote :

The immediate plan is to disable scaling the VRML-matched step file and bypass the scale code for models that are at 0,0,0 scaling.

v6 will either add the checkbox option or some hiding variant.

I'll revert the patch in 5.1.5 and we'll push addressing this into v6

Changed in kicad:
assignee: Simon Schubert (corecode) → Seth Hillbrand (sethh)
milestone: 5.1.5 → 6.0.0-rc1
Revision history for this message
Ian McInerney (imcinerney) wrote :

@Seth, did you revert this from 5.1.5 yet?

Revision history for this message
Seth Hillbrand (sethh) wrote :

Thanks for the reminder. Done.

Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

KiCad bug tracker has moved to Gitlab. This report is now available here: https://gitlab.com/kicad/code/kicad/-/issues/1781

Changed in kicad:
status: In Progress → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.