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 pathwith, 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_...
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement