π‘ LightUp 7.1 | SketchUp's only real-time renderer that uses object-based rendering
Download Trial
Making components...
-
Hello y'all,
I'm having quite a hard time trying to figure out how to make components
I can retrieve components from the Component Samples folder and that seems to work, but what I really want to do is ask the user what the dimensions are (of a generic house or an image of a tree) and make the 'house' those dimensions.
I think my problem is that I don't know how to define the edges/faces as a component. I don't really know what to replacecomponentdefinition= definition.load path
with, or how to define my 'house' in the DefinitionList, or if this even makes sense.
Any help would be greatly appreciated
Thanks,
laura -
house = model.definitions.add("MyHouse") house.entities.add_face(...) ... model.active_entities.add_instance(house)
-
Alternatively just make a group and add entities to it... then turn it into a component when you are done...
### you'll need to define stuff like entities, pt1/2 etc earlier on - it's skipped here for brevity group=entities.add_group() group.entities.add_line(pt1,pt2) ### add as much as you want... instance=group.to_component definition=instance.definition definition.name="My Definition's Name" instance.name="My Instance's Name" tr=Geom;;Transformation.new(ptxyz) ### ptxyz = new insertion point, as it'll be located at the ORIGIN by default instance.transform!(tr) ###to move or even rotate/scale it as needed ### etc ### to now add further stuff to definition use### definition.entities.add_...
Advertisement