View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002659 | Draft | Feature | public | 2016-08-04 18:18 | 2016-08-15 13:49 |
| Reporter | yorik | Assigned To | ezzieyguywuf | ||
| Priority | normal | Severity | minor | Reproducibility | have not tried |
| Status | closed | Resolution | fixed | ||
| Platform | PC | OS | Debian | OS Version | Testing 64bit |
| Summary | 0002659: Allow to make sketch from draft object that is not in the XY plane | ||||
| Description | 1) Give the created sketch the same placement as the Draft object 2) When adding geometry to the sketch, it must be first converted to the sketch coordinates (apply inverse placement) | ||||
| Tags | No tags attached. | ||||
| FreeCAD Information | |||||
|
|
I will work on this bug. I figured out the "Placement" bit, still figuring out the Geometry piece. Since the user can select multiple Draft objects to convert to sketch, each of which may be on different working planes, I propose that if Draft objects with multiple working planes are selected, a dialog pops up asking the user if they wish to create multiple sketches or to abort the operation. Alternatively, I could just have it make multiple sketches silently. |
|
|
Great! I'll upgrade you to "developer" so you can attribute bugs to yourself. If you wish, take this one for you! ;) I suppose you already figured out where this all happens, Draft.py in the makeSketch() function. For the geometry, once you have the placement, it's just a matter of applying its inverse to all the geometry that needs to be added to the sketch, for ex: - you have an edge - you have the placement, you take its inverse (Placement.inverse) - you add to the sketch not the edge itself, but a copy of the edge whose placement is multiplied by the inverse above. That will have the effect of expressing the same edge in the coordinates system of the placement. About the problem you mention, indeed I thought about hat problem too... There is also the problem that the tool can convert not only Draft objects to sketches, but any part object. And for some of them you might no be able to get a placement (for example a single line, "floating" in space, what is its normal?). I think I would go the incremental way, that is, do the placement/geometry transformation above only if we are in a clear case, that is, we have one 2D object (isDervivedFrom("Part::Part2DObject"), which is the case of all Draft objects, or many objects that are coplanar. For all other cases, I wouldn't bother much and leave things as they are for now... |
|
|
Yes, I agree with you on the incremental approach. I'll work on doing as you've outlined. I understand completely what you're saying, that shouldn't be too hard to code, but I want to spend some time understanding what's going on under the hood. It would seem to me that I'd want to apply a transformation to the Curve object before adding it to the sketch, so I want to understand how this Placement thing works and why it does what it does. Thanks for upgrading me to Developer I feel so fancy! |
|
|
I can confirm that this is an issue. |
|
|
@Yorik: using your suggesting I was able to solve the bug for the case of Rectangle and Circle, however for Arcs and Lines it is doing some funny stuff. I'm going to spend some time diving in a bit deeper, but if you have any suggestions I'm open to hearing them. |
|
|
This issue has been fixed with pull request[247](https://github.com/FreeCAD/FreeCAD/pull/247) |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2016-08-04 18:18 | yorik | New Issue | |
| 2016-08-04 18:18 | yorik | Status | new => assigned |
| 2016-08-04 18:18 | yorik | Assigned To | => yorik |
| 2016-08-04 18:18 | yorik | Project | FreeCAD => Draft |
| 2016-08-05 12:27 | ezzieyguywuf | Note Added: 0007248 | |
| 2016-08-05 13:25 | yorik | Note Added: 0007250 | |
| 2016-08-05 14:35 | ezzieyguywuf | Note Added: 0007251 | |
| 2016-08-05 14:36 | ezzieyguywuf | Assigned To | yorik => ezzieyguywuf |
| 2016-08-05 14:36 | ezzieyguywuf | Note Added: 0007252 | |
| 2016-08-05 14:36 | ezzieyguywuf | Status | assigned => confirmed |
| 2016-08-05 20:40 | ezzieyguywuf | Note Added: 0007253 | |
| 2016-08-15 13:49 | ezzieyguywuf | Note Added: 0007277 | |
| 2016-08-15 13:49 | ezzieyguywuf | Status | confirmed => closed |
| 2016-08-15 13:49 | ezzieyguywuf | Resolution | open => fixed |
FreeCAD