Showing results for 
Search instead for 
Did you mean: 

extrude or remove from part


Hi everyone...

I crete a par with code and insert a occurence (other .par) and i want to cut the occurrence, and i don't know from where take the countour (lines) of the face or exist other form to cut the material..... anyone can help me this is my code


I'm trying to remove material from the part1.par

            Dim objProfileSets As SolidEdgePart.ProfileSets = Nothing
            Dim objProfileSet As SolidEdgePart.ProfileSet = Nothing
            Dim objProfiles As SolidEdgePart.Profiles = Nothing
            Dim objProfile As SolidEdgePart.Profile = Nothing
            Dim objRefplanes As SolidEdgePart.RefPlanes = Nothing
            Dim objLines2d As SolidEdgeFrameworkSupport.Lines2d = Nothing
            Dim objLine2d As SolidEdgeFrameworkSupport.Line2d = Nothing
            Dim objRelations2d As SolidEdgeFrameworkSupport.Relations2d = Nothing
            Dim objRelation2d As SolidEdgeFrameworkSupport.Relation2d = Nothing
            Dim objModels As SolidEdgePart.Models = Nothing
            Dim objModel As SolidEdgePart.Model = Nothing
            Dim objModel1 As SolidEdgePart.Model = Nothing
            Dim medht As Double = 0.0, xc As Double = 0.0, yc As Double = 0.0, zc As Double = 0.0
            Dim objDocument As SolidEdgeFramework.SolidEdgeDocument = Nothing
            Dim aProfiles As Array

            objPart = objDocuments.Open(ppath & "\part4.par")
            'objPart = objDocuments.Add("SolidEdge.PartDocument")
            ' Get a reference to the profile sets collection
            objProfileSets = objPart.ProfileSets
            ' Add a new profile set
            objProfileSet = objProfileSets.Add()
            ' Get a reference to the profiles collection
            objProfiles = objProfileSet.Profiles
            ' Get a reference to the ref planes collection
            objRefplanes = objPart.RefPlanes
            ' Add a new profile
            objProfile = objProfiles.Add(objRefplanes.Item(3))
            ' Get a reference to the lines2d collection
            objLines2d = objProfile.Lines2d
            objLine2d = objLines2d.AddBy2Points(-0.03666, -0.03666, 0.03666, -0.03666)
            objLine2d = objLines2d.AddBy2Points(0.03666, -0.03666, 0.03666, 0.03666)
            objLine2d = objLines2d.AddBy2Points(0.03666, 0.03666, -0.03666, 0.03666)
            objLine2d = objLines2d.AddBy2Points(-0.03666, 0.03666, -0.03666, -0.03666)
            ' revisa que todas las puntas estenunidas antes de la extruccion
            objRelations2d = objProfile.Relations2d
            objRelation2d = objRelations2d.AddKeypoint(objLines2d.Item(1), 1, objLines2d.Item(2), 0)
            objRelation2d = objRelations2d.AddKeypoint(objLines2d.Item(2), 1, objLines2d.Item(3), 0)
            objRelation2d = objRelations2d.AddKeypoint(objLines2d.Item(3), 1, objLines2d.Item(4), 0)
            objRelation2d = objRelations2d.AddKeypoint(objLines2d.Item(4), 1, objLines2d.Item(1), 0)
            'cierra todos los profiles
            ' esconde las lineas profiles
            objProfile.Visible = False
            ' Create a new array of profile objects
            aProfiles = Array.CreateInstance(GetType(SolidEdgePart.Profile), 1)
            aProfiles.SetValue(objProfile, 0)
            ' Get a reference to the models collection
            objModels = objPart.Models
            'crea la extrusion de las lineas cerradass
            msg = "Altura de Conn:"
            Title = "Altura de conector.."""
            defvalue = ""
            medht = InputBox(msg, Title, defvalue, 800, 500)
            medht = medht / 39.370078740157481
            objModel = objModels.AddFiniteExtrudedProtrusion(aProfiles.Length, aProfiles, SolidEdgePart.FeaturePropertyConstants.igRight, medht)



Re: extrude or remove from part

Siemens Genius Siemens Genius
Siemens Genius
Not sure I follow. Can you post sample files you have created manually to explain the situation?

Aditya Gurushankar
Manager, Solid Edge Planning

Re: extrude or remove from part


Hi, AdityaG

Thanks for answer me, i already have a part4.par created and i insert a new occurrence whit ExtrudedProtrusion command in the top of the other, but i want a cut the part4.par with the occurence (par).... i send you  a example to show the problem,  subtract the occurrence from the part4.... i hope to you can helpme....




extrude.png  extrude1.png