Dear All,
I'm strugling with chamfer between 2 3D lines. The code creates two 3Dlines but it cannot create chamfer between them. Could you inform me what I should change to get what i want:
# pkt. startowy 0
Lokalizacja_X1 = 0
IV_podstawa4_1 = AllplanGeo.Point3D(Lokalizacja_X1, 0, 0)
# pkt. 1
IV_podstawa4_2 = AllplanGeo.Point3D(Lokalizacja_X1, 0, self.H6)
#
# pkt. 2
IV_podstawa4_3 = AllplanGeo.Point3D(
Lokalizacja_X1,
self.B1/2 - self.B21/2,
self.H6 + self.H5
)
#---------------------------------------
Linia3D_1 = AllplanGeo.Line3D(IV_podstawa4_1, IV_podstawa4_2)
Linia3D_2 = AllplanGeo.Line3D(IV_podstawa4_2, IV_podstawa4_3)
input_pnt = AllplanGeo.Point3D(IV_podstawa4_2)
result, intersect_pnt = AllplanGeo.IntersectionCalculus(Linia3D_1, Linia3D_2)
chamfer_width = self.chamfer #(it's defined in _init part)
if not GeometryValidate.intersection(result):
return
plane = AllplanGeo.Plane3D(Linia3D_1.GetStartPoint(),
Linia3D_1.GetEndPoint(),
Linia3D_2.GetEndPoint())
chamfer_line = AllplanGeo.ChamferCalculus.CalculateApplicableChamfers(
Linia3D_1, Linia3D_2, plane, intersect_pnt, chamfer_width)
com_prop = AllplanBaseElements.CommonProperties()
com_prop.GetGlobalProperties()
com_prop.Pen = 1
com_prop.Color = 6
self.model_ele_list.append(AllplanBasisElements.ModelElement3D(com_prop, Linia3D_1))
self.model_ele_list.append(AllplanBasisElements.ModelElement3D(com_prop, Linia3D_2))
self.model_ele_list.append(AllplanBasisElements.ModelElement3D(com_prop, chamfer_line))