// Autodesk.Civil.DatabaseServices.Network
public unsafe void AddCurvePipe(ObjectId pipeFamilyId, ObjectId pipeSizeId, Curve3d curve, [MarshalAs(UnmanagedType.U1)] bool clockwise, ref ObjectId newPipeId, [MarshalAs(UnmanagedType.U1)] bool applyRules)
{
CircularArc3d circularArc3d = null;
ObjectId objectId = pipeFamilyId;
AcDbObjectId oid;
cpblk(ref oid, &objectId, 8);
ObjectId objectId2 = pipeSizeId;
AcDbObjectId acDbObjectId;
cpblk(ref acDbObjectId, &objectId2, 8);
<Module>.Autodesk.Civil.Checker.CheckArgOid<class AeccDbPartFamilyItem>(oid, "A part family id of Autodesk.Civil.DatabaseServices.Styles.PartFamily is expected.");
<Module>.Autodesk.Civil.Checker.CheckArgOid<class AeccDbPartSizeFilter>(acDbObjectId, "A part size id of Autodesk.Civil.DatabaseServices.Styles.PartSize is expected.");
AeccDbTreeOid aeccDbTreeOid;
cpblk(ref aeccDbTreeOid, ref oid, 8);
AeccDbTreeOid styleRootOid;
AcDbObjectId styleOid;
string message;
try
{
styleRootOid = aeccDbTreeOid;
styleOid = acDbObjectId;
message = "Part size doesn't belong to the part family.";
}
catch
{
<Module>.___CxxCallUnwindDtor(ldftn(AeccDbTreeOid.{dtor}), (void*)(&aeccDbTreeOid));
throw;
}
<Module>.Autodesk.Civil.Checker.CheckArgIsChildOid(styleRootOid, styleOid, message);
DbObjectReader<AeccDbPartFamilyItem,1,0> dbObjectReader<AeccDbPartFamilyItem,1,0>;
<Module>.DbObjectPointer<AeccDbPartFamilyItem,0,1,0>.{ctor}(ref dbObjectReader<AeccDbPartFamilyItem,1,0>, ref oid);
try
{
try
{
circularArc3d = (CircularArc3d)curve;
}
catch (InvalidCastException)
{
throw new ArgumentException("The curve type should be CircularArc3d.");
}
AcDbObjectId ?kNull@AcDbObjectId@@2V1@B = <Module>.?kNull@AcDbObjectId@@2V1@B;
Point3d endPoint = circularArc3d.EndPoint;
Point3d startPoint = circularArc3d.StartPoint;
AecRmCString aecRmCString;
AecRmCString* ptr = <Module>.AeccDbPartFamilyItem.getGuid((0 == *(ref dbObjectReader<AeccDbPartFamilyItem,1,0> + 24)) ? (*(ref dbObjectReader<AeccDbPartFamilyItem,1,0> + 16)) : 0L, (AecRmCString*)(&aecRmCString));
AeccDbGeo* impObj;
AcGePoint3d* ptr2;
AcGePoint3d* ptr3;
double radius;
try
{
impObj = base.GetImpObj();
AcGePoint3d acGePoint3d;
ptr2 = <Module>.Autodesk.Civil.ToAcGePoint3d(&acGePoint3d, startPoint);
AcGePoint3d acGePoint3d2;
ptr3 = <Module>.Autodesk.Civil.ToAcGePoint3d(&acGePoint3d2, endPoint);
radius = circularArc3d.Radius;
}
catch
{
<Module>.___CxxCallUnwindDtor(ldftn(AecRmCString.{dtor}), (void*)(&aecRmCString));
throw;
}
AeccNetworkErrorCode es;
<Module>.AeccDbNetwork.addCurvePipe(impObj, &es, (AecRmCString*)ptr, ref acDbObjectId, ptr2, ptr3, radius, clockwise, ref ?kNull@AcDbObjectId@@2V1@B, applyRules);
<Module>.Autodesk.Civil.Checker.Check(es, "Fail to add curve pipe.");
ObjectId objectId3 = <Module>.ToObjectId(ref ?kNull@AcDbObjectId@@2V1@B);
newPipeId = objectId3;
}
catch
{
<Module>.___CxxCallUnwindDtor(ldftn(DbObjectReader<AeccDbPartFamilyItem,1,0>.{dtor}), (void*)(&dbObjectReader<AeccDbPartFamilyItem,1,0>));
throw;
}
<Module>.DbObjectPointer<AeccDbPartFamilyItem,0,1,0>.{dtor}(ref dbObjectReader<AeccDbPartFamilyItem,1,0>);
try
{
}
catch
{
<Module>.___CxxCallUnwindDtor(ldftn(DbObjectReader<AeccDbPartFamilyItem,1,0>.{dtor}), (void*)(&dbObjectReader<AeccDbPartFamilyItem,1,0>));
throw;
}
}