Don't create extra copies of entities in Revolve and Helix groups.
Might break some older files with those groups that depend on these extra entities. Fixes #549.
This commit is contained in:
parent
e51fdf6fba
commit
b55dac7620
@ -566,8 +566,6 @@ void Group::Generate(IdList<Entity,hEntity> *entity,
|
|||||||
AddParam(param, h.param(5), axis_dir.y);
|
AddParam(param, h.param(5), axis_dir.y);
|
||||||
AddParam(param, h.param(6), axis_dir.z);
|
AddParam(param, h.param(6), axis_dir.z);
|
||||||
|
|
||||||
int ai = 1;
|
|
||||||
|
|
||||||
// Not using range-for here because we're changing the size of entity in the loop.
|
// Not using range-for here because we're changing the size of entity in the loop.
|
||||||
for(i = 0; i < entity->n; i++) {
|
for(i = 0; i < entity->n; i++) {
|
||||||
Entity *e = &(entity->Get(i));
|
Entity *e = &(entity->Get(i));
|
||||||
@ -576,10 +574,7 @@ void Group::Generate(IdList<Entity,hEntity> *entity,
|
|||||||
|
|
||||||
e->CalculateNumerical(/*forExport=*/false);
|
e->CalculateNumerical(/*forExport=*/false);
|
||||||
hEntity he = e->h;
|
hEntity he = e->h;
|
||||||
|
// one copy for each end of the revolved surface
|
||||||
CopyEntity(entity, SK.GetEntity(predef.origin), 0, ai, NO_PARAM, NO_PARAM,
|
|
||||||
NO_PARAM, NO_PARAM, NO_PARAM, NO_PARAM, NO_PARAM, NO_PARAM, CopyAs::NUMERIC);
|
|
||||||
|
|
||||||
for(a = 0; a < 2; a++) {
|
for(a = 0; a < 2; a++) {
|
||||||
//! @todo is this check redundant?
|
//! @todo is this check redundant?
|
||||||
Entity *e = &(entity->Get(i));
|
Entity *e = &(entity->Get(i));
|
||||||
@ -596,7 +591,6 @@ void Group::Generate(IdList<Entity,hEntity> *entity,
|
|||||||
// entity is not chiral, and dragging a revolve may break the arc by inverting it.
|
// entity is not chiral, and dragging a revolve may break the arc by inverting it.
|
||||||
// MakeLatheCircles(entity, param, he, axis_pos, axis_dir, ai);
|
// MakeLatheCircles(entity, param, he, axis_pos, axis_dir, ai);
|
||||||
MakeLatheSurfacesSelectable(entity, he, axis_dir);
|
MakeLatheSurfacesSelectable(entity, he, axis_dir);
|
||||||
ai++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@ -618,8 +612,6 @@ void Group::Generate(IdList<Entity,hEntity> *entity,
|
|||||||
// distance to translate along the rotation axis
|
// distance to translate along the rotation axis
|
||||||
AddParam(param, h.param(7), 20);
|
AddParam(param, h.param(7), 20);
|
||||||
|
|
||||||
int ai = 1;
|
|
||||||
|
|
||||||
// Not using range-for here because we're changing the size of entity in the loop.
|
// Not using range-for here because we're changing the size of entity in the loop.
|
||||||
for(i = 0; i < entity->n; i++) {
|
for(i = 0; i < entity->n; i++) {
|
||||||
Entity *e = &(entity->Get(i));
|
Entity *e = &(entity->Get(i));
|
||||||
@ -628,9 +620,7 @@ void Group::Generate(IdList<Entity,hEntity> *entity,
|
|||||||
|
|
||||||
e->CalculateNumerical(/*forExport=*/false);
|
e->CalculateNumerical(/*forExport=*/false);
|
||||||
|
|
||||||
CopyEntity(entity, SK.GetEntity(predef.origin), 0, ai, NO_PARAM, NO_PARAM,
|
// one copy for each end of the helix
|
||||||
NO_PARAM, NO_PARAM, NO_PARAM, NO_PARAM, NO_PARAM, NO_PARAM, CopyAs::NUMERIC);
|
|
||||||
|
|
||||||
for(a = 0; a < 2; a++) {
|
for(a = 0; a < 2; a++) {
|
||||||
Entity *e = &(entity->Get(i));
|
Entity *e = &(entity->Get(i));
|
||||||
e->CalculateNumerical(false);
|
e->CalculateNumerical(false);
|
||||||
@ -658,7 +648,6 @@ void Group::Generate(IdList<Entity,hEntity> *entity,
|
|||||||
entity->Add(&en);
|
entity->Add(&en);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ai++;
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user