RemoveUnderlying property for primitives was added
This commit is contained in:
@@ -30,9 +30,11 @@ namespace StructureHelperLogics.NdmCalculations.Primitives
|
||||
public double Width { get; set; }
|
||||
public double Height { get; set; }
|
||||
public double Angle { get; set; }
|
||||
|
||||
public bool ClearUnderlying { get; set; }
|
||||
public bool Triangulate { get; set; }
|
||||
public IVisualProperty VisualProperty { get; }
|
||||
|
||||
|
||||
public RectanglePrimitive()
|
||||
{
|
||||
Name = "New Rectangle";
|
||||
@@ -41,6 +43,8 @@ namespace StructureHelperLogics.NdmCalculations.Primitives
|
||||
VisualProperty = new VisualProperty { Opacity = 0.8d};
|
||||
UsersPrestrain = new StrainTuple();
|
||||
AutoPrestrain = new StrainTuple();
|
||||
ClearUnderlying = false;
|
||||
Triangulate = true;
|
||||
}
|
||||
|
||||
public RectanglePrimitive(IHeadMaterial material) : this() { HeadMaterial = material; }
|
||||
@@ -48,6 +52,7 @@ namespace StructureHelperLogics.NdmCalculations.Primitives
|
||||
public object Clone()
|
||||
{
|
||||
var primitive = new RectanglePrimitive();
|
||||
NdmPrimitivesService.CopyNdmProperties(this, primitive);
|
||||
NdmPrimitivesService.CopyDivisionProperties(this, primitive);
|
||||
ShapeService.CopyRectangleProperties(this, primitive);
|
||||
return primitive;
|
||||
@@ -66,5 +71,19 @@ namespace StructureHelperLogics.NdmCalculations.Primitives
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool IsPointInside(IPoint2D point)
|
||||
{
|
||||
var xMax = CenterX + Width / 2;
|
||||
var xMin = CenterX - Width / 2;
|
||||
var yMax = CenterY + Height / 2;
|
||||
var yMin = CenterY - Height / 2;
|
||||
if (point.X > xMax ||
|
||||
point.X < xMin ||
|
||||
point.Y > yMax ||
|
||||
point.Y < yMin)
|
||||
{ return false; }
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user