|Draft -> Add Point|
|Introducerad i version|
The counterpart to this tool is the Draft DelPoint operation.
- Select a or a . Note: The tool is disabled if no object is selected.
- Press the button.
- Click a point on the 3D view, or type a coordinate and press the button.
- Press or the button to finish the operation; points already placed will remain.
This functionality is also available from thetool.
The options of this tool are described in.
There is no programming interface available for the AddPoint tool, however, adding points is simple.
Points attribute of a wire or spline is a list with the points that comprise that object; to add points, overwrite this attribute with a longer list of points. You can use methods like
insert() to add a new element in the desired position in the list. Each point is defined by its
FreeCAD.Vector, with units in millimeters.
import FreeCAD, Draft p1 = FreeCAD.Vector(-1000, -400, 0) p2 = FreeCAD.Vector(2200, -1000, 0) wire = Draft.makeWire([p1, p2]) p_new = FreeCAD.Vector(1500, 1500, 0) points = wire.Points points.insert(1, p_new) wire.Points = points FreeCAD.ActiveDocument.recompute()