Model.markprojecttomanysurfaces#

Model.markprojecttomanysurfaces(ProjectionType, SourceEntityTypeCollection, TargetEntityTypeCollection, VectorNode1=Entity(), VectorNode2=Entity(), VectorNode3=Entity(), VectorXComp=DBL_MAX, VectorYComp=DBL_MAX, VectorZComp=DBL_MAX)#

Projects entities to multiple surfaces.

Parameters:
  • ProjectionType (int) –

    1 - Project by vector:

    • To project along a vector given its 3 components along x, y and z directions, VectorXComp, VectorYComp, and VectorZComp are used.

    • To project along a vector defined by 2 nodes VectorNode1 and VectorNode2 are used.

    • To project along a vector normal to the plane defined by 3 nodes VectorNode1, VectorNode2 and VectorNode3Id are used.

    2 - Project normal to surfaces

  • SourceEntityTypeCollection (Collection) – The collection containing the entities to project. Valid entites are elements, nodes and points. This is a mandatory option.

  • TargetEntityTypeCollection (Collection) – The collection containing the surface entities to project onto.

  • VectorNode1 (Entity) – The first node entity of the vector. Valid only when ProjectionType=1.

  • VectorNode2 (Entity) – The second node entity of the vector. Valid only when ProjectionType=1.

  • VectorNode3 (Entity) – The third node entity of the vector. Valid only when ProjectionType=1.

  • VectorXComp (double) – The x component of the vector. Valid only when ProjectionType=1.

  • VectorYComp (double) – The y component of the vector. Valid only when ProjectionType=1.

  • VectorZComp (double) – The z component of the vector. Valid only when ProjectionType=1.

Example#

Project nodes with IDs 1575 - 1674 to surfaces with IDs 17 - 19 along the vector ( 5.7 , 0 , 9.5 )#
import hm
import hm.entities as ent

model = hm.Model()

Elements = hm.Collection(model, ent.Element, list(range(123, 169)))
Surfaces = hm.Collection(model, ent.Surface, list(range(7, 20)))
model.markprojecttomanysurfaces(
    ProjectionType=1,
    SourceEntityType=Elements,
    TargetEntityType=Surfaces,
    VectorNode1=1798,
    VectorNode2=1820,
)
Project elements with IDs 123 - 168 to surfaces with IDs 7 - 10 along the vector given by nodes with IDs 1798 and 1820#
import hm
import hm.entities as ent

model = hm.Model()

Nodes = hm.Collection(model, ent.Node, list(range(1575, 1675)))
Surfaces = hm.Collection(model, ent.Surface, list(range(17, 11)))
model.markprojecttomanysurfaces(
    ProjectionType=1,
    SourceEntityTypeCollection=Nodes,
    TargetEntityTypeCollection=Surfaces,
    VectorXComp=5.7,
    VectorYComp=0,
    VectorZComp=9.5,
)
Project points with IDs 136 - 140 to surfaces with IDs 15 and 16 normal to the plane given by nodes with IDs 1200 , 1208 and 1210#
import hm
import hm.entities as ent

model = hm.Model()

Points = hm.Collection(model, ent.Point, list(range(136, 141)))
Surfaces = hm.Collection(model, ent.Surface, [15, 16])
model.markprojecttomanysurfaces(
    ProjectionType=1,
    SourceEntityTypeCollection=Points,
    TargetEntityTypeCollection=Surfaces,
    VectorNode1=1200,
    VectorNode2=1208,
    VectorNode3Id=1210,
)
Project nodes with IDs 136 - 140 normally to surfaces with IDs 15 and 16#
import hm
import hm.entities as ent

model = hm.Model()

Nodes = hm.Collection(model, ent.Node, list(range(136, 141)))
Surfaces = hm.Collection(model, ent.Surface, [15, 16])
model.markprojecttomanysurfaces(
    ProjectionType=2,
    SourceEntityTypeCollection=Nodes,
    TargetEntityTypeCollection=Surfaces,
)