Finalizing Python interface bindings for Robot, Spreadsheet, Surface.
This commit is contained in:
@@ -4,18 +4,12 @@ from Base.BaseClass import PyObjectBase
|
||||
from Base.Metadata import export
|
||||
|
||||
@export(
|
||||
Father="PyObjectBase",
|
||||
Name="BlendCurvePy",
|
||||
Twin="BlendCurve",
|
||||
TwinPointer="BlendCurve",
|
||||
Include="Mod/Surface/App/Blending/BlendCurve.h",
|
||||
Namespace="Surface",
|
||||
FatherInclude="Base/BaseClassPy.h",
|
||||
FatherNamespace="Base",
|
||||
Constructor=True,
|
||||
Delete=True,
|
||||
)
|
||||
class BlendCurvePy(PyObjectBase):
|
||||
class BlendCurve(PyObjectBase):
|
||||
"""
|
||||
Create a BlendCurve that interpolate 2 BlendPoints.
|
||||
curve = BlendCurve(BlendPoint1, BlendPoint2)
|
||||
@@ -1,41 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
Father="PyObjectBase"
|
||||
FatherInclude="Base/BaseClassPy.h"
|
||||
FatherNamespace="Base"
|
||||
Name="BlendCurvePy"
|
||||
PythonName="Surface.BlendCurve"
|
||||
Twin="BlendCurve"
|
||||
TwinPointer="BlendCurve"
|
||||
Include="Mod/Surface/App/Blending/BlendCurve.h"
|
||||
Namespace="Surface"
|
||||
Constructor="true"
|
||||
Delete="true">
|
||||
<Documentation>
|
||||
</Documentation>
|
||||
<Documentation>
|
||||
<Author Licence="LGPL" Name="Mattéo Grellier" EMail="matteogrellier@gmail.com" />
|
||||
<UserDocu>
|
||||
Create a BlendCurve that interpolate 2 BlendPoints.
|
||||
curve = BlendCurve(BlendPoint1, BlendPoint2)
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
<Methode Name="compute">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
Return the BezierCurve that interpolate the input BlendPoints.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setSize">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
Set the tangent size of the blendpoint at given index.
|
||||
If relative is true, the size is considered relative to the distance between the two blendpoints.
|
||||
myBlendCurve.setSize(idx, size, relative)
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
</PythonExport>
|
||||
</GenerateModel>
|
||||
@@ -4,18 +4,12 @@ from Base.BaseClass import PyObjectBase
|
||||
from Base.Metadata import constmethod, export
|
||||
|
||||
@export(
|
||||
Father="PyObjectBase",
|
||||
Name="BlendPointPy",
|
||||
Twin="BlendPoint",
|
||||
TwinPointer="BlendPoint",
|
||||
Include="Mod/Surface/App/Blending/BlendPoint.h",
|
||||
Namespace="Surface",
|
||||
FatherInclude="Base/BaseClassPy.h",
|
||||
FatherNamespace="Base",
|
||||
Constructor=True,
|
||||
Delete=True,
|
||||
)
|
||||
class BlendPointPy(PyObjectBase):
|
||||
class BlendPoint(PyObjectBase):
|
||||
"""
|
||||
Create BlendPoint from a point and some derivatives.
|
||||
myBlendPoint = BlendPoint([Point, D1, D2, ..., DN])
|
||||
@@ -1,57 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
Father="PyObjectBase"
|
||||
FatherInclude="Base/BaseClassPy.h"
|
||||
FatherNamespace="Base"
|
||||
Name="BlendPointPy"
|
||||
PythonName="Surface.BlendPoint"
|
||||
Twin="BlendPoint"
|
||||
TwinPointer="BlendPoint"
|
||||
Include="Mod/Surface/App/Blending/BlendPoint.h"
|
||||
Namespace="Surface"
|
||||
Constructor="true"
|
||||
Delete="true">
|
||||
<Documentation>
|
||||
</Documentation>
|
||||
<Documentation>
|
||||
<Author Licence="LGPL" Name="Mattéo Grellier" EMail="matteogrellier@gmail.com" />
|
||||
<UserDocu>
|
||||
Create BlendPoint from a point and some derivatives.
|
||||
myBlendPoint = BlendPoint([Point, D1, D2, ..., DN])
|
||||
BlendPoint can also be constructed from an edge
|
||||
myBlendPoint = BlendPoint(Edge, parameter = float, continuity = int)
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
<Attribute Name="Vectors" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>The list of vectors of this BlendPoint.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="vectors" Type="List"/>
|
||||
</Attribute>
|
||||
<Methode Name="getSize" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
Return BlendPoint first derivative length.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setSize">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
Resizes the BlendPoint vectors,
|
||||
by setting the length of the first derivative.
|
||||
theBlendPoint.setSize(new_size)
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setvectors">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
Set the vectors of BlendPoint.
|
||||
BlendPoint.setvectors([Point, D1, D2, ..., DN])
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
</PythonExport>
|
||||
</GenerateModel>
|
||||
@@ -13,11 +13,8 @@ include_directories(
|
||||
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Blending)
|
||||
|
||||
generate_from_xml(Blending/BlendPointPy)
|
||||
generate_from_xml(Blending/BlendCurvePy)
|
||||
|
||||
generate_from_py_(Blending/BlendPointPy)
|
||||
generate_from_py_(Blending/BlendCurvePy)
|
||||
generate_from_py(Blending/BlendPoint)
|
||||
generate_from_py(Blending/BlendCurve)
|
||||
|
||||
set(Surface_LIBS
|
||||
FreeCADApp
|
||||
@@ -26,9 +23,9 @@ set(Surface_LIBS
|
||||
|
||||
# BlendPoint Wrapper
|
||||
SET(BlendingPy_SRCS
|
||||
Blending/BlendPointPy.xml
|
||||
Blending/BlendPoint.pyi
|
||||
Blending/BlendPointPyImp.cpp
|
||||
Blending/BlendCurvePy.xml
|
||||
Blending/BlendCurve.pyi
|
||||
Blending/BlendCurvePyImp.cpp
|
||||
)
|
||||
SOURCE_GROUP("Blending" FILES ${BlendingPy_SRCS})
|
||||
|
||||
Reference in New Issue
Block a user