Offset a curve that is not on a planar surface (NX 8)
Offset a curve that is not on a planar surface (NX 8)
(OP)
I am working in NX8. I have a curve that I would like to OFFSET, making it larger in diameter so to speak. I dont see an easy way to do this using the Offset Curve function, can this be done? I have attached my file for reference and would really appreciate some advice on a quick way of doing this, thank you in advance.





RE: Offset a curve that is not on a planar surface (NX 8)
I extruded the spline , then offsetted the face. I first created two lines roughly across the spline, then a third line perpendicular to one of the lines to get a "reasonable" vector for the extrusion.
Regards,
Tomas
RE: Offset a curve that is not on a planar surface (NX 8)
Is it possible to scale the curve ? then for the scale factor use sizes of new diameter/current diameter
RE: Offset a curve that is not on a planar surface (NX 8)
RE: Offset a curve that is not on a planar surface (NX 8)
If one scales the curve one needs to define a scale center, which one might be able to set by human logic but i doubt that a computer might "understand where it should be per default". Plus that it will scale in all directions not only in the "expected plane of curve" ( The scaled curve will also be "higher" .)
My workaround is based upon my assumption of the extrusion vector, then the offset is the face normal.
I attach a picture for Jerry.
Regards,
Tomas
RE: Offset a curve that is not on a planar surface (NX 8)
Under previous versions of NX there was 3 Point Fit and 4 Point Fit under Transform
There must be something eqivalent to that in NX8.
Maybe use the binoculars and enter 3 Point Fit and see what comes up
RE: Offset a curve that is not on a planar surface (NX 8)
Dim offset1 As Double = 0.5
to some other value. Note this journal only works using NX8.
CODE -->
Option Strict Off Imports System Imports NXOpen Imports NXOpen.UF Imports NXOpen.Features Module ZNormalOffset Dim s As Session = Session.GetSession() Dim ufs As UFSession = UFSession.GetUFSession() Dim workPart As Part = s.Parts.Work Sub Main() Dim offset1 As Double = 0.5 Dim spline1 As Spline = Nothing spline1 = select_a_spline("Select a Spline") Dim curveparm As Double = 0.0 Dim delcurveparm As Double = 1.0 / 100.0 Dim pnt1(2) As Double Dim curvetang(2) As Double Dim junk3(2) As Double Dim junk1 As Double = Nothing Dim normal1() As Double = {0.0, 0.0, 1.0} Dim vect1(2) As Double Dim magnitude1 As Double = 0.0001 Dim epnt1(2) As Double Dim coordinates1 As Point3d Dim ArrayOfPoints2(99) As Point For i As Integer = 0 To 99 ufs.Modl.AskCurveProps(spline1.Tag, curveparm, pnt1, curvetang, junk3, junk3, junk1, junk1) ufs.Vec3.Cross(normal1, curvetang, vect1) ufs.Vec3.Unitize(vect1, 0.001, magnitude1, vect1) epnt1(0) = pnt1(0) + offset1 * vect1(0) epnt1(1) = pnt1(1) + offset1 * vect1(1) epnt1(2) = pnt1(2) + offset1 * vect1(2) coordinates1 = New Point3d(epnt1(0), epnt1(1), epnt1(2)) ArrayOfPoints2(i) = workPart.Points.CreatePoint(coordinates1) curveparm += delcurveparm Next Dim splinefeat2 As Feature Dim periodic1 As Boolean = True splinefeat2 = CreateStudioSplineThruPoints(ArrayOfPoints2, periodic1) End Sub Public Function CreateStudioSplineThruPoints(ByRef points() As Point, ByVal periodic1 As Boolean) As Feature Dim markId9 As Session.UndoMarkId markId9 = s.SetUndoMark(Session.MarkVisibility.Visible, "Studio Spline Thru Point") Dim Pcount As Integer = points.Length - 1 Dim nullNXObject As NXObject = Nothing Dim studioSplineBuilderEx1 As Features.StudioSplineBuilderEx studioSplineBuilderEx1 = workPart.Features.CreateStudioSplineBuilderEx(nullNXObject) studioSplineBuilderEx1.Degree = 3 studioSplineBuilderEx1.InputCurveOption = StudioSplineBuilderEx.InputCurveOptions.Delete studioSplineBuilderEx1.Type = Features.StudioSplineBuilderEx.Types.ThroughPoints studioSplineBuilderEx1.IsPeriodic = periodic1 studioSplineBuilderEx1.MatchKnotsType = Features.StudioSplineBuilderEx.MatchKnotsTypes.None studioSplineBuilderEx1.HasPlaneConstraint = False studioSplineBuilderEx1.OrientExpress.AxisOption = GeometricUtilities.OrientXpressBuilder.Axis.Passive studioSplineBuilderEx1.OrientExpress.PlaneOption = GeometricUtilities.OrientXpressBuilder.Plane.Passive Dim knots1(-1) As Double studioSplineBuilderEx1.SetKnots(knots1) Dim parameters1(-1) As Double studioSplineBuilderEx1.SetParameters(parameters1) Dim nullDirection As Direction = Nothing Dim nullScalar As Scalar = Nothing Dim nullOffset As Offset = Nothing Dim geometricConstraintData(Pcount) As Features.GeometricConstraintData For ii As Integer = 0 To Pcount geometricConstraintData(ii) = studioSplineBuilderEx1.ConstraintManager.CreateGeometricConstraintData() geometricConstraintData(ii).Point = points(ii) geometricConstraintData(ii).AutomaticConstraintDirection = Features.GeometricConstraintData.ParameterDirection.Iso geometricConstraintData(ii).AutomaticConstraintType = Features.GeometricConstraintData.AutoConstraintType.None geometricConstraintData(ii).TangentDirection = nullDirection geometricConstraintData(ii).TangentMagnitude = nullScalar geometricConstraintData(ii).Curvature = nullOffset geometricConstraintData(ii).CurvatureDerivative = nullOffset geometricConstraintData(ii).HasSymmetricModelingConstraint = False Next ii studioSplineBuilderEx1.ConstraintManager.SetContents(geometricConstraintData) Dim feature1 As Features.Feature feature1 = studioSplineBuilderEx1.CommitFeature() studioSplineBuilderEx1.Destroy() Return feature1 End Function Function select_a_spline(ByVal prompt As String) As Spline Dim ui As UI = ui.GetUI() Dim curveType() As Selection.SelectionType = _ {Selection.SelectionType.Curves} Dim cursor As Point3d = Nothing Dim selobj As Spline = Nothing Dim resp As Selection.Response = _ ui.SelectionManager.SelectObject("Select a spline", prompt, _ Selection.SelectionScope.AnyInAssembly, False, _ curveType, selobj, cursor) Return selobj End Function Public Function GetUnloadOption(ByVal dummy As String) As Integer GetUnloadOption = NXOpen.Session.LibraryUnloadOption.Immediately End Function End ModuleFrank Swinkels
RE: Offset a curve that is not on a planar surface (NX 8)
1) Use N-sided surface with triangular type to Build a surface of the spline.
2) Enlarge the faces in UV directions with linear mode.
3) Sew the enlarged faces together.
2) Use the Offset curve in face command with the sewn faces and original spline. Set the offset method to along arc length.
Step 1 to 3, is the kludge bit as the quality of the created surfaces will decide the final offset curves position.
RE: Offset a curve that is not on a planar surface (NX 8)
I created an extrude from the spline. Used offset region to offset the faces of the extrude. Then used Project Curve to project along the face normal.
The result is exactly same as the spline generated from Frank's journal.
Suresh
www.technisites.com.au
RE: Offset a curve that is not on a planar surface (NX 8)
Use N-sided surface with triangular type to Build a surface of the spline
copied the spline, splited the copy in 4 segments , offset in face with the segments
regards
RE: Offset a curve that is not on a planar surface (NX 8)