make origin work correct with multiple parts
This commit is contained in:
@@ -205,11 +205,11 @@ void Point::onChanged(const App::Property* prop)
|
||||
// Note: We only handle the three base planes here
|
||||
gp_Pnt base(0,0,0);
|
||||
gp_Dir normal;
|
||||
if (strcmp(l->getNameInDocument(), App::Part::BaselineTypes[0]) == 0)
|
||||
if (strcmp(l->LineType.getValue(), App::Part::BaselineTypes[0]) == 0)
|
||||
normal = gp_Dir(1,0,0);
|
||||
else if (strcmp(l->getNameInDocument(), App::Part::BaselineTypes[1]) == 0)
|
||||
else if (strcmp(l->LineType.getValue(), App::Part::BaselineTypes[1]) == 0)
|
||||
normal = gp_Dir(0,1,0);
|
||||
else if (strcmp(l->getNameInDocument(), App::Part::BaselineTypes[2]) == 0)
|
||||
else if (strcmp(l->LineType.getValue(), App::Part::BaselineTypes[2]) == 0)
|
||||
normal = gp_Dir(0,0,1);
|
||||
|
||||
if (s1.IsNull())
|
||||
@@ -222,11 +222,11 @@ void Point::onChanged(const App::Property* prop)
|
||||
// Note: We only handle the three base planes here
|
||||
gp_Pnt base(0,0,0);
|
||||
gp_Dir normal;
|
||||
if (strcmp(p->getNameInDocument(), App::Part::BaseplaneTypes[0]) == 0)
|
||||
if (strcmp(p->PlaneType.getValue(), App::Part::BaseplaneTypes[0]) == 0)
|
||||
normal = gp_Dir(0,0,1);
|
||||
else if (strcmp(p->getNameInDocument(), App::Part::BaseplaneTypes[2]) == 0)
|
||||
else if (strcmp(p->PlaneType.getValue(), App::Part::BaseplaneTypes[2]) == 0)
|
||||
normal = gp_Dir(1,0,0);
|
||||
else if (strcmp(p->getNameInDocument(), App::Part::BaseplaneTypes[1]) == 0)
|
||||
else if (strcmp(p->PlaneType.getValue(), App::Part::BaseplaneTypes[1]) == 0)
|
||||
normal = gp_Dir(0,1,0);
|
||||
|
||||
if (s1.IsNull())
|
||||
|
||||
Reference in New Issue
Block a user