Fem: Add electrostatic constraint symbol
This commit is contained in:
committed by
Max Wilfinger
parent
82c7d013fb
commit
b64549b348
@@ -367,6 +367,7 @@ SET(FemGuiIcon_SVG
|
||||
SET(FemGuiSymbol_IV
|
||||
Resources/symbols/ConstraintContact.iv
|
||||
Resources/symbols/ConstraintDisplacement.iv
|
||||
Resources/symbols/ConstraintElectrostaticPotential.iv
|
||||
Resources/symbols/ConstraintFixed.iv
|
||||
Resources/symbols/ConstraintForce.iv
|
||||
Resources/symbols/ConstraintHeatFlux.iv
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
#Inventor V2.1 ascii
|
||||
|
||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
#/***************************************************************************
|
||||
# * Copyright (c) 2024 Mario Passaglia <mpassaglia[at]cbc.uba.ar> *
|
||||
# * *
|
||||
# * This file is part of FreeCAD. *
|
||||
# * *
|
||||
# * FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
# * under the terms of the GNU Lesser General Public License as *
|
||||
# * published by the Free Software Foundation, either version 2.1 of the *
|
||||
# * License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * FreeCAD is distributed in the hope that it will be useful, but *
|
||||
# * WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
# * Lesser General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU Lesser General Public *
|
||||
# * License along with FreeCAD. If not, see *
|
||||
# * <https://www.gnu.org/licenses/>. *
|
||||
# * *
|
||||
# **************************************************************************
|
||||
|
||||
|
||||
Separator {
|
||||
|
||||
Separator {
|
||||
|
||||
Translation {
|
||||
translation 0 1.25 0
|
||||
|
||||
}
|
||||
Cylinder {
|
||||
radius 0.25
|
||||
height 2.5
|
||||
|
||||
}
|
||||
Translation {
|
||||
translation 0 1.3 0
|
||||
|
||||
}
|
||||
Cube {
|
||||
width 2
|
||||
height 0.1
|
||||
depth 0.75
|
||||
|
||||
}
|
||||
Translation {
|
||||
translation 0 0.4 0
|
||||
|
||||
}
|
||||
BaseColor {
|
||||
rgb 0.17 0.46 1.0
|
||||
|
||||
}
|
||||
Cube {
|
||||
width 1.5
|
||||
height 0.1
|
||||
depth 0.75
|
||||
|
||||
}
|
||||
Translation {
|
||||
translation 0 0.3 0
|
||||
|
||||
}
|
||||
Cylinder {
|
||||
radius 0.25
|
||||
height 0.5
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -36,7 +36,17 @@ from . import view_base_femconstraint
|
||||
|
||||
class VPConstraintElectroStaticPotential(view_base_femconstraint.VPBaseFemConstraint):
|
||||
|
||||
def __init__(self, vobj):
|
||||
super().__init__(vobj)
|
||||
mat = vobj.ShapeAppearance[0]
|
||||
mat.DiffuseColor = (1.0, 0.0, 0.2, 0.0)
|
||||
vobj.ShapeAppearance = mat
|
||||
|
||||
def setEdit(self, vobj, mode=0):
|
||||
view_base_femconstraint.VPBaseFemConstraint.setEdit(
|
||||
self, vobj, mode, task_constraint_electrostaticpotential._TaskPanel
|
||||
)
|
||||
|
||||
def attach(self, vobj):
|
||||
super().attach(vobj)
|
||||
vobj.loadSymbol(self.resource_symbol_dir + "ConstraintElectrostaticPotential.iv")
|
||||
|
||||
Reference in New Issue
Block a user