Adding sliders to all primitives
This commit is contained in:
parent
3ac482f5e9
commit
c36d270c92
23 changed files with 205 additions and 56 deletions
|
|
@ -559,8 +559,20 @@ namespace MatterHackers.Plugins.EditorTools
|
|||
|
||||
public static Vector3 GetCenterPosition(IObject3D item, Placement placement)
|
||||
{
|
||||
var aabb = item.GetAxisAlignedBoundingBox(item.Matrix.Inverted);
|
||||
var cornerPosition = aabb.Center;
|
||||
var invertedMatrix = item.Matrix.Inverted;
|
||||
var aabb = item.GetAxisAlignedBoundingBox(invertedMatrix);
|
||||
|
||||
Vector3 cornerPosition;
|
||||
var useOriginXy = true;
|
||||
if (useOriginXy)
|
||||
{
|
||||
cornerPosition = Vector3.Zero;
|
||||
}
|
||||
else
|
||||
{
|
||||
cornerPosition = aabb.Center;
|
||||
}
|
||||
|
||||
switch (placement)
|
||||
{
|
||||
case Placement.Bottom:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue