-
Notifications
You must be signed in to change notification settings - Fork 0
Sketch3D
Stephen S. Mitchell edited this page Sep 23, 2025
·
3 revisions
← Back to Classes | Documentation Home | Methods Index | Properties Index
- Namespace:
AlibreScript.API - Kind:
Class
Type: Object
A list of figures defines on the sketch, e.g. bspline
Type: Object
Name of the sketch
Adds a circular arc to the sketch
def AddArc(new_arc):
"""
Adds a circular arc to the sketch
Args:
new_arc (CircularArc3D): Arc to add
"""Adds a circular arc using three points - center, start and end Arc goes anti-clockwise from start to end
def AddArcCenterStartEnd(center_x, center_y, center_z, start_x, start_y, start_z, end_x, end_y, end_z):
"""
Adds a circular arc using three points - center, start and end Arc goes anti-clockwise from start to end
Args:
center_x (float): X coordinate for center
center_y (float): Y coordinate for center
center_z (float): Z coordinate for center
start_x (float): X coordinate for start
start_y (float): Y coordinate for start
start_z (float): Z coordinate for start
end_x (float): X coordinate for end
end_y (float): Y cordinate for end
end_z (float): Z coordnate for end
"""Adds a Bspline to the sketch
Overload 1:
def AddBspline(points):
"""
Adds a Bspline to the sketch
Args:
points (list): List of control points [X1, Y1, Z1, X2, Y2, Z2, ...]
Returns:
The Bspline object that was created
"""Overload 2:
def AddBspline(bspline):
"""
Adds a Bspline to the sketch
Args:
bspline (Bspline3D): Bspline to add
"""Adds a line to the sketch
Overload 1:
def AddLine(start_point, end_point):
"""
Adds a line to the sketch
Args:
start_point (list): Start of line [X, Y, Z]
end_point (list): End of line [X, Y, Z]
"""Overload 2:
def AddLine(new_line):
"""
Adds a line to the sketch
Args:
new_line (Line3D): 3D line to add
"""Overload 3:
def AddLine(x1, y1, z1, x2, y2, z2):
"""
Adds a line to the sketch
Args:
x1 (float): Start point X
y1 (float): Start point Y
z1 (float): Start point Z
x2 (float): End point X
y2 (float): End point Y
z2 (float): End point Z
"""Adds a polyline to the sketch
def AddLines(points):
"""
Adds a polyline to the sketch
Args:
points (list): Set of points [Point1X, Point1Y, Point1Z, Point2X, Point2Y, Point2Z, ...]
"""Adds a point to the sketch
Overload 1:
def AddPoint(x, y, z):
"""
Adds a point to the sketch
Args:
x (float): Point X coordinate
y (float): Point Y coordinate
z (float): Point Z coordinate
"""Overload 2:
def AddPoint(new_point):
"""
Adds a point to the sketch
Args:
new_point (SketchPoint3D): Point to add
"""Adds a polyline to the sketch
def AddPolyline(line):
"""
Adds a polyline to the sketch
Args:
line (Polyline3D): Polyine to add
"""Adds elements to the sketch from XML
def FromXml(xml):
"""
Adds elements to the sketch from XML
Args:
xml (str): XML to parse
"""Loads the sketch from an XML file
def LoadXml(file_name):
"""
Loads the sketch from an XML file
Args:
file_name (str): Path and name of file to load from
"""Saves the sketch to an XML file
def SavetoXml(file_name):
"""
Saves the sketch to an XML file
Args:
file_name (str): Path and name of file to save to
"""Documentation Home | Classes | Methods Index | Properties Index | Members Index
Generated on 2025-09-23 02:06