Files
create/src/Mod/Sketcher/App/SketchObjectPy.xml
Abdullah Tahiri d3b0cf771f 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.
2014-12-20 12:33:37 +01:00

147 lines
5.4 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
<PythonExport
Father="Part2DObjectPy"
Name="SketchObjectPy"
Twin="SketchObject"
TwinPointer="SketchObject"
Include="Mod/Sketcher/App/SketchObject.h"
Namespace="Sketcher"
FatherInclude="Mod/Part/App/Part2DObjectPy.h"
FatherNamespace="Part">
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
<UserDocu>With this objects you can handle sketches</UserDocu>
</Documentation>
<Methode Name="solve">
<Documentation>
<UserDocu>solve the actual set of geometry and constraints</UserDocu>
</Documentation>
</Methode>
<Methode Name="addGeometry">
<Documentation>
<UserDocu>add a geometric object to the sketch</UserDocu>
</Documentation>
</Methode>
<Methode Name="delGeometry">
<Documentation>
<UserDocu>delete a geometric object from the sketch</UserDocu>
</Documentation>
</Methode>
<Methode Name="toggleConstruction">
<Documentation>
<UserDocu>switch a geometry to a construcion line</UserDocu>
</Documentation>
</Methode>
<Methode Name="setConstruction">
<Documentation>
<UserDocu>set construction mode of a geometry on or off</UserDocu>
</Documentation>
</Methode>
<Methode Name="addConstraint">
<Documentation>
<UserDocu>add a constraint to the sketch</UserDocu>
</Documentation>
</Methode>
<Methode Name="delConstraint">
<Documentation>
<UserDocu>delete a constraint from the sketch</UserDocu>
</Documentation>
</Methode>
<Methode Name="renameConstraint">
<Documentation>
<UserDocu>Rename a constraint of the sketch</UserDocu>
</Documentation>
</Methode>
<Methode Name="addExternal">
<Documentation>
<UserDocu>add a link to an external geometry to use it in a constraint</UserDocu>
</Documentation>
</Methode>
<Methode Name="delExternal">
<Documentation>
<UserDocu>delete a external geometry link from the sketch</UserDocu>
</Documentation>
</Methode>
<Methode Name="delConstraintOnPoint">
<Documentation>
<UserDocu>delete coincident constraints associated with a sketch point</UserDocu>
</Documentation>
</Methode>
<Methode Name="setDatum">
<Documentation>
<UserDocu>set the Datum of a Distance or Angle constraint</UserDocu>
</Documentation>
</Methode>
<Methode Name="movePoint">
<Documentation>
<UserDocu>
movePoint(GeoIndex,PointPos,Vector,[relative]) - move a given point (or curve)
to another location.
It moves the specified point (or curve) to the given location by adding some
temporary weak constraints and solve the sketch.
This method is mostly used to allow the user to drag some portions of the sketch
in real time by e.g. the mouse and it works only for underconstrained portions of
the sketch.
The argument 'relative', if present, states if the new location is given
relatively to the current one.
</UserDocu>
</Documentation>
</Methode>
<Methode Name="getPoint">
<Documentation>
<UserDocu>
getPoint(GeoIndex,PointPos) - retrieve the vector of a point in the sketch
</UserDocu>
</Documentation>
</Methode>
<Methode Name="getAxis">
<Documentation>
<UserDocu>
return an axis based on the corresponding construction line
</UserDocu>
</Documentation>
</Methode>
<Methode Name="fillet">
<Documentation>
<UserDocu>create fillet between two edges or at a point</UserDocu>
</Documentation>
</Methode>
<Methode Name="trim">
<Documentation>
<UserDocu>trim a curve with a given id at a given reference point</UserDocu>
</Documentation>
</Methode>
<Methode Name="ExposeInternalGeometry">
<Documentation>
<UserDocu>Exposes all internal geometry of an object supporting internal geometry</UserDocu>
</Documentation>
</Methode>
<Methode Name="DeleteUnusedInternalGeometry">
<Documentation>
<UserDocu>Deletes all unused (not further constrained) internal geometry</UserDocu>
</Documentation>
</Methode>
<Attribute Name="ConstraintCount" ReadOnly="true">
<Documentation>
<UserDocu>Number of Constraints in this sketch</UserDocu>
</Documentation>
<Parameter Name="ConstraintCount" Type="Int"/>
</Attribute>
<Attribute Name="GeometryCount" ReadOnly="true">
<Documentation>
<UserDocu>Number of geometric objects in this sketch</UserDocu>
</Documentation>
<Parameter Name="GeometryCount" Type="Int"/>
</Attribute>
<Attribute Name="AxisCount" ReadOnly="true">
<Documentation>
<UserDocu>
return the the number of construction lines in the sketch which can be used as axes
</UserDocu>
</Documentation>
<Parameter Name="AxisCount" Type="Int"/>
</Attribute>
</PythonExport>
</GenerateModel>