Curved Pipe Geometry

Just a quick note that catch my attention, in fact a recurrent question. If the Pipe is of type Curved, how can we access/read the geometry information?

In fact, there is a Pipe.Curve2d property will return a CircularArc2d, which has a Radius property, and some others, like Center. If you need a point as a specific position, try EvaluatePoint at a specific parameter of the curve, which is a BRep API from AutoCAD.

Pipe myPipe = // read the pipe
myPipe.Curve2d.EvaluatePoint(0.5); // middle of the arc, for instance


Comments

2 responses to “Curved Pipe Geometry”

  1. Hi,
    [Civil3D]
    I have question about setting targets for a new BaselineRegion. I think I am getting an error that I do not understand. The code sample is below:
    if (newTargetInfo.TargetType == targetInfo.TargetType)
    {
    newTargetInfo.TargetIds = targetInfo.TargetIds;
    }
    Surprisingly, the above code throws an argument exception, saying that the target id is not within the expected range. This happens when the TargetType is Elevation or Offset, and the single target ObjectId is FeatureLine. How can such exception occur to begin with, when we are checking TargetTypes to match? Even without that, for an Elevation or Offset TargetType, a FeatureLine must be a valid ObjectId.
    Your help is gratefully appreciated!

  2. Med,
    Sorry about the problems you’re having…
    About this specific case, the target ID can be set via UI? The API has the same restrictions as the UI.
    As this question is not related to the post, the best route to get support is via forums.
    Regards,
    Augusto

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading