Create curve by using center of toolpaths, Patterns or workplanes using API in VB.net

Create curve by using center of toolpaths, Patterns or workplanes using API in VB.net

anton.vendland
Participant Participant
698 Views
5 Replies
Message 1 of 6

Create curve by using center of toolpaths, Patterns or workplanes using API in VB.net

anton.vendland
Participant
Participant

Hi,

I need generate center curve from center points of set of toolpaths or set of patterns or set of workplanes.

If with workplanes, I need create workplane eather from toolpath or Pattern. 

I am using PM API with VB.net

Thank you if any help.

0 Likes
699 Views
5 Replies
Replies (5)
Message 2 of 6

anton.vendland
Participant
Participant

 

old API was:

Dim oCurve As Curve
Set oCurve = PowerMILL.ActiveProject.Curves.CreateCurveFromPoints(PowerMILL.ActiveProject.Workplanes("WP1"), _
PowerMILL.ActiveProject.Workplanes("WP1"), CurveType:=CurveLine, _
CurveMethod:=CurveCentrePointPattern, nSegments:=10, Tolerance:=0.1, _
Points:=Array(Point(0, 0, 0), Point(1, 0, 0), Point(2, 0, 0)))

0 Likes
Message 3 of 6

luke.edwards.autodesk
Community Manager
Community Manager

Hi Anton, I'm not sure whay you mean about the old API. I don't recognise some of the constructs you have there. Do you mean you want to create a curve in PowerShape that represents the toolpath?


Luke Edwards
Consulting Services Manager
0 Likes
Message 4 of 6

anton.vendland
Participant
Participant

Hi Luke, I need use PM for curve creation.

It could be method collecting center points from Planes, tollpath or patterns.

And then creating curves by points or any other methods.

 

Thank you

0 Likes
Message 5 of 6

luke.edwards.autodesk
Community Manager
Community Manager

Hi. You can create a Pattern or a Boundary from a Polyline, Spline or PIC file using the various functions on the PowerMill.ActiveProject.Patterns and PowerMill.ActiveProject.Boundaries collections.

A Polyline and Spline can be created from a list of points (that might come from centre points of planes, workplanes etc as you mention). A PIC file can be created by exporting curves and toolpaths to PIC files and then importing into the Pattern or Boundary.

I hope this makes sense, I'm still a little unclear on exactly what you are trying to achieve.


Luke Edwards
Consulting Services Manager
0 Likes
Message 6 of 6

anton.vendland
Participant
Participant

antonvendland_0-1680710038177.png

That is my target

0 Likes