Skip to content

Commit

Permalink
Fem: Add electrostatic constraint symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
marioalexis84 authored and maxwxyz committed Dec 17, 2024
1 parent 82c7d01 commit b64549b
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Mod/Fem/Gui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,17 @@

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")

0 comments on commit b64549b

Please sign in to comment.