View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000690 | Sketcher | Feature | public | 2012-05-01 20:20 | 2015-09-10 13:18 |
Reporter | mathrick | Assigned To | abdullah | ||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | closed | Resolution | fixed | ||
Product Version | 0.13 | ||||
Fixed in Version | 0.16 | ||||
Summary | 0000690: Add ability to clone and operate on sketch elements as objects | ||||
Description | It would be extremely useful if sketch elements could be copied/pasted, much like it's possible in vector drawing apps such as Inkscape. The use-case are repeating similar elements, such as several holes of the same shape. Right now, if I want to punch 15 identical holes in a solid, I can do it in one of two suboptimal ways: 1. Make a solid 2. Make a mapped sketch1 on face 3. Create the hole shape, solve it 4. Pocket -> pocket1 5. Copy sketch1 -> sketch2 6. Map sketch2 onto pocket1, position it 7. Pocket -> pocket2 ... <repeat 13 times> I now end up with 15 in-between solids and sketches and 15 distinct pocket operations, each with its own parameters. And if I need to update the hole shape, I have to redo the whole thing. OR 1. Make a solid 2. Make a mapped sketch1 on face 3. Create the hole shape, solve it ... <repeat 14 times> 18. Pocket it I now have one resulting solid, and can punch the holes with just one operation, but if the shape is complex, I just redid my work 15 times, and if I ever change it, I need to update all 15 holes individually. By way of comparison, to do the same in Inkscape (aside from the fact it won't be constraint-solved, obviously), I'd do the following: 1. Draw the shape 2. Clone it 15 times Now I have 15 linked copies of the original shape, which get updated if I change the original (just like solids are linked to their sketches in FC). Being able to do the same in FC would be extremely helpful. However, even without the link relationship, just being able to copy things into the same sketch as plain old lines and arcs would be awesome, because it already makes scenario 0000002 15x faster and easier. | ||||
Tags | No tags attached. | ||||
FreeCAD Information | |||||
|
The Draft module actually already has a clone feature. From the python console you use it like this (replace "myObject" by the actual name of your object) import Draft base = App.ActiveDocument.myObject Draft.clone(base) See if this is what you want, then I can make a GUI button for it. |
|
BTW the Draft workbench also has an array tool, that might be even more interesting for duplicating 15 objects regularly... |
|
Right, but how do I designate "objects" within a sketch? If I'm not mistaken, the smallest independent object would be a sketch, and I want to clone geometry within a sketch. |
|
Ok, then indeed it's something different... |
|
I tried playing around with the Python console, but I'm stumped on trying to access the currently selected geometry in the sketch view. Is there python-side plumbing to allow that, or is it missing? |
|
Gui.Selection.getSelectionEx() will give you which object and which component of it is selected. Indeed, the easiest way to obtain what you need is probably to make a little macro... If you want to try that, we can help, but it's probably better to do that on the forums, since more people will be able to help... |
|
This would be a useful function, and I would like to add the following suggestions: + Clone vs Copy - with Cloning, the clones would have a standard, relative, distance between them (which could be altered, later on, if needed, yet remaining equal/relative to all) - if you change the dimension of one of the clones, then the dimensions of all clones would change, too. + The Cloning could be "linear" or "circular" (radial?) I will attach two picture, showing what I mean... By the way, Libre Office Draw has such feature. To check it out, you can create an object, choose it, and press Shift+F3 . |
2013-04-12 16:16
|
|
2013-04-12 16:17
|
|
|
Copy/Clone: commit 97d551b5517335e657bb3ad637a1eebab4706115 It also introduces linear array in Sketcher. |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-05-01 20:20 | mathrick | New Issue | |
2012-05-02 11:49 | yorik | Note Added: 0001995 | |
2012-05-02 11:50 | yorik | Note Added: 0001996 | |
2012-05-02 15:11 | mathrick | Note Added: 0001998 | |
2012-05-02 15:34 | yorik | Note Added: 0001999 | |
2012-05-02 16:55 | mathrick | Note Added: 0002000 | |
2012-05-02 18:23 | yorik | Note Added: 0002001 | |
2012-05-05 17:50 | yorik | Project | FreeCAD => Sketcher |
2013-04-12 16:02 | nikospap | Note Added: 0003061 | |
2013-04-12 16:16 | nikospap | File Added: linear.png | |
2013-04-12 16:17 | nikospap | File Added: radial.png | |
2015-09-10 13:16 | abdullah | Assigned To | => abdullah |
2015-09-10 13:16 | abdullah | Status | new => assigned |
2015-09-10 13:18 | abdullah | Note Added: 0006381 | |
2015-09-10 13:18 | abdullah | Status | assigned => resolved |
2015-09-10 13:18 | abdullah | Fixed in Version | => 0.16 |
2015-09-10 13:18 | abdullah | Resolution | open => fixed |
2015-09-10 13:18 | abdullah | Status | resolved => closed |