Hi Community,
i want to create a 3d sketch automatically through vba/vb.net. if user select two edges of circular surfaces, it will create a 3d sketch spline(interpolation method)
Hello @gopinathmY575P,
Writing such script can go from really easy to hard depending the case. For instance, first question would be : Are the two circles on the same elevation ? If yes, we can simply create two lines, calculate the point where they cross, connect them and add a simple perpendicular constraint. If not, we have to add a third line to compensate the elevation, and this complexifies the calculus for the connexions. Next on would be the starting situation rotation. Here in the provided example we can see the parts looks perpendicular, and looks like they follow the XYZ corrdinate (meaning we can constraint the line to an existing axis to be parallel). But what if there is a 16.72156454 rotation of the parts on the Z axis ? Then we could not add the constraints as easily since there is no parallel reference (though we could use the part's reference axis if the hole is perpendicular for one of those, but what if not?). Often those sorts of code are designed for "all stars aligned" situations, but in actual reality (from my experience), the situations are often more complex that it seems, thus causing harm since taking such short cuts makes the scrit realy sensitive.
What you are really asking in the end is some sort of piping sofware. Why not use the one provided in Inventor? (Tube & pipes). Developping such code cost time & thus money, then also complexifies the process since there is now code to maintain & learn if you leave the job. Why can't we go for tube & pipe ?
Could you please be more clear in what you are trying to achieve.
Kind regards,
FINET L.
If this post solved your question, please kindly mark it as "Solution"
If this post helped out in any way to solve your question, please drop a "Like"@FINET_Laurent exactly I tried to create replica of pipes and tube, but without adaptive sketch features. I didn't want to use adaptive sketch features for different reasons.
Please answer the questions so we can go forward.
Kind regards,
FINET L.
If this post solved your question, please kindly mark it as "Solution"
If this post helped out in any way to solve your question, please drop a "Like"1) Are the two circles on the same elevation? in some cases, yes and some cases no.
2) if there is a rotation of the parts on the Z axis ? No
Hello @gopinathmY575P,
You can then confirm that the pipes will always be parallel to one of the assembly's reference axes (XYZ) ?
If it is the case, then what would the workflow be ? I can propose :
1. Select the two part's circular edge in the assebmy by using the command manager
2. Creating an empty part file .ipt to host the future 3D sketch
3. In the new part file, create 2 point 3D (fixed) that matches the input circle's center
4. Create the 3D sketch
5. Project the two points geometry
6. Draw the lines + contraint them
I think that would be sufficient to at least get started. What do you think ?
Kind regards,
FINET L.
If this post solved your question, please kindly mark it as "Solution"
If this post helped out in any way to solve your question, please drop a "Like"Can't find what you're looking for? Ask the community or share your knowledge.