adizanni / ExportToHASS

Sweethome3D Plugin for Home Assistant Export
GNU General Public License v3.0
49 stars 5 forks source link

Feature Request parts ID ? #6

Open Travis-Prall opened 2 years ago

Travis-Prall commented 2 years ago

This works great ,but for using floor3d with complex objects like doors that have like 100 parts. How can one figure out which part of an object correlates to the visual part of the object?

In other words I have a door that looks like this: "Southwest_Door_1": { "object_id": "Southwest_Door_1" }, "Southwest_Door_2": { "object_id": "Southwest_Door_2" }, "Southwest_Door_3": { "object_id": "Southwest_Door_3" }, "Southwest_Door_4": { "object_id": "Southwest_Door_4" }, "Southwest_Door_5": { "object_id": "Southwest_Door_5" }, "Southwest_Door_6": { "object_id": "Southwest_Door_6" }, "Southwest_Door_7": { "object_id": "Southwest_Door_7" }, "Southwest_Door_8": { "object_id": "Southwest_Door_8" }, "Southwest_Door_9": { "object_id": "Southwest_Door_9" }, "Southwest_Door_10": { "object_id": "Southwest_Door_10" }, "Southwest_Door_11": { "object_id": "Southwest_Door_11" }, "Southwest_Door_12": { "object_id": "Southwest_Door_12" }, "Southwest_Door_13": { "object_id": "Southwest_Door_13" }, "Southwest_Door_14": { "object_id": "Southwest_Door_14" }, "Southwest_Door_15": { "object_id": "Southwest_Door_15" }, "Southwest_Door_16": { "object_id": "Southwest_Door_16" }, "Southwest_Door_17": { "object_id": "Southwest_Door_17" }, "Southwest_Door_18": { "object_id": "Southwest_Door_18" }, "Southwest_Door_19": { "object_id": "Southwest_Door_19" }, "Southwest_Door_20": { "object_id": "Southwest_Door_20" }, "Southwest_Door_21": { "object_id": "Southwest_Door_21" }, "Southwest_Door_22": { "object_id": "Southwest_Door_22" }, "Southwest_Door_23": { "object_id": "Southwest_Door_23" }, "Southwest_Door_24": { "object_id": "Southwest_Door_24" }, "Southwest_Door_25": { "object_id": "Southwest_Door_25" }, "Southwest_Door_26": { "object_id": "Southwest_Door_26" }, "Southwest_Door_27": { "object_id": "Southwest_Door_27" },

etc...

How do I know which part is the hinges and which part is the frame and which part is the actual door so i can program movement in floor3d card?

adizanni commented 2 years ago

Hello @Travis-Prall , you have a quite complex door. Once you have imported the model in the card, when you are in edit mode, you can double click the visible parts of the door to retrieve their object ids (they appear in a pop-up). Hinges and frames are usually visible. Once you have determined at least one hinge, you can list all non-moving objects (the frame) and exclude them from the object group representing the moving parts of the door; hinges can also be excluded as they are not moving (only rotating along their axes). I'm not sure I'm clear. It is true that it could be better to keep the name of the parts instead of replacing it with just a number while exporting. I will give it a thought. Do not hesitate to put additional comments here to come together to a solution for your problem.

adizanni commented 2 years ago

I put this as an enhancement and will try to implement in a future release, nowing that it could be disruptive for existing models so I may have to give the option to use the part names or not.