std::list<EntityWrapperPtr>::const_iterator anIt1 = theEntity1->subEntities().begin();
std::list<EntityWrapperPtr>::const_iterator anIt2 = theEntity2->subEntities().begin();
if ((*anIt2)->group() == theGroupID) // mirrored point is not fixed
- makeMirrorPoints(theEntity1->subEntities().front(),
- theEntity2->subEntities().front(), theMirrorLine);
+ makeMirrorPoints(*anIt1, *anIt2, theMirrorLine);
// Workaround to avoid problems in SolveSpace.
// The symmetry of two arcs will be done using symmetry of three points on these arcs:
const Slvs_Entity& aSubEnt =
std::dynamic_pointer_cast<SolveSpaceSolver_EntityWrapper>(aSub)->entity();
- EntityWrapperPtr aNewEntity(new SolveSpaceSolver_EntityWrapper(theFeature, aSubEnt));
- aNewEntity->setSubEntities(std::list<EntityWrapperPtr>(1, aSub));
- return aNewEntity;
+ return EntityWrapperPtr(new SolveSpaceSolver_EntityWrapper(theFeature, aPoint, aSubEnt));
}
// wrong entity
std::shared_ptr<GeomAPI_Pnt2d> aEndPnt = aBuilder->point(*aSIt++);
std::shared_ptr<GeomAPI_XY> aDelta = aEndPnt->xy()->decreased(aStartPnt->xy());
+ bool isFullValue = theConstraint->isFullValue();
+ int aNbObjects = aSubs.size()-3;
+ if (isFullValue && aNbObjects > 0) {
+ aDelta->setX(aDelta->x()/aNbObjects);
+ aDelta->setY(aDelta->y()/aNbObjects);
+ }
+
std::list<EntityWrapperPtr>::const_iterator aPrevIt = aSIt++;
for (; aSIt != aSubs.end(); ++aPrevIt, ++aSIt)
translate(*aPrevIt, *aSIt, aDelta);