Browsed by
Tag: copy

Scaling a Sketch

Scaling a Sketch

Compatible with WizoScript versions: 1.70

Creates a copy of a sketch and scales it to 50% in size

Units.Current = UnitTypes.Inches
 
TestRoom = Part("TEST ROOM Scaled", False)
OriginalSketch = TestRoom.GetSketch("Sketch<2>")
 
# currently 8.25" wide, need it to be 4.125"
ScaleFactor = 4.125 / 8.25 * 100.0
 
ScaledSketch = TestRoom.AddSketch("Scaled", TestRoom.GetFace("Face<6>"))
ScaledSketch.CopyFrom(OriginalSketch, 0, 0, 0, 0, 0, 0, 0, ScaleFactor)
Copy Sketch

Copy Sketch

Compatible with WizoScript 1.22 and later.

Copies a sketch from the X-Y plane to the Y-Z plane.

MyPart = Part("MyPart")
Sketch1 = MyPart.AddSketch("Sketch1", MyPart.GetPlane("XY-Plane"))
Sketch1.AddLines([0, 10, 0, 0, 10, 0, 10, 10], False)
Sketch1.AddArcCenterStartAngle(5, 10, 10, 10, 180, False)
 
Sketch2 = MyPart.AddSketch("Sketch2", MyPart.GetPlane("YZ-Plane"))
Sketch2.CopyFrom(Sketch1)