View Issue Details

IDProjectCategoryView StatusLast Update
0001886SketcherBugpublic2015-02-17 12:49
Reportercleahcim Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
PlatformMicrosoftOSWindowsOS Version8
Product Version0.14 
Fixed in Version0.15 
Summary0001886: Geometry rotation in Sketcher
DescriptionIt seems that the arc is being doubly rotated. Once around the Base and an additional time around the arc.Center.
Steps To ReproduceTry running the script below. It should result in several lobes around the point, but turns into a mess of inception-rotated arcs. It works with lines.
CODE: SELECT ALL
if(App.activeDocument() == None): App.newDocument()

f = App.activeDocument().addObject("Sketcher::SketchObject","Sketch")
ctr = App.Vector(25, 25, 0)
p = App.Placement(App.Vector(25,25,0), App.Vector(0,0,1), 45)
f.addGeometry(Part.Point(ctr))
a = Part.ArcOfCircle(Part.Circle(App.Vector(25.292349,13.653396,0),App.Vector(0,0,1),14.931091),-2.531933,-0.416702)
l = Part.Line(App.Vector(22,17,0), App.Vector(27,17,0))
f.addGeometry([a,l])

# Rotate the Geometries
for i in range(7):
   a.rotate(p)
   l.rotate(p)
   f.addGeometry(a) # rotating the arc causes weird side affects
   f.addGeometry(l) # all is good here

App.ActiveDocument.recompute()
Additional InformationThread started: http://forum.freecadweb.org/viewtopic.php?f=22&t=9145

OS: Windows
Word size: 64-bit
Version: 0.14.3700 (Git)
Branch: releases/FreeCAD-0-14
Hash: 32f5aae0a64333ec8d5d160dbc46e690510c8fe1
Python version: 2.7.6
Qt version: 4.8.5
Coin version: 4.0.0a
SoQt version: 1.6.0a
OCC version: 6.6.0
Tagssketcher
FreeCAD Information

Related Changesets

FreeCAD: master 0767cd35

2015-01-24 22:24:06

DeepSOIC


Committer: wmayer Details Diff
Sketcher: fix reversed geometry and rotated arcs

Fixes a bug where an arc, ellipse, or arc-of-ellipse, being reversed in
XY plane, behaved badly in sketcher (see forum thread "Sketch: how to
handle reversed external arcs?"
http://forum.freecadweb.org/viewtopic.php?f=10&t=9130 ).
Also fixes a problem with rotated arcs (see forum thread "Rotating Arc
in Sketcher"
http://forum.freecadweb.org/viewtopic.php?f=22&t=9145#p74262 ).

This is done by adding an emulation flag to a few methods in
Part::GeomXXX, which makes the shape to pretend being non-reversed
(CCW). This causes endpoints of reversed arcs of circles lineked as
external geometry to swap, causing broken sketches sometimes.
Affected Issues
0001886
mod - src/Mod/Part/App/Geometry.cpp Diff File
mod - src/Mod/Part/App/Geometry.h Diff File
mod - src/Mod/Sketcher/App/Sketch.cpp Diff File
mod - src/Mod/Sketcher/App/SketchObject.cpp Diff File
mod - src/Mod/Sketcher/App/planegcs/GCS.h Diff File
mod - src/Mod/Sketcher/Gui/CommandConstraints.cpp Diff File
mod - src/Mod/Sketcher/Gui/CommandCreateGeo.cpp Diff File
mod - src/Mod/Sketcher/Gui/CommandSketcherTools.cpp Diff File
mod - src/Mod/Sketcher/Gui/DrawSketchHandler.cpp Diff File
mod - src/Mod/Sketcher/Gui/TaskSketcherValidation.cpp Diff File
mod - src/Mod/Sketcher/Gui/ViewProviderSketch.cpp Diff File

FreeCAD: master 13406a4d

2015-01-24 22:30:49

DeepSOIC


Committer: wmayer Details Diff
Sketch:Validation: swap endpoints for reversed + constraint orientation locking controls

Added buttons to port sketches to CCW-emulation Sketcher.

Bonus =) : Added constraint orientation lock/unlock buttons (affects
point-wise modes of tangent and perpendicular constraints so far)
Affected Issues
0001886
mod - src/Mod/Sketcher/App/SketchObject.cpp Diff File
mod - src/Mod/Sketcher/App/SketchObject.h Diff File
mod - src/Mod/Sketcher/Gui/TaskSketcherValidation.cpp Diff File
mod - src/Mod/Sketcher/Gui/TaskSketcherValidation.h Diff File
mod - src/Mod/Sketcher/Gui/TaskSketcherValidation.ui Diff File

Issue History

Date Modified Username Field Change
2014-12-30 02:54 cleahcim New Issue
2014-12-30 13:25 cleahcim Tag Attached: sketcher
2015-01-24 15:10 wmayer Note Added: 0005708
2015-02-17 12:48 wmayer Changeset attached => FreeCAD Master master 0767cd35
2015-02-17 12:48 wmayer Changeset attached => FreeCAD Master master 13406a4d
2015-02-17 12:49 wmayer Status new => closed
2015-02-17 12:49 wmayer Resolution open => fixed
2015-02-17 12:49 wmayer Fixed in Version => 0.15