What is a good classname for objects in 3D viewspace?

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
microelly2
Posts: 4365
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

What is a good classname for objects in 3D viewspace?

Postby microelly2 » Tue Jul 23, 2019 6:12 am

creating nodes for pyflow environment I'm wondering how should I name the objects in 3D viewspace.

There are the concepts shape and geometry illustrated here: https://www.freecadweb.org/wiki/Topolog ... _scripting

Then there is the step to bring the Shape into a Document
example
Part.show(aShape)
or
f = doc.addObject("Part::Feature", "myObject")
f.Shape = aShape

What is/should be the classname for f? Part?, Part Feature?, Feature?, Body?, Figure?

With pyflow I will work with multiple documents, so it will be possible to have different incarnations of the same objects in the documents
(i think about different level of details or different modes shaded, wireframe/grid)

When I call it Part Feature, then there can be other features like Mesh Feature too.
wandererfan
Posts: 2985
Joined: Tue Nov 06, 2012 5:42 pm

Re: What is a good classname for objects in 3D viewspace?

Postby wandererfan » Tue Jul 23, 2019 11:26 am

microelly2 wrote:
Tue Jul 23, 2019 6:12 am
creating nodes for pyflow environment I'm wondering how should I name the objects in 3D viewspace.
"DisplayableObject"? "Object3D"?

Just no more "Partxxxx" please!
User avatar
microelly2
Posts: 4365
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: What is a good classname for objects in 3D viewspace?

Postby microelly2 » Tue Jul 23, 2019 11:32 am

what about view3D? we had in German 3D Ansicht, 3D Darstellung

https://forum.freecadweb.org/viewtopic. ... 14#p322530
chrisb
Posts: 18177
Joined: Tue Mar 17, 2015 9:14 am

Re: What is a good classname for objects in 3D viewspace?

Postby chrisb » Tue Jul 23, 2019 4:18 pm

microelly2 wrote:
Tue Jul 23, 2019 6:12 am
What is/should be the classname for f? Part?, Part Feature?, Feature?, Body?, Figure?
None of Part, Part Feature, Feature, Body due to disambiguities expected.

If I understand it right, these objects are only visualisations, i.e. 3D representations of objects. Then why not name them as such: Representation or Representation3D or Visualisation3D or View3D
User avatar
kkremitzki
Posts: 1709
Joined: Thu Mar 03, 2016 9:52 pm
Location: Texas

Re: What is a good classname for objects in 3D viewspace?

Postby kkremitzki » Tue Jul 23, 2019 5:47 pm

DisplayableObject seems nice and descriptive.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
User avatar
microelly2
Posts: 4365
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: What is a good classname for objects in 3D viewspace?

Postby microelly2 » Tue Jul 23, 2019 6:26 pm

here a short video to get a feeling for those representation nodes.
phpBB [video]

thanks to all for the discussion,
I can rework the naming next days.
wandererfan
Posts: 2985
Joined: Tue Nov 06, 2012 5:42 pm

Re: What is a good classname for objects in 3D viewspace?

Postby wandererfan » Tue Jul 23, 2019 6:41 pm

kkremitzki wrote:
Tue Jul 23, 2019 5:47 pm
DisplayableObject seems nice and descriptive.
+1