View Issue Details

IDProjectCategoryView StatusLast Update
0000700FreeCADBugpublic2012-05-27 19:21
Reporterjrheinlaender Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
Product Version0.12 
Fixed in Version0.13 
Summary0000700: Part->Feature->Mirroring needs boolean operation
DescriptionHi,

IMHO after creating a Mirroring Feature, some kind of boolean operation is required to fuse the result (e.g. a union when mirroring a pad, and the "common material" of both shapes when mirroring a pocket).

For example, inserting the following code in FeatureMirroring.cpp seems to give OK results for mirroring pads:

        BRepBuilderAPI_Transform mkTrf(shape, mat);
// ----- inserted

        BRepAlgoAPI_Fuse mkFuse(mkTrf, shape);
        if (!mkFuse.IsDone())
            return new App::DocumentObjectExecReturn("Fusion with mirrored shape failed");
        // TODO: This is copied from Feature.cpp from here ----
        if (mkFuse.Shape().IsNull())
            Standard_Failure::Raise("Shape is null");
        TopoDS_Shape solRes;
        TopExp_Explorer xp;
        xp.Init(mkFuse.Shape(),TopAbs_SOLID);
        for (;xp.More(); xp.Next()) {
            solRes = xp.Current();
        }
        // to here ----
        if (solRes.IsNull())
            return new App::DocumentObjectExecReturn("Resulting shape is not a solid");
        this->Shape.setValue(solRes);

        //this->Shape.setValue(mkTrf.Shape());
// ------- end inserted
        return App::DocumentObject::StdReturn;

I am willing to work on fixing this if someone confirms that it is the right way to go.

Jan

BTW, product version 0.13 is missing from this Tracker, so I used 0.12 instead
TagsNo tags attached.
FreeCAD Information

Activities

jrheinlaender

2012-05-25 12:37

developer   ~0002083

The issue has been resolved, the bug was in my head rather than in the code - I hade a different idea of what the mirroring tool was supposed to do.

See http://forum.freecadweb.org/viewtopic.php?f=10&t=2613&sid=88b5f73c52d7f2f47bec0c86b6148605

wmayer

2012-05-27 19:21

administrator   ~0002091

I'll close it...

Issue History

Date Modified Username Field Change
2012-05-10 08:02 jrheinlaender New Issue
2012-05-25 12:37 jrheinlaender Note Added: 0002083
2012-05-27 19:21 wmayer Note Added: 0002091
2012-05-27 19:21 wmayer Status new => closed
2012-05-27 19:21 wmayer Resolution open => no change required
2012-05-27 19:21 wmayer Fixed in Version => 0.13