Component |
Note: This API is now obsolete.
[ObsoleteAttribute("此方法无法创建可复用对象,建议使用GetOrCreateBoltGroup方法代替!", false)] BoltGroup CreateBoltGroup( PartBase main, PartBase[] subs, Vec3 posStart, Vec3 posEnd, bool bRuntime )
var boltGroup = compInst.CreateBoltGroup(mainPart, subParts, posStart, posEnd, true); boltGroup.WorkAsix = woxkAxisW; // 应首先复制螺栓的工作坐标系 boltGroup.RotationSide = Define.ObjectSide.SIDE_TOP boltGroup.BoltStandard = boltStandard; boltGroup.BoltSize = boltSize; boltGroup.Shape = Define.BoltGroupShape.BOLT_GROUPSHAPE_ARRAY; boltGroup.ArrayStrideX = new double[] {100.0}; boltGroup.ArrayStrideY = new double[] {100.0}; boltGroup.HoleTol = holeTol; boltGroup.SectionFlags = sectFlags; boltGroup.MadeType = Define.PartMadeType.PART_MADE_SITE; boltGroup.ThreadInMtrl = false; boltGroup.HoleType = Define.BoltHoleType.BOLT_HOLE_OVERSIZED; boltGroup.HoleX = 0.0; boltGroup.HoleY = 0.0; boltGroup.RotateSlot = Define.BoltRotateSlot.BOLT_SLOT_PARALLEL; boltGroup.CutLength = 2.0 * (mainThickness + subThickness); boltGroup.Refresh(); // 设置完所有属性之后需要手动刷新螺栓对象以使得属性生效