Generic Concrete Cross Section Idea Statica

I would like to create a generic RCS in Idea statica. The docs show a cross section component which corresponds with the UI in Idea:

However my questions is how to activate it:
Is assume by using the

GENERAL_CONCRETE: viktor.external.idea_rcs.objects.CrossSectionType = 52

within create_cross_section_parameter or using the CrossSectionComponent by using
create_cross_section_component. The latter only allows name as input though.

Anyway I would like to create a CrossSection with name: str, outline: list[tuple[float, float]] and material : MatConcreteEc2.
How can I achieve this using the SDK?

Hi Johan,

Correclt me if am wrong, I think RCS means “Rectangular Cross Section” ? Here is an slightly modified version of the idea example here creating a beam with a rectangular cross section with any height and width (Tuple[float, float]) and material.

from viktor.external.idea_rcs import Model, ConcreteMaterial, RectSection

model = Model()  # Initialize the model.

# Create the desired material(s).
cs_mat =  model.create_matconcrete_ec2(ConcreteMaterial.C12_15)

# Create a beam (or other type of member) to be checked.
cross_section = RectSection(0.5, 1.0)
beam = model.create_beam(cross_section, cs_mat)

Hi Paulien,

RCS = ReinforcedCrossSection. IdeaRCS.

But I had not seen the SectionPrototype1D. SinceI use the OpenModel though, instead of the Model.

# Initialize the model.
model = OpenModel()  # empty model, or optionally pass ProjectData and/or CodeSettings

# Create the concrete section.
mat = model.create_matconcrete_ec2(ConcreteMaterial.C12_15)
cs = model.create_cross_section_parameter(name='cs', cross_section_type=CrossSectionType.RECT, material=mat,
                                          Width=2.0, Height=2.0)

# Create the reinforced cross section.
rcs = model.create_reinforced_cross_section(name='rcs', cross_section=cs)

In the example from the documention above I would like to insert a GeneralShape (custum shape) based on a material + vertices to create a cross section. However the CrossSectionType.GeneralShape doesn’t exist or anything similar. I wonder if i missed something.

using the Model could be an option, but OpenModel solved a lot of other problems before, so I prefer to stick with the OpenModel
Thanks for the reply!

I misinterpreted the docs. You should first initiate the cross sections, then call the method to a an x number of components. It works fine now. Thanks for the feedback.

 cross_section = self.create_cross_section_component(_name)
        cross_section.create_component(
                              outline=[(p.x * MM_TO_M, p.y * MM_TO_M) for p in reinforced_cross_section.shape.vertices(8)],
                              material=idea_material,
                              )
        self.css[_name] = cross_section
        return cross_section
1 Like

No problem, thanks taking the time and posting the solution for others!