For t = o To 0.5 Step 1 / 40
ckq(i) = 0.5 * length7.Value * Cos(t * pi) + 0.5 * length7.Value * Sin(t * pi) * t * pi ckq1(i) = 0.5 * length7.Value * Sin(t * pi) - 0.5 * length7.Value * Cos(t * pi) * t * pi
'自己编写如下取他 为以下值 0.02、0.04、0.08、0.12、0.15、0.2、0.3、0.4、0.5
'目的:绘制10个点 i = i + 1 Next t
Set hybridShapePlaneExplicit1 = originElements1.PlaneXY
Set reference14 = part1.CreateReferenceFromObject(hybridShapePlaneExplicit1)
Set hybridShapePointOnPlane1 hybridShapeFactory1.AddNewPointOnPlane(reference14, ckq(0), ckq1(0)) hybridBody1.AppendHybridShape hybridShapePointOnPlane1
part1.InWorkObject = hybridShapePointOnPlane1
part1.Update
Set hybridShapePlaneExplicit1 = originElements1.PlaneXY
Set reference15 = part1.CreateReferenceFromObject(hybridShapePlaneExplicit1)
Set hybridShapePointOnPlane2 hybridShapeFactory1.AddNewPointOnPlane(reference15, ckq(2), ckq1(2))
hybridBody1.AppendHybridShape hybridShapePointOnPlane2
part1.InWorkObject = hybridShapePointOnPlane2
part1.Update
Set hybridShapePlaneExplicit1 = originElements1.PlaneXY
= = Set reference16 = part1.CreateReferenceFromObject(hybridShapePlaneExplicit1)
Set hybridShapePointOnPlane3
hybridShapeFactory1.AddNewPointOnPlane(reference16, ckq(4), ckq1(4))
hybridBody1.AppendHybridShape hybridShapePointOnPlane3
part1.InWorkObject = hybridShapePointOnPlane3
part1.Update
Set hybridShapePlaneExplicit1 = originElements1.PlaneXY
Set reference17 = part1.CreateReferenceFromObject(hybridShapePlaneExplicit1)
Set hybridShapePointOnPlane4
hybridShapeFactory1.AddNewPointOnPlane(reference17, ckq(6), ckq1(6))
hybridBody1.AppendHybridShape hybridShapePointOnPlane4
part1.InWorkObject = hybridShapePointOnPlane4
part1.Update
Set hybridShapePlaneExplicit1 = originElements1.PlaneXY
Set reference18 = part1.CreateReferenceFromObject(hybridShapePlaneExplicit1)
Set hybridShapePointOnPlane5
hybridShapeFactory1.AddNewPointOnPlane(reference18, ckq(8), ckq1(8))
hybridBody1.AppendHybridShape hybridShapePointOnPlane5
part1.InWorkObject = hybridShapePointOnPlane5
part1.Update
Set hybridShapePlaneExplicit1 = originElements1.PlaneXY
Set reference19 = part1.CreateReferenceFromObject(hybridShapePlaneExplicit1)
=
=
=
Set hybridShapePointOnPlane6
hybridShapeFactory1.AddNewPointOnPlane(reference19, ckq(10), ckq1(10))
hybridBody1.AppendHybridShape hybridShapePointOnPlane6
part1.InWorkObject = hybridShapePointOnPlane6
part1.Update
Set hybridShapePlaneExplicit1 = originElements1.PlaneXY
Set reference20 = part1.CreateReferenceFromObject(hybridShapePlaneExplicit1)
Set hybridShapePointOnPlane7
hybridShapeFactory1.AddNewPointOnPlane(reference20, ckq(12), ckq1(12))
hybridBody1.AppendHybridShape hybridShapePointOnPlane7
part1.InWorkObject = hybridShapePointOnPlane7
part1.Update
Set hybridShapePlaneExplicit1 = originElements1.PlaneXY
Set reference21 = part1.CreateReferenceFromObject(hybridShapePlaneExplicit1)
Set hybridShapePointOnPlane8
hybridShapeFactory1.AddNewPointOnPlane(reference21, ckq(14), ckq1(14))
hybridBody1.AppendHybridShape hybridShapePointOnPlane8
part1.InWorkObject = hybridShapePointOnPlane8
part1.Update
Set hybridShapePlaneExplicit1 = originElements1.PlaneXY
Set reference22 = part1.CreateReferenceFromObject(hybridShapePlaneExplicit1)
Set hybridShapePointOnPlane9
hybridShapeFactory1.AddNewPointOnPlane(reference22, ckq(16), ckq1(16))
hybridBody1.AppendHybridShape hybridShapePointOnPlane9
=
=
=
=
part1.InWorkObject = hybridShapePointOnPlane9
part1.Update
Set hybridShapePlaneExplicit1 = originElements1.PlaneXY
Set reference23 = part1.CreateReferenceFromObject(hybridShapePlaneExplicit1)
Set hybridShapePointOnPlane10 = hybridShapeFactory1.AddNewPointOnPlane(reference23, ckq(18), ckq1(18))
hybridBody1.AppendHybridShape hybridShapePointOnPlane10
part1.InWorkObject = hybridShapePointOnPlane10
part1.Update
'绘制 spline 线
Set hybridShapeSpline1 = hybridShapeFactory1.AddNewSpline()
hybridShapeSpline1.SetSplineType 0
hybridShapeSpline1.SetClosing 0
Set reference24 = part1.CreateReferenceFromObject(hybridShapePointOnPlane1)
hybridShapeSpline1.AddPointWithConstraintExplicit reference24, Nothing, -1#, 1, Nothing, 0#
Set reference25 = part1.CreateReferenceFromObject(hybridShapePointOnPlane2)
hybridShapeSpline1.AddPointWithConstraintExplicit reference25, Nothing, -1#, 1, Nothing, 0#
Set reference26 = part1.CreateReferenceFromObject(hybridShapePointOnPlane3)
hybridShapeSpline1.AddPointWithConstraintExplicit reference26, Nothing, -1#, 1, Nothing, 0#
Set reference27 = part1.CreateReferenceFromObject(hybridShapePointOnPlane4)
hybridShapeSpline1.AddPointWithConstraintExplicit reference27, Nothing, -1#, 1, Nothing, 0#
Set reference28 = part1.CreateReferenceFromObject(hybridShapePointOnPlane5)
hybridShapeSpline1.AddPointWithConstraintExplicit reference28, Nothing, -1#, 1, Nothing, 0#
Set reference29 = part1.CreateReferenceFromObject(hybridShapePointOnPlane6)
hybridShapeSpline1.AddPointWithConstraintExplicit reference29, Nothing, -1#, 1, Nothing, 0#
Set reference30 = part1.CreateReferenceFromObject(hybridShapePointOnPlane7)
hybridShapeSpline1.AddPointWithConstraintExplicit reference30, Nothing, -1#, 1, Nothing, 0#
Set reference31 = part1.CreateReferenceFromObject(hybridShapePointOnPlane8)
hybridShapeSpline1.AddPointWithConstraintExplicit reference31, Nothing, -1#, 1, Nothing, 0#
Set reference32 = part1.CreateReferenceFromObject(hybridShapePointOnPlane9)
hybridShapeSpline1.AddPointWithConstraintExplicit reference32, Nothing, -1#, 1, Nothing, 0#
Set reference33 = part1.CreateReferenceFromObject(hybridShapePointOnPlane10)
hybridShapeSpline1.AddPointWithConstraintExplicit reference33, Nothing, -1#, 1, Nothing, 0#
hybridBody1.AppendHybridShape hybridShapeSpline1
part1.InWorkObject = hybridShapeSpline1