Greetings,
I have developed a loader using the NWCreate API, but now I'm stuck.
As input I have polygon contours (profiles), which I need to extrude or rotate to make solids in NavisWorks.
Input for translational sweeps: Sweep length, sweep direction(vector), coefficients of sweep plane, polygon contour
Output: Polygon contour is extruded in space to form a solid.
Input for rotational sweeps: Sweep axis, sweep rotation angle, coefficients of sweep plane, polygon contour
Output: Polygon contour is rotated in space to form a solid
How can I accomplish this using the NWCreate API?
Hi,
some comments from our engineer team:
two options.
Hope this helps.
I saw elsewhere in the Autodesk forums (http://forums.autodesk.com/t5/Navisworks-General-Discussion/nwcreate-and-BRep-objects/td-p/2706251) that the B-Rep modeling functionality is not available with the stand-alone version of NWCreate. This post if from 2009, though. Is this still the case?
I am attempting to extrude a b-spline over a specific distance to create the side of a component. I have successfully created the b-spline, but when I attempt to extrude it with the following, I cannot set the extrusion distance - Navisworks defaults to 20 meters. What am I missing?
LcNwcExtrudedSurface Surface(curve, new LtVector{ 0,0,1 }); //20 meters - can't fight
LcNwcFace face(Surface, LI_NWC_SENSE_NEGATIVE);
LcNwcShell shell;
shell.AddFace(face);
Nwstream.BRepShell(shell)
Xiaodong -
A sample project is attached. The b-spline projection starts on line 60 of BSplineLoader.cpp. Thank you for your help.
Gordon
Hi Gordon,
I failed to build your project, but I also consulted with our engineer in the mean time. He shared a quick comment:
The problem here is that they are creating just a surface. In this case, an “extruded surface” is a semi-infinite surface that needs to be bounded before it can be correctly rendered.
It sounds like what they want to do is use the Prism function instead, LiNwcBRepCreatePrism, which takes an entity (either a loop or a face), and extrudes it in a given direction for a specified distance.
I think maybe these comments can help you already.
I will also find time to make your project working at my side. I believe I simply missed something.
Xiaodong -
That makes sense. I am able to create a B-Spline Curve (LcNwcBSplineCurve). Can you briefly explain how I can get from a Curve to a Loop or a Face? I can't figure it out from the documentation and I don't see any examples in the API that demonstrate this.
Thank you.
Gordon
Can't find what you're looking for? Ask the community or share your knowledge.