Files
create/src/Mod/Part/App/ArcOfConicPy.xml
Abdullah Tahiri 6e33785049 Part: Rearrange inheritance not to use ArcPy
============================================

Inheritance:

Geometry
- GeomPoint
- GeomCurve (GeometryCurvePy)
- - GeomBoundedCurve (BoundedCurvePy)
- - - GeomBezierCurve (BezierCurvePy)
- - - GeomBSplineCurve (BSplineCurvePy)
- - - GeomTrimmedCurve (TrimmedCurvePy)
- - - - GeomArcOfConic (ArcOfConicPy)
- - - - - GeomArcOfCircle (ArcOfCirclePy)
- - - - - GeomArcOfEllipse (ArcOfEllipsePy)
- - - - - GeomArcOfHyperbola (ArcOfHyperbolaPy)
- - - - - GeomArcOfParabola (ArcOfParabolaPy)
- - - - GeomLineSegment (LineSegmentPy)
- - GeomConic
- - - GeomCircle
- - - GeomEllipse
- - - GeomHyperbola
- - - GeomParabola
- - GeomLine
- - GeomOffsetCurve

* Note: ArcPy is also a twinclass of c++ GeomTrimmedCurve, Python ArcPy derives from Python TrimmedCurvePy.

Same functionality as before:

>>> geometries = ActiveSketch.Geometry
>>> line = geometries[1]
>>> arc = geometries[2]
>>> line
<Line segment (-97.4389,42.4463,0) (-80.7887,44.5569,0) >
>>> arc
ArcOfCircle (Radius : 19.3111, Position : (-74.6914, -23.2165, 0), Direction : (0, 0, 1), Parameter : (1.82335, 2.71597))
>>> line.FirstParameter
0.0
>>> line.LastParameter
16.783437032695776
>>> line.setParameterRange(0,20)
>>> line.LastParameter
20.0
>>> arc.StartPoint
Vector (-79.51683708894876, -4.517938119394778, 0.0)
>>> arc.EndPoint
Vector (-92.27963885411512, -15.243140671641918, 0.0)
>>> arc.setParameterRange(1.5,3)
>>> arc
ArcOfCircle (Radius : 19.3111, Position : (-74.6914, -23.2165, 0), Direction : (0, 0, 1), Parameter : (1.5, 3))
>>> geometries[1] = line
>>> geometries[2] = arc
>>> ActiveSketch.Geometry = geometries
>>> ActiveSketch.solve()
0
>>>
2019-02-11 19:13:55 +01:00

56 lines
2.0 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="TrimmedCurvePy"
Name="ArcOfConicPy"
PythonName="Part.ArcOfConic"
Twin="GeomArcOfConic"
TwinPointer="GeomArcOfConic"
Include="Mod/Part/App/Geometry.h"
Namespace="Part"
FatherInclude="Mod/Part/App/TrimmedCurvePy.h"
FatherNamespace="Part"
Constructor="true">
<Documentation>
<Author Licence="LGPL" Name="Abdullah Tahiri" EMail="abdullah.tahiri.yo[at]gmail.com" />
<UserDocu>Describes a portion of a conic</UserDocu>
</Documentation>
<Attribute Name="Location" ReadOnly="false">
<Documentation>
<UserDocu>Center of the conic.</UserDocu>
</Documentation>
<Parameter Name="Location" Type="Object"/>
</Attribute>
<Attribute Name="Center" ReadOnly="false">
<Documentation>
<UserDocu>Deprecated -- use Location.</UserDocu>
</Documentation>
<Parameter Name="Center" Type="Object"/>
</Attribute>
<Attribute Name="AngleXU" ReadOnly="false">
<Documentation>
<UserDocu>The angle between the X axis and the major axis of the conic.</UserDocu>
</Documentation>
<Parameter Name="AngleXU" Type="Float"/>
</Attribute>
<Attribute Name="Axis" ReadOnly="false">
<Documentation>
<UserDocu>The axis direction of the conic</UserDocu>
</Documentation>
<Parameter Name="Axis" Type="Object"/>
</Attribute>
<Attribute Name="XAxis" ReadOnly="false">
<Documentation>
<UserDocu>The X axis direction of the circle</UserDocu>
</Documentation>
<Parameter Name="XAxis" Type="Object"/>
</Attribute>
<Attribute Name="YAxis" ReadOnly="false">
<Documentation>
<UserDocu>The Y axis direction of the circle</UserDocu>
</Documentation>
<Parameter Name="YAxis" Type="Object"/>
</Attribute>
</PythonExport>
</GenerateModel>