Core: Part::PartFeature should be Part::Feature

This commit is contained in:
Florian Foinant-Willig
2025-04-06 21:40:58 +02:00
committed by Chris Hennes
parent 914e756cf0
commit ef0ca1cff3
9 changed files with 15 additions and 15 deletions

View File

@@ -59,7 +59,7 @@ struct TypeData;
if (anode->is<Mesh::MeshFeature>()) {
// do something..
}
else if (anode->is<Part::PartFeature>()) {
else if (anode->is<Part::Feature>()) {
// do something..
}
else {

View File

@@ -830,7 +830,7 @@ def makeSpace(objects=None,baseobj=None,name=None):
# We assume that the objects list is not a mixed set. The type of the first
# object will determine the type of the set.
# Input to this function can come into three different formats. First convert it
# to a common format: [ (<Part::PartFeature>, ["Face1", ...]), ... ]
# to a common format: [ (<Part::Feature>, ["Face1", ...]), ... ]
if (hasattr(objects[0], "isDerivedFrom") and
objects[0].isDerivedFrom("Gui::SelectionObject")):
# Selection set: convert to common format
@@ -838,12 +838,12 @@ def makeSpace(objects=None,baseobj=None,name=None):
objects = [(obj.Object, obj.SubElementNames) for obj in objects]
elif (isinstance(objects[0], tuple) or isinstance(objects[0], list)):
# Tuple or list of object with subobjects: pass unmodified
# [ (<Part::PartFeature>, ["Face1", ...]), ... ]
# [ (<Part::Feature>, ["Face1", ...]), ... ]
pass
else:
# Single object: assume anything else passed is a single object with no
# boundaries.
# [ <Part::PartFeature> ]
# [ <Part::Feature> ]
objects = [(objects[0], [])]
if isSingleObject(objects):
@@ -1091,7 +1091,7 @@ def makeWall(baseobj=None,height=None,length=None,width=None,align=None,face=Non
Parameters
----------
baseobj: <Part::PartFeature>, optional
baseobj: <Part::Feature>, optional
The base object with which to build the wall. This can be a sketch, a
draft object, a face, or a solid. It can also be left as None.
height: float, optional

View File

@@ -130,7 +130,7 @@ class Arch_Wall:
----------
point: <class 'Base.Vector'>
The point the user has selected.
obj: <Part::PartFeature>, optional
obj: <Part::Feature>, optional
The object the user's cursor snapped to, if any.
"""

View File

@@ -151,7 +151,7 @@ class TestArchSpace(TestArchBase.TestArchBase):
# space = App.ActiveDocument.Space
else:
# Also tests the alternative way of specifying the boundaries
# [ (<Part::PartFeature>, ["Face1", ...]), ... ]
# [ (<Part::Feature>, ["Face1", ...]), ... ]
space = Arch.makeSpace([(wall, boundaries)])
App.ActiveDocument.recompute() # To calculate space area

View File

@@ -207,7 +207,7 @@ class Facebinder(DraftObject):
def addSubobjects(self, obj, facelinks):
"""adds facelinks to this facebinder"""
# facelinks is an iterable or a selection set:
# [(<Part::PartFeature>, ("3.Face3", "3.Face6"))]
# [(<Part::Feature>, ("3.Face3", "3.Face6"))]
# or:
# Gui.Selection.getSelectionEx("", 0)
sels = obj.Faces

View File

@@ -1734,7 +1734,7 @@ def drawInsert(insert, num=None, clone=False):
Returns
-------
Part::TopoShape ('Compound') or
Part::Part2DObject or Part::PartFeature (`Draft Clone`)
Part::Part2DObject or Part::Feature (`Draft Clone`)
The returned object is normally a copy of the `Part.Compound`
extracted from `blockshapes` or created with `drawBlock()`.

View File

@@ -1509,7 +1509,7 @@ def get_contact_obj_faces(femmesh, femelement_table, femnodes_ele_table, femobj)
contact_obj = femobj["Object"]
if len(contact_obj.References) == 1 and len(contact_obj.References[0][1]) == 2:
# [(<Part::PartFeature>, ('Face7', 'Face3'))]
# [(<Part::Feature>, ('Face7', 'Face3'))]
# refs are merged because they are on the same doc obj
# but only one element face for each contact face (Gui, TaskPael contact)
ref_obj = contact_obj.References[0][0]
@@ -1521,7 +1521,7 @@ def get_contact_obj_faces(femmesh, femelement_table, femnodes_ele_table, femobj)
and len(contact_obj.References[0][1]) == 1
and len(contact_obj.References[1][1]) == 1
):
# [(<Part::PartFeature>, ('Face3',)), (<Part::PartFeature>, ('Face7',))]
# [(<Part::Feature>, ('Face3',)), (<Part::Feature>, ('Face7',))]
# refs are on different objects
# but only one element face for each contact face (Gui, TaskPael contact)
slave_ref = contact_obj.References[0]
@@ -1591,7 +1591,7 @@ def get_tie_obj_faces(femmesh, femelement_table, femnodes_ele_table, femobj):
tie_obj = femobj["Object"]
if len(tie_obj.References) == 1 and len(tie_obj.References[0][1]) == 2:
# [(<Part::PartFeature>, ('Face7', 'Face3'))]
# [(<Part::Feature>, ('Face7', 'Face3'))]
# refs are merged because they are on the same doc obj
# but only one element face for each contact face (Gui, TaskPael tie)
ref_obj = tie_obj.References[0][0]
@@ -1603,7 +1603,7 @@ def get_tie_obj_faces(femmesh, femelement_table, femnodes_ele_table, femobj):
and len(tie_obj.References[0][1]) == 1
and len(tie_obj.References[1][1]) == 1
):
# [(<Part::PartFeature>, ('Face3',)), (<Part::PartFeature>, ('Face7',))]
# [(<Part::Feature>, ('Face3',)), (<Part::Feature>, ('Face7',))]
# refs are on different objects
# but only one element face for each contact face (Gui, TaskPael tie)
slave_ref = tie_obj.References[0]

View File

@@ -36,7 +36,7 @@ using namespace Part;
// returns a string which represent the object e.g. when printed in python
std::string PartFeaturePy::representation() const
{
return {"<Part::PartFeature>"};
return {"<Part::Feature>"};
}
PyObject *PartFeaturePy::getElementHistory(PyObject *args, PyObject *kwds) {

View File

@@ -445,7 +445,7 @@ Base::Vector3d ShapeExtractor::getLocation3dFromFeat(const App::DocumentObject*
return Base::Vector3d(0.0, 0.0, 0.0);
}
// if (isDraftPoint(obj) {
// //Draft Points are not necc. Part::PartFeature??
// //Draft Points are not necc. Part::Feature??
// //if Draft option "use part primitives" is not set are Draft points still PartFeature?
const Part::Feature* pf = dynamic_cast<const Part::Feature*>(obj);