BIM: add parameter for BIM_Sketch view props (#25778)
* Add BIM parameters to param_dict Add BIM parameters to param_dict for future use. * BIM: add parameter for BIMSketch view props
This commit is contained in:
@@ -56,16 +56,16 @@ class BIM_Sketch:
|
||||
sk.Placement = wp.get_placement()
|
||||
sk.MapMode = "Deactivated"
|
||||
|
||||
sk.ViewObject.LineWidth = params.get_param_view("DefaultShapeLineWidth")
|
||||
sk.ViewObject.PointSize = params.get_param_view("DefaultShapePointSize")
|
||||
sk.ViewObject.AutoColor = False
|
||||
sk.ViewObject.LineColor = params.get_param_view("DefaultShapeLineColor")
|
||||
sk.ViewObject.PointColor = params.get_param_view("DefaultShapeVertexColor")
|
||||
sk.ViewObject.ShapeAppearance = [utils.get_view_material()]
|
||||
|
||||
if getattr(FreeCADGui, "Snapper", None) and FreeCADGui.Snapper.grid.Visible:
|
||||
sk.ViewObject.GridSize = Units.Quantity(params.get_param("gridSpacing"))
|
||||
sk.ViewObject.ShowGrid = True
|
||||
if not params.get_param("BIMSketchPlacementOnly", path="Mod/BIM"):
|
||||
sk.ViewObject.LineWidth = params.get_param_view("DefaultShapeLineWidth")
|
||||
sk.ViewObject.PointSize = params.get_param_view("DefaultShapePointSize")
|
||||
sk.ViewObject.AutoColor = False
|
||||
sk.ViewObject.LineColor = params.get_param_view("DefaultShapeLineColor")
|
||||
sk.ViewObject.PointColor = params.get_param_view("DefaultShapeVertexColor")
|
||||
sk.ViewObject.ShapeAppearance = [utils.get_view_material()]
|
||||
if getattr(FreeCADGui, "Snapper", None) and FreeCADGui.Snapper.grid.Visible:
|
||||
sk.ViewObject.GridSize = Units.Quantity(params.get_param("gridSpacing"))
|
||||
sk.ViewObject.ShowGrid = True
|
||||
|
||||
FreeCADGui.ActiveDocument.setEdit(sk.Name)
|
||||
FreeCADGui.activateWorkbench("SketcherWorkbench")
|
||||
|
||||
@@ -622,6 +622,12 @@ def _get_param_dictionary():
|
||||
"WindowWidth": ("float", 1000.0),
|
||||
}
|
||||
|
||||
# BIM parameters that are not in the preferences:
|
||||
# Note: incomplete!
|
||||
param_dict["Mod/BIM"] = {
|
||||
"BIMSketchPlacementOnly": ("bool", False),
|
||||
}
|
||||
|
||||
# For the Mod/Mesh parameters we do not check the preferences:
|
||||
param_dict["Mod/Mesh"] = {
|
||||
"MaxDeviationExport": ("float", 0.1),
|
||||
|
||||
Reference in New Issue
Block a user