HybridShapeDirection (Object)
Represents the hybrid shape direction feature object.
Role: To access the data of the hybrid shape direction feature object. A direction can be specified using:
A line: the direction is tangent to the line
A plane: the direction is normal to the plane
Its components
see
' 5.1- Creates a cylinder, later which will be used for opening creation as a intersecting profile
Set ObjHybridShapeFactory = ObjPart.HybridShapeFactory
Set ObjHybridShapePointCoord = ObjHybridShapeFactory.AddNewPointCoord(90000, 10000, 0)
Set PointRef = ObjPart.CreateReferenceFromObject(ObjHybridShapePointCoord)
Set Manager = CATIA.ActiveEditor.GetService("RfgService")
Set ObjDirection = Manager.GetReferencePlane(ObjPart, 1, "DECK.2")
Set Direction = ObjPart.CreateReferenceFromObject(ObjDirection)
Set ObjHybridShapeDirection = ObjHybridShapeFactory.AddNewDirection(Direction)
Set ObjHybridShapeCylinder = ObjHybridShapeFactory.AddNewCylinder(PointRef, 2000, 32800, 20, ObjHybridShapeDirection)
Set CylinderRef = ObjPart.CreateReferenceFromObject(ObjHybridShapeCylinder)
Eric N. indocti discant et ament meminisse periti
Dim hybridShapeFactory1 As HybridShapeFactory
Set hybridShapeFactory1 = part1.HybridShapeFactory
Dim hybridShapePointOnCurve1 As HybridShapePointOnCurve
Set hybridShapePointOnCurve1 = hybridShapeFactory1.AddNewPointOnCurveWithReferenceFromDistance(reference2, reference1, D * i, False)
Dim hybridShapePlaneNormal1 As HybridShapePlaneNormal
Set hybridShapePlaneNormal1 = hybridShapeFactory1.AddNewPlaneNormal(reference2, hybridShapePointOnCurve1)
'Intersection curve
Dim hybridShapeIntersection1 As HybridShapeIntersection
Set hybridShapeIntersection1 = hybridShapeFactory1.AddNewIntersection(hybridShapePlaneNormal1, surface)
Dim hybridShapeNear1 As HybridShapeNear
Set hybridShapeNear1 = hybridShapeFactory1.AddNewNear(hybridShapeIntersection1, hybridShapePointOnCurve1)
hybridBody1.AppendHybridShape hybridShapeNear1
part1.InWorkObject = hybridShapeNear1
' Making tangent curve on near curve
Dim reference21 As Reference
Set reference21 = part1.CreateReferenceFromObject(hybridShapeNear1)
Dim reference22 As Reference
Set reference22 = part1.CreateReferenceFromObject(hybridShapePointOnCurve1)
Dim reference23 As Reference
Set reference23 = part1.CreateReferenceFromObject(hybridShapePlaneNormal1)
Dim hybridShapeLineTangency1 As HybridShapeLineTangency
Set hybridShapeLineTangency1 = hybridShapeFactory1.AddNewLineTangencyOnSupport(reference21, reference22, reference23, 0#, 10#, False)
Dim hybridShapeLinePtDir1 As HybridShapeLinePtDir
Set hybridShapeLinePtDir1 = hybridShapeFactory1.AddNewLinePtDir(hybridShapePointOnCurve1, direction, 0#, 5#, False)
Dim hybridBody2 As HybridBody
Set hybridBody2 = hybridBodies1.Item("Geometrical Set.1")
Dim parameters1 As Parameters
Set parameters1 = part1.Parameters
Dim angle1 As Angle
Set angle1 = parameters1.CreateDimension("", "ANGLE", 0#)
Dim relations1 As Relations
Set relations1 = part1.Relations
Dim formula1 As Formula
Set formula1 = relations1.CreateFormula("Formula.6", "", angle1, "angle(`Geometrical Set.1\hybridShapeLineTangency1` ,`Geometrical Set.1\hybridBody2` ) ")