Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a surface with a sketch using Abaqus Python

Status
Not open for further replies.

CADlalala

Aerospace
Joined
Apr 3, 2014
Messages
43
Location
GB

Hello,

My question might sounds rather simple but my knowledge in Abaqus scripting is almost inexistent.
I am creating a script to generate a sketch (just a simple closed polygon) and I want to create a surface for that sketch. In CATIA this can be achieved with the "fill command" but I do not know how to do it in Abaqus.

Many thanks!

The code:

from abaqus import *
from abaqusConstants import *
import sketch
import part

MyModel=mdb.Model(name='Model-1')

CSketch=MyModel.ConstrainedSketch(name='FirstSketch', sheetSize=100)

g, v, d, c = CSketch.geometry, CSketch.vertices, CSketch.dimensions, CSketch.constraints

CSketch.Line(point1=(10.0, 10.0), point2=(10.0, 15.0))
CSketch.Line(point1=(10.0, 15.0), point2=(-10.0, 15.0))
CSketch.Line(point1=(-10.0, 15.0), point2=(-10.0, -15.0))
CSketch.Line(point1=(-10.0, -15.0), point2=(10.0, -15.0))
CSketch.Line(point1=(10.0, -15.0), point2=(10.0, -10.0))
CSketch.Line(point1=(10.0, -10.0), point2=(5, 0))
CSketch.Line(point1=(5, 0), point2=(10.0, 10.0))
p = mdb.models['Model-1'].Part(name='Part-1', dimensionality=THREE_D,type=DEFORMABLE_BODY)

p = mdb.models['Model-1'].parts['Part-1']

#p.BaseShellExtrude(sketch=CSketch, depth=100.0)


myViewport = session.Viewport(name='Viewport for Model A',
origin=(10, 10), width=150, height=100)
myViewport.setValues(displayedObject=p)
myViewport.partDisplay.setValues(renderStyle=SHADED)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top