Allplan VisulScript/Python

Syntax

CreateRailSweptBRep3D함수를 이용한 Sweep

홍사훈     0건     357회

본문

 

minor1 = 1000; major1 = 1000

minor2 = 2000; major2 = 2000

apex_z = 5000

angle = AllplanGeo.Angle() 

angle.Deg  = 0

 

arc1 = AllplanGeo.Arc3D (AllplanGeo.Point3D(0, 0, 0),

                           AllplanGeo.Vector3D(100),

                           AllplanGeo.Vector3D(001),

                           minor1, major1, 0., angle.Rad)

 

arc2 = AllplanGeo.Arc3D (AllplanGeo.Point3D(00, apex_z),

                            AllplanGeo.Vector3D(100),

                            AllplanGeo.Vector3D(001),

                            minor2, major2, 0., angle.Rad)

line1 = AllplanGeo.Line3D (arc1.GetStartPoint(), arc2.GetStartPoint())

line2 = AllplanGeo.Line3D (arc1.GetEndPoint(), arc2.GetEndPoint())

 

profiles = [arc1, arc2]

rails = [line1]

if angle.Deg < 360.0:

    rails = [line2]

 

com_prop = AllplanBaseElements.CommonProperties() 

com_prop.GetGlobalProperties()  

com_prop.Color = 19

 

err, brep = AllplanGeo.CreateRailSweptBRep3D(profiles, rails, False, True, False

self.model_ele_list.append(AllplanBasisElements.ModelElement3D(com_prop, brep))

등록된 댓글이 없습니다.



Copyrightⓡ1996~2025, sahoon.com All Rights Reserved.