×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Journal - CrossHatch Issue

Journal - CrossHatch Issue

Journal - CrossHatch Issue

(OP)
Hello Eng-Tips. I have an problem with the attached journal. This journal build a set of line with crosshatch inside the enclosed area but when the postion of the lines change the crosshatch is build outside the enclosed area. So far I couldn't found the problem, can anyone take a look??.

BestRegards

RE: Journal - CrossHatch Issue

Try changing your "help point" for each cross hatch.
I changed/added the highlighted code in your AddCrossHatch function.

CODE

Dim nullNXObject As NXObject = Nothing  

'Dim helpPoint1 As Point3d = New Point3d(22.9249159645684, 40.0055496572782, 0.0)
Dim helpPoint1 As Point3d
If TypeOf (Lines(0)) Is Arc Then
    Dim t As Arc = Lines(0)
    helpPoint1 = New Point3d(t.CenterPoint.X + t.Radius * Math.Cos(t.StartAngle), t.CenterPoint.Y + t.Radius * Math.Sin(t.StartAngle), t.CenterPoint.Z)  
Else  
    helpPoint1 = New Point3d(22.9249159645684, 40.0055496572782, 0.0)  
End If

section1.AddToSection(rules1, Lines(0), nullNXObject, nullNXObject, helpPoint1, Section.Mode.Create, False) 

www.nxjournaling.com

RE: Journal - CrossHatch Issue

(OP)
Thanks Cowski!!! This solve the issue, but what exactly do these lines?

BestRegards.

RE: Journal - CrossHatch Issue

The "help point" helps to define what area to crosshatch. Using the same help point for each region may not give the desired results, as is evident with your original code. The help point needs to be defined for each region. The code I added changes your help point to be equal to the start point of Lines(0). This way the help point changes with each region of curves that you draw.

Note: the code I added was for testing and is not very robust. It assumes Lines(0) is going to be an arc; but since all your curves are arcs, this is a pretty safe assumption. However, should you use this code "as is" on a region made only of lines or a mixture of curve types, it will probably fail. I'll leave it as an "exercise for the reader" to modify the code if/when it is necessary.

www.nxjournaling.com

RE: Journal - CrossHatch Issue

(OP)
I add four more regions (made only of lines or arcs, not mix) and it works fine for what I need, but adding a line to a region of arcs or viceversa fail as you said, the journal stop with a warning window about "Unhandled exception has occured in a component in your app..." after that it stop exactly where the region change from line, line, line to line, line, arc...

BestRegards, and thanks for your help!!!.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources