本文整理汇总了C++中HeeksConfig类的典型用法代码示例。如果您正苦于以下问题:C++ HeeksConfig类的具体用法?C++ HeeksConfig怎么用?C++ HeeksConfig使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了HeeksConfig类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PickCreateRevolution
void PickCreateRevolution()
{
if(wxGetApp().m_marked_list->size() == 0)
{
wxGetApp().PickObjects(_("pick sketches, faces or circles"), MARKING_FILTER_CIRCLE | MARKING_FILTER_SKETCH | MARKING_FILTER_FACE);
}
double angle;
{
HeeksConfig config;
config.Read(_T("RevolutionAngle"), &angle, 360.0);
}
if(InputRevolutionAngle(angle, &wxGetApp().m_extrude_to_solid))
{
{
HeeksConfig config;
config.Write(_T("RevolutionAngle"), angle);
}
if(wxGetApp().m_marked_list->size() > 0)
{
CreateExtrusionOrRevolution(wxGetApp().m_marked_list->list(), angle, wxGetApp().m_extrude_to_solid, true, 0.0, true);
}
}
}
示例2: ReadDefaultValues
void CTag::ReadDefaultValues()
{
HeeksConfig config;
config.Read(_T("Width"), &m_width);
config.Read(_T("Angle"), &m_angle);
config.Read(_T("Height"), &m_height);
}
示例3: Run
void Run()
{
wxString message(_("Use negative for smaller and Positive for larger)"));
wxString prompt(_("Enter the distance"));
wxString caption(_("Distance"));
double distance;
HeeksConfig config;
config.Read(_T("CopyParallelDistance"), &distance, 1.0);
if(wxGetApp().InputDouble(wxString(_("Use negative for smaller and Positive for larger)") ), _("Enter the distance"), distance))
{
config.Write(_T("CopyParallelDistance"), distance);
HeeksObj *parallel_sketch = sketch_for_tools->Parallel( double(distance) );
if (parallel_sketch != NULL)
{
wxGetApp().StartHistory();
wxGetApp().AddUndoably(parallel_sketch, NULL, NULL);
wxGetApp().EndHistory();
}
else
{
wxMessageBox(wxString(_("Error making offset")));
}
}
}
示例4: Run
// Tool's virtual functions
void Run(){
double offset_value = 2.0;
HeeksConfig config;
config.Read(_T("OffsetShapeValue"), &offset_value);
if(wxGetApp().InputLength(_("Enter Offset Value, + for making bigger, - for making smaller"), _("Offset value"), offset_value))
{
try
{
TopoDS_Shape new_shape = BRepOffsetAPI_MakeOffsetShape(shape_for_tools->Shape(), offset_value, wxGetApp().m_geom_tol);
#ifdef TESTNEWSHAPE
//This will end up throwing 90% of the exceptions caused by a bad offset
BRepTools::Clean(new_shape);
BRepMesh::Mesh(new_shape, 1.0);
#endif
HeeksObj* new_object = CShape::MakeObject(new_shape, _("Result of 'Offset Shape'"), SOLID_TYPE_UNKNOWN, shape_for_tools->m_color, shape_for_tools->GetOpacity());
shape_for_tools->HEEKSOBJ_OWNER->Add(new_object, NULL);
shape_for_tools->HEEKSOBJ_OWNER->Remove(shape_for_tools);
config.Write(_T("OffsetShapeValue"), offset_value);
}
catch (Standard_Failure) {
Handle_Standard_Failure e = Standard_Failure::Caught();
wxMessageBox(wxString(_("Error making offset")) + _T(": ") + Ctt(e->GetMessageString()));
}
}
}
示例5: WriteDefaultValues
void CTag::WriteDefaultValues()
{
HeeksConfig config;
config.Write(_T("Width"), m_width);
config.Write(_T("Angle"), m_angle);
config.Write(_T("Height"), m_height);
}
示例6: set_initial_values
void COrientationModifierParams::set_initial_values()
{
HeeksConfig config;
config.Read(_T("OrientationModifier_m_spacing"), (int *) &m_spacing, int(eNormalSpacing));
config.Read(_T("OrientationModifier_number_of_rotations"), (int *) &m_number_of_rotations, 0);
config.Read(_T("OrientationModifier_sketch_rotates_text"), &m_sketch_rotates_text, false);
config.Read(_T("OrientationModifier_justification"), (int *) &m_justification, int(eLeftJustified));
}
示例7: Run
void Run(){
double rad = 2.0;
HeeksConfig config;
config.Read(_T("EdgeBlendRadius"), &rad);
if(wxGetApp().InputLength(_("Enter Blend Radius"), _("Radius"), rad))
{
edge_for_tools->Blend(rad,false);
config.Write(_T("EdgeBlendRadius"), rad);
}
}
示例8: CDxfRead
HeeksDxfRead::HeeksDxfRead(const wxChar* filepath, bool undoable) : CDxfRead(Ttc(filepath)), m_undoable(undoable)
{
HeeksConfig config;
config.Read(_T("ImportDxfAsSketches"), &m_make_as_sketch);
config.Read(_T("IgnoreDxfReadErrors"), &m_ignore_errors);
config.Read(_T("DxfReadPoints"), &m_read_points);
config.Read(_T("LayerNameSuffixesToDiscard"), m_layer_name_suffixes_to_discard);
m_current_block = NULL;
extract(gp_Trsf(), m_ucs_matrix);
}
示例9: write_values_to_config
void COrientationModifierParams::write_values_to_config()
{
// We always want to store the parameters in mm and convert them back later on.
HeeksConfig config;
// These values are in mm.
config.Write(_T("OrientationModifier_m_spacing"), m_spacing);
config.Write(_T("OrientationModifier_number_of_rotations"), m_number_of_rotations);
config.Write(_T("OrientationModifier_sketch_rotates_text"), m_sketch_rotates_text);
config.Write(_T("OrientationModifier_justification"), m_justification);
}
示例10: WriteDefaultValues
void CPocket::WriteDefaultValues()
{
CSketchOp::WriteDefaultValues();
HeeksConfig config;
config.Write(_T("StepOver"), m_step_over);
config.Write(_T("CutMode"), (int)(m_cut_mode));
config.Write(_T("MaterialAllowance"), m_material_allowance);
config.Write(_T("FromCenter"), m_starting_place);
config.Write(_T("KeepToolDown"), m_keep_tool_down_if_poss);
config.Write(_T("UseZigZag"), m_use_zig_zag);
config.Write(_T("ZigAngle"), m_zig_angle);
config.Write(_T("ZigUnidirectional"), m_zig_unidirectional);
config.Write(_T("DecentStrategy"), (int)(m_entry_move));
}
示例11: PickCreateExtrusion
void PickCreateExtrusion()
{
if(wxGetApp().m_marked_list->size() == 0)
{
wxGetApp().PickObjects(_("pick sketches, faces or circles"), MARKING_FILTER_CIRCLE | MARKING_FILTER_SKETCH | MARKING_FILTER_FACE);
}
double height;
double taper_angle;
{
HeeksConfig config;
config.Read(_T("ExtrusionHeight"), &height, 10.0);
config.Read(_T("ExtrusionTaperAngle"), &taper_angle, 0.0);
}
if(InputExtrusionHeight(height, &(wxGetApp().m_extrude_to_solid), &taper_angle))
{
{
HeeksConfig config;
config.Write(_T("ExtrusionHeight"), height);
config.Write(_T("ExtrusionTaperAngle"), taper_angle);
config.Write(_T("ExtrudeToSolid"), wxGetApp().m_extrude_to_solid);
}
if(wxGetApp().m_marked_list->size() > 0)
{
wxGetApp().StartHistory();
CreateExtrusionOrRevolution(wxGetApp().m_marked_list->list(),height, wxGetApp().m_extrude_to_solid, false, taper_angle);
wxGetApp().EndHistory();
}
}
}
示例12: ReadDefaultValues
void CPocket::ReadDefaultValues()
{
CSketchOp::ReadDefaultValues();
HeeksConfig config;
config.Read(_T("StepOver"), &m_step_over, 1.0);
int int_mode = m_cut_mode;
config.Read(_T("CutMode"), &int_mode, CPocket::eConventional);
m_cut_mode = (CPocket::eCutMode)int_mode;
config.Read(_T("MaterialAllowance"), &m_material_allowance, 0.2);
config.Read(_T("FromCenter"), &m_starting_place, 1);
config.Read(_T("KeepToolDown"), &m_keep_tool_down_if_poss, true);
config.Read(_T("UseZigZag"), &m_use_zig_zag, false);
config.Read(_T("ZigAngle"), &m_zig_angle);
config.Read(_T("ZigUnidirectional"), &m_zig_unidirectional, false);
int int_for_entry_move = CPocket::ePlunge;
config.Read(_T("DecentStrategy"), &int_for_entry_move);
m_entry_move = (CPocket::eEntryStyle) int_for_entry_move;
}
示例13: WriteToConfig
void HRuler::WriteToConfig(HeeksConfig& config)
{
config.Write(_T("RulerTrsf11"), m_trsf.Value(1, 1));
config.Write(_T("RulerTrsf12"), m_trsf.Value(1, 2));
config.Write(_T("RulerTrsf13"), m_trsf.Value(1, 3));
config.Write(_T("RulerTrsf14"), m_trsf.Value(1, 4));
config.Write(_T("RulerTrsf21"), m_trsf.Value(2, 1));
config.Write(_T("RulerTrsf22"), m_trsf.Value(2, 2));
config.Write(_T("RulerTrsf23"), m_trsf.Value(2, 3));
config.Write(_T("RulerTrsf24"), m_trsf.Value(2, 4));
config.Write(_T("RulerTrsf31"), m_trsf.Value(3, 1));
config.Write(_T("RulerTrsf32"), m_trsf.Value(3, 2));
config.Write(_T("RulerTrsf33"), m_trsf.Value(3, 3));
config.Write(_T("RulerTrsf34"), m_trsf.Value(3, 4));
config.Write(_T("RulerUseViewUnits"), m_use_view_units);
config.Write(_T("RulerUnits"), m_units);
config.Write(_T("RulerWidth"), m_width);
config.Write(_T("RulerLength"), m_length);
config.Write(_T("RulerEmptyLength"), m_empty_length);
}
示例14: ReadFromConfig
void HRuler::ReadFromConfig(HeeksConfig& config)
{
double m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34;
config.Read(_T("RulerTrsf11"), &m11, 1.0);
config.Read(_T("RulerTrsf12"), &m12, 0.0);
config.Read(_T("RulerTrsf13"), &m13, 0.0);
config.Read(_T("RulerTrsf14"), &m14, 0.0);
config.Read(_T("RulerTrsf21"), &m21, 0.0);
config.Read(_T("RulerTrsf22"), &m22, 1.0);
config.Read(_T("RulerTrsf23"), &m23, 0.0);
config.Read(_T("RulerTrsf24"), &m24, 0.0);
config.Read(_T("RulerTrsf31"), &m31, 0.0);
config.Read(_T("RulerTrsf32"), &m32, 0.0);
config.Read(_T("RulerTrsf33"), &m33, 1.0);
config.Read(_T("RulerTrsf34"), &m34, 0.0);
m_trsf.SetValues(m11, m12, m13, m14, m21, m22, m23, m24, m31, m32, m33, m34, 0.0001, 0.00000001);
config.Read(_T("RulerUseViewUnits"), &m_use_view_units);
config.Read(_T("RulerUnits"), &m_units);
config.Read(_T("RulerWidth"), &m_width);
config.Read(_T("RulerLength"), &m_length);
config.Read(_T("RulerEmptyLength"), &m_empty_length);
}
示例15: ReadFromConfig
// static
void CPocket::ReadFromConfig()
{
HeeksConfig config;
config.Read(_T("PocketSplineDeviation"), &max_deviation_for_spline_to_arc, 0.1);
}