Example #1
0
 /// <summary>
 /// 创建位置约束
 /// </summary>
 /// <param name="center"></param>
 private void SetSketchConstraint(Line[] center)
 {
     SketchUtils.CreateConstraint(center[0], SketchConstraintBuilder.Constraint.Parallel, new NXObject[] { this.WaiLine[0], this.WaiLine[2], this.LeiLine[0], this.LeiLine[2] });   //平行约束
     SketchUtils.CreateConstraint(center[1], SketchConstraintBuilder.Constraint.Parallel, new NXObject[] { this.WaiLine[1], this.WaiLine[3], this.LeiLine[1], this.LeiLine[3] });
     SketchUtils.SetFixed(center);
 }