概述
#在视窗旋转模型
session.viewports['Viewport: 1'].view.setValues(nearPlane=411.918,
farPlane=630.471, width=341.595, height=174.432, cameraPosition=(11.2585,
-516.712, 103.053), cameraUpVector=(-0.79531, 0.396499, 0.458552),
cameraTarget=(10.1589, -12.516, 35.0157), viewOffsetX=-5.34045,
viewOffsetY=2.43439)
#Seed Part
p = mdb.models['Model-1'].parts['mount']
p.seedPart(size=9.5, deviationFactor=0.1, minSizeFactor=0.1)
#Mesh Part
p = mdb.models['Model-1'].parts['mount']
p.generateMesh()
Mdb()
#: A new model database has been created.
#: The model "Model-1" has been created.
session.viewports['Viewport: 1'].setValues(displayedObject=None)
s = mdb.models['Model-1'].ConstrainedSketch(name='__profile__',
sheetSize=200.0)
g, v, d, c = s.geometry, s.vertices, s.dimensions, s.constraints
s.setPrimaryObject(option=STANDALONE)
s.Spot(point=(-55.0, 15.0))
s.Line(point1=(-46.25, 6.25), point2=(-1.25, 13.75))
s.Line(point1=(-1.25, 13.75), point2=(-6.25, 6.25))
s.Line(point1=(-6.25, 6.25), point2=(-20.0, 1.25))
s.Line(point1=(-20.0, 1.25), point2=(6.25, 1.25))
s.HorizontalConstraint(entity=g[5], addUndoState=False)
s.Line(point1=(6.25, 1.25), point2=(6.25, -21.25))
s.VerticalConstraint(entity=g[6], addUndoState=False)
s.PerpendicularConstraint(entity1=g[5], entity2=g[6], addUndoState=False)
s.Line(point1=(6.25, -21.25), point2=(28.75, -17.5))
s.Line(point1=(28.75, -17.5), point2=(45.0, -14.7916666666501))
s.ParallelConstraint(entity1=g[7], entity2=g[8], addUndoState=False)
#画圆
s.CircleByCenterPerimeter(center=(-43.75, -15.0), point1=(-37.5, -18.75))
#矩形
s.rectangle(point1=(-30.0, -11.25), point2=(-10.0, -21.25))
#画椭圆
s.EllipseByCenterPerimeter(center=(-35.0, 15.0), axisPoint1=(-27.5, 15.0),
axisPoint2=(-35.0, 16.25))
#切向圆
s.ArcByStartEndTangent(point1=(-1.25, 13.75), point2=(-1.25, 5.0), entity=g[2])
s.ArcByCenterEnds(center=(-30.0, 22.5), point1=(-28.75, 21.25), point2=(-32.5,
25.0), direction=COUNTERCLOCKWISE)
s.Arc3Points(point1=(-23.75, 20.0), point2=(-22.5, 15.0), point3=(-18.75,
22.5))
s.FilletByRadius(radius=2.0, curve1=g[5], nearPoint1=(-15.2434959411621,
1.09756469726563), curve2=g[4], nearPoint2=(-16.1005554199219,
2.31707763671875))
#样条曲线
session.viewports['Viewport: 1'].view.setValues(width=139.24, height=74.4681,
cameraPosition=(1.66854, 0.233523, 188.562), cameraTarget=(1.66854,
0.233523, 0))
s.Spline(points=((-47.5, 26.25), (-31.1942779562208, 23.8033419210956), (-25.0,
30.0), (-20.0, 27.5), (-18.75, 22.5), (-7.5, 27.5), (-1.25, 23.75), (3.75,
22.5), (8.75, 30.0)))
s.CoincidentConstraint(entity1=v[32], entity2=g[17], addUndoState=False)
#构造线/构造圆
s.CoincidentConstraint(entity1=v[32], entity2=g[17], addUndoState=False)
s.ConstructionLine(point1=(-57.5, 2.5), point2=(-48.8402367833035,
-9.78324914435204))
s.ConstructionLine(point1=(-50.0, 2.5), angle=0.0)
s.HorizontalConstraint(entity=g[22], addUndoState=False)
s.ConstructionLine(point1=(-37.5, -1.25), angle=0.0)
s.HorizontalConstraint(entity=g[23], addUndoState=False)
s.ConstructionLine(point1=(-55.0, 8.75), angle=90.0)
s.VerticalConstraint(entity=g[24], addUndoState=False)
s.ConstructionLine(point1=(-46.25, 6.25), angle=90.0)
s.CoincidentConstraint(entity1=v[1], entity2=g[25], addUndoState=False)
s.VerticalConstraint(entity=g[25], addUndoState=False)
s.ConstructionLine(point1=(-38.75, 7.5), angle=90.0)
s.VerticalConstraint(entity=g[26], addUndoState=False)
s.ConstructionLine(point1=(-5.0, -26.25), angle=45.0)
s.ConstructionCircleByCenterPerimeter(center=(27.5, -7.5), point1=(31.25,
-11.25))
#草图元素删除
s.delete(objectList=(g[9], ))
s.delete(objectList=(g[10], g[11], g[12], g[13], c[38], c[39], c[40], c[41],
c[42]))
s.delete(objectList=(g[2], g[3], g[4], g[14], g[16], g[17], g[18], g[20],
c[53], c[64], c[78]))
s.delete(objectList=(g[6], g[7], c[19]))
s.delete(objectList=(g[8], ))
s.delete(objectList=(g[5], ))
s.delete(objectList=(g[19], ))
#
s.Line(point1=(-18.75, 28.75), point2=(-18.75, -17.5))
s.VerticalConstraint(entity=g[29], addUndoState=False)
s.setAsConstruction(objectList=(g[29], ))
s.offset(distance=4.96, objectList=(g[29], ), side=LEFT)
s.autoTrimCurve(curve1=g[29], point1=(-18.7049560546875, 1.75949859619141))
s.trimExtendCurve(curve1=g[31], point1=(-18.8774375915527, 5.19549942016602),
curve2=g[32], point2=(-19.0499267578125, -6.65870475769043))
s.breakCurve(curve1=g[33], point1=(-18.532470703125, 1.07229995727539),
curve2=g[32], point2=(-18.6187133789063, -2.62140274047852))
最后
以上就是负责铃铛为你收集整理的2021-11-03-abaqus-sketch的全部内容,希望文章能够帮你解决2021-11-03-abaqus-sketch所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复