def testrun_spline_curve(filename="IGESFile_spline_curve.igs"): """draw a spline curve""" system = IGEStorage() system.StartSection.Prolog = " " system.GlobalSection.IntegerBits = int(32) system.GlobalSection.SPMagnitude = int(38) system.GlobalSection.SPSignificance = int(6) system.GlobalSection.DPMagnitude = int(38) system.GlobalSection.DPSignificance = int(15) system.GlobalSection.MaxNumberLineWeightGrads = int(8) system.GlobalSection.WidthMaxLineWeightUnits = float(0.016) system.GlobalSection.MaxCoordValue = float(71) spline_curve = IGES.IGESSplineCurve(stype=3, h=1, ndim=3) spline_curve.addSegment(0., [5.817, 0.183686, 7.152560000000000E-007, 0.00391344, 7.42046, 0.116096, -1.430510000000000E-006, -0.0365138, 0.582714, 0.26764, -2.682210000000000E-007, -0.0384366]) spline_curve.addSegment(1., [6.0046, 0.195428, 0.011741, -0.0231148, 7.50004, 0.00655174, -0.109543, 0.0169944, 0.811917, 0.15233, -0.11531, -0.00673003]) spline_curve.addSegment(2., [6.18865, 0.149566, -0.0576034, -0.034095, 7.41404, -0.161551, -0.0585597, 0.0144959, 0.842207, - 0.0984805, -0.1355, 0.000767251]) spline_curve.addSegment(3., [6.24652, -0.0679259, -0.159888, 0.0609804, 7.20843, -0.235182, -0.0150719, 0.0548643, 0.608993, - 0.367179, -0.133198, 0.11326]) spline_curve.addSegment(4., [6.07969, -0.204761, 0.0230529, -0.00538516, 7.01304, -0.100733, 0.149521, -0.0375805, 0.221876, - 0.293796, 0.206582, -0.0375974]) spline_curve.addSegment(5., [5.89259, -0.174811, 0.00689745, 0.041456, 7.02425, 0.0855677, 0.0367796, 0.0150364, 0.0970648, 0.00657602, 0.0937898, 0.0214335]) spline_curve.addSegment(6., [5.76614, -0.0366479, 0.131266, -0.0437549, 7.16163, 0.204236, 0.0818889, -0.0272963, 0.218864, 0.258456, 0.15809, -0.0526968]) spline_curve.addSegment(7., [5.817, 0.0946183, 1.430510000000000E-006, -0.26253, 7.42046, 0.286125, 0., -0.163778, 0.582714, 0.146546, -1.713630000000000E-007, -0.316181]) system.Commit(spline_curve) system.save(filename)
system.Commit(line) arc = IGES.IGESGeomArc(0.0, IGES.IGESPoint(0.0, 0.0, 0.0), IGES.IGESPoint(0.0, 0.5, 0.0), IGES.IGESPoint(-0.5, 0.0, 0.0)) arc.TransfrmMat = trans.DirectoryDataPointer.data arc.LineFontPattern.setSolid() arc.LineWeightNum = 2 arc.Color.setRed() arc.StatusNumber.Hierachy.setGlobalDefer() arc.StatusNumber.EntityUseFlag.setGeometry() arc.StatusNumber.Subordinate.setPhysicallyDependent() arc.StatusNumber.Visablilty.setVisible() system.Commit(arc) scurve = IGES.IGESSplineCurve(3, 1, 3) scurve.addSegment(0.0, [ 4., 0.5625, 0., -0.0625, 15., -0.312501, 1.430510000000000E-006, 0.0624995, 0., 0., 0., 0. ]) scurve.addSegment(1.0, [ 4.5, 0.375, -0.1875, 0.0625, 14.75, -0.125, 0.1875, -0.0625005, 0., 0., 0., 0. ]) scurve.addSegment(2.0, [ 4.75, 0.1875, 0., 0.375, 14.75, 0.062499, -2.861020000000000E-006, -0.375003, 0., 0., 0., 0. ]) scurve.LineFontPattern.setSolid() scurve.LineWeightNum = 2 scurve.Color.setCyan()