thicken feature problems

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
normally I use 'rootComp.createOpenProfile' for the creation of extrusion and then I canuse the thicken feature. For the following body I use sweep, it is not working with the openProfile command and the thicken feature is not working at all.Hopefully someone could help me to exlpain my mistake.
Thank you in advance,
Janina
The code:
# Creation of construction Point and Vector for Plane
Point= adsk.core.Point3D.create(0,-h1,0)
normal = adsk.core.Vector3D.create(0,0,1)
plane = adsk.core.Plane.create(Point,normal)
cons_planes = rootComp.constructionPlanes
# Determine as construction plane
cons_planeInput = cons_planes.createInput()
cons_planeInput.setByPlane(plane)
cons_plane = cons_planes.add(cons_planeInput)
# Create a new sketch
sketch0 = rootComp.sketches.add(cons_plane)
# Draw a separation line
lines = sketch0.sketchCurves.sketchLines;
line1_endpoint = adsk.core.Point3D.create((D/2), 0, 0)
line1_startpoint = adsk.core.Point3D.create(-(D/2), 0, 0)
line1= lines.addByTwoPoints(line1_startpoint, line1_endpoint)
# Draw a dish
arcs = sketch0.sketchCurves.sketchEllipses
majorAxisPoint = adsk.core.Point3D.create(0, -hz, 0)
Point = adsk.core.Point3D.create((D/2), 0, 0)
centerSketchPoint = adsk.core.Point3D.create(0, 0, 0)
ellipsearc = arcs.add(centerSketchPoint,majorAxisPoint,Point)
ellipsearc.split(line1_endpoint)
# Get the profile
prof = sketch0.profiles.item(0)
# Creation of construction Point and Vector for Plane
Point1= adsk.core.Point3D.create(0,-h1,0)
normal1 = adsk.core.Vector3D.create(0,1,0)
plane1 = adsk.core.Plane.create(Point1,normal1)
cons_planes1 = rootComp.constructionPlanes
# Determine as construction plane
cons_planeInput1 = cons_planes1.createInput()
cons_planeInput1.setByPlane(plane1)
cons_plane1 = cons_planes1.add(cons_planeInput1)
# Create profile 1
sketch1 = rootComp.sketches.add(cons_plane1)
sketchCircles1 = sketch1.sketchCurves.sketchCircles
centerPoint1 = adsk.core.Point3D.create (0,0,0)
circle1 = sketchCircles1.addByCenterRadius(centerPoint1, (D/2))
#path = rootComp.createOpenProfile(circle1)
# Create path
path = rootComp.features.createPath(circle1)
# Create a sweep input
sweeps = rootComp.features.sweepFeatures
sweepInput = sweeps.createInput(prof, path, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
#sweepInput.isSolid = False
# Create the sweep.
sweep = sweeps.add(sweepInput)
# Get the body
body = sweep.bodies.item(0)
# Create thicken feature
thickenFeatures = rootComp.features.thickenFeatures
inputFaces = adsk.core.ObjectCollection.create()
bodies = sweep.bodies
for body in bodies :
inputFaces.add(body)
thickenInput = thickenFeatures.createInput(inputFaces, sd, False, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
thickenFeatures.add(thickenInput)