Extend FreeCAD WebAssembly runtime support
Some checks failed
FreeCAD master CI / Prepare (push) Has been cancelled
FreeCAD master CI / Pixi (push) Has been cancelled
FreeCAD master CI / Ubuntu (push) Has been cancelled
FreeCAD master CI / Windows (push) Has been cancelled
FreeCAD master CI / Lint (push) Has been cancelled
FreeCAD master CI / WrapUp (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
Some checks failed
FreeCAD master CI / Prepare (push) Has been cancelled
FreeCAD master CI / Pixi (push) Has been cancelled
FreeCAD master CI / Ubuntu (push) Has been cancelled
FreeCAD master CI / Windows (push) Has been cancelled
FreeCAD master CI / Lint (push) Has been cancelled
FreeCAD master CI / WrapUp (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
This commit is contained in:
@@ -22,7 +22,11 @@
|
||||
# * *
|
||||
# ******************************************************************************/
|
||||
|
||||
import FreeCAD, FreeCADGui
|
||||
import FreeCAD
|
||||
if FreeCAD.GuiUp:
|
||||
import FreeCADGui
|
||||
else:
|
||||
FreeCADGui = None
|
||||
import Part, Sketcher
|
||||
|
||||
|
||||
@@ -148,11 +152,13 @@ class ShaftFeature:
|
||||
self.feature.ReferenceAxis = (self.sketch, ["H_Axis"])
|
||||
self.feature.Angle = 360.0
|
||||
self.Doc.recompute()
|
||||
self.Gui.hide("SketchShaft")
|
||||
if self.Gui is not None:
|
||||
self.Gui.getDocument(self.Doc.Name).getObject(self.sketch.Name).hide()
|
||||
else:
|
||||
self.Doc.recompute()
|
||||
# FIXME: Will give a warning in the console if the active window is not the feature
|
||||
self.Gui.SendMsgToActiveView("ViewFit")
|
||||
if self.Gui is not None:
|
||||
self.Gui.SendMsgToActiveView("ViewFit")
|
||||
|
||||
def updateSegment(self, segment, oldLength, length, diameter, innerdiameter):
|
||||
constrRadius = 4 + segment * 6
|
||||
|
||||
Reference in New Issue
Block a user