def createPoint(theSketchFeature):
aSketchPointFeature = theSketchFeature.addFeature("SketchPoint")
- aPointCoordindates = geomDataAPI_Point2D(aSketchPointFeature.attribute("PointCoordindates"))
- aPointCoordindates.setValue(random.uniform(0, 50), random.uniform(0, 50))
+ aPointCoordinates = geomDataAPI_Point2D(aSketchPointFeature.attribute("PointCoordinates"))
+ aPointCoordinates.setValue(random.uniform(0, 50), random.uniform(0, 50))
return aSketchPointFeature
def createLine(theSketchFeature):
def createPoint(theSketchFeature):
aSketchPointFeature = theSketchFeature.addFeature("SketchPoint")
- aPointCoordindates = geomDataAPI_Point2D(aSketchPointFeature.attribute("PointCoordindates"))
- aPointCoordindates.setValue(random.uniform(0, 100), random.uniform(0, 100))
+ aPointCoordinates = geomDataAPI_Point2D(aSketchPointFeature.attribute("PointCoordinates"))
+ aPointCoordinates.setValue(random.uniform(0, 100), random.uniform(0, 100))
return aSketchPointFeature
# Get document
/// 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
<context>
<name>SketchPoint:Model_FeatureValidator</name>
<message>
- <source>Attribute "PointCoordindates" is not initialized.</source>
+ <source>Attribute "PointCoordinates" is not initialized.</source>
<translation>Point is not defined</translation>
</message>
</context>
<context>
- <name>SketchPoint:PointCoordindates</name>
+ <name>SketchPoint:PointCoordinates</name>
<message>
- <source>Attribute "PointCoordindates" is locked by modification value in the viewer.</source>
+ <source>Attribute "PointCoordinates" is locked by modification value in the viewer.</source>
<translation>Select a point</translation>
</message>
</context>
anOrigShape = anOrigRes.shape()
assert (anOrigShape)
anOrigin = aSketchFeature.addFeature("SketchPoint")
-anOriginCoord = geomDataAPI_Point2D(anOrigin.attribute("PointCoordindates"))
+anOriginCoord = geomDataAPI_Point2D(anOrigin.attribute("PointCoordinates"))
anOriginCoord.setValue(0., 0.)
anOrigin.selection("External").setValue(anOrigRes, anOrigShape)
aSession.finishOperation()
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"))
anOrigShape = anOrigRes.shape()
assert (anOrigShape)
anOrigin = aSketchFeature.addFeature("SketchPoint")
-anOriginCoord = geomDataAPI_Point2D(anOrigin.attribute("PointCoordindates"))
+anOriginCoord = geomDataAPI_Point2D(anOrigin.attribute("PointCoordinates"))
anOriginCoord.setValue(0., 0.)
anOrigin.selection("External").setValue(anOrigRes, anOrigShape)
aSession.finishOperation()
aPointCoodinates = [0., 0.]
aSession.startOperation()
aPoint = aSketchFeature.addFeature("SketchPoint")
-aPointCoord = geomDataAPI_Point2D(aPoint.attribute("PointCoordindates"))
+aPointCoord = geomDataAPI_Point2D(aPoint.attribute("PointCoordinates"))
aPointCoord.setValue(aPointCoodinates[0], aPointCoodinates[1])
aSession.finishOperation()
# create new circle
aLineEnd = [10., 50.]
aSession.startOperation()
aPoint = aSketchFeature.addFeature("SketchPoint")
-aPointCoord = geomDataAPI_Point2D(aPoint.attribute("PointCoordindates"))
+aPointCoord = geomDataAPI_Point2D(aPoint.attribute("PointCoordinates"))
aPointCoord.setValue(aPointCoodinates[0], aPointCoodinates[1])
aLine = aSketchFeature.addFeature("SketchLine")
aStartPnt = geomDataAPI_Point2D(aLine.attribute("StartPoint"))
#=========================================================================
aSession.startOperation()
aRotationPoint = aSketchFeature.addFeature("SketchPoint")
-aRotationPointPoint = geomDataAPI_Point2D(aRotationPoint.attribute("PointCoordindates"))
+aRotationPointPoint = geomDataAPI_Point2D(aRotationPoint.attribute("PointCoordinates"))
aRotationPointPoint.setValue(CENTER_X, CENTER_Y)
aSession.finishOperation()
assert(model.dof(aSketchFeature) == 7)
# 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 (not coords.isInitialized())
# Simulate SketchPlugin_Point::move(...)
coords.setValue(10., 10.)
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)
#=========================================================================
<!-- SketchPoint -->
<feature id="SketchPoint" title="Point" tooltip="Create point" icon="icons/Sketch/point.png">
- <sketch-2dpoint_selector id="PointCoordindates" accept_expressions="0" title="Point" tooltip="Point coordinates"
+ <sketch-2dpoint_selector id="PointCoordinates" accept_expressions="0" title="Point" tooltip="Point coordinates"
enable_value="enable_by_preferences"/>
<boolvalue id="Auxiliary" label="Auxiliary" default="false" tooltip="Construction element" obligatory="0"/>
</feature>
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)