3D Design

3D Design

Pull question

    • seghier
      Subscriber

      Hello

      I used pull in python script to create extrusion, and when heights changed the pull created based on the new height

      For example the solid have a height of 10mm, i want change the height to 15mm but with pull it became 25mm

      I used Rhino and extrude don't work like that, Is there a way to use pull based on the origin plane (0,0,0)

    • seghier
      Subscriber
      I used this but any suggestions to make it better are welcome.

      import math
      zvalue = 12
      face_z = GetRootPart().Bodies[1].Faces[4].GetFacePoint(0.5,0.5).Z
      selection = Selection.Create(GetRootPart().Bodies[1].Faces[4])
      if zvalue>0 and math.fabs(zvalue-face_z*1000) != 0:
      anchorPoint = Point.Create(MM(0), MM(0), MM(zvalue))
      upToSelection = Selection.Create(SketchPoint.Create(anchorPoint).CreatedCurves)
      rename= RenameObject.Execute(upToSelection,"center")
      options = ExtrudeFaceOptions result = ExtrudeFaces.UpTo(selection, Direction.DirZ,upToSelection,anchorPoint, options)
      Delete.Execute(Selection.CreateByNames('center'))


    • Keyur Kanade
      Ansys Employee
      I am not script expert. But while pulling make sure that you use same anchor or starting point.
      Regards Keyur
      How to access Ansys Online Help Document
      How to show full resolution image
      Guidelines on the Student Community
      How to use Google to search within Ansys Student Community
Viewing 2 reply threads
  • You must be logged in to reply to this topic.