"""Constructor"""
### Create the feature
self.my = sketch.addFeature("SketchPoint")
- geomDataAPI_Point2D( self.my.data().attribute("PointCoordindates") ).setValue(x, y)
+ geomDataAPI_Point2D( self.my.data().attribute("PointCoordinates") ).setValue(x, y)
self.my.execute()
def pointData (self):
"""Returns points attribute"""
- return geomDataAPI_Point2D( self.my.data().attribute("PointCoordindates") )
+ return geomDataAPI_Point2D( self.my.data().attribute("PointCoordinates") )
def result (self):
"""Returns result object"""
/// Coordinates of the point
inline static const std::string& COORD_ID()
{
- static const std::string MY_COORD_ID("PointCoordindates");
+ static const std::string MY_COORD_ID("PointCoordinates");
return MY_COORD_ID;
}
/// Returns the kind of a feature
aSession.startOperation()
aSketchPoint = aSketchFeature.addFeature("SketchPoint")
aSketchPointCoords = geomDataAPI_Point2D(
- aSketchPoint.attribute("PointCoordindates"))
+ aSketchPoint.attribute("PointCoordinates"))
aSketchPointCoords.setValue(50., 50.)
aSketchLine = aSketchFeature.addFeature("SketchLine")
aLineAStartPoint = geomDataAPI_Point2D(aSketchLine.attribute("StartPoint"))
# aSketchPoint = aDocument.addFeature("SketchPoint")
aSketchPoint = aSketchFeature.addFeature("SketchPoint")
assert (aSketchPoint.getKind() == "SketchPoint")
-coords = geomDataAPI_Point2D(aSketchPoint.attribute("PointCoordindates"))
+coords = geomDataAPI_Point2D(aSketchPoint.attribute("PointCoordinates"))
assert (coords.x() == 0)
assert (coords.y() == 0)
assert (not coords.isInitialized())
aSketchReflist = aSketchFeature.reflist("Features")
assert (aSketchReflist.size() == 1)
assert (len(aSketchReflist.list()) == 1)
-coords = geomDataAPI_Point2D(aSketchPoint.attribute("PointCoordindates"))
+coords = geomDataAPI_Point2D(aSketchPoint.attribute("PointCoordinates"))
assert (coords.x() == 10.0)
assert (coords.y() == 10.0)
#=========================================================================
<!--icon=":pictures/x_point.png"-->
</feature>
<feature id="SketchPoint" title="Point" tooltip="Create point" icon=":icons/point.png">
- <sketch-2dpoint_selector id="PointCoordindates" title="Point" tooltip="Point coordinates"/>
+ <sketch-2dpoint_selector id="PointCoordinates" title="Point" tooltip="Point coordinates"/>
<boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
</feature>
<feature id="SketchLine" title="Line" tooltip="Create line" icon=":icons/line.png">
mouseClick(waitForObject(":OpenParts*_AppElements_ViewPort"), annotaion_point[0], annotaion_point[1], 0, Qt.LeftButton)
waitFor("object.exists(':Distance.First object_QLineEdit')", 20000)
- test.compare(str(findObject(":Distance.First object_QLineEdit").text), "SketchPoint_1/PointCoordindates")
+ test.compare(str(findObject(":Distance.First object_QLineEdit").text), "SketchPoint_1/PointCoordinates")
waitFor("object.exists(':Distance.Second object_QLineEdit')", 20000)
test.compare(str(findObject(":Distance.Second object_QLineEdit").text), "SketchLine_1")
waitFor("object.exists(':Distance.ConstraintValue_ModuleBase_ParamSpinBox')", 20000)