View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000319 | FreeCAD | Feature | public | 2011-03-27 09:24 | 2011-05-17 07:16 |
| Reporter | pperisin | Assigned To | |||
| Priority | normal | Severity | feature | Reproducibility | N/A |
| Status | closed | Resolution | won't fix | ||
| Product Version | trunk | ||||
| Summary | 0000319: Allow scale on Parts | ||||
| Description | Allow scaling of parts in all three axis independently (X, Y and Z) | ||||
| Tags | No tags attached. | ||||
| FreeCAD Information | |||||
|
|
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... |
|
|
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 |
|
|
Scaling is possible on python side by using the method transformGeometry(). As input you give a matrix which contains the scaling you need. |
|
|
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. |
|
|
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... |
|
|
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". |
|
|
Thank you werner. I did not test it yet but I will later. 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 |
|
|
As seen in discussion, don't like the idea.. |
| 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 |
|
Note Added: 0000765 | |
| 2011-04-02 16:20 |
|
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 |
|
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 |
|
Note Added: 0000824 | |
| 2011-05-17 07:16 |
|
Status | feedback => closed |
| 2011-05-17 07:16 |
|
Resolution | open => won't fix |
FreeCAD