hominoids / SBC_Model_Framework

A framework for the generation of SBC and micro-controller models
GNU General Public License v3.0
97 stars 20 forks source link

Wanting to add personal SBC to local framework #16

Closed djorr5 closed 3 months ago

djorr5 commented 3 months ago

First of all want to say awesome work on this, it looks amazing and I apologise for the noob question possibly.

I have a locally designed PCB and I was hoping to utilise the SBC Case builder. I have cloned your repo and put in the board outline to play around with it. However I cannot see it when I select it in OpenSCAD. I have copied data from the previous board in sbc_models.cfg file and just modified the loc_z, y, z components, saved the file and opened OpenSCAD>sbc_models_viewer.scad. However it doesn't show up. Have I missed a step to have it show up there?

What I have added to the bottom of the cfg file:

            ["z2mqtt_fence",[
                    "NAME: Zigbee 2 MQTT Electric fence measurment",
            "MANUFACTURER: NA",
                     "SOC: NA",
                    "ARCH: NA",
               "PROCESSOR: NA",
                  "MEMORY: NA",
                     "GPU: NA",
                     "VPU: NA",
                     "NPU: NA",
                     "MCU: NA",
                 "NETWORK: NA",
                "WIRELESS: NA",
                   "VIDEO: NA",
                 "DISPLAY: NA",
                  "CAMERA: NA",
                   "AUDIO: NA",
                 "STORAGE: NA",
                    "PCIe: NA",
                     "USB: NA",
                    "GPIO: NA",
                     "OTG: NA",
                      "IR: NA",
                    "UART: NA",
                 "SENSORS: NA",
                   "POWER: NA",
                  "SOURCE: OEM mechanical drawings",
                    "TODO: none",
                  "STATUS: green, verified"
            ],
            "pcb","rectangle",0,0,0,0,"top",[0,0,0],[109,51,1.6],[4,"#008066",0,0,0,18,4,0],[false,10,2,"default"],
            "pcbhole","round",0,2.97,3.04,0,"top",[0,0,0],[3,0,0],["solid","#fee5a6","rear",5,"left_rear"],[false,10,2,"default"],
            "pcbhole","round",0,97.05,3.04,0,"top",[0,0,0],[3,0,0],["solid","#fee5a6","rear",5,"right_rear"],[false,10,2,"default"],
            "pcbhole","round",0,2.97,69.08,0,"top",[0,0,0],[3,0,0],["solid","#fee5a6","front",5,"left_front"],[false,10,2,"default"],
            "pcbhole","round",0,97.05,69.08,0,"top",[0,0,0],[3,0,0],["solid","#fee5a6","round",5,"right_front"],[false,10,2,"default"]]
djorr5 commented 3 months ago

Actually scrap that. I can just modify one of the existing ones since it is only local for now.

hominoids commented 3 months ago

The name "z2mqtt_fence" has to be added manually to the array on line 30 of sbc_models_viewer.scad, which is a list of all SBC used to populate the pick box. Unfortunately there isn't a way to dynamically fill the user interface in OpenSCAD customizer. After adding it restart the viewer.

djorr5 commented 3 months ago

@hominoids appreciate the quick response and understood. I have 1 more questions. My board has an MCU with a PCB antenna. I added a "pcbsoc" to the layout hoping that it would be recongnised by the case builder but unfortunely it hasn't. Please see image: image Is there something I should use that would automatically add this cutout to the case?

djorr5 commented 3 months ago

I kept reading and figured it out. Based on their being no astrerix for pcb* there is no cut out. All good.

hominoids commented 3 months ago

In SBC Model Framework heatsink entries are used to make vent and fan masks for SOC. For SOC that don't have an OEM heatsink there is a 'stub' entry that can be used. See the Rpi entries for a 'stub' example. These are used by SBC Case Builder or an Accessory entry can be used in SBC Case Builder to do the same thing. Only the top or bottom faces are effected by heatsink masks and your example needs a side wall opening.

This can be handled in SBC Case Builder by creating an entry in sbc_case_builder_accessories.cfg. Create a new entry with a unique name and use a subtractive rectangle for the opening for the bottom side wall of the case, for the case your using above. The effected face could be different for other case styles. In sbc_case_builder.scad add the accessory group name you chose to line 200 to have it available in the pick box under the GUI tab 'Options and Accessories' after restarting SBC Case Builder. The helper script get_customizer_values.scad can also be used to gather all entries in sbc_models.cfg and sbc_case_builder_accessories.cfg in order to help manually update sbc_case_builder.scad. A text editor can be used to modify sbc_case_builder_accessories.cfg while viewing the model in SBC Case Builder. OpenScad will automatically update the model when sbc_case_builder_accessories.cfg is saved.

hominoids commented 3 months ago

One other thing, turn on 'accessory highlight' under the View tab in SBC Case Builder so you can see the subtractive entry while visually placing it in the model. It will aide you to know which way to make adjustments in sbc_case_builder_accessories.cfg.