Article | 60000567 |
Type | Bug |
Product | Engine |
Version | 6012 |
Date Added | 7/2/2008 |
Fixed | Yes [7/9/2008] |
Submitted by | Massimo Schinardi |
Keywords |
Offset problem with specific polylines.
Added in 6013 new Method CmdOffsetEx.
When the polyline contains bulge arcs it is possible in the result object to contain segments that intersect to each other.
The algorithm used for polylines without arcs is better and improved more to succeed in more complex polylines.
For this reason a new method in CommandAction cmdOffsetEx was exported.
You can use this method to offset polylines containing arcs and get as a result polyline with only line segments.
Creates a new object at a specified distance from an existing object. The difference between Offset and OffsetEx is that in polylines with bulges the created entity will not preserve these bulges but a new polyline will be created with line segments.
"entity">The vdFigure object that will be the base of the offset command or "USER",null so the user picks this entity to the screen.
"dist">The distance(double) or "USER",null so the user picks this distance to the screen.
"side">A (gPoint) point representing the side where the new object will be created or "USER",null so the user picks this point to the screen.
"CurveResolution">Curve resolution used to break the arc segments into small lines .Valid values (1-20000).
"Equality">Equality to be used to compare points and lengths during geometry calculation of the offset.
returns>True if the command was succesfull.
public bool CmdOffsetEx(object entity, object dist, object side, int CurveResolution, double Equality)
Example of calling previous method inside a vdFrameControl:
CmdOffsetEx(null,//let the user select the entity to offset
null,//let the user select the distance to oofset
null, //let the user select the side to offset
500, //Curve resolution used to break the arc segments into small lines .Valid values (1-20000).
Globals.VD_ZERO4//Equality to be used to compare points and lengths during geometry calculation of the offset.);