private Visual3D CreateBgcView(SnappedBendedGenCylinder bgc) { return(CreateVisual(bgc, model => { model.Bind(GeometryModel3D.GeometryProperty, () => bgc.BottomCenterResult, () => bgc.Uresult, () => bgc.Vresult, () => bgc.ComponentResults, (bottomCenter, U, V, components) => CreateBGCGeometry(bottomCenter, U, V, components)); })); }
public static void Read(this VectorsReader reader, SnappedBendedGenCylinder bgc) { bgc.BottomCenterResult = reader.ReadPoint3D(); bgc.NPtopResult = reader.ReadVector(); bgc.NPbotResult = reader.ReadVector(); bgc.Uresult = reader.ReadVector3D(); bgc.Vresult = reader.ReadVector3D(); foreach (var i in Enumerable.Range(0, bgc.ComponentResults.Length)) { bgc.ComponentResults[i] = new BendedCylinderComponent(reader.ReadValue(), bgc.ComponentResults[i].Progress, reader.ReadValue(), reader.ReadValue()); } }
public static VariableVectorsWriter Write(this VariableVectorsWriter writer, SnappedBendedGenCylinder bgc) { writer = writer .Write(bgc.BottomCenter) .Write(bgc.NPtop) .Write(bgc.NPbot) .Write(bgc.U) .Write(bgc.V); foreach (var component in bgc.Components) { writer = writer .Write(component.Radius) .Write(component.vS) .Write(component.vT); } return(writer); }
public static VectorsWriter Write(this VectorsWriter writer, SnappedBendedGenCylinder bgc) { writer = writer .Write(bgc.BottomCenterResult) .Write(bgc.NPtopResult) .Write(bgc.NPbotResult) .Write(bgc.Uresult) .Write(bgc.Vresult); foreach (var component in bgc.ComponentResults) { writer = writer .Write(component.Radius) .Write(component.S) .Write(component.T); } return(writer); }