Skip to content

Commit

Permalink
Sketcher: Migrate old construction points as construction
Browse files Browse the repository at this point in the history
=========================================================

Fix that construction points, which did not have the construction flag before, as construction flag was
reserved for internal alignment points, are migrated as construction points.

Fixes:
https://forum.freecadweb.org/viewtopic.php?f=8&t=53466&start=40#p467176
https://forum.freecadweb.org/viewtopic.php?p=467160#p467160
  • Loading branch information
abdullahtahiriyo committed Jan 14, 2021
1 parent fe1bee4 commit 919196f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Mod/Sketcher/App/SketchObject.cpp
Expand Up @@ -7574,7 +7574,14 @@ void SketchObject::migrateSketch(void)

if(ext->testMigrationType(Part::GeometryMigrationExtension::Construction))
{
GeometryFacade::setConstruction(g, ext->getConstruction());
auto gf = GeometryFacade::getFacade(g); // at this point IA geometry is already migrated

bool oldconstr = ext->getConstruction();

if( g->getTypeId() == Part::GeomPoint::getClassTypeId() && !gf->isInternalAligned())
oldconstr = true;

GeometryFacade::setConstruction(g,oldconstr);
}

g->deleteExtension(Part::GeometryMigrationExtension::getClassTypeId());
Expand Down

0 comments on commit 919196f

Please sign in to comment.