View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000909 | Sketcher | Bug | public | 2012-12-07 20:23 | 2017-09-27 12:22 |
Reporter | mirage335 | Assigned To | logari81 | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Fixed in Version | 0.15 | ||||
Summary | 0000909: Disappearing sketches due to tangency autoconstraint | ||||
Description | Some fully constrained objects disappear immediately upon being drawn in a FreeCAD sketch. Circle with center point 0,0 and radius 50 fails. Circle with center point 0,0 and radius 10 works. Tested against FreeCAD_sf_master commit 3987ec36b529e877ec80fd69ebab877c8a8ba2ea . Steps to reproduce: Open FreeCAD. Create new document and XY plane sketch. Enable grid snap, and auto constraints. Draw circle, centered at (0,0) with radius 50, using only grid snaps. Circle disappears instantly upon creation. | ||||
Tags | No tags attached. | ||||
FreeCAD Information | |||||
|
Can't reproduce this. |
|
OS: Funtoo Gfx: Intel. No direct rendering. What distribution and graphics hardware are you using? |
|
I confirm this on FreeCAD compiled today. But for me, radii at which the circle disappears are: 10, 30, 40, 50, 60. R20 works. I have not tested further dimensions. Even though the circle disappears, the point constraint is still visible, and the solver messages box indicates a solved sketch. The green and red axes and the grid disappear as well. Using box selection then pressing delete empties the sketch, only the root point stays visible. After emptying the sketch, the grid and axes do not come back. But starting the circle tool again and drawing a new circle, the grid snap is still active even if hidden. As soon as the second click is made, axes and grid reappear and all seems to be back to normal. |
|
Some more info. This may be related to a refresh bug I just noticed. When starting a new sketch, the refresh icon in the toolbar activates. If I click on it (or do Ctrl+R) the grid disappears. Checking "Grid snap" in the taskpanel makes the grid visible again. But drawing a circle with grid snap on still makes it disappear. OS: Ubuntu 12.04.1 LTS Platform: 64-bit Version: 0.13.1757 (Git) Branch: master Hash: 22cfda67defb281ccc707ed5c0b9e56584ec4982 Python version: 2.7.3 Qt version: 4.8.1 Coin version: 3.1.3 SoQt version: 1.5.0 OCC version: 6.5.0 graphics: Nvidia GeForce GTX 650 Ti with nvidia-current 304.64 driver |
2012-12-12 01:11
|
|
|
It seems related to tangent constraint... When you create a circle with center at (0,0) and click your radius point not exactly on the axis line, but slightly off, so you don't prelight the axis, all goes fine. If you click exactly on the axis, a tangent constraint is added and the circle is invalid. I guess, because of the tangent constraint, the radius of the circle is zero... |
|
Can reproduce, but IMO not actuall a bug. The auto constraint got showed before click and the resulting has then a zero diameter (as requested by the constraints). So just don't click on the axis and set later a diameter constraint! One can hope for a super inteligent auto constraint, but thats a different story. If no feedback I will close this issue... |
|
ok, this is because I enabled autoconstraints with the root axes recently. Actually I think the tangency autoconstraint kicks in to aggressively in general. We have to fix this but I don't think the severity of this bug is so high. |
|
Ok then, I leafe that open for later use. |
|
You could consider adding an internal check: circle tool should create a circle; if constraints require a zero radius the circle becomes a point, and this is not what circle tool is supposed to do. You can then disregard conflicting constraint and create geometry unconstrained. SolidWorks throws an exception in similar cases (zero length line and similar) with pop-up notification stating that adding auto constrains would produce invalid geometry and will not be added. When you confirm it, geometry (circle or whatever) is created in the position of the click without the conflicting constraint. |
|
The changes on DrawSketchHandler.cpp of the attached change set fix this issue. |
FreeCAD: master 501c40f0 2014-11-01 15:12:18 Abdullah Tahiri Committer: wmayer Details Diff |
Sketcher: Ellipse implementation enhancements - ArcOfEllipse enhancement: Tangency ArcOfEllipse to ArcOfEllipse or ArcOfCircle by selecting end/starting points... - Minor bug corrections (Thanks DeepSOIC) - ExposeInternalGeometry python command - DeleteUnusedInternalGeometry python command - On deletion of an Ellipse/ArcOfEllipse all further unconstrained internal geometry is also deleted. - This cleans up the code by eliminating code repetition in the creation methods. - Major bug fix for autoconstraints for ellipse and arc of ellipse creation (for both creation methods) - Major bug fix Start and Endpoint constraints of an arc of ellipse where not taking into account that Sketcher arcs are always CCW, so they have to be exchanged if we convert a CW arc into a CCW arc. Sketcher: General bug fix: Tangency wrongly suggested What? ===== - On creation of a shape autoconstraints are suggested. - Tangent autoconstraint was suggested even with lines perpendicular to the tangency direction Reproduce ========= - Make a circle on the origin and move the mouse along the X axis, it will suggest a tangency that is impossible - Click on the axis and no circle will be created Solution ======== - The SeekConstraint now can use the parameter dir to give a direction that is substantially perpendicular to the expected tangency, so that if an object having a direction (a line) is hit, a tangency will not be suggested if within around 6 degrees of being parallel. - Additionally, if such a line is an X,Y axis of the sketch, tangency will only be suggested if the direction is within 6 degrees of being perpendicular (i.e. it is almost tangent already while sketching). - This difference is due to the fact that an X or Y axis can not "move" to meet the object under creation, whereas a line can. |
Affected Issues 0000909 |
|
mod - src/Mod/Sketcher/App/Sketch.cpp | Diff File | ||
mod - src/Mod/Sketcher/App/SketchObject.cpp | Diff File | ||
mod - src/Mod/Sketcher/App/SketchObject.h | Diff File | ||
mod - src/Mod/Sketcher/App/SketchObjectPy.xml | Diff File | ||
mod - src/Mod/Sketcher/App/SketchObjectPyImp.cpp | Diff File | ||
mod - src/Mod/Sketcher/Gui/CMakeLists.txt | Diff File | ||
mod - src/Mod/Sketcher/Gui/CommandConstraints.cpp | Diff File | ||
add - src/Mod/Sketcher/Gui/CommandConstraints.h | Diff File | ||
mod - src/Mod/Sketcher/Gui/CommandCreateGeo.cpp | Diff File | ||
mod - src/Mod/Sketcher/Gui/DrawSketchHandler.cpp | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-12-07 20:23 | mirage335 | New Issue | |
2012-12-08 14:06 | wmayer | Note Added: 0002629 | |
2012-12-10 21:37 | mirage335 | Note Added: 0002633 | |
2012-12-12 01:02 | normandc | Note Added: 0002635 | |
2012-12-12 01:10 | normandc | Note Added: 0002636 | |
2012-12-12 01:11 | normandc | File Added: disappearing-sketch.fcstd | |
2012-12-12 01:14 | normandc | Note Edited: 0002636 | |
2012-12-18 14:46 | yorik | Note Added: 0002660 | |
2012-12-20 18:47 |
|
Note Added: 0002686 | |
2012-12-20 18:47 |
|
Status | new => feedback |
2012-12-20 20:00 | logari81 | Note Added: 0002697 | |
2012-12-20 20:01 | logari81 | Severity | major => minor |
2012-12-20 20:01 | logari81 | Status | feedback => acknowledged |
2012-12-20 20:06 |
|
Note Added: 0002699 | |
2012-12-20 20:07 | logari81 | Summary | Disappearing Sketches => Disappearing sketches due to tangency autoconstraint |
2012-12-20 20:08 | logari81 | Status | acknowledged => assigned |
2012-12-20 20:08 | logari81 | Assigned To | => logari81 |
2012-12-20 22:06 | logari81 | Project | FreeCAD => Sketcher |
2013-01-02 22:22 | swxer | Note Added: 0002786 | |
2014-07-23 12:51 | wmayer | Relationship added | has duplicate 0001608 |
2015-01-12 14:22 | wmayer | Changeset attached | => FreeCAD Master master 501c40f0 |
2015-01-12 14:23 | wmayer | Note Added: 0005634 | |
2015-01-12 14:23 | wmayer | Status | assigned => closed |
2015-01-12 14:24 | wmayer | Resolution | open => fixed |
2015-01-12 14:24 | wmayer | Fixed in Version | => 0.15 |
2017-09-27 12:22 | Kunda1 | Relationship added | related to 0003154 |