CreateDistributeOperator
Create the operator for Distribute. Taking as inputs mandatory objects and the
sourceProduct from where distribute is performed as well as the targetProduct to
where the distribution is performed.
- Signature
-
CreateDistributeOperator(objects: List, sourceProduct: ProductOccurrence, targetProduct: ProductOccurrence): CATDistribute
- Inputs
-
- objects (List): Inputs used for distribute
function, list of features (GeometricFeature) such as wall, door,
windows, etc.
- sourceProduct (ProductOccurrence): Source
product that is used to deduce path of feature. This product must be
above all features present in object list.
- targetProduct (ProductOccurrence): Target
product needed that corresponds to where the structure is
created.
- Returned Value
- DistributeOperator
- Sample
-
Let ListWall1 (List)
Let sourceProduct (ProductOccurrence)
Let targetProduct (ProductOccurrence)
Let Distribute (CATDistribute)
Distribute = CreateDistributeOperator(ListWall1, sourceProduct, targetProduct)
SetSources
Define sources that is used by the operator. Using this method will clear all
previous sources set in the operator.
- Signature
-
SetSources(objects: List, sourceProduct: ProductOccurrence): VoidType
- Inputs
-
- objects (List): Inputs used for distribute
function, list of features (VolumeGeo) such as wall, door, windows,
etc.
- sourceProduct (ProductOccurrence): Source
product that is used to deduce path of feature. This product must be
above all features present in object list.
- Returned Value
- Not applicable.
- Sample
-
Let ListWall1 (List)
Let ListWall2 (List)
Let sourceProduct1 (ProductOccurrence)
Let sourceProduct2 (ProductOccurrence)
Let targetProduct (ProductOccurrence)
Let Distribute (CATDistribute)
Distribute = CreateDistributeOperator(ListWall1, sourceProduct1, targetProduct)
if (Distribute <> NULL)
{
Distribute.AddSources(ListWall2, sourceProduct2)
}
AddSources
Define sources that is used by the operator. Using this method will append the
provided objects to the list of previous sources set in the operator.
- Signature
-
AddSources(objects: List, sourceProduct: ProductOccurrence): VoidType
- Inputs
-
- objects (List): Inputs used for distribute
function, list of features (VolumeGeo) such as wall, door, windows,
etc.
- sourceProduct (ProductOccurrence): Source
product that is used to deduce path of feature. This product must be
above all features present in object list.
- Returned Value
- Not applicable.
- Sample
-
Let ListWall1 (List)
Let ListWall2 (List)
Let sourceProduct1 (ProductOccurrence)
Let sourceProduct2 (ProductOccurrence)
Let targetProduct (ProductOccurrence)
Let Distribute (CATDistribute)
Distribute = CreateDistributeOperator(ListWall1, sourceProduct1, targetProduct)
If (Distribute <> NULL)
{
Distribute.AddSources(ListWall2, sourceProduct2)
}
SetTargetProduct
Defines a new target product or a new target shape located under the provided product
to be used by Distribute operator as root for structure’s creation.
- Signature
-
SetTargetProduct(targetProduct: ProductOccurrence): VoidType
- Inputs
-
- TargetProduct (ProductOccurrence): Target
product that corresponds to where the structure is created.
- TargetShape (ProductOccurrence): Target shape
that corresponds to where the structure is created (optional).
- Returned Value
- Not applicable.
- Sample
-
Let ListWall1 (List)
Let sourceProduct1 (ProductOccurrence)
Let targetProduct1 (ProductOccurrence)
Let targetProduct2 (ProductOccurrence)
Let Distribute (CATDistribute)
Distribute = CreateDistributeOperator(ListWall1, sourceProduct1, targetProduct1)
if (Distribute <> NULL)
{
Distribute.SetTarget(targetProduct2)
}
OR
Let ListWall1 (List)
Let sourceProduct1 (ProductOccurrence)
Let targetProduct1 (ProductOccurrence)
Let targetProduct2 (ProductOccurrence)
Let targetShape (VPMRepInstance)
Let Distribute (CATDistribute)
Distribute = CreateDistributeOperator(ListWall1, sourceProduct1, targetProduct1)
if (Distribute <> NULL)
{
Distribute.SetTarget(targetProduct2, targetShape)
}
SetAssociativityMode
Defining the associativity or not of the distributed elements. Traceability will
always be part of the distribution but the link that enables update is only created
with Associativity.
- Signature
-
SetAssociativityMode(AssociativityMode: AssociativityModeEnum): VoidType
- Inputs
-
AssociativityMode (AssociativityModeEnum): Mode of
associativity needed.
- TraceabilityOnly: No link is created from
distributed feature to source, only simple traceability link
created. No attributes or update performed if source
modified.
- Associativity: In addition of the
traceability link, we add the capability for the distributed
feature be aware of modification of its source. (Attributes
modification on PSet for example) and being able to update
it.
- Returned Value
- Not applicable.
- Sample
-
Let ListWall1 (List)
Let sourceProduct (ProductOccurrence)
Let targetProduct (ProductOccurrence)
Let Distribute (CATDistribute)
Distribute = CreateDistributeOperator(ListWall1, sourceProduct, targetProduct)
if (Distribute <> NULL)
{
Let a_mode (AssociativityModeEnum)
a_mode = 'Associativity'
Distribute->SetAssociativityMode(a_mode)
}
SetSimilarityMode
Define mode of grouping for the sources and enable the creation of the structure
designed inside it.
- Signature
-
SetSimilarityMode (similarityMode: SimilarityModeEnum): VoidType
- Inputs
-
SimilarityMode: Distribution result grouping mode.
- NoGrouping: Flat structure, feature are
created right under rootPrd.
- Type: One level structure, feature are
grouped by their type. If none found Miscellaneous is used.
- Type_Subtype: Two levels structure, same
as Type but including subtype (IFC
attributes) as second group.
- Name: Using similarity algorithm, feature
are grouped depending on their name. Option nameSensitivity can
be used to refine the grouping.
- Type_Name: Same as type
Type, but include the name grouping
at the end. Option nameSensitivity can be used to refine the
grouping.
- Type_SubType_Name: Same as
Type_Subtype, but include the name
grouping at the end. Option nameSensitivity can be used to
refine the grouping.
- Returned Value
- Not applicable.
- Sample
-
Let ListWall1 (List)
Let sourceProduct (ProductOccurrence)
Let targetProduct (ProductOccurrence)
Let Distribute (CATDistribute)
Distribute = CreateDistributeOperator(ListWall1, sourceProduct, targetProduct)
if (Distribute <> NULL)
{
Let s_mode(SimilarityModeEnum)
s_mode = 'Type_Name'
Distribute->SetSimilarityMode(s_mode)
}
SetNameSensitivity
The lower the sensitivity is set (0) means that sources is grouped in less group as
possible. Setting to the max (100), will create as many groups as we have feature
(or at least close to it). This option will only work if SimilarityMode is using
Name. If not, this one is ignored.
- Signature
-
SetNameSensitivity(nameSensitivity: Real): VoidType
- Inputs
-
NameSensitivity (Real, Optional): Sensitivity of
the similarity in name of feature. From 0 (strict / no grouping) to 100
(almost all grouped together).
- Returned Value
- Not applicable.
- Sample
-
Let ListWall1 (List)
Let sourceProduct (ProductOccurrence)
Let targetProduct (ProductOccurrence)
Let Distribute (CATDistribute)
Distribute = CreateDistributeOperator(ListWall1, sourceProduct, targetProduct)
if (Distribute <> NULL)
{
Distribute.SetNameSensitivity(20.0)
}
Run
This method is to be called to perform the action of the distribution. It will
compile and execute using all options set before. Depending on the setup, it will
create or not some product structure, create native feature or driver.
- Signature
-
Run(): VoidType
- Inputs
- Not applicable.
- Returned Value
- Not applicable.
- Sample
-
Let ListWall (List)
Let sourceProduct (ProductOccurrence)
Let targetProduct (ProductOccurrence)
Let Distribute (CATDistribute)
Distribute = CreateDistributeOperator(ListWall, sourceProduct, targetProduct)
if (Distribute <> NULL)
{
Distribute.Run()
}
|