Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Tagging faces through feature script
harrison_wang204
Member Posts: 1 ✭
Hi there,
I'm currently working on a project with the following pipeline:
1) Create a 3-D Model using OnShape
2) Export this model as a Parasolid object
3) Convert the Parasolid to a tetrahedral mesh
4) Run a series of simulations on the mesh, contingent on various boundary conditions
My current issue is that the boundary conditions are generated on the face level for my original 3-D Model through an OnShape FeatureScript then enforced on the vertex level for my tetrahedral mesh (i.e. given a table model, generate a boundary condition for the face corresponding to the tabletop, then enforce a boundary condition on all mesh vertices that comprise that tabletop face). Therefore I would like an effective way of mapping vertices of my mesh to faces of my original OnShape model. Currently, my implementation solves this issue by including the bounding-box of each face in the FeatureScript export (of boundary conditions), manually computing the bounding-box of each Parasolid face in my application, then comparing these boxes to find out which boundary conditions correspond to which vertices. This solution doesn't feel particularly efficient or robust.
So the question I have is whether there is a way, through the OnShape API, to 'tag' certain faces with attributes or information that can then be accessed from a newly exported Parasolid object. Thanks a bunch and sorry for the lengthy contextual background!
I'm currently working on a project with the following pipeline:
1) Create a 3-D Model using OnShape
2) Export this model as a Parasolid object
3) Convert the Parasolid to a tetrahedral mesh
4) Run a series of simulations on the mesh, contingent on various boundary conditions
My current issue is that the boundary conditions are generated on the face level for my original 3-D Model through an OnShape FeatureScript then enforced on the vertex level for my tetrahedral mesh (i.e. given a table model, generate a boundary condition for the face corresponding to the tabletop, then enforce a boundary condition on all mesh vertices that comprise that tabletop face). Therefore I would like an effective way of mapping vertices of my mesh to faces of my original OnShape model. Currently, my implementation solves this issue by including the bounding-box of each face in the FeatureScript export (of boundary conditions), manually computing the bounding-box of each Parasolid face in my application, then comparing these boxes to find out which boundary conditions correspond to which vertices. This solution doesn't feel particularly efficient or robust.
So the question I have is whether there is a way, through the OnShape API, to 'tag' certain faces with attributes or information that can then be accessed from a newly exported Parasolid object. Thanks a bunch and sorry for the lengthy contextual background!
Tagged:
0
Best Answer
-
ilya_baran Onshape Employees, Developers, HDM Posts: 1,215Unfortunately, while you can tag faces in FS and parasolid files supports face attributes, currently the tags do not turn into parasolid attributes on export. Please create an improvement request.Ilya Baran \ VP, Architecture and FeatureScript \ Onshape Inc5
Answers