3D Design

3D Design

How does SelectionPoint.Create works in SpaceClaim’s IronPython?

    • kireevartur

      Hello everyone! 

      I want to create some geometry by scripting in SpaceClaim and I have problems with rounding corners creation.

      Recording with API V18 Beta creates such code:

      # Create 2D Round

      curveSelPoint1 = SelectionPoint.Create(GetRootPart().Curves[2], 0.000350858464285384)

      curveSelPoint2 = SelectionPoint.Create(GetRootPart().Curves[3], 0.000864859402742673)

      result = Sketch2DRound.Create(curveSelPoint1, curveSelPoint2, r)

      # EndBlock

      Where r -- variable, created by me.

      I can not understand or find in any documentation what do the numbers after comma in SelectionPoint.Create mean.

      And how can I address to the certain lines or curves in my code to make my code reproducible? Saying reproducible I mean situation, when curves where moved to slightly different position and I need to create rounded corner with these lines addressing to them by names.

    • pini_daniel
      HellonI am facing the same problem. Have you discoverd how to creat 2d round using the script?nDanieln
    • Fuxx
      The number should be the central angle of the arc of a circle which describes your curve.nL= a*RnL= Length of the arcna=central angle in rad(!)nR=Radius of the circlenI haven't used it for rounding edges yet but I experimented a bit with the splitting curves feature.nFor straight lines it should be just the segment of the line at which you want to round. nhttps://en.wikipedia.org/wiki/Arc_(geometry)nYou should be able to extract many of the variables via the MeasureHelper.nUnfortunately I don't know who to calc the correct r in result = Sketch2DRound.Create(curveSelPoint1, curveSelPoint2, r) right now. You might have to take a dive into maths for that.n
Viewing 2 reply threads
  • You must be logged in to reply to this topic.