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!
Post Reply
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

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

Post by microelly2 »

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.
User avatar
wandererfan
Veteran
Posts: 6265
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

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

Post by wandererfan »

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
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

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

Post by microelly2 »

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

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

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

Post by chrisb »

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
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
kkremitzki
Veteran
Posts: 2511
Joined: Thu Mar 03, 2016 9:52 pm
Location: Illinois

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

Post by kkremitzki »

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
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

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

Post by microelly2 »

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.
User avatar
wandererfan
Veteran
Posts: 6265
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

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

Post by wandererfan »

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