cancel
Showing results for 
Search instead for 
Did you mean: 

How to break lines?

Pioneer
Pioneer

Hi,

 

I have imported several 2D drawings to FEMAP to get the structural geometry. The resulting geometry consists of approx 14 000 curves of which about half are obsolete for the task. I thought I could simply break curves with a plane and delete the ones that are not needed. This turns out to be difficult when using the break command because FEMAP will show a pop-up window for every curve that is not intersecting with the plane! It is also difficult to select only the curves that intersect with plane as they are of different length,location and direction and the window selction does not catch them if not one end is inside the window.

 

Is there any way to carry out the task without having to clic "ok" thousands of times?

 

Thanks,

Kristoffer 

1 REPLY

Re: How to break lines?

Phenom
Phenom

Hi,

 

Little update from this post:

http://community.plm.automation.siemens.com/t5/Femap-Discussion-Forum/Fast-Way-to-Intersect-Curves-w...

 

NB: - you need to create a surface first, so a plane.

- 2 cases will still "bug" (i.e. you'll get the message you're trying to avoid): if curves are in that plane, and if curves have an endpoint on the plane.

 

Apart from that the message should not appear, so this might help.

AP

 

 

Sub Main
    Dim App As femap.model
    Set App = feFemap()

    Dim p1(2) As Double, p2 As Variant, p3 As Variant
    Dim d1 As Double

    Dim cSet As femap.Set, s As femap.Surface
    Dim p As femap.Point

    Set cSet = App.feSet
    Set s = App.feSurface
    Set p = App.fePoint

    If cSet.Select(FT_CURVE,False,"Select curves") = FE_CANCEL Then End
    If s.SelectID("Select surface") = FE_CANCEL Then End

    While cSet.Next
        If App.feCoordSurfaceIntersect(cSet.CurrentID,s.ID,p1,p2) <> FE_FAIL Then
            'p.xyz = p2
            'p.Put(p.NextEmptyID)

            '02/2016 - check that point lies on curve
            'could also use feMeasureDistanceBetweenGeometry...
            App.feCoordOntoCurve(cSet.CurrentID,p2,p3)
            App.feMeasureDistance(p2,p3,d1)
            If Abs(d1) < 1e-10 Then App.feCurveBreak(cSet.CurrentID,p2) Else GoTo NOINTERSECT
        Else
            NOINTERSECT:
            App.feAppMessage(FCM_ERROR,"Could not find intersection for curve #" & CStr(cSet.CurrentID))
        End If
    Wend
End Sub