This PR adds the ability to reconstruct single curves from a the reconstruction json data.
API Call
reconstruct_curve(sketch_data, sketch_name, curve_id, scale, translate, rotate): Reconstruct a sketch from the provided sketch data
sketch_data: is the sketch entity data structure from the json data
sketch_name: is the name of the sketch to draw the curve in, typically returned from add_sketch()
curve_id: the uuid of the curve to be drawn
scale (optional): scale to apply to the sketch e.g. {"x": 0.5, "y": 0.5, "z": 0.5}
translate (optional): translation to apply to the sketch e.g. {"x": 1, "y": 1, "z":0}
rotate (optional): rotation to apply to the sketch in degrees e.g. {"x": 0, "y": 0, "z": 90}
Additional API Change
Additionally I also changed reconstruct_sketch() to be consistent (and more efficient), by passing in the sketch_data rather than the full json data structure.
reconstruct_sketch(sketch_data, sketch_plane, scale, translate, rotate): Reconstruct a sketch from the provided sketch data
sketch_data: is the sketch entity data structure from the json data
sketch_plane (optional): sketch plane to create the sketch on. Can be either one of:
string value representing a construction plane: XY, XZ, or YZ
B-Rep planar face id
point3d on a planar face of a B-Rep
scale (optional): scale to apply to the sketch e.g. {"x": 0.5, "y": 0.5, "z": 0.5}
translate (optional): translation to apply to the sketch e.g. {"x": 1, "y": 1, "z":0}
rotate (optional): rotation to apply to the sketch in degrees e.g. {"x": 0, "y": 0, "z": 90}
This PR adds the ability to reconstruct single curves from a the reconstruction json data.
API Call
reconstruct_curve(sketch_data, sketch_name, curve_id, scale, translate, rotate)
: Reconstruct a sketch from the provided sketch datasketch_data
: is the sketch entity data structure from the json datasketch_name
: is the name of the sketch to draw the curve in, typically returned fromadd_sketch()
curve_id
: the uuid of the curve to be drawnscale
(optional): scale to apply to the sketch e.g.{"x": 0.5, "y": 0.5, "z": 0.5}
translate
(optional): translation to apply to the sketch e.g.{"x": 1, "y": 1, "z":0}
rotate
(optional): rotation to apply to the sketch in degrees e.g.{"x": 0, "y": 0, "z": 90}
Additional API Change
Additionally I also changed
reconstruct_sketch()
to be consistent (and more efficient), by passing in thesketch_data
rather than the full json data structure.reconstruct_sketch(sketch_data, sketch_plane, scale, translate, rotate)
: Reconstruct a sketch from the provided sketch datasketch_data
: is the sketch entity data structure from the json datasketch_plane
(optional): sketch plane to create the sketch on. Can be either one of:XY
,XZ
, orYZ
scale
(optional): scale to apply to the sketch e.g.{"x": 0.5, "y": 0.5, "z": 0.5}
translate
(optional): translation to apply to the sketch e.g.{"x": 1, "y": 1, "z":0}
rotate
(optional): rotation to apply to the sketch in degrees e.g.{"x": 0, "y": 0, "z": 90}