mirror of
https://github.com/eliasstepanik/OSCADSharpDotnet7.git
synced 2026-01-23 19:28:27 +00:00
+ Added internal Parent reference / made assignments to it when operations occur
This commit is contained in:
parent
a4613ea79d
commit
8506459939
@ -262,6 +262,11 @@ namespace OSCADSharp
|
|||||||
return this.ToString() == other.ToString();
|
return this.ToString() == other.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The parent of this object in its OSCADObject tree
|
||||||
|
/// </summary>
|
||||||
|
internal OSCADObject Parent { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Internal collection of children for this object
|
/// Internal collection of children for this object
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -20,6 +20,10 @@ namespace OSCADSharp.Scripting
|
|||||||
{
|
{
|
||||||
this.outerStatement = outerStatement;
|
this.outerStatement = outerStatement;
|
||||||
this.children = children.ToList();
|
this.children = children.ToList();
|
||||||
|
foreach (var child in children)
|
||||||
|
{
|
||||||
|
child.Parent = this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
|
|||||||
@ -33,6 +33,7 @@ namespace OSCADSharp.Transforms
|
|||||||
this.Opacity = opacity;
|
this.Opacity = opacity;
|
||||||
|
|
||||||
this.children.Add(obj);
|
this.children.Add(obj);
|
||||||
|
obj.Parent = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
|
|||||||
@ -35,6 +35,7 @@ namespace OSCADSharp.Transforms
|
|||||||
this.Height = height;
|
this.Height = height;
|
||||||
|
|
||||||
this.children.Add(obj);
|
this.children.Add(obj);
|
||||||
|
obj.Parent = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override OSCADObject Clone()
|
public override OSCADObject Clone()
|
||||||
|
|||||||
@ -32,6 +32,7 @@ namespace OSCADSharp.Transforms
|
|||||||
this.Normal = normal;
|
this.Normal = normal;
|
||||||
|
|
||||||
this.children.Add(obj);
|
this.children.Add(obj);
|
||||||
|
obj.Parent = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
|
|||||||
@ -30,6 +30,7 @@ namespace OSCADSharp.Transforms
|
|||||||
this.Size = size;
|
this.Size = size;
|
||||||
|
|
||||||
this.children.Add(obj);
|
this.children.Add(obj);
|
||||||
|
obj.Parent = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
|
|||||||
@ -30,6 +30,7 @@ namespace OSCADSharp.Transforms
|
|||||||
this.Angle = angle;
|
this.Angle = angle;
|
||||||
|
|
||||||
this.children.Add(obj);
|
this.children.Add(obj);
|
||||||
|
obj.Parent = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
|
|||||||
@ -30,6 +30,7 @@ namespace OSCADSharp.Transforms
|
|||||||
this.ScaleFactor = scale;
|
this.ScaleFactor = scale;
|
||||||
|
|
||||||
this.children.Add(obj);
|
this.children.Add(obj);
|
||||||
|
obj.Parent = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
|
|||||||
@ -27,6 +27,7 @@ namespace OSCADSharp.Transforms
|
|||||||
this.Vector = vector;
|
this.Vector = vector;
|
||||||
|
|
||||||
this.children.Add(obj);
|
this.children.Add(obj);
|
||||||
|
obj.Parent = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user