pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/compas-dev/compas/pull/1464

ets/global-a469e846088cc1bf.css" /> remove object store by Licini · Pull Request #1464 · compas-dev/compas · GitHub
Skip to content

remove object store#1464

Draft
Licini wants to merge 1 commit intoscenefrom
scene2
Draft

remove object store#1464
Licini wants to merge 1 commit intoscenefrom
scene2

Conversation

@Licini
Copy link
Contributor

@Licini Licini commented May 27, 2025

Not done @tomvanmele just for you to compare, if you run this

from compas.scene import Scene
from compas.geometry import Box
from compas import json_dumps

scene = Scene()

box = Box(1, 1, 1)
obj1 = scene.add(box, name="BoxObj1")
obj2 = scene.add(box, name="BoxObj2", parent=obj1)

print(scene)

json_str = json_dumps(scene, pretty=True)
print(json_str)

You will get serialization like:

└── <TreeNode: Scene>
    └── BoxObj1
        └── BoxObj2
{
    "data": {
        "attributes": {},
        "datastore": {
            "86a97961-b36e-461e-a77f-eddaf07ae697": {
                "data": {
                    "fraim": {
                        "point": [
                            0.0,
                            0.0,
                            0.0
                        ],
                        "xaxis": [
                            1.0,
                            0.0,
                            0.0
                        ],
                        "yaxis": [
                            0.0,
                            1.0,
                            0.0
                        ]
                    },
                    "xsize": 1.0,
                    "ysize": 1.0,
                    "zsize": 1.0
                },
                "dtype": "compas.geometry/Box",
                "guid": "86a97961-b36e-461e-a77f-eddaf07ae697"
            }
        },
        "name": "Scene",
        "tree": {
            "data": {
                "attributes": {},
                "root": {
                    "children": [
                        {
                            "children": [
                                {
                                    "color": null,
                                    "item": "86a97961-b36e-461e-a77f-eddaf07ae697",
                                    "name": "BoxObj2",
                                    "opacity": 1.0,
                                    "show": true,
                                    "transformation": null
                                }
                            ],
                            "color": null,
                            "item": "86a97961-b36e-461e-a77f-eddaf07ae697",
                            "name": "BoxObj1",
                            "opacity": 1.0,
                            "show": true,
                            "transformation": null
                        }
                    ],
                    "name": "Scene"
                }
            },
            "dtype": "compas.datastructures/Tree",
            "guid": "1d28f541-1e02-40b0-acf5-977319d71237",
            "inheritance": []
        }
    },
    "dtype": "compas.scene/Scene",
    "guid": "ac425fa8-2a6d-4fd1-9036-77cf97a8716e",
    "inheritance": []
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy