View Issue Details

IDProjectCategoryView StatusLast Update
0003181SketcherFeaturepublic2018-10-06 15:07
ReportergiftAssigned To 
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status newResolutionopen 
Product Version0.17 
Target Version0.19Fixed in Version 
Summary0003181: Allow to toggle the construction of points
DescriptionIs it possible to allow to toggle the construction of points? Sorry, I don’t have a clever development environment. So, I can only share untested code for your inspiration. In the German forum is a discuss about this topic. What do you think about this an idea?


// /src/Mod/Sketcher/App/SketchObject.cpp
// ...
// line 73
include <Base/Parameter.h> // add
// ...
// line 724
int SketchObject::toggleConstruction(int GeoId)
{
    const std::vector< Part::Geometry * > &vals = getInternalGeometry();
    if (GeoId < 0 || GeoId >= int(vals.size()))
        return -1;

    ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Sketcher"); 
//add
    ParameterGrp::handle hSubGrp = hGrp->GetGroup("General"); // add
    bool allowcp = hSubGrp->GetBool("AllowConstructionPoints", false); // add
    if((vals[GeoId]->getTypeId() == Part::GeomPoint::getClassTypeId()) && (!allowcp) ) // 
edit
        return -1;

    std::vector< Part::Geometry * > newVals(vals);

    Part::Geometry *geoNew = newVals[GeoId]->clone();
    geoNew->Construction = !geoNew->Construction;
    newVals[GeoId]=geoNew;

    this->Geometry.setValues(newVals);
    //this->Constraints.acceptGeometry(getCompleteGeometry()); <= This is not necessary for a toggle. 
Reducing redundant solving. Abdullah
    solverNeedsUpdate=true;
    return 0;
}
// ...
TagsSketcher Points toggle

Activities

Kunda1

2017-09-10 10:29

administrator   ~0010099

@gift please link the forum thread to this ticket also it i customary to post your Help>About FreeCAD>Copy to clipboard

wmayer

2017-09-10 10:51

administrator   ~0010100

Forum link: https://forum.freecadweb.org/viewtopic.php?f=13&t=22693#p190378

chrisb

2017-09-10 11:20

developer   ~0010101

Since ickby is currently the main developer of PDN I simply give the link to the german discussion. If someone not capable of german is interested in discussing this issue or working on it I can open a topic in the english forum as well.
Please leave in that case a message in the forum.

industromatic

2017-09-11 16:48

reporter   ~0010106

Does "toggle the construction of points" mean they will be visible for constraining a datum when outside the sketch edit mode?

gift

2017-09-11 17:27

reporter   ~0010107

Exact. That is the idea.

abdullah

2018-10-06 15:07

manager   ~0011946

As of today, the proposed implementation is very problematic, as the "construction" property of points is reused for another function.

However, I do see the merit and I agree we should think how to enable it.

Issue History

Date Modified Username Field Change
2017-09-10 10:02 gift New Issue
2017-09-10 10:02 gift Tag Attached: Sketcher Points toggle
2017-09-10 10:26 Kunda1 Description Updated View Revisions
2017-09-10 10:26 Kunda1 Description Updated View Revisions
2017-09-10 10:29 Kunda1 Note Added: 0010099
2017-09-10 10:51 wmayer Note Added: 0010100
2017-09-10 11:20 chrisb Note Added: 0010101
2017-09-11 16:48 industromatic Note Added: 0010106
2017-09-11 17:27 gift Note Added: 0010107
2018-10-06 15:07 abdullah Note Added: 0011946
2018-10-06 15:07 abdullah Target Version => 0.19