View Issue Details

IDProjectCategoryView StatusLast Update
0000319FreeCADFeaturepublic2011-05-17 07:16
Reporterpperisin Assigned ToJriegel 
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionwon't fix 
Product Versiontrunk 
Summary0000319: Allow scale on Parts
DescriptionAllow scaling of parts in all three axis independently (X, Y and Z)
TagsNo tags attached.
FreeCAD Information

Activities

wmayer

2011-03-28 07:33

administrator   ~0000749

Scaling of shapes is problematic and IMO this not the proper way how cad should work. It works OK as long as an object is fully convex but leads to self-intersections and thus breaks a model if there are some non-convex areas and the scaling factor is too high.

So, it's up to Jürgen to decide this...

Jriegel

2011-04-02 16:20

administrator   ~0000765

Im on Werners side, its not a proper CAD operation. CAD lives from its exactness. We put a lot effort into a constraint sketcher and our parametric objects to get exactness from the start on. Scaling is on of this operations which destroy exactness.

No problem to allow it on the python level, but not in as a feature...

Sorry

wmayer

2011-04-02 17:21

administrator   ~0000767

Scaling is possible on python side by using the method transformGeometry(). As input you give a matrix which contains the scaling you need.

pperisin

2011-04-03 05:12

reporter   ~0000770

So How can I use it from python. Can you give me an example (Let's say I fused box and sphere - how to resize them from console)

I know that this is not proper CAD function, but sometimes I need it since I develop electronic products, and sometimes I have component that has STEP file, but it needs to be scaled in order to fit my requirements.

Jriegel

2011-04-03 05:59

administrator   ~0000771

Thats what I mean. The STEP part is supported by a manufacturere to
allow you design with the right dimension and shape. If you scale it you have
something undefined. Sure something you can look at, but not the intended
purpose. Or think on your circuit board, if you scale it its screwed, cause
no electronic part will fit the holes any more.

So still, if you use scale you leave design an enter CGI...

wmayer

2011-04-03 07:05

administrator   ~0000772

from FreeCAD import Base
import Part

box=Part.makeBox(10,10,10)
cyl=Part.makeCylinder(2,10)
fuse=box.fuse(cyl)
Part.show(fuse)

# do uniform scaling
mat=Base.Matrix()
mat.A11=5.0
mat.A22=5.0
mat.A33=5.0
scaled=fuse.transformGeometry(mat)
Part.show(scaled)

The diagonal of the matrix holds the scaling information and center of the scaling is the origin. If you e.g. need to scale from another center you have to set A14, A24 and A34 accordingly.

If you need more information just have a look on so called "affine transformations".

pperisin

2011-04-06 12:25

reporter   ~0000773

Thank you werner. I did not test it yet but I will later.

https://tracker.freecad.org/view_user_page.php?id=104: you are correct, but sometimes i can not find STEP model for component that I need. Sometimes I need component that is (let's say) 10x5mm, and has two rows of pins on 10mm side.

I can not find STEP model for this kind of component, but I have one that is 20x10mm, and has two rows of pins on 20mm side (let's say they have same number of pins).

then It is good to have this ability, since I can just scale the part I have, and get STEP file. It is true it will not match 100% to the real component, but it is still something, and mostly I do not need that big precision.

Regards,
Petar Perisin

Jriegel

2011-05-17 07:16

administrator   ~0000824

As seen in discussion, don't like the idea..

Issue History

Date Modified Username Field Change
2011-03-27 09:24 pperisin New Issue
2011-03-28 07:33 wmayer Note Added: 0000749
2011-03-28 07:33 wmayer Assigned To => Jriegel
2011-03-28 07:33 wmayer Status new => assigned
2011-04-02 16:20 Jriegel Note Added: 0000765
2011-04-02 16:20 Jriegel Status assigned => feedback
2011-04-02 17:21 wmayer Note Added: 0000767
2011-04-03 05:12 pperisin Note Added: 0000770
2011-04-03 05:59 Jriegel Note Added: 0000771
2011-04-03 07:05 wmayer Note Added: 0000772
2011-04-06 12:25 pperisin Note Added: 0000773
2011-05-17 07:16 Jriegel Note Added: 0000824
2011-05-17 07:16 Jriegel Status feedback => closed
2011-05-17 07:16 Jriegel Resolution open => won't fix